{"id":17171905,"url":"https://github.com/zegnat/php-website-starter","last_synced_at":"2025-06-19T22:09:41.714Z","repository":{"id":50251956,"uuid":"116581243","full_name":"Zegnat/php-website-starter","owner":"Zegnat","description":"My minimum viable setup for starting a PHP project.","archived":false,"fork":false,"pushed_at":"2023-04-24T22:49:05.000Z","size":78,"stargazers_count":3,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"develop","last_synced_at":"2025-06-19T22:08:00.643Z","etag":null,"topics":["middleware","php","psr-15","psr-2","psr-7"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"0bsd","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Zegnat.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2018-01-07T16:32:29.000Z","updated_at":"2020-09-16T22:19:43.000Z","dependencies_parsed_at":"2025-04-13T16:10:59.782Z","dependency_job_id":"2e79b42e-050a-4481-be15-34b6e727d2bc","html_url":"https://github.com/Zegnat/php-website-starter","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/Zegnat/php-website-starter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zegnat%2Fphp-website-starter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zegnat%2Fphp-website-starter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zegnat%2Fphp-website-starter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zegnat%2Fphp-website-starter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Zegnat","download_url":"https://codeload.github.com/Zegnat/php-website-starter/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zegnat%2Fphp-website-starter/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260838663,"owners_count":23070614,"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":["middleware","php","psr-15","psr-2","psr-7"],"created_at":"2024-10-14T23:35:36.448Z","updated_at":"2025-06-19T22:09:36.697Z","avatar_url":"https://github.com/Zegnat.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PHP Website Starter\n\nThe PHP Website Starter is my minimum viable setup for starting a PHP project.\n\nWhat my minimum setup is changes all the time, and this repository will change\nwith it. The idea is that, whenever I start a new website project, I can get a\ncheckout of the current state of this repository without having to think about\nwhere I will start.\n\nThis is heavily inspired by [the Fermi Framework][Fermi] and even uses similar\ndependencies. But I have a slightly different way of wanting to handle my\nconfigurations and base dependencies.\n\n[Fermi]: https://github.com/journeygroup/fermi\n\n## Usage\n\nVia Composer\n\n``` bash\n$ composer create-project zegnat/website-starter\n```\n\n## Current Practices\n\n1. Using [Auryn][] to get actual dependency injections. Never pass around\n   a container.\n2. Using [PSR-7 HTTP message objects][PSR-7] with [PSR-17 factories][PSR-17]\n   for all request and response handling.\n3. Using [nyholm/psr7-server][] to create the initial [PSR-7][] request.\n4. Using [Middleland][] to run through all configured\n   [PSR-15 Middlewares][PSR-15].\n5. Using [FastRoute][] to parse requested URIs and find the matching\n   [PSR-15 RequestHandlers][PSR-15].\n6. Using a [Zend Emitter][] to output a final response to the web server.\n7. Using [PHP CS Fixer][] to check all code against a somewhat opinionated set\n   of style rules based on the [Symfony Coding Standards][].\n8. Using [PHPUnit][] to test all classes used in the project and generate\n   coverage reports using [`phpdbg`][].\n\n## PSR-7 \u0026 PSR-17 Providers\n\nBy default this project loads [Diactoros][] for its [PSR-7][] objects and\nmatching [PSR-17][] factories.\n\nThe providers can easily be swapped for a different set of implementations.\nSimply remove the dependency from composer and add a new one. Example:\n\n```bash\n$ composer remove zendframework/zend-diactoros\n$ composer require nyholm/psr7\n```\n\nThen change [the injector configuration](config/injector.php) to tell\n[Auryn][] which factories it should use. In the case of [nyholm/psr7][] all of\nthem can be defined as `Nyholm\\Psr7\\Factory\\Psr17Factory::class`.\n\n[Auryn]: https://github.com/rdlowrey/auryn\n[Diactoros]: https://zendframework.github.io/zend-diactoros/\n[FastRoute]: https://github.com/nikic/FastRoute\n[Middleland]: https://github.com/oscarotero/middleland\n[nyholm/psr7]: https://github.com/Nyholm/psr7\n[nyholm/psr7-server]: https://github.com/Nyholm/psr7-server\n[PHP CS Fixer]: https://github.com/FriendsOfPHP/PHP-CS-Fixer\n[`phpdbg`]: https://www.php.net/manual/en/book.phpdbg.php\n[PHPUnit]: https://phpunit.de/\n[PSR-7]: http://www.php-fig.org/psr/psr-7/\n[PSR-15]: https://www.php-fig.org/psr/psr-15/\n[PSR-17]: https://www.php-fig.org/psr/psr-17/\n[Symfony Coding Standards]: https://symfony.com/doc/current/contributing/code/standards.html\n[Zend Emitter]: https://docs.zendframework.com/zend-httphandlerrunner/emitters/\n\n## License\n\nThe BSD Zero Clause License (0BSD). Please see the LICENSE file for\nmore information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzegnat%2Fphp-website-starter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzegnat%2Fphp-website-starter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzegnat%2Fphp-website-starter/lists"}