{"id":15630655,"url":"https://github.com/jbboehr/php-psr","last_synced_at":"2025-04-12T17:39:05.490Z","repository":{"id":31405116,"uuid":"34968386","full_name":"jbboehr/php-psr","owner":"jbboehr","description":"PHP extension providing the accepted PSR interfaces","archived":false,"fork":false,"pushed_at":"2024-10-07T11:59:36.000Z","size":674,"stargazers_count":236,"open_issues_count":4,"forks_count":32,"subscribers_count":19,"default_branch":"master","last_synced_at":"2025-04-03T19:13:29.687Z","etag":null,"topics":["c","deus-vult","php","php-extension","php-extensions","php-fig","php8","psr"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jbboehr.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-05-03T00:33:02.000Z","updated_at":"2025-03-02T02:37:10.000Z","dependencies_parsed_at":"2024-10-23T01:32:35.198Z","dependency_job_id":null,"html_url":"https://github.com/jbboehr/php-psr","commit_stats":{"total_commits":172,"total_committers":12,"mean_commits":"14.333333333333334","dds":0.5755813953488372,"last_synced_commit":"44cebb62d14846686de58022366a8eaf37e47c6a"},"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jbboehr%2Fphp-psr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jbboehr%2Fphp-psr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jbboehr%2Fphp-psr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jbboehr%2Fphp-psr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jbboehr","download_url":"https://codeload.github.com/jbboehr/php-psr/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248606864,"owners_count":21132429,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c","deus-vult","php","php-extension","php-extensions","php-fig","php8","psr"],"created_at":"2024-10-03T10:34:36.797Z","updated_at":"2025-04-12T17:39:05.467Z","avatar_url":"https://github.com/jbboehr.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# php-psr\n\n[![GitHub Build Status](https://github.com/jbboehr/php-psr/workflows/ci/badge.svg)](https://github.com/jbboehr/php-psr/actions?query=workflow%3Aci)\n[![GitHub Windows Build Status](https://github.com/jbboehr/php-psr/workflows/windows/badge.svg)](https://github.com/jbboehr/php-psr/actions?query=workflow%3Awindows)\n[![Appveyor Build Status][:badge-appveyor:]][:build-appveyor:]\n[![Coverage Status][:badge-coveralls:]][:build-coveralls:]\n[![License][:badge-license:]][:ext-license:]\n\nThis PHP extension provides the interfaces from the [PSR][:psr-fig:] standards as established by the [PHP-FIG][:php-fig:] group.\nYou can use interfaces provided by this extension in another extension easily - see this [example][:example:].\n\nAs of v1.2 of the extension, classes are defined in the `PsrExt` namespace and aliased into the `Psr` namespace.\n\n## Interfaces\n\n| PSR | Reference | \n| --- | --- |\n| [PSR-3] | [psr/log] [*](#psrlogunimpl) | \n| [PSR-6] | [psr/cache] | \n| [PSR-7] | [psr/http-message] | \n| [PSR-11] | [psr/container] | \n| [PSR-13] | [psr/link] | \n| [PSR-14] | [psr/event-dispatcher] | \n| [PSR-15] | [psr/http-server-handler] | \n| [PSR-15] | [psr/http-server-middleware] | \n| [PSR-16] | [psr/simple-cache] | \n| [PSR-17] | [psr/http-factory] | \n| [PSR-18] | [psr/http-client] | \n\n## Installation\n\n### Linux / macOS\n\nPrerequisite packages are:\n\n- PHP development headers and tools, `php` \u003e= 7.3\n- `gcc` \u003e= 4.4 | `clang` \u003e= 3.x | `vc` \u003e= 11\n- GNU `make` \u003e= 3.81\n- `automake`\n- `autoconf`\n\nYou 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.\n\n```bash\ngit clone https://github.com/jbboehr/php-psr.git\ncd php-psr\nphpize\n./configure\nmake\nmake test\nsudo make install\n```\n\nIf you have specific PHP versions running:\n\n```bash\ngit clone https://github.com/jbboehr/php-psr.git\ncd php-psr\n/usr/local/bin/phpize\n./configure --with-php-config=/usr/local/bin/php-config\nmake\nmake test\nsudo make install\n```\n\nAdd the extension to your *php.ini*:\n\n```ini\necho extension=psr.so | tee -a /path/to/your/php.ini\n```\n\nFinally, _restart the web server_.\n\n### PECL / Windows\n\nYou may also be able to install this extension via [PECL][:pecl-psr:]:\n\n```bash\npecl install psr\n```\n\nor by downloading a DLL from [PECL][:pecl-psr:] or [windows.php.net][:windows-psr:] and placing it in the appropriate directory.\n\n### Nix / NixOS\n\n```bash\nnix-env -i -f https://github.com/jbboehr/php-psr/archive/master.tar.gz\n```\n\nwith a custom version of PHP:\n\n```bash\nnix-env -i -f https://github.com/jbboehr/php-psr/archive/master.tar.gz --arg php '(import \u003cnixpkgs\u003e {}).php71'\n```\n\nor, in a `.nix` file:\n\n```nix\n(import \u003cnixpkgs\u003e {}).callPackage (import (fetchTarball {\n  url = https://github.com/jbboehr/php-psr/archive/v1.2.0.tar.gz;\n  sha256 = \"1c4jc09d46ac43kkckil8l76is973czwp0g6vhpnv5105l7z3zgi\";\n})) {}\n```\n\n### Using with composer\n\nIn 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.\n\n\u003ca name=\"psrlogunimpl\"\u003eNote:\u003c/a\u003e `LoggerInterfaceTest` and `TestLogger` from `psr/log` are not implemented. If you use these classes, you should keep `psr/log` installed ([discussion](https://github.com/jbboehr/php-psr/issues/57)).\n\n```json\n{\n    \"name\": \"sample/app\",\n    \"require\": {\n        \"ext-psr\": \"*\"\n    },\n    \"provide\": {\n        \"psr/log\": \"1.0.0\",\n        \"psr/cache\": \"1.0.0\",\n        \"psr/http-message\": \"1.0.0\",\n        \"psr/container\": \"1.1.1\",\n        \"psr/link\": \"1.0.0\",\n        \"psr/event-dispatcher\": \"1.0.0\",\n        \"psr/http-server-handler\": \"1.0.0\",\n        \"psr/http-server-middleware\": \"1.0.0\",\n        \"psr/simple-cache\": \"1.0.0\",\n        \"psr/http-factory\": \"1.0.0\",\n        \"psr/http-client\": \"1.0.0\"\n    },\n}\n```\n\nThis will use this PHP extension instead of downloading from packagist.\n\n## Credits\n\n* [@sergeyklay][:github-sergeyklay:] - Appveyor and documentation improvements\n* [@flyinghail][:github-flyinghail:] - PSR-14, PSR-15, PSR-17, and PSR-18 support\n* [@Jan-E][:github-jan-e:] - Original appveyor template\n* [All Contributors](https://github.com/jbboehr/php-psr/graphs/contributors)\n\n## License\n\nThis project is open source software licensed under the Simplified BSD License.\nSee the [LICENSE.md][:ext-license:] file for more information.\n\nPSR Interfaces: Copyright (c) 2012-present [PHP Framework Interoperability Group][:php-fig:].\n\n[:psr-fig:]: https://www.php-fig.org/psr\n[:php-fig:]: https://www.php-fig.org\n[:pecl-psr:]: https://pecl.php.net/package/psr\n[:badge-appveyor:]: https://ci.appveyor.com/api/projects/status/x1ymkqggy1mkl0ux/branch/master?svg=true\n[:badge-coveralls:]: https://coveralls.io/repos/jbboehr/php-psr/badge.svg?branch=master\u0026service=github\n[:badge-license:]: https://img.shields.io/badge/license-BSD-brightgreen.svg\n[:build-appveyor:]: https://ci.appveyor.com/project/jbboehr/php-psr/branch/master\n[:build-coveralls:]: https://coveralls.io/github/jbboehr/php-psr?branch=master\n[:ext-license:]: https://github.com/jbboehr/php-psr/blob/master/LICENSE.md\n[:example:]: https://github.com/jbboehr/php-handlebars/blob/v0.7.1/impl.c#L213-L215\n[:windows-psr:]: http://windows.php.net/downloads/pecl/releases/psr/\n\n[PSR-3]: http://www.php-fig.org/psr/psr-3\n[PSR-6]: https://www.php-fig.org/psr/psr-6\n[PSR-7]: https://www.php-fig.org/psr/psr-7\n[PSR-11]: https://www.php-fig.org/psr/psr-11\n[PSR-13]: https://www.php-fig.org/psr/psr-13\n[PSR-14]: http://www.php-fig.org/psr/psr-14\n[PSR-15]: http://www.php-fig.org/psr/psr-15\n[PSR-16]: https://www.php-fig.org/psr/psr-16\n[PSR-17]: https://www.php-fig.org/psr/psr-17\n[PSR-18]: https://www.php-fig.org/psr/psr-18\n\n[psr/log]: https://github.com/php-fig/log\n[psr/cache]: https://github.com/php-fig/cache\n[psr/http-message]: https://github.com/php-fig/http-message\n[psr/container]: https://github.com/php-fig/container\n[psr/link]: https://github.com/php-fig/link\n[psr/simple-cache]: https://github.com/php-fig/simple-cache\n[psr/http-server-handler]: https://github.com/php-fig/http-server-handler\n[psr/http-server-middleware]: https://github.com/php-fig/http-server-middleware\n[psr/http-factory]: https://github.com/php-fig/http-factory\n[psr/http-client]: https://github.com/php-fig/http-client\n[psr/event-dispatcher]: https://github.com/php-fig/event-dispatcher\n\n[equip/dispatch]: https://github.com/equip/dispatch\n[middlewares/request-handler]: https://github.com/middlewares/request-handler\n[http-interop/http-factory-guzzle]: https://github.com/http-interop/http-factory-guzzle\n[ricardofiorani/guzzle-psr18-adapter]: https://github.com/ricardofiorani/guzzle-psr18-adapter\n[monolog/monolog]: https://github.com/Seldaek/monolog\n[psx/cache]: https://github.com/apioo/psx-cache\n[psx/dependency]: https://github.com/apioo/psx-dependency\n[php-fig/link-util]: https://github.com/php-fig/link-util\n[crell/tukio]: https://github.com/Crell/Tukio.git\n[php-fig/event-dispatcher-util]: https://github.com/php-fig/event-dispatcher-util\n[php-fig/cache-util]: https://github.com/php-fig/cache-util\n[laminas/laminas-diactoros]: https://github.com/laminas/laminas-diactoros\n[php-fig/event-dispatcher-util]: https://github.com/php-fig/event-dispatcher-util\n\n[:github-sergeyklay:]: https://github.com/sergeyklay\n[:github-jan-e:]: https://github.com/Jan-E\n[:github-flyinghail:]: https://github.com/flyinghail\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjbboehr%2Fphp-psr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjbboehr%2Fphp-psr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjbboehr%2Fphp-psr/lists"}