Common PHP project library https://railgun.sh/index
Find a file
2023-01-01 19:00:00 +00:00
bench Imported into new repository. 2022-09-13 15:13:11 +02:00
docs Imported into new repository. 2022-09-13 15:13:11 +02:00
src Replaced uses of floatval and intval with casts. 2023-01-01 19:00:00 +00:00
tests Replaced uses of floatval and intval with casts. 2023-01-01 19:00:00 +00:00
tools Fixed bitrot issues related to PHP updates. 2023-01-01 18:47:24 +00:00
.gitattributes Imported into new repository. 2022-09-13 15:13:11 +02:00
.gitignore Imported into new repository. 2022-09-13 15:13:11 +02:00
index.php Imported into new repository. 2022-09-13 15:13:11 +02:00
LICENCE Imported into new repository. 2022-09-13 15:13:11 +02:00
phpdoc.xml Imported into new repository. 2022-09-13 15:13:11 +02:00
phpstan.neon Imported into new repository. 2022-09-13 15:13:11 +02:00
phpunit.xml Imported into new repository. 2022-09-13 15:13:11 +02:00
README.md Imported into new repository. 2022-09-13 15:13:11 +02:00
TODO.md Imported into new repository. 2022-09-13 15:13:11 +02:00
VERSION Replaced uses of floatval and intval with casts. 2023-01-01 19:00:00 +00:00

Index

Index is a common library for my PHP projects.

It provides a number of components that I would otherwise copy between projects (and thus become out-of-sync) as well as a number of quality of life things on top of standard PHP stdlib functionality such as abstractions of arrays and strings as objects inspired by .NET's standard library.

Requirements and Dependencies

Index currently targets PHP 8.1. (also list extensions!!!!!!!!!)

Index\Data\MariaDB

Requires the mysqli extension. mysqlnd is recommended as the underlying driver, but libmysql should work without a hitch. This driver also works for MySQL as the dependencies would suggest, but you should consider using MariaDB instead of possible.

Index\Data\SQLite

Requires the sqlite3 extension.

Versioning

Index versioning will mostly follow the Semantic Versioning specification v2.0.0, counting dropped support for a minor PHP version (e.g. 7.1 -> 7.2 or 7.4 -> 8.0) as a reason to increment the major version. Previous major versions may be supported for a time with backports depending on what projects of mine still target older versions of PHP.

The version is stored in the root of the repository in a file called VERSION and can be read out within Index using Index\Environment::getIndexVersion().

Contribution

By submitting code for inclusion in the main Index source tree you agree to transfer ownership of the code to the project owner. The contributor will still be attributed for the contributed code, unless they ask for this attribution to be removed. This is to avoid intellectual property rights traps and drama that could lead to blackmail situations. If you do not agree with these terms, you are free to fork off.

Licencing

Index is available under the BSD 2-Clause License, a full version of which is enclosed in the LICENCE file.