{"id":36971521,"url":"https://github.com/chubbyphp-legacy/chubbyphp-framework-router-hack-routing","last_synced_at":"2026-01-13T21:54:04.650Z","repository":{"id":56952672,"uuid":"375074904","full_name":"chubbyphp-legacy/chubbyphp-framework-router-hack-routing","owner":"chubbyphp-legacy","description":"Hack routing implementation for chubbyphp-framework.","archived":true,"fork":false,"pushed_at":"2023-12-02T17:57:28.000Z","size":71,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-11-27T14:48:57.731Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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-legacy.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}},"created_at":"2021-06-08T16:24:57.000Z","updated_at":"2024-07-06T14:06:55.000Z","dependencies_parsed_at":"2023-02-05T21:25:16.971Z","dependency_job_id":null,"html_url":"https://github.com/chubbyphp-legacy/chubbyphp-framework-router-hack-routing","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/chubbyphp-legacy/chubbyphp-framework-router-hack-routing","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chubbyphp-legacy%2Fchubbyphp-framework-router-hack-routing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chubbyphp-legacy%2Fchubbyphp-framework-router-hack-routing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chubbyphp-legacy%2Fchubbyphp-framework-router-hack-routing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chubbyphp-legacy%2Fchubbyphp-framework-router-hack-routing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chubbyphp-legacy","download_url":"https://codeload.github.com/chubbyphp-legacy/chubbyphp-framework-router-hack-routing/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chubbyphp-legacy%2Fchubbyphp-framework-router-hack-routing/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28401638,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T14:36:09.778Z","status":"ssl_error","status_checked_at":"2026-01-13T14:35:19.697Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2026-01-13T21:54:03.645Z","updated_at":"2026-01-13T21:54:04.643Z","avatar_url":"https://github.com/chubbyphp-legacy.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# chubbyphp-framework-router-hack-routing\n\n[![CI](https://github.com/chubbyphp/chubbyphp-framework-router-hack-routing/workflows/CI/badge.svg?branch=master)](https://github.com/chubbyphp/chubbyphp-framework-router-hack-routing/actions?query=workflow%3ACI)\n[![Coverage Status](https://coveralls.io/repos/github/chubbyphp/chubbyphp-framework-router-hack-routing/badge.svg?branch=master)](https://coveralls.io/github/chubbyphp/chubbyphp-framework-router-hack-routing?branch=master)\n[![Infection MSI](https://badge.stryker-mutator.io/github.com/chubbyphp/chubbyphp-framework-router-hack-routing/master)](https://dashboard.stryker-mutator.io/reports/github.com/chubbyphp/chubbyphp-framework-router-hack-routing/master)\n[![Latest Stable Version](https://poser.pugx.org/chubbyphp/chubbyphp-framework-router-hack-routing/v/stable.png)](https://packagist.org/packages/chubbyphp/chubbyphp-framework-router-hack-routing)\n[![Total Downloads](https://poser.pugx.org/chubbyphp/chubbyphp-framework-router-hack-routing/downloads.png)](https://packagist.org/packages/chubbyphp/chubbyphp-framework-router-hack-routing)\n[![Monthly Downloads](https://poser.pugx.org/chubbyphp/chubbyphp-framework-router-hack-routing/d/monthly)](https://packagist.org/packages/chubbyphp/chubbyphp-framework-router-hack-routing)\n\n[![bugs](https://sonarcloud.io/api/project_badges/measure?project=chubbyphp_chubbyphp-framework-router-hack-routing\u0026metric=bugs)](https://sonarcloud.io/dashboard?id=chubbyphp_chubbyphp-framework-router-hack-routing)\n[![code_smells](https://sonarcloud.io/api/project_badges/measure?project=chubbyphp_chubbyphp-framework-router-hack-routing\u0026metric=code_smells)](https://sonarcloud.io/dashboard?id=chubbyphp_chubbyphp-framework-router-hack-routing)\n[![coverage](https://sonarcloud.io/api/project_badges/measure?project=chubbyphp_chubbyphp-framework-router-hack-routing\u0026metric=coverage)](https://sonarcloud.io/dashboard?id=chubbyphp_chubbyphp-framework-router-hack-routing)\n[![duplicated_lines_density](https://sonarcloud.io/api/project_badges/measure?project=chubbyphp_chubbyphp-framework-router-hack-routing\u0026metric=duplicated_lines_density)](https://sonarcloud.io/dashboard?id=chubbyphp_chubbyphp-framework-router-hack-routing)\n[![ncloc](https://sonarcloud.io/api/project_badges/measure?project=chubbyphp_chubbyphp-framework-router-hack-routing\u0026metric=ncloc)](https://sonarcloud.io/dashboard?id=chubbyphp_chubbyphp-framework-router-hack-routing)\n[![sqale_rating](https://sonarcloud.io/api/project_badges/measure?project=chubbyphp_chubbyphp-framework-router-hack-routing\u0026metric=sqale_rating)](https://sonarcloud.io/dashboard?id=chubbyphp_chubbyphp-framework-router-hack-routing)\n[![alert_status](https://sonarcloud.io/api/project_badges/measure?project=chubbyphp_chubbyphp-framework-router-hack-routing\u0026metric=alert_status)](https://sonarcloud.io/dashboard?id=chubbyphp_chubbyphp-framework-router-hack-routing)\n[![reliability_rating](https://sonarcloud.io/api/project_badges/measure?project=chubbyphp_chubbyphp-framework-router-hack-routing\u0026metric=reliability_rating)](https://sonarcloud.io/dashboard?id=chubbyphp_chubbyphp-framework-router-hack-routing)\n[![security_rating](https://sonarcloud.io/api/project_badges/measure?project=chubbyphp_chubbyphp-framework-router-hack-routing\u0026metric=security_rating)](https://sonarcloud.io/dashboard?id=chubbyphp_chubbyphp-framework-router-hack-routing)\n[![sqale_index](https://sonarcloud.io/api/project_badges/measure?project=chubbyphp_chubbyphp-framework-router-hack-routing\u0026metric=sqale_index)](https://sonarcloud.io/dashboard?id=chubbyphp_chubbyphp-framework-router-hack-routing)\n[![vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=chubbyphp_chubbyphp-framework-router-hack-routing\u0026metric=vulnerabilities)](https://sonarcloud.io/dashboard?id=chubbyphp_chubbyphp-framework-router-hack-routing)\n\n## Description\n\nHack routing implementation for [chubbyphp-framework][1].\n\nDEPRECATED: I suggest to use [chubbyphp-framework-router-fastroute][11].\n\n## Requirements\n\n * php: ^8.0\n * [chubbyphp/chubbyphp-framework][1]: ^5.0.3\n * [chubbyphp/chubbyphp-http-exception][2]: ^1.0.1\n * [azjezz/hack-routing][3]: dev-main@dev\n * [psr/http-message][4]: ^1.0.1\n\n## Installation\n\nThrough [Composer](http://getcomposer.org) as [chubbyphp/chubbyphp-framework-router-hack-routing][10].\n\n```bash\ncomposer require chubbyphp/chubbyphp-framework-router-hack-routing \"^1.0\"\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\\RouteMatcherMiddleware;\nuse Chubbyphp\\Framework\\RequestHandler\\CallbackRequestHandler;\nuse Chubbyphp\\Framework\\Router\\HackRouting\\RouteMatcher;\nuse Chubbyphp\\Framework\\Router\\Route;\nuse Chubbyphp\\Framework\\Router\\Routes;\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 RouteMatcherMiddleware(new RouteMatcher(new Routes([\n        Route::get('/hello/{name:[a-z]+}', '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        ))\n    ]))),\n]);\n\n$app-\u003eemit($app-\u003ehandle((new ServerRequestFactory())-\u003ecreateFromGlobals()));\n```\n\n## Copyright\n\n2023 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/azjezz/hack-routing\n[4]: https://packagist.org/packages/psr/http-message\n[10]: https://packagist.org/packages/chubbyphp/chubbyphp-framework-router-hack-routing\n[11]: https://packagist.org/packages/chubbyphp/chubbyphp-framework-router-hack-fastroute\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchubbyphp-legacy%2Fchubbyphp-framework-router-hack-routing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchubbyphp-legacy%2Fchubbyphp-framework-router-hack-routing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchubbyphp-legacy%2Fchubbyphp-framework-router-hack-routing/lists"}