2017 © Pedro Peláez
 

symfony-bundle php-project-analyzer-bundle

Symfony Bundle for PhpProjectAnalyzer

image

jdlabails/php-project-analyzer-bundle

Symfony Bundle for PhpProjectAnalyzer

  • Sunday, April 15, 2018
  • by jdlabails
  • Repository
  • 2 Watchers
  • 9 Stars
  • 2,449 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 2 Open issues
  • 30 Versions
  • 22 % Grown

The README.md

Php Project Analyzer Bundle

Gives you consolidated views of analysis results., (*1)

Build Status Total Downloads Latest Stable Version SensioLabsInsight, (*2)

It give a view like :, (*3)

, (*4)

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, (*5)

And parses their report to give a nice view for rapid analysis of your project., (*6)

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, (*7)

    access_control:
     # PPA
     - { path: "^(/[a-z]{2})?/ppa(/[a-z]*)?", roles: IS_AUTHENTICATED_ANONYMOUSLY }
    
  • Set your config, (*8)

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 ```bash 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 ```bash 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, (*9)

Need contributions

Examples : * avoid phar files for dependencies symfony * refacto code * unit tests * download security checker at each scan * behat, (*10)

Just make a pull request on master, (*11)

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, (*12)

json "minimum-stability": "dev", "prefer-stable": true, "repositories": [ { "type": "path", "url": "/path/to/your/project/dir/jdlabails-php-project-analyzer-bundle/" } ],, (*13)

The Versions

21/09 2016

v1.2.2

1.2.2.0 https://github.com/jdlabails/PhpProjectAnalyzerBundle

Symfony Bundle for PhpProjectAnalyzer

  Sources   Download

MIT

The Requires

 

by Jean-David Labails

php project analyzer symfony

21/09 2016

v1.2.1

1.2.1.0 https://github.com/jdlabails/PhpProjectAnalyzerBundle

Symfony Bundle for PhpProjectAnalyzer

  Sources   Download

MIT

The Requires

 

by Jean-David Labails

php project analyzer symfony

21/09 2016

v1.2.0

1.2.0.0 https://github.com/jdlabails/PhpProjectAnalyzerBundle

Symfony Bundle for PhpProjectAnalyzer

  Sources   Download

MIT

The Requires

 

by Jean-David Labails

php project analyzer symfony

11/06 2016

v1.1.2

1.1.2.0 https://github.com/jdlabails/PhpProjectAnalyzerBundle

Symfony Bundle for PhpProjectAnalyzer

  Sources   Download

MIT

The Requires

 

by Jean-David Labails

php project analyzer symfony

21/02 2016

v1.1.1

1.1.1.0 https://github.com/jdlabails/PhpProjectAnalyzerBundle

Symfony Bundle for PhpProjectAnalyzer

  Sources   Download

MIT

The Requires

 

by Jean-David Labails

php project analyzer symfony

04/02 2016

v1.1.0

1.1.0.0 https://github.com/jdlabails/PhpProjectAnalyzerBundle

Bundle for PhpProjectAnalyzer

  Sources   Download

MIT

The Requires

 

by Jean-David Labails

php project analyzer

01/02 2016

v1.0

1.0.0.0 https://github.com/jdlabails/PhpProjectAnalyzerBundle

Bundle for PhpProjectAnalyzer

  Sources   Download

MIT

The Requires

 

by Jean-David Labails

php project analyzer

30/01 2016

v0.13

0.13.0.0 https://github.com/jdlabails/PhpProjectAnalyzerBundle

Bundle for PhpProjectAnalyzer

  Sources   Download

MIT

The Requires

 

by Jean-David Labails

php project analyzer

24/01 2016

0.12

0.12.0.0 https://github.com/jdlabails/PhpProjectAnalyzerBundle

Bundle for PhpProjectAnalyzer

  Sources   Download

MIT

The Requires

 

by Jean-David Labails

php project analyzer

24/01 2016

0.11

0.11.0.0 https://github.com/jdlabails/PhpProjectAnalyzerBundle

Bundle for PhpProjectAnalyzer

  Sources   Download

MIT

The Requires

 

by Jean-David Labails

php project analyzer

24/01 2016

0.10

0.10.0.0 https://github.com/jdlabails/PhpProjectAnalyzerBundle

Bundle for PhpProjectAnalyzer

  Sources   Download

MIT

The Requires

 

by Jean-David Labails

php project analyzer

23/01 2016

0.9

0.9.0.0 https://github.com/jdlabails/PhpProjectAnalyzerBundle

Bundle for PhpProjectAnalyzer

  Sources   Download

MIT

The Requires

 

by Jean-David Labails

php project analyzer

23/01 2016

0.8

0.8.0.0 https://github.com/jdlabails/PhpProjectAnalyzerBundle

Bundle for PhpProjectAnalyzer

  Sources   Download

MIT

The Requires

 

by Jean-David Labails

php project analyzer

27/09 2015

0.7

0.7.0.0 https://github.com/jdlabails/PhpProjectAnalyzerBundle

Bundle for PhpProjectAnalyzer

  Sources   Download

MIT

The Requires

 

by Jean-David Labails

php project analyzer

27/09 2015

0.6

0.6.0.0 https://github.com/jdlabails/PhpProjectAnalyzerBundle

Bundle for PhpProjectAnalyzer

  Sources   Download

MIT

The Requires

 

by Jean-David Labails

php project analyzer

21/09 2015

0.5

0.5.0.0 https://github.com/jdlabails/PhpProjectAnalyzerBundle

Bundle for PhpProjectAnalyzer

  Sources   Download

MIT

The Requires

 

by Jean-David Labails

php project analyzer

17/09 2015

0.4

0.4.0.0 https://github.com/jdlabails/PhpProjectAnalyzerBundle

Bundle for PhpProjectAnalyzer

  Sources   Download

MIT

The Requires

 

by Jean-David Labails

php project analyzer

15/09 2015

0.3

0.3.0.0 https://github.com/jdlabails/PhpProjectAnalyzerBundle

Bundle for PhpProjectAnalyzer

  Sources   Download

MIT

The Requires

 

by Jean-David Labails

php project analyzer

15/09 2015

0.2

0.2.0.0 https://github.com/jdlabails/PhpProjectAnalyzerBundle

Bundle for PhpProjectAnalyzer

  Sources   Download

MIT

The Requires

 

by Jean-David Labails

php project analyzer

15/09 2015

0.1

0.1.0.0 https://github.com/jdlabails/PhpProjectAnalyzerBundle

Bundle for PhpProjectAnalyzer

  Sources   Download

MIT

The Requires

 

by Jean-David Labails

php project analyzer