mario-naether / php-ci-template
提供一些PHP质量保证工具和Codeception扩展
0.7.0
2017-03-31 13:52 UTC
Requires
- ahmedsamy/codeception-smtp-mail: *
- apigen/apigen: >=4
- captbaritone/mailcatcher-codeception-module: *
- codeception/c3: *
- codeception/codeception: ^2
- codeception/mockery-module: *
- codeception/phpbuiltinserver: *
- codeception/robo-paracept: *
- codeception/specify: *
- codeception/verify: *
- edgedesign/phpqa: *
- edno/codeception-gherkin-param: *
- friendsofphp/php-cs-fixer: *
- gamajo/codeception-redirects: *
- jacekk/codeception-dataprovider-module: *
- jakoch/phantomjs-installer: *
- justblackbird/codeception-config-module: *
- league/factory-muffin: *
- league/factory-muffin-faker: *
- mcustiel/codeception-http-mock: *
- mikey179/vfsstream: *
- monolog/monolog: *
- nathanmac/datetime-codeception-module: *
- neronmoon/scriptsdev: *
- phpmetrics/phpmetrics: ~2
- redcomponent/teststatistics: *
- site5/phantoman: *
- symfony/event-dispatcher: ~2
This package is auto-updated.
Last update: 2024-09-18 18:58:58 UTC
README
此包提供一些PHP质量保证工具,灵感来源于http://jenkins-php.org/
##使用Codeception进行单元测试 ####模块
- codeception/codeception
- captbaritone/mailcatcher-codeception-module
- dlabs/codeception-module-visualception
- codeception/verify
- codeception/specify
- codeception/mockery-module
- nathanmac/datetime-codeception-module
- redcomponent/teststatistics
- justblackbird/codeception-config-module
- codeception/phpbuiltinserver
- edno/codeception-gherkin-param
- mcustiel/codeception-http-mock
- ahmedsamy/codeception-smtp-mail
- jacekk/codeception-dataprovider-module
- gamajo-codeception-redirects
###Factory Muffin Faker
###Faker
###使用PhantomJS安装器,在composer.json中添加以下代码
"scripts-dev": {
"post-install-cmd": [
"PhantomInstaller\\Installer::installPhantomJS"
],
"post-update-cmd": [
"PhantomInstaller\\Installer::installPhantomJS"
]
}
##质量保证工具 ###使用一条命令分析PHP代码
- phploc
- phpcpd
- phpcs
- pdepend
- phpmd
- phpmetrics
vendor/bin/phpqa --analyzedDirs ./examples/src/ --buildDir ./build/logs --report
要使用此方法在PHP QA工具中进行工作副本/粘贴检测
PHP 5.4/5.5
composer require sebastian/phpcpd:dev-master#de90566 --ignore-platform-reqs php
###使用单独的命令分析PHP代码
mkdir build/logs
####pdepend (https://pdepend.org/)
vendor/bin/pdepend --jdepend-xml=./build/logs/pdepend-jdepend.xml --summary-xml=./build/logs/pdepend-summary.xml --dependency-xml=./build/logs/pdepend-dependencies.xml --jdepend-chart=./build/logs/pdepend-jdepend.svg --overview-pyramid=./build/logs/pdepend-pyramid.svg ./examples/src/
####phpcpd (https://github.com/sebastianbergmann/phpcpd)
vendor/bin/phpcpd --log-pmd build/logs/pmd-cpd.xml ./examples/src
####phploc (https://github.com/sebastianbergmann/phploc)
vendor/bin/phploc --progress --exclude=vendor ./examples/src/ --log-xml ./build/logs/phploc.xml
####phpmd (https://phpmd.org/)
vendor/bin/phpmd examples/src xml ./vendor/edgedesign/phpqa/app/phpmd.xml --suffixes php --exclude /vendor/ --reportfile ./build/logs/phpmd.xml
####phpcs (https://github.com/squizlabs/PHP_CodeSniffer)
vendor/bin/phpcs -p --extensions=php --standard=PSR2 --ignore=*/vendor/* ./examples/src/ --report=checkstyle --report-file=./build/logs/checkstyle.xml
####phpmetrics (https://github.com/phpmetrics/PhpMetrics)
vendor/bin/phpmetrics ./examples/src/ --extensions php --excluded-dirs="vendor" --offline --report-html ./build/logs/phpmetrics.html --report-xml ./build/logs/phpmetrics.xml
####php-cs-fixer (https://github.com/FriendsOfPHP/PHP-CS-Fixer)
vendor/bin/php-cs-fixer fix
####ApiGen (https://github.com/ApiGen/ApiGen)
vendor/bin/apigen generate