hanaboso / php-check-utils
Utils for php development - CodeSniffer, PhpStan, PhpUnit, PhpStorm
Installs: 29 840
Dependents: 14
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: ^8.3
- ext-apcu: *
- ext-json: *
- ext-pcov: *
- brianium/paratest: ^7.5
- dg/bypass-finals: ^1.7
- ergebnis/composer-normalize: ^2.43
- ergebnis/phpstan-rules: ^2.2
- php-mock/php-mock-phpunit: ^2.10
- phpstan/phpstan: ^1.11
- phpstan/phpstan-doctrine: ^1.4
- phpstan/phpstan-phpunit: ^1.4
- phpstan/phpstan-strict-rules: ^1.6
- phpstan/phpstan-symfony: ^1.4
- phpunit/phpunit: ^11.2
- slevomat/coding-standard: ^8.15
- spaze/phpstan-disallowed-calls: ^3.4
- squizlabs/php_codesniffer: ^3.10
- symfony/browser-kit: ^7.1
- symfony/framework-bundle: ^7.1
- symfony/security-core: ^7.1
Requires (Dev)
- doctrine/mongodb-odm: ^2.8
- doctrine/orm: ^3.2
- friendsoftwig/twigcs: ^6.4
- phpstan/phpstan-nette: ^1.3
Suggests
- apitte/core: Install me, if you need to use ControllerTestTrait in Nette.
- doctrine/mongodb-odm: Install me, if you using MongoDB.
- doctrine/orm: Install me, if you using MySQL.
- friendsoftwig/twigcs: Install me, if you want to check Twig CodeStyle.
- phpstan/phpstan-nette: Install me, for enable PHPStan for Nette.
- dev-master
- 1.6.4
- 1.6.3
- 1.6.2
- 1.6.1
- 1.6.0
- 1.5.7
- 1.5.6
- 1.5.5
- 1.5.4
- 1.5.3
- 1.5.2
- 1.5.1
- 1.5.0
- 1.4.10
- 1.4.9
- 1.4.8
- 1.4.7
- 1.4.6
- 1.4.5
- 1.4.4
- 1.4.3
- 1.4.2
- 1.4.1
- 1.4.0
- 1.3.9
- 1.3.8
- 1.3.6
- 1.3.5
- 1.3.4
- 1.3.3
- 1.3.2
- 1.3.1
- 1.3.0
- 1.2.3
- 1.2.2
- 1.2.1
- 1.2.0
- 1.1.42
- 1.1.41
- 1.1.40
- 1.1.39
- 1.1.38
- 1.1.37
- 1.1.36
- 1.1.35
- 1.1.34
- 1.1.33
- 1.1.32
- 1.1.31
- 1.1.30
- 1.1.29
- 1.1.28
- 1.1.27
- 1.1.26
- 1.1.25
- 1.1.24
- 1.1.23
- 1.1.22
- 1.1.21
- 1.1.20
- 1.1.19
- 1.1.18
- 1.1.17
- 1.1.16
- 1.1.15
- 1.1.14
- 1.1.13
- 1.1.12
- 1.1.11
- 1.1.10
- 1.1.9
- 1.1.8
- 1.1.7
- 1.1.5
- 1.1.4
- 1.1.3
- 1.1.2
- 1.1.1
- 1.1.0
- 1.0.x-dev
- 1.0.50
- 1.0.49
- 1.0.48
- 1.0.47.2
- 1.0.47.1
- 1.0.47
- 1.0.46
- 1.0.45
- 1.0.44
- 1.0.43
- 1.0.42
- 1.0.41
- 1.0.40
- 1.0.39
- 1.0.38
- 1.0.37
- 1.0.36
- 1.0.35
- 1.0.34
- 1.0.33
- 1.0.32
- 1.0.31
- 1.0.30
- 1.0.29
- 1.0.28
- 1.0.27
- 1.0.26
- 1.0.25
- 1.0.24
- 1.0.23
- 1.0.22
- 1.0.21
- 1.0.20
- 1.0.19
- 1.0.18
- 1.0.17
- 1.0.16
- 1.0.15
- 1.0.14
- 1.0.13
- 1.0.12
- 1.0.11
- 1.0.10
- 1.0.9
- 1.0.8
- 1.0.7
- 1.0.6
- 1.0.5
- 1.0.4
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
This package is auto-updated.
Last update: 2024-11-19 17:37:36 UTC
README
Installation
- Download package via composer
composer require --dev hanaboso/php-check-utils
CodeSniffer
- PHP_CodeSniffer docs: https://github.com/squizlabs/PHP_CodeSniffer
- Slevomat Coding Standard docs: https://github.com/slevomat/coding-standard/
- run PHP_CodeSniffer
./vendor/bin/phpcs --standard=./ruleset.xml -p src/ tests/
- ruleset.xml for app
<?xml version="1.0"?> <ruleset name="HANABOSO CODE STYLE"> <rule ref="./vendor/hanaboso/php-check-utils/ruleset.xml"/> <rule ref="SlevomatCodingStandard.Files.TypeNameMatchesFileName"> <properties> <property name="rootNamespaces" type="array" value=" src=>MyBundle, tests=>Tests "/> </properties> </rule> </ruleset>
CodeFixer
- PHP_CodeSniffer docs: https://github.com/squizlabs/PHP_CodeSniffer
- run PHP_CodeSnifferFixer
./vendor/bin/phpcbf --standard=./ruleset.xml -p src/ tests/
PhpStan
- PHPStan docs: https://github.com/phpstan/phpstan
- run PHPStan
./vendor/bin/phpstan analyse -c phpstan.neon -l 8 src/ tests/
- phpstan.neon for app
includes: - vendor/hanaboso/php-check-utils/phpstan.neon # hanaboso rules parameters excludes_analyse: ignoreErrors: symfony: container_xml_path: %rootDir%/../../../var/cache/dev/srcDevDebugProjectContainer.xml
CodeCoverage
- run Coverage.sh
./vendor/hanaboso/php-check-utils/bin/coverage.sh 100
PhpStorm - Code Style
- Import code style XML file from ./vendor/hanaboso/php-check-utils/phpstorm.xml to PhpStorm
- Open import window
File -> Settings -> Code Style -> PHP -> Import Scheme -> Intellij IDEA code style XML