{"id":18834309,"url":"https://github.com/chubbyphp/chubbyphp-framework-router-symfony","last_synced_at":"2025-04-14T04:32:22.516Z","repository":{"id":56952668,"uuid":"274217312","full_name":"chubbyphp/chubbyphp-framework-router-symfony","owner":"chubbyphp","description":"Symfony Router implementation for chubbyphp-framework.","archived":false,"fork":false,"pushed_at":"2025-03-12T14:09:30.000Z","size":70,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-27T18:55:27.921Z","etag":null,"topics":["chubbyphp-framework","psr-15","psr-7","routing"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chubbyphp.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}},"created_at":"2020-06-22T18:47:49.000Z","updated_at":"2025-03-12T14:09:34.000Z","dependencies_parsed_at":"2024-12-08T08:17:20.478Z","dependency_job_id":"882d5205-3a84-4504-a088-d00622253777","html_url":"https://github.com/chubbyphp/chubbyphp-framework-router-symfony","commit_stats":{"total_commits":36,"total_committers":3,"mean_commits":12.0,"dds":0.4444444444444444,"last_synced_commit":"c0c262cd485c7ad8417bae9267eb8079f3463d36"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chubbyphp%2Fchubbyphp-framework-router-symfony","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chubbyphp%2Fchubbyphp-framework-router-symfony/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chubbyphp%2Fchubbyphp-framework-router-symfony/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chubbyphp%2Fchubbyphp-framework-router-symfony/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chubbyphp","download_url":"https://codeload.github.com/chubbyphp/chubbyphp-framework-router-symfony/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248821998,"owners_count":21166989,"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":["chubbyphp-framework","psr-15","psr-7","routing"],"created_at":"2024-11-08T02:11:51.707Z","updated_at":"2025-04-14T04:32:22.503Z","avatar_url":"https://github.com/chubbyphp.png","language":"PHP","readme":"# chubbyphp-framework-router-symfony\n\n\n[![CI](https://github.com/chubbyphp/chubbyphp-framework-router-symfony/actions/workflows/ci.yml/badge.svg)](https://github.com/chubbyphp/chubbyphp-framework-router-symfony/actions/workflows/ci.yml)\n[![Coverage Status](https://coveralls.io/repos/github/chubbyphp/chubbyphp-framework-router-symfony/badge.svg?branch=master)](https://coveralls.io/github/chubbyphp/chubbyphp-framework-router-symfony?branch=master)\n[![Mutation testing badge](https://img.shields.io/endpoint?style=flat\u0026url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2Fchubbyphp%2Fchubbyphp-framework-router-symfony%2Fmaster)](https://dashboard.stryker-mutator.io/reports/github.com/chubbyphp/chubbyphp-framework-router-symfony/master)\n[![Latest Stable Version](https://poser.pugx.org/chubbyphp/chubbyphp-framework-router-symfony/v)](https://packagist.org/packages/chubbyphp/chubbyphp-framework-router-symfony)\n[![Total Downloads](https://poser.pugx.org/chubbyphp/chubbyphp-framework-router-symfony/downloads)](https://packagist.org/packages/chubbyphp/chubbyphp-framework-router-symfony)\n[![Monthly Downloads](https://poser.pugx.org/chubbyphp/chubbyphp-framework-router-symfony/d/monthly)](https://packagist.org/packages/chubbyphp/chubbyphp-framework-router-symfony)\n\n[![bugs](https://sonarcloud.io/api/project_badges/measure?project=chubbyphp_chubbyphp-framework-router-symfony\u0026metric=bugs)](https://sonarcloud.io/dashboard?id=chubbyphp_chubbyphp-framework-router-symfony)\n[![code_smells](https://sonarcloud.io/api/project_badges/measure?project=chubbyphp_chubbyphp-framework-router-symfony\u0026metric=code_smells)](https://sonarcloud.io/dashboard?id=chubbyphp_chubbyphp-framework-router-symfony)\n[![coverage](https://sonarcloud.io/api/project_badges/measure?project=chubbyphp_chubbyphp-framework-router-symfony\u0026metric=coverage)](https://sonarcloud.io/dashboard?id=chubbyphp_chubbyphp-framework-router-symfony)\n[![duplicated_lines_density](https://sonarcloud.io/api/project_badges/measure?project=chubbyphp_chubbyphp-framework-router-symfony\u0026metric=duplicated_lines_density)](https://sonarcloud.io/dashboard?id=chubbyphp_chubbyphp-framework-router-symfony)\n[![ncloc](https://sonarcloud.io/api/project_badges/measure?project=chubbyphp_chubbyphp-framework-router-symfony\u0026metric=ncloc)](https://sonarcloud.io/dashboard?id=chubbyphp_chubbyphp-framework-router-symfony)\n[![sqale_rating](https://sonarcloud.io/api/project_badges/measure?project=chubbyphp_chubbyphp-framework-router-symfony\u0026metric=sqale_rating)](https://sonarcloud.io/dashboard?id=chubbyphp_chubbyphp-framework-router-symfony)\n[![alert_status](https://sonarcloud.io/api/project_badges/measure?project=chubbyphp_chubbyphp-framework-router-symfony\u0026metric=alert_status)](https://sonarcloud.io/dashboard?id=chubbyphp_chubbyphp-framework-router-symfony)\n[![reliability_rating](https://sonarcloud.io/api/project_badges/measure?project=chubbyphp_chubbyphp-framework-router-symfony\u0026metric=reliability_rating)](https://sonarcloud.io/dashboard?id=chubbyphp_chubbyphp-framework-router-symfony)\n[![security_rating](https://sonarcloud.io/api/project_badges/measure?project=chubbyphp_chubbyphp-framework-router-symfony\u0026metric=security_rating)](https://sonarcloud.io/dashboard?id=chubbyphp_chubbyphp-framework-router-symfony)\n[![sqale_index](https://sonarcloud.io/api/project_badges/measure?project=chubbyphp_chubbyphp-framework-router-symfony\u0026metric=sqale_index)](https://sonarcloud.io/dashboard?id=chubbyphp_chubbyphp-framework-router-symfony)\n[![vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=chubbyphp_chubbyphp-framework-router-symfony\u0026metric=vulnerabilities)](https://sonarcloud.io/dashboard?id=chubbyphp_chubbyphp-framework-router-symfony)\n\n## Description\n\nSymfony Router implementation for [chubbyphp-framework][1].\n\n## Requirements\n\n * php: ^8.2\n * [chubbyphp/chubbyphp-framework][1]: ^5.2\n * [chubbyphp/chubbyphp-http-exception][2]: ^1.2\n * [psr/http-message][3]: ^1.1|^2.0\n * [symfony/expression-language][4]: ^5.4.45|^6.4.13|^7.2\n * [symfony/routing][5]: ^5.4.48|^6.4.18|^7.2\n\n## Installation\n\nThrough [Composer](http://getcomposer.org) as [chubbyphp/chubbyphp-framework-router-symfony][10].\n\n```bash\ncomposer require chubbyphp/chubbyphp-framework-router-symfony \"^2.2\"\n```\n\n## Usage\n\n```php\n\u003c?php\n\ndeclare(strict_types=1);\n\nnamespace App;\n\nuse Chubbyphp\\Framework\\Application;\nuse Chubbyphp\\Framework\\Middleware\\ExceptionMiddleware;\nuse Chubbyphp\\Framework\\Middleware\\RouterMiddleware;\nuse Chubbyphp\\Framework\\RequestHandler\\CallbackRequestHandler;\nuse Chubbyphp\\Framework\\Router\\Symfony\\Router;\nuse Chubbyphp\\Framework\\Router\\Route;\nuse Psr\\Http\\Message\\ServerRequestInterface;\nuse Slim\\Psr7\\Factory\\ResponseFactory;\nuse Slim\\Psr7\\Factory\\ServerRequestFactory;\n\n$loader = require __DIR__.'/vendor/autoload.php';\n\n$responseFactory = new ResponseFactory();\n\n$app = new Application([\n    new ExceptionMiddleware($responseFactory, true),\n    new RouterMiddleware(new SymfonyRouter([\n        Route::get('/hello/{name}', 'hello', new CallbackRequestHandler(\n            function (ServerRequestInterface $request) use ($responseFactory) {\n                $name = $request-\u003egetAttribute('name');\n                $response = $responseFactory-\u003ecreateResponse();\n                $response-\u003egetBody()-\u003ewrite(sprintf('Hello, %s', $name));\n\n                return $response;\n            }\n        ), [], [SymfonyRouter::PATH_REQUIREMENTS =\u003e ['name' =\u003e '[a-z]+']])\n    ])),\n]);\n\n$app-\u003eemit($app-\u003ehandle((new ServerRequestFactory())-\u003ecreateFromGlobals()));\n```\n\n## Copyright\n\n2025 Dominik Zogg\n\n[1]: https://packagist.org/packages/chubbyphp/chubbyphp-framework\n[2]: https://packagist.org/packages/chubbyphp/chubbyphp-http-exception\n[3]: https://packagist.org/packages/psr/http-message\n[4]: https://packagist.org/packages/symfony/expression-language\n[5]: https://packagist.org/packages/symfony/routing\n[10]: https://packagist.org/packages/chubbyphp/chubbyphp-framework-router-symfony\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchubbyphp%2Fchubbyphp-framework-router-symfony","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchubbyphp%2Fchubbyphp-framework-router-symfony","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchubbyphp%2Fchubbyphp-framework-router-symfony/lists"}