All Projects → jbboehr → Php Psr

jbboehr / Php Psr

Licence: other
PHP extension providing the accepted PSR interfaces

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to Php Psr

Php Extensions
PHP C扩展开发
Stars: ✭ 31 (-83.6%)
Mutual labels:  php-extension
Php Ext Collection
PHP collection extensions - PHP Version 7.x
Stars: ✭ 89 (-52.91%)
Mutual labels:  php-extension
V8js
V8 Javascript Engine for PHP — This PHP extension embeds the Google V8 Javascript Engine
Stars: ✭ 1,659 (+777.78%)
Mutual labels:  php-extension
Phptdlib
PHP Extension for tdlib/td written with PHP-CPP
Stars: ✭ 59 (-68.78%)
Mutual labels:  php-extension
Php Rs
A library to build PHP extensions in Rust.
Stars: ✭ 81 (-57.14%)
Mutual labels:  php-extension
Ext Collections
Array manipulation extension for PHP.
Stars: ✭ 94 (-50.26%)
Mutual labels:  php-extension
Xhprof Apm
Xhprof APM
Stars: ✭ 29 (-84.66%)
Mutual labels:  php-extension
Ycdatabase
The lightest php database framework written in c language, built in php extension, for mysql
Stars: ✭ 130 (-31.22%)
Mutual labels:  php-extension
Ant php extension
PHP 扩展, 用于 PHP-FPM、FastCGI、LD_PRELOAD等模式下突破 disabled_functions
Stars: ✭ 85 (-55.03%)
Mutual labels:  php-extension
Php Rdkafka
Production-ready, stable Kafka client for PHP
Stars: ✭ 1,703 (+801.06%)
Mutual labels:  php-extension
Seaslog
An effective,fast,stable log extension for PHP.http://pecl.php.net/package/SeasLog http://php.net/SeasLog
Stars: ✭ 1,136 (+501.06%)
Mutual labels:  php-extension
Gutenberg Parser Rs
An experimental Rust parser for WordPress Gutenberg post format
Stars: ✭ 76 (-59.79%)
Mutual labels:  php-extension
Msphpsql
Microsoft Drivers for PHP for SQL Server
Stars: ✭ 1,570 (+730.69%)
Mutual labels:  php-extension
Php Spx
A simple & straight-to-the-point PHP profiling extension with its built-in web UI
Stars: ✭ 972 (+414.29%)
Mutual labels:  php-extension
Cphalcon
High performance, full-stack PHP framework delivered as a C extension.
Stars: ✭ 10,534 (+5473.54%)
Mutual labels:  php-extension
Graphql Parser Php
A PHP extension wrapping the libgraphqlparser library for parsing GraphQL.
Stars: ✭ 29 (-84.66%)
Mutual labels:  php-extension
Ip2region
Ip2region is a offline IP location library with accuracy rate of 99.9% and 0.0x millseconds searching performance. DB file is ONLY a few megabytes with all IP address stored. binding for Java,PHP,C,Python,Nodejs,Golang,C#,lua. Binary,B-tree,Memory searching algorithm
Stars: ✭ 9,836 (+5104.23%)
Mutual labels:  php-extension
Pht
A new threading extension for PHP
Stars: ✭ 175 (-7.41%)
Mutual labels:  php-extension
Php Zephir Parser
The Zephir Parser delivered as a C extension for the PHP language.
Stars: ✭ 129 (-31.75%)
Mutual labels:  php-extension
Php Akm
Ahocorasick keyword match.
Stars: ✭ 116 (-38.62%)
Mutual labels:  php-extension

php-psr

Appveyor Build Status GitHub Linux Build Status GitHub OSX Build Status GitHub Docker Build Status Coverage Status License

This PHP extension provides the interfaces from the PSR standards as established by the PHP-FIG group. You can use interfaces provided by this extension in another extension easily - see this example.

Interfaces

PSR Reference Tested against
PSR-3 psr/log * monolog
PSR-6 psr/cache psx-cache, laminas-cache
PSR-7 psr/http-message laminas-diactoros
PSR-11 psr/container league/container
PSR-13 psr/link php-fig/link-util
PSR-14 psr/event-dispatcher tukio
PSR-15 psr/http-server-handler equip/dispatch
PSR-15 psr/http-server-middleware middleware/request-handler
PSR-16 psr/simple-cache psx-cache, laminas-cache
PSR-17 psr/http-factory http-interop/http-factory-guzzle
PSR-18 psr/http-client ricardofiorani/guzzle-psr18-adapter

Installation

Linux / macOS

Prerequisite packages are:

  • PHP development headers and tools
  • gcc >= 4.4 | clang >= 3.x | vc >= 11
  • GNU make >= 3.81
  • automake
  • autoconf

You will need the PHP development headers. If PHP was manually installed, these should be available by default. Otherwise, you will need to fetch them from a repository.

git clone https://github.com/jbboehr/php-psr.git
cd php-psr
phpize
./configure
make
make test
sudo make install

If you have specific PHP versions running:

git clone https://github.com/jbboehr/php-psr.git
cd php-psr
/usr/local/bin/phpize
./configure --with-php-config=/usr/local/bin/php-config
make
make test
sudo make install

Add the extension to your php.ini:

echo extension=psr.so | tee -a /path/to/your/php.ini

Finally, restart the web server.

PECL / Windows

You may also be able to install this extension via PECL:

pecl install psr

or by downloading a DLL from PECL or windows.php.net and placing it in the appropriate directory.

Nix / NixOS

nix-env -i -f https://github.com/jbboehr/php-psr/archive/master.tar.gz

with a custom version of PHP:

nix-env -i -f https://github.com/jbboehr/php-psr/archive/master.tar.gz --arg php '(import <nixpkgs> {}).php71'

or, in a .nix file:

(import <nixpkgs> {}).callPackage (import (fetchTarball {
  url = https://github.com/jbboehr/php-psr/archive/v1.0.0.tar.gz;
  sha256 = "12237b392rz224r4d8p6pwnldpl2bfrvpcim5947avjd49sn8ss4";
})) {}

Using with composer

In your project, you can prevent the installation of the unnecessary composer packages provided by this extension by adding the following to your composer.json. You will need to make sure the extension is installed and enabled in your PHP configuration. You may also want to consider leaving them installed to provide stubs to your IDE. This configuration is not suitable for a library published to packagist.

Note: LoggerInterfaceTest and TestLogger from psr/log are not implemented. If you use these classes, you should keep psr/log installed (discussion).

{
    "name": "sample/app",
    "require": {
        "ext-psr": "*"
    },
    "provide": {
        "psr/log": "^1",
        "psr/cache": "^1",
        "psr/http-message": "^1",
        "psr/container": "^1",
        "psr/link": "^1",
        "psr/event-dispatcher": "^1",
        "psr/http-server-handler": "^1",
        "psr/http-server-middleware": "^1",
        "psr/simple-cache": "^1",
        "psr/http-factory": "^1",
        "psr/http-client": "^1"
    },
}

This will use this PHP extension instead of downloading from packagist.

Credits

License

This project is open source software licensed under the Simplified BSD License. See the LICENSE.md file for more information.

PSR Interfaces: Copyright (c) 2012-present PHP Framework Interoperability Group.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].