Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tomlutzenberger/constantine
The (hopefully) most comprehensive collection of constants for PHP
https://github.com/tomlutzenberger/constantine
collection constants php utility
Last synced: about 2 months ago
JSON representation
The (hopefully) most comprehensive collection of constants for PHP
- Host: GitHub
- URL: https://github.com/tomlutzenberger/constantine
- Owner: tomlutzenberger
- License: mit
- Created: 2021-10-23T19:38:31.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2022-08-21T20:11:51.000Z (over 2 years ago)
- Last Synced: 2024-04-15T00:01:17.711Z (9 months ago)
- Topics: collection, constants, php, utility
- Language: PHP
- Homepage:
- Size: 696 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
![Constantine](logo.png)
![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/tomlutzenberger/constantine?cacheSeconds=600)
![Packagist PHP Version Support](https://img.shields.io/packagist/php-v/tomlutzenberger/constantine?cacheSeconds=600)
![Libraries.io dependency status for GitHub repo](https://img.shields.io/librariesio/github/tomlutzenberger/constantine?cacheSeconds=600)
![Packagist Downloads](https://img.shields.io/packagist/dt/tomlutzenberger/constantine?cacheSeconds=600)
![Maintenance](https://img.shields.io/maintenance/yes/2022)\
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?cacheSeconds=600&project=tomlutzenberger_constantine&metric=alert_status)](https://sonarcloud.io/dashboard?id=tomlutzenberger_constantine)
[![Technical Debt](https://sonarcloud.io/api/project_badges/measure?project=tomlutzenberger_constantine&metric=sqale_index)](https://sonarcloud.io/summary/new_code?id=tomlutzenberger_constantine)
[![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=tomlutzenberger_constantine&metric=code_smells)](https://sonarcloud.io/summary/new_code?id=tomlutzenberger_constantine)
[![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=tomlutzenberger_constantine&metric=ncloc)](https://sonarcloud.io/summary/new_code?id=tomlutzenberger_constantine)
![GitHub](https://img.shields.io/github/license/tomlutzenberger/constantine)CONSTANTINE
=====================
The (hopefully) most comprehensive collection of constants for PHPWhy should I use it?
--------------------
* Using magic numbers no one remembers the meaning of?\
**Code smell**
* Repeating yourself by using the same values over and over again?\
**Code smell**
* Having a typo in one of the repeated values?\
**Dangerous --> Bugs**
* Having to look up stuff?\
**Time-consuming**
* Updating values that changed all over the code base?\
**Time-consuming**
* Bloating your classes with constants and maintaining them?\
**Time-consuming**What can I expect?
------------------
A growing amount of useful constants to use in your application. Right now CONSTANTINE contains **>13.9k** constants.Requirements
------------
* PHP >=7.1
* nothing else, zero dependencyInstallation
------------
The preferred way to install CONSTANTINE is through [composer](http://getcomposer.org/download/).Either run
```
php composer.phar require --prefer-dist tomlutzenberger/constantine "*"
```or add
```
"tomlutzenberger/constantine": "*"
```to the `required` section of your `composer.json` file.
Usage
-----
Simple and straight-forward:```php