{"id":19691785,"url":"https://github.com/tomlutzenberger/constantine","last_synced_at":"2025-07-18T13:33:22.741Z","repository":{"id":38025758,"uuid":"420506547","full_name":"tomlutzenberger/constantine","owner":"tomlutzenberger","description":"The (hopefully) most comprehensive collection of constants for PHP","archived":false,"fork":false,"pushed_at":"2022-08-21T20:11:51.000Z","size":713,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-10T08:57:09.379Z","etag":null,"topics":["collection","constants","php","utility"],"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/tomlutzenberger.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-10-23T19:38:31.000Z","updated_at":"2022-06-23T12:56:56.000Z","dependencies_parsed_at":"2022-08-08T22:46:11.870Z","dependency_job_id":null,"html_url":"https://github.com/tomlutzenberger/constantine","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomlutzenberger%2Fconstantine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomlutzenberger%2Fconstantine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomlutzenberger%2Fconstantine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomlutzenberger%2Fconstantine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tomlutzenberger","download_url":"https://codeload.github.com/tomlutzenberger/constantine/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241000411,"owners_count":19891790,"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":["collection","constants","php","utility"],"created_at":"2024-11-11T19:10:59.992Z","updated_at":"2025-02-27T09:44:30.396Z","avatar_url":"https://github.com/tomlutzenberger.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Constantine](logo.png)\n\n![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/tomlutzenberger/constantine?cacheSeconds=600)\n![Packagist PHP Version Support](https://img.shields.io/packagist/php-v/tomlutzenberger/constantine?cacheSeconds=600)\n![Libraries.io dependency status for GitHub repo](https://img.shields.io/librariesio/github/tomlutzenberger/constantine?cacheSeconds=600)\n![Packagist Downloads](https://img.shields.io/packagist/dt/tomlutzenberger/constantine?cacheSeconds=600)\n![Maintenance](https://img.shields.io/maintenance/yes/2022)\\\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?cacheSeconds=600\u0026project=tomlutzenberger_constantine\u0026metric=alert_status)](https://sonarcloud.io/dashboard?id=tomlutzenberger_constantine)\n[![Technical Debt](https://sonarcloud.io/api/project_badges/measure?project=tomlutzenberger_constantine\u0026metric=sqale_index)](https://sonarcloud.io/summary/new_code?id=tomlutzenberger_constantine)\n[![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=tomlutzenberger_constantine\u0026metric=code_smells)](https://sonarcloud.io/summary/new_code?id=tomlutzenberger_constantine)\n[![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=tomlutzenberger_constantine\u0026metric=ncloc)](https://sonarcloud.io/summary/new_code?id=tomlutzenberger_constantine)\n![GitHub](https://img.shields.io/github/license/tomlutzenberger/constantine)\n\nCONSTANTINE\n=====================\nThe (hopefully) most comprehensive collection of constants for PHP\n\nWhy should I use it?\n--------------------\n* Using magic numbers no one remembers the meaning of?\\\n  **Code smell**\n* Repeating yourself by using the same values over and over again?\\\n  **Code smell**\n* Having a typo in one of the repeated values?\\\n  **Dangerous --\u003e Bugs**\n* Having to look up stuff?\\\n  **Time-consuming**\n* Updating values that changed all over the code base?\\\n  **Time-consuming**\n* Bloating your classes with constants and maintaining them?\\\n  **Time-consuming**\n\nWhat can I expect?\n------------------\nA growing amount of useful constants to use in your application. Right now CONSTANTINE contains **\u003e13.9k** constants.\n\nRequirements\n------------\n* PHP \u003e=7.1\n* nothing else, zero dependency\n\nInstallation\n------------\nThe preferred way to install CONSTANTINE is through [composer](http://getcomposer.org/download/).\n\nEither run\n\n```\nphp composer.phar require --prefer-dist tomlutzenberger/constantine \"*\"\n```\n\nor add\n\n```\n\"tomlutzenberger/constantine\": \"*\"\n```\n\nto the `required` section of your `composer.json` file.\n\n\nUsage\n-----\nSimple and straight-forward:\n\n```php\n\u003c?php\n\nuse TomLutzenberger\\Constantine\\Protocol\\HttpStatusCode;\n\nclass MyController\n{\n    public function notFoundAction(): int\n    {\n        return HttpStatusCode::NOT_FOUND;\n    }\n}\n```\n\nLicense\n-----\nThis package is published under the MIT License and can be used for any\ncommercial and personal projects.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomlutzenberger%2Fconstantine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomlutzenberger%2Fconstantine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomlutzenberger%2Fconstantine/lists"}