jdlabails/php-project-analyzer-bundle
Composer 安装命令:
composer require jdlabails/php-project-analyzer-bundle
包简介
Symfony Bundle for PhpProjectAnalyzer
README 文档
README
Gives you consolidated views of analysis results.
It give a view like :
Features
- Aggregate php analysis metrics
- Offer user-friendly interface
- Execute quick scan of your project
- English or French interfaces
- Links with code coverage report
- Scoring based on quantity and quality metrics
- Enable PhpUnit or Atoum unit tests
- Security checker available
It executes
- Php Mess Detector
- Php Unit Tests
- Atoum tests
- Php Code Sniffer ( + reparation tool via phpcbf)
- Copy-paste detector
- Php Depend
- Php Loc
And parses their report to give a nice view for rapid analysis of your project.
Install
- composer require jdlabails/php-project-analyzer-bundle --dev
- add bundle to kernel
/* app/AppKernel.php */ public function registerBundles() { // ... $bundles[] = new JD\PhpProjectAnalyzerBundle\JDPhpProjectAnalyzerBundle(); // ... }
- Add routing
# app/config/routing.yml ppa: resource: '@JDPhpProjectAnalyzerBundle/Resources/config/routing.yml'
- Add security exception
access_control: # PPA - { path: "^(/[a-z]{2})?/ppa(/[a-z]*)?", roles: IS_AUTHENTICATED_ANONYMOUSLY }
- Set your config
framework: translator: { fallback: %locale% } jd_php_project_analyzer: title: Php project analyzer description: It's a ouaaaouhh project ! gitRepositoryURL: https://github.com/jdlabails/PhpProjectAnalyzerBundle # directory to analyze srcPath : /home/jd/Dev/ppa/src/JD # quantitative metric count : true # quality metric : copy-paste cpd : true # quality metric : code sniffer cs : enable: true standard: PSR2 # security checker security: true # quality metric : phpdepend depend : true # quality metric : phploc loc : true # quality metric : mess detector md : enable: true rules: cleancode: true codesize: true controversial: true design: true naming: true unusedcode: true # generate phpdoc docs : true # testing test : enable: false lib : phpunit # phpunit || atoum phpunitTestSuite : ppa # atoumPath : /home/smith/www/projectX/vendor/bin/atoum # atoumTestDir : /absolute/path/to/your/test/dir # score score: enable: true csWeight: 100 # between 0 and 100, weighting of code sniffer testWeight: 100 # between 0 and 100, weighting of testing locWeight: 100 # between 0 and 100, weighting of code coverage
- Set assets
php app/console assets:install
- Set right for ppa directory in the web directory
sudo php app/console ppa:init
- Add web/ppa in your .gitignore
Use
- Call http://127.0.0.1:8000/en/ppa with your nav.
- Click on 'Start Scan'
update your phar
cd Resources/_phar
chmod +x update.sh
./update.sh
Commands available
ppa:analyse:launch ==> launch analysis without web interface ppa:analyse:read ==> read analysis without web interface. The result is in json
Need contributions
Examples :
- avoid phar files for dependencies symfony
- refacto code
- unit tests
- download security checker at each scan
- behat
Just make a pull request on master
Check style
bin/phpcs --standard=PSR2 --extensions=php Entities Manager Command Controller DependencyInjection Traits
Unit Tests
bin/simple-phpunit -c phpunit.xml
Tip for local project
Put in your composer.json
"minimum-stability": "dev", "prefer-stable": true, "repositories": [ { "type": "path", "url": "/path/to/your/project/dir/jdlabails-php-project-analyzer-bundle/" } ],
jdlabails/php-project-analyzer-bundle 适用场景与选型建议
jdlabails/php-project-analyzer-bundle 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 10.85k 次下载、GitHub Stars 达 11, 最近一次更新时间为 2015 年 09 月 15 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「Php Project Analyzer Symfony」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 jdlabails/php-project-analyzer-bundle 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 jdlabails/php-project-analyzer-bundle 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 jdlabails/php-project-analyzer-bundle 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Log analyzer widget for yii2
Runtime analysis tool for Doctrine ORM integrated into Symfony Web Profiler. Unlike static linters, it analyzes actual query execution at runtime to detect performance bottlenecks, security vulnerabilities, and best practice violations during development with real execution context and data.
Phan plugins for Miraheze
Analyze queries generated by Prime ORM and dump unsafe or not optimized queries
A powerful Symfony bundle for user-agent analysis. It provides accurate detection of operating systems (Windows, MacOS, Linux, iOS, Android...), browsers (Chrome, Firefox, Safari...), and device types (Desktop, Mobile, Tablet, TV...). Supports specific version detection and includes advanced handlin
Static code analyzer for prooph projects
统计信息
- 总下载量: 10.85k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 12
- 点击次数: 11
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-09-15
