germania-kg / update-command
PHP Package boilerplate
Requires
- php: ^7.4|^8.0
- symfony/console: ^5.0|^6.0
- symfony/process: ^5.3|^6.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.0
- laminas/laminas-log: ^2.0
- php-coveralls/php-coveralls: ^2.0
- phpspec/prophecy-phpunit: ^2.0
- phpstan/phpstan: ^1.0
- phpunit/phpunit: ^9.0
- spatie/phpunit-watcher: ^1.0
README
Symfony Console Command for updating a web app from CLI.
Installation
$ composer require germania-kg/update-command:^1.0
Requirements
This package requires the Symfony Console and Process components.
Usage
use Germania\UpdateApp\UpdateAppCommand; $cache_directories = array(); $cmd = new UpdateAppCommand(); $cmd = new UpdateAppCommand($cache_directories);
CLI usage
The command name is update
, and it accepts a --no-dev
option for production environments:
$ bin/console update $ bin/console update --no-dev
Development
$ git clone git@github.com:GermaniaKG/UpdateAppCommand.git
# or
$ git clone https://github.com/GermaniaKG/UpdateAppCommand.git
Run all tests
This packages has predefined test setups for code quality, code readability and unit tests. Check them out at the scripts
section of composer.json.
$ composer test # ... which currently includes $ composer phpunit
Unit tests
Default configuration is phpunit.xml.dist. Create a custom phpunit.xml to apply your own settings. Also visit phpunit.readthedocs.io · Packagist
$ composer phpunit
# ... or
$ vendor/bin/phpunit
PhpStan
Default configuration is phpstan.neon.dist. Create a custom phpstan.neon to apply your own settings. Also visit phpstan.org · GitHub · Packagist
$ composer phpstan
# ... which includes
$ vendor/bin/phpstan analyse
PhpCS
Default configuration is .php-cs-fixer.dist.php. Create a custom .php-cs-fixer.php to apply your own settings. Also visit cs.symfony.com · GitHub · Packagist
$ composer phpcs
# ... which aliases
$ vendor/bin/php-cs-fixer fix --verbose --diff --dry-run
Apply all CS fixes:
$ composer phpcs:apply
# ... which aliases
$ vendor/bin/php-cs-fixer fix --verbose --diff