articstudio / php-bin
Installs: 92
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 1
Open Issues: 2
pkg:composer/articstudio/php-bin
Requires
- php: >=7.3
- ergebnis/composer-normalize: ^2.2
- ergebnis/phpstan-rules: ^0.14.2
- nunomaduro/phpinsights: ^1.11
- php-school/cli-menu: ^3.2
- phpmetrics/phpmetrics: ^2.5
- phpstan/phpstan: ^0.12.4
- phpstan/phpstan-strict-rules: ^0.12.1
- phpunit/phpunit: ^8.0
- squizlabs/php_codesniffer: ^3.5
- symfony/console: ^4.4
- symfony/process: ^4.4
- thecodingmachine/phpstan-strict-rules: ^0.12.0
README
PHP bin helpers.
| Servei | Master | Develop | 
|---|---|---|
| CircleCI | 
Install
composer require articstudio/php-bin
Usage
For launch a interactive menu execute (in the root folder of project):
php vendor/bin/phpbin
If you would to execute in a command line environment, the pattern of execution is:
php vendor/bin/phpbin name-menu:name-task:name-subtask [parameter1] [parameter2]
Examples:
Add a subtree:
php vendor/bin/phpbin git:subtree:add [repository/subtree1]
Push a subtree:
php vendor/bin/phpbin git:subtree:push [repository/subtree1]
Install package to module:
php vendor/bin/phpbin composer:install [package-name] [module-name] [d/D]
This package is composed by three big menus:
Git helpers:
Provides some commands to manage a simple tasks for git subtrees.
By default this command take a set of subtrees who indicate in composer.json, attribute "config: subtree{}".
But you can type a name of subtree to add manually.
- 
Launch git menu php vendor/bin/phpbin git
- 
Git add subtree php vendor/bin/phpbin git:subtree:add [repository/subtree1]
- 
Git pull subtree php vendor/bin/phpbin git:subtree:pull [repository/subtree1]
- 
Git push subtree php vendor/bin/phpbin git:subtree:push [repository/subtree1]
- 
Git remove subtree php vendor/bin/phpbin git:subtree:remove [repository/subtree1]
- 
Git check local subtrees with composer.json subtrees php vendor/bin/phpbin git:subtree:check
PHP helpers:
Provides some commands to manage a php tasks:
- 
PHP lint (Syntax checker) php vendor/bin/phpbin php:lint
- 
PHP Metrics (Code metrics generator) php vendor/bin/phpbin php:metrics
- 
PHP PSR1 php vendor/bin/phpbin php:psr1
- 
PHP PSR1-fix php vendor/bin/phpbin php:psr1:fix
- 
PHP PSR2 php vendor/bin/phpbin php:psr2
- 
PHP PSR2-fix php vendor/bin/phpbin php:psr2:fix
- 
PHP unit test (pass all tests in /testdirectory)php vendor/bin/phpbin php:test
Composer helpers:
Provides some commands to manage a composer more easily:
Composer install dev
- Composer install:
php vendor/bin/phpbin composer:install [package_name] [module_name] [envoirment]
This command, add a package into a module (subtree), this package will added into file composer.json (in require or require-dev, deppends envoirment parameter) of module,
and will install into root project (vendor folder).
Composer get dev packages
- Composer dev packages:
php vendor/bin/phpbin composer:dev-packages [module_name]
Load all module requires and require-dev to root file composer.json like require-dev
Composer solve versions conflicts
- Composer update versions:
php vendor/bin/phpbin composer:update-versions [module_name]
Solve conflicts about versions from root project composer.json, to module or modules composer.json file.
Composer normalize
- Composer normalize composer.json files:
php vendor/bin/phpbin composer:normalize [module_name]
Normalize structure of project composer.json, and module or modules composer.json file.