germania-kg/update-command

PHP Package boilerplate

1.2.3 2023-01-25 13:47 UTC

This package is auto-updated.

Last update: 2024-04-25 16:47:28 UTC


README

Symfony Console Command for updating a web app from CLI.

Tests

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