phriendly-dependencies
A tool to check if you are accessing dependencies you should not have access to., (*1)
At the moment it checks that you are using, in the use clauses at the
beginning of your files, only classes which are contained in a namespace exposed
by your own library or by a dependency explicitely declared in your
composer.json., (*2)
In other words, this tool notifies you if you are using directly classes
belonging to packages that are not first dependencies of your own library., (*3)
This is to avoid that changes in the dependencies of your dependencies could
generate errors in your library., (*4)
install
Install the library using, (*5)
composer require marcosh/phriendly-dependencies
composer
Install dependencies using, (*6)
composer install
If you are using Docker you could use, (*7)
docker run --rm -ti -v $(pwd):/app -u $(id -u):$(id -g) -e "COMPOSER_HOME=/tmp/composer" composer install
run
Run the program with, (*8)
php bin/phd.php -p $PATH_YOU_WANT_TO_ANALYZE
If you are using Docker you could use, (*9)
docker run --rm -ti -v $(pwd):/app php:7.1 php /app/bin/phd.php -p $PATH_YOU_WANT_TO_ANALYZE
test
Run the tests with, (*10)
php vendor/bin/phpunit
If you are using Docker you could use, (*11)
docker run --rm -ti -v $(pwd):/app php:7.1 php /app/vendor/bin/phpunit -c /app/phpunit.xml