Check your PHP project's PHP extension requirements against all loaded PHP extensions.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Florian Brinker cece9d0d02 Add composer scripts and box file 3 months ago
.vscode Base Application 3 months ago
bin Base Application 3 months ago
config Add PHPCS & PHPStan 3 months ago
docker Add PHP7.2, 8.0 containers 3 months ago
src Refactor duplicated dependencies 3 months ago
.gitignore Add PHPCS & PHPStan 3 months ago
LICENSE.md Update Readme 3 months ago
README.md Update Readme 3 months ago
box.json Add composer scripts and box file 3 months ago
composer.json Add composer scripts and box file 3 months ago
composer.lock PHP7.2 dependencies 3 months ago
docker-compose.yaml Add PHP7.2, 8.0 containers 3 months ago
phpcs.xml Add PHPCS & PHPStan 3 months ago
phpstan.neon Add PHPCS & PHPStan 3 months ago

README.md

php-extension-check

Check your PHP project's PHP extension requirements against all loaded PHP extensions.

Requires a PHP version of 7.2 or above.

The idea behind this project is to have an idea of your project's requirements for a minimal server installation.

Another use case can be cleaning up old legacy projects using the same server configuration/installation for decades after doing some refactorings or upgrades, esp. when moving those projects into Docker images.

Installation

... todo, when any releases are ready

Usage

To check your code, simply run the extension-check.phar.

The tool automatically executes the checks for the current directory (./).

Important

Please note that your command line and web server PHP configurations (php.ini files) may load different PHP extensions!

To use a specific php.ini file, run the tool like this:

php -c path/to/your/webserver/php.ini ./extension-check.phar

Checking a specific Directory

If you want to check a specific directory, you can specify it as an argument:

./extension-check.phar ./src

Note: You should include your vendor files, if any, for valid results.

Exclude Extensions

If you want to exclude some PHP extensions, you can use the --exclude option:

./extension-check.phar --exclude=core,standard,xdebug

or alternatively

./extension-check.phar --exclude=core --exclude=standard --exclude=xdebug

Contributions

To check the code quality, run

composer check

To run the test suite, execute

composer test