Deptrac is a static code analysis tool for PHP that helps you communicate, visualize and enforce architectural decisions in your projects

Overview

Deptrac

What is Deptrac?

Deptrac is a static code analysis tool for PHP that helps you communicate, visualize and enforce architectural decisions in your projects. You can freely define your architectural layers over classes and which rules should apply to them.

For example, you can use Deptrac to ensure that bundles/modules/extensions in your project are truly independent of each other to make them easier to reuse.

Deptrac can be used in a CI pipeline to make sure a pull request does not violate any of the architectural rules you defined. With the optional Graphviz formatter you can visualize your layers, rules and violations.

ModelController1

Table of Contents

  1. Requirements
  2. Installation
    1. PHAR
    2. PHIVE
    3. Composer
    4. Optional Dependency: Graphviz
  3. Getting Started
    1. The Depfile
  4. Run Deptrac
  5. Contribute
    1. Code of Conduct
  6. Further Documentation

Requirements

In order to run Deptrac you need at least PHP 7.4. We also support PHP 8.

You can analyse projects that require an older PHP version as long as nikic/php-parser can parse it.

Installation

While you can install Deptrac using composer, we recommend using either the phar installation or PHIVE. This will ensure that Deptrac and its dependencies are bundled together and will not interfere with any of your project's dependencies.

PHAR

Download the latest deptrac.phar.

You can run the phar file using php:

php deptrac.phar analyse

All examples in this documentation, assume you have the deptrac.phar downloaded in your project's root directory as described above.

Feel free to add Deptrac to your PATH (i.e. /usr/local/bin/deptrac) to make it globally available.

curl -LS https://github.com/qossmic/deptrac/releases/download/0.15.0/deptrac.phar -o deptrac.phar

# optional
sudo chmod +x deptrac.phar
sudo mv deptrac.phar /usr/local/bin/deptrac

PHIVE

You can install Deptrac with Phive

phive install -g qossmic/deptrac

and accept the key with fingerprint 41DD E075 4745 9FAE CFA1 7813 B8F6 4013 4AB1 782E.

To upgrade Deptrac use the following command:

phive update -g qossmic/deptrac

Composer

We do not recommend installing this repository via Composer. Instead, please use the dedicated distribution repository https://github.com/qossmic/deptrac-shim.

When you install Deptrac using the qossmic/deptrac-shim package, you will get the benefit of using the phar installation, but you can use it like any other composer dependency, i.e. you run Deptrac like this:

composer require qossmic/deptrac-shim
php vendor/bin/deptrac analyse

Optional Dependency: Graphviz

If you want to create graphical diagrams with your class dependencies, you will also need the dot command provided by Graphviz.

Graphviz can be installed using common package managers:

# for macos + brew
brew install graphviz

# for ubuntu and debian
sudo apt-get install graphviz

Graphviz is also available for Windows. Install the current stable release and append the binary path on the environment variable Path (e.g. C:\Program Files (x86)\Graphviz2.38\bin).

Getting Started

In order to get started with Deptrac you will need a configuration file, called depfile. This configuration file is written in YAML and, by default, is stored with the name depfile.yaml in your project's root directory.

Deptrac can generate a template for you, using the init command.

php deptrac.phar init

The main purpose of this file is:

  1. Define in which directories Deptrac will search for classes and which files to exclude.
  2. Define your architectural layers using so-called collectors.
  3. Define a ruleset describing which layers can communicate with each other.

You can find out more about the Core Concepts in the docs.

The Depfile

Let's have a look at the generated file:

# depfile.yaml
paths:
  - ./src
exclude_files:
  - '#.*test.*#'
layers:
  -
    name: Controller
    collectors:
      -
        type: className
        regex: .*Controller.*
  -
    name: Repository
    collectors:
      -
        type: className
        regex: .*Repository.*
  -
    name: Service
    collectors:
      -
        type: className
        regex: .*Service.*
ruleset:
  Controller:
    - Service
  Service:
    - Repository
  Repository: ~

By default, Deptrac will search your project's src/ directory for classes and will ignore any files and directory having test in it.

We then define three layers by searching for class names in the files found by Deptrac. Any file containing a class with Controller will be grouped in a layer with the same name. The same happens for classes having Repository and Service in their name. It is important to note that the fully qualified class name is used for grouping classes. That means, the collector will take the full namespace into account.

The default ruleset will then allow classes in the Controller-layer to communicate - i.e. use classes from - the Service layer. Classes grouped in the Service layer may not use classes from the Controller layer, but they can use classes from the Repository layer. Classes inside the Repository layer may not use any classes from the other two layers.

You can learn more about the file in the Depfile reference.

Run Deptrac

Once you have set up the depfile you can run Deptrac to analyse your code and check for violations.

php deptrac.phar

# which is equivalent to
php deptrac.phar analyse depfile.yaml

If you run php deptrac.phar -v you'll get a more verbose output.

The analyse command runs with a caching mechanism for parsed files by default. This can be disabled with the --no-cache option.

The generated output will roughly look like this:

 ----------- --------------------------------------------------------------------------------------------------------------------------------
  Reason      Repository
 ----------- --------------------------------------------------------------------------------------------------------------------------------
  Violation   examples\MyNamespace\Repository\SomeRepository must not depend on examples\MyNamespace\Controllers\SomeController (Controller)
              /Users/dbr/workspace/qossmic/deptrac/examples/ControllerServiceRepository1/SomeRepository.php:5
 ----------- --------------------------------------------------------------------------------------------------------------------------------


 -------------------- -----
  Report
 -------------------- -----
  Violations           1
  Skipped violations   0
  Uncovered            0
  Allowed              4
  Warnings             0
  Errors               0
 -------------------- -----

This is a report generated by Deptrac. At the top you can see a list of violations, if there are any. A violation means, that a layer uses a layer that is prohibited by the configured ruleset. In this case, a class from the Repository layer uses a class from the Controller layer.

The table on the bottom gives you an overview over:

  • how many violations were found.
  • how many violations were skipped, meaning your depfile contains exceptions. which will not cause Deptrac to return with an error status code, e.g. in CI, when these violations are found.
  • how many classes were found in the directories, that were not assigned to a layer.
  • how many usages between layers were found that do not violate the ruleset.
  • how many warnings where encountered, e.g. because a class is grouped in multiple layers.
  • how many errors were encountered, e.g. when you exclude a violation in your depfile but that violation is not encountered.

If the output does not match your expectations please take a look at the debugging commands available in Deptrac.

You can also change the output format itself by using one of the many provided Output Formatters.

Contribute

Deptrac is in active development. We are looking for your suggestions and help to make it better.

Feel free to open an issue if you encounter bugs, have suggestions or would like to add a new feature to Deptrac.

Please feel free to improve this documentation, fix bugs, or work on a suggested feature by making a pull request on GitHub. Don't hesitate to ask for support, if you need help at any point.

The Contribution Guide in the documentation contains some advice for making a pull request with code changes.

Code of Conduct

If you are professional and polite then everything will be alright.

Please don't be inconsiderate or mean, or anything in between.

Further Documentation

You can find additional documentation on the following topics in the docs/ directory:

  • Core Concepts - explains layers, rules and violations in more details.
  • Depfile - reference for all available settings in a depfile
  • Collectors - reference for which collectors are available in Deptrac to define your layers.
  • Formatters - lists the different output formats supported by Deptrac
  • Debugging - overview of the debug commands
  • Contribute - advice for contributing code changes, e.g. how to run tests or how to build a phar file with your changes that you can use to analyse your projects
Comments
  • Enhancement: Ignored/Exempt Layers

    Enhancement: Ignored/Exempt Layers

    I would like a way to define a layer that was available for dependency checks to other layers but otherwise exempt from validation. See also the conversation at: https://github.com/qossmic/deptrac/issues/506

    This might be beyond me for my first PR but I would be willing to try. I imagine it working with a special modifier like ~ (maybe + as a nod to transitive dependencies?). Those this would be a valid depfile:

    layers:
      - name: Core
        collectors:
          - type: className
            regex: Core
      - name: Module
        collectors:
          - type: className
            regex: Module
    
    ruleset:
      Core: +
      Module:
        - Core
    
    help wanted 
    opened by MGatner 18
  • Internal - Refactor AstRunner to support parsing more than classes

    Internal - Refactor AstRunner to support parsing more than classes

    Right now the whole AstRunner part of the codebase presumes that we are parsing classes only. This assumption runs deep across the codebase.

    Right now we have an issue requesting support for parsing function https://github.com/qossmic/deptrac/issues/331 Also, there is another issue requesting support for parsing global variables/superglobals https://github.com/qossmic/deptrac/issues/473

    After a Slack discussion with @dbrumann, I created this issue, where we can discuss what/how needs to be changed.

    cc @smoench, @slde-flash we would welcome your input on this, as you are more familiar with this part of the codebase.

    someone works on 
    opened by patrickkusebauch 18
  • test-suite doesn't green on windows

    test-suite doesn't green on windows

    running the testsuite on a windows box lead to a lot of errors.

    ...<snip>
    
    C:\dvl\GitHub\deptrac\tests\OutputFormatter\BaselineOutputFormatterTest.php:115
    
    31) Tests\Qossmic\Deptrac\OutputFormatter\BaselineOutputFormatterTest::testBasic with data set #1 (array(Qossmic\Deptrac\RulesetEngine\Violation Object (...)), 'skip_violations:\r\n  Origina...lB\r\n')
    Failed asserting that two strings are equal.
    --- Expected
    +++ Actual
    @@ @@
    -'skip_violations:\r\n
    -  OriginalA:\r\n
    -    - OriginalB\r\n
    +'skip_violations:\n
    +  OriginalA:\n
    +    - OriginalB\n
     '
    
    C:\dvl\GitHub\deptrac\tests\OutputFormatter\BaselineOutputFormatterTest.php:115
    
    32) Tests\Qossmic\Deptrac\OutputFormatter\BaselineOutputFormatterTest::testBasic with data set #0 (array(Qossmic\Deptrac\RulesetEngine\Violation Object (...)), 'skip_violations:\r\n  ClassA:...sB\r\n')
    Failed asserting that two strings are equal.
    --- Expected
    +++ Actual
    @@ @@
    -'skip_violations:\r\n
    -  ClassA:\r\n
    -    - ClassB\r\n
    +'skip_violations:\n
    +  ClassA:\n
    +    - ClassB\n
     '
    
    C:\dvl\GitHub\deptrac\tests\OutputFormatter\BaselineOutputFormatterTest.php:115
    
    FAILURES!
    Tests: 283, Assertions: 466, Failures: 32.
    

    it seems most of them are related to mixed line-endings.

    bug help wanted 
    opened by staabm 16
  • using `/vendor/` as a layer

    using `/vendor/` as a layer

    we want to minimize dependencies on external libraries (those installed via composer), or at least allow using those externals only from certain layers.

    from a architecture perspective we want 3rd party code only allow within the Integration layer.

    we try to use something like this (simplified):

    paths:
      - app/
    layers:
      - name: Controller
        collectors:
          - type: className
            regex: .*Controller.*
      - name: Business
        collectors:
          - type: className
            regex: .*\\business\\.*
      - name: BusinessException
        collectors:
          - type: className
            regex: .*\\exception\\.*
      - name: Vendor
        collectors:
          - type: directory
            regex: .*/vendor/.*
    ruleset:
      Controller:
        - ViewModel
      Business:
        - BusinessException
      Integration:
        - Business
        - Vendor
    

    we are wondering why we don't see a violation for the following code

    // app/portal/controllers/AuthenticationController.php
    <?php
    
    class AuthenticationController extends ApplicationController
    {
        public function createArchitectureErrorForTesting(): void
        {
            $test = (new \ZxcvbnPhp\Zxcvbn())->passwordStrength('xyt');
        }
    }
    

    the mentioned lib is installed via composer.json

    {
    ...
        "require" : {
            "ext-json": "*",
            "ext-soap": "*",
            "bjeavons/zxcvbn-php": "^1.2"
        },
    ...
    

    PS: using the regex on /vendor/ a few packages would be whitelisted via negative lookahead or similar (e.g. framework packages)

    opened by staabm 16
  • Load Collectors by FQCN

    Load Collectors by FQCN

    This patch enables the registry to load collectors by FQCN if not already present in the cache the missing object gets initiated and added to the cache.

    Should fix #164

    enhancement 
    opened by DanielBadura 16
  • Enhancement: skip_violations for traits

    Enhancement: skip_violations for traits

    Currently allowing a violation in a trait:

    skip_violations:
      CodeIgniter\HTTP\ResponseTrait:
        - CodeIgniter\Pager\PagerInterface
    

    ... will not apply to any of the classes that use the trait, requiring every class to apply the exemption as well.

    ----------- ------------------------------------------------------------------------------------------------ 
      Reason      HTTP                                                                                            
     ----------- ------------------------------------------------------------------------------------------------ 
      Violation   CodeIgniter\HTTP\ResponseInterface must not depend on CodeIgniter\Pager\PagerInterface (Pager)  
                  /opt/CodeIgniter4/system/HTTP/ResponseInterface.php:16                                          
      Violation   CodeIgniter\HTTP\ResponseInterface must not depend on CodeIgniter\Pager\PagerInterface (Pager)  
                  /opt/CodeIgniter4/system/HTTP/ResponseInterface.php:189                                         
      Violation   CodeIgniter\HTTP\ResponseInterface must not depend on CodeIgniter\Pager\PagerInterface (Pager)  
                  /opt/CodeIgniter4/system/HTTP/ResponseInterface.php:178                                         
      Violation   CodeIgniter\HTTP\Response must not depend on CodeIgniter\Pager\PagerInterface (Pager)           
                  CodeIgniter\HTTP\ResponseInterface::32 ->                                                       
                  CodeIgniter\Pager\PagerInterface::16                                                            
                  /opt/CodeIgniter4/system/HTTP/ResponseInterface.php:16                                          
      Violation   CodeIgniter\HTTP\Response must not depend on CodeIgniter\Pager\PagerInterface (Pager)           
                  CodeIgniter\HTTP\ResponseInterface::32 ->                                                       
                  CodeIgniter\Pager\PagerInterface::189                                                           
                  /opt/CodeIgniter4/system/HTTP/ResponseInterface.php:189                                         
      Violation   CodeIgniter\HTTP\Response must not depend on CodeIgniter\Pager\PagerInterface (Pager)           
                  CodeIgniter\HTTP\ResponseInterface::32 ->                                                       
                  CodeIgniter\Pager\PagerInterface::178                                                           
                  /opt/CodeIgniter4/system/HTTP/ResponseInterface.php:178                                         
      Violation   CodeIgniter\HTTP\Response must not depend on CodeIgniter\Pager\PagerInterface (Pager)           
                  CodeIgniter\HTTP\ResponseTrait::34 ->                                                           
                  CodeIgniter\Pager\PagerInterface::18                                                            
                  /opt/CodeIgniter4/system/HTTP/ResponseTrait.php:18                                              
      Violation   CodeIgniter\HTTP\Response must not depend on CodeIgniter\Pager\PagerInterface (Pager)           
                  CodeIgniter\HTTP\ResponseTrait::34 ->                                                           
                  CodeIgniter\Pager\PagerInterface::196                                                           
                  /opt/CodeIgniter4/system/HTTP/ResponseTrait.php:196                                             
      Violation   CodeIgniter\HTTP\Response must not depend on CodeIgniter\Pager\PagerInterface (Pager)           
                  CodeIgniter\HTTP\ResponseTrait::34 ->                                                           
                  CodeIgniter\Pager\PagerInterface::185                                                           
                  /opt/CodeIgniter4/system/HTTP/ResponseTrait.php:185                                             
      Violation   CodeIgniter\HTTP\RedirectResponse must not depend on CodeIgniter\Pager\PagerInterface (Pager)   
                  CodeIgniter\HTTP\Response::21 ->                                                                
                  CodeIgniter\HTTP\ResponseInterface::32 ->                                                       
                  CodeIgniter\Pager\PagerInterface::16                                                            
                  /opt/CodeIgniter4/system/HTTP/ResponseInterface.php:16                                          
      Violation   CodeIgniter\HTTP\RedirectResponse must not depend on CodeIgniter\Pager\PagerInterface (Pager)   
                  CodeIgniter\HTTP\Response::21 ->                                                                
                  CodeIgniter\HTTP\ResponseInterface::32 ->                                                       
                  CodeIgniter\Pager\PagerInterface::189                                                           
                  /opt/CodeIgniter4/system/HTTP/ResponseInterface.php:189                                         
      Violation   CodeIgniter\HTTP\RedirectResponse must not depend on CodeIgniter\Pager\PagerInterface (Pager)   
                  CodeIgniter\HTTP\Response::21 ->                                                                
                  CodeIgniter\HTTP\ResponseInterface::32 ->                                                       
                  CodeIgniter\Pager\PagerInterface::178                                                           
                  /opt/CodeIgniter4/system/HTTP/ResponseInterface.php:178                                         
      Violation   CodeIgniter\HTTP\RedirectResponse must not depend on CodeIgniter\Pager\PagerInterface (Pager)   
                  CodeIgniter\HTTP\Response::21 ->                                                                
                  CodeIgniter\HTTP\ResponseTrait::34 ->                                                           
                  CodeIgniter\Pager\PagerInterface::18                                                            
                  /opt/CodeIgniter4/system/HTTP/ResponseTrait.php:18                                              
      Violation   CodeIgniter\HTTP\RedirectResponse must not depend on CodeIgniter\Pager\PagerInterface (Pager)   
                  CodeIgniter\HTTP\Response::21 ->                                                                
                  CodeIgniter\HTTP\ResponseTrait::34 ->                                                           
                  CodeIgniter\Pager\PagerInterface::196                                                           
                  /opt/CodeIgniter4/system/HTTP/ResponseTrait.php:196                                             
      Violation   CodeIgniter\HTTP\RedirectResponse must not depend on CodeIgniter\Pager\PagerInterface (Pager)   
                  CodeIgniter\HTTP\Response::21 ->                                                                
                  CodeIgniter\HTTP\ResponseTrait::34 ->                                                           
                  CodeIgniter\Pager\PagerInterface::185                                                           
                  /opt/CodeIgniter4/system/HTTP/ResponseTrait.php:185                                             
      Violation   CodeIgniter\HTTP\DownloadResponse must not depend on CodeIgniter\Pager\PagerInterface (Pager)   
                  CodeIgniter\HTTP\Response::21 ->                                                                
                  CodeIgniter\HTTP\ResponseInterface::32 ->                                                       
                  CodeIgniter\Pager\PagerInterface::16                                                            
                  /opt/CodeIgniter4/system/HTTP/ResponseInterface.php:16                                          
      Violation   CodeIgniter\HTTP\DownloadResponse must not depend on CodeIgniter\Pager\PagerInterface (Pager)   
                  CodeIgniter\HTTP\Response::21 ->                                                                
                  CodeIgniter\HTTP\ResponseInterface::32 ->                                                       
                  CodeIgniter\Pager\PagerInterface::189                                                           
                  /opt/CodeIgniter4/system/HTTP/ResponseInterface.php:189                                         
      Violation   CodeIgniter\HTTP\DownloadResponse must not depend on CodeIgniter\Pager\PagerInterface (Pager)   
                  CodeIgniter\HTTP\Response::21 ->                                                                
                  CodeIgniter\HTTP\ResponseInterface::32 ->                                                       
                  CodeIgniter\Pager\PagerInterface::178                                                           
                  /opt/CodeIgniter4/system/HTTP/ResponseInterface.php:178                                         
      Violation   CodeIgniter\HTTP\DownloadResponse must not depend on CodeIgniter\Pager\PagerInterface (Pager)   
                  CodeIgniter\HTTP\Response::21 ->                                                                
                  CodeIgniter\HTTP\ResponseTrait::34 ->                                                           
                  CodeIgniter\Pager\PagerInterface::18                                                            
                  /opt/CodeIgniter4/system/HTTP/ResponseTrait.php:18                                              
      Violation   CodeIgniter\HTTP\DownloadResponse must not depend on CodeIgniter\Pager\PagerInterface (Pager)   
                  CodeIgniter\HTTP\Response::21 ->                                                                
                  CodeIgniter\HTTP\ResponseTrait::34 ->                                                           
                  CodeIgniter\Pager\PagerInterface::196                                                           
                  /opt/CodeIgniter4/system/HTTP/ResponseTrait.php:196                                             
      Violation   CodeIgniter\HTTP\DownloadResponse must not depend on CodeIgniter\Pager\PagerInterface (Pager)   
                  CodeIgniter\HTTP\Response::21 ->                                                                
                  CodeIgniter\HTTP\ResponseTrait::34 ->                                                           
                  CodeIgniter\Pager\PagerInterface::185                                                           
                  /opt/CodeIgniter4/system/HTTP/ResponseTrait.php:185                                             
     ----------- ------------------------------------------------------------------------------------------------ 
    
    help wanted no-issue-activity 
    opened by MGatner 14
  • `\` vs `\\`  in depfile

    `\` vs `\\` in depfile

    my testing on windows suggests that the example mentioned in the readme

    layers:
      - name: Foo
        collectors:
          - type: implements
            implements: 'App\SomeInterface'
    

    does not work.

    it works after adjusting it to

    layers:
      - name: Foo
        collectors:
          - type: implements
            implements: 'App\\SomeInterface'
    

    is this a windows only issue? is the example in the readme wrong?

    opened by clxmstaab 14
  • Exclude classes with `@internal` from collection

    Exclude classes with `@internal` from collection

    See #538

    To Do:

    • [x] Read @internal in class doc block
    • [x] Add flag to AstClassReference for @internal
    • [x] Provide collector for classes flagged as @internal
    no-pr-activity 
    opened by dbrumann 13
  • DirectoryCollector not working

    DirectoryCollector not working

    Hi,

    i'm trying to add my vendor directory as a layer to track dependencies. I get the following error:

    PHP Fatal error:  Uncaught Error: Call to a member function getFilepath() on null in phar:///home/user/projects/project/bin/deptrac.phar/src/Collector/DirectoryCollector.php:39
    Stack trace:
    #0 phar:///home/user/projects/project/bin/deptrac.phar/src/ClassNameLayerResolver.php(64): SensioLabs\Deptrac\Collector\DirectoryCollector->satisfy(Array, Object(SensioLabs\AstRunner\AstParser\NikicPhpParser\AstClassReference), Object(SensioLabs\AstRunner\AstMap), Object(SensioLabs\Deptrac\CollectorFactory), Object(SensioLabs\AstRunner\AstParser\NikicPhpParser\NikicPhpParser))
    #1 phar:///home/user/projects/project/bin/deptrac.phar/src/ClassNameLayerResolverCacheDecorator.php(23): SensioLabs\Deptrac\ClassNameLayerResolver->getLayersByClassName('Exception')
    #2 phar:///home/user/projects/project/bin/deptrac.phar/src/RulesetEngine.php(25): SensioLabs\Deptrac\ClassNameLayerResolverCacheDecorator->getLayersByClassName('Exception')
    #3 phar:///home/user/projects/project in phar:///home/user/projects/project/bin/deptrac.phar/src/Collector/DirectoryCollector.php on line 39
    

    My configuration for the layer looks like this:

    - name: Vendor
        collectors:
          - type: directory
            regex: vendor/.*
    

    The configuration follows the documentation, I also tried different regex and escaping of the slash etc.

    Any ideas?

    Love this tool by the way ;)

    bug 
    opened by maxkaemmerer 12
  • added windows-ci github-action

    added windows-ci github-action

    https://github.com/qossmic/deptrac/pull/700 should be merged before we discuss this PR, as it partly depends on the changes

    closes https://github.com/qossmic/deptrac/issues/586

    opened by staabm 11
  • Bool Collector: Multiple Class Layers

    Bool Collector: Multiple Class Layers

    Off this recommendation I am implementing the Bool Collector. I think I have it configured all correctly, but I am receiving warnings about classes existing in multiple layers that they clearly should not qualify for.

    Here is an example message:

    Tatter\Users\Entities\MythEntity is in more than one layer ["Entity", "Other Entity"]. It is recommended that one class should only be in one layer.

    An example of the generating files: https://github.com/tattersoftware/codeigniter4-workflows/pull/34/files

    And the full output, in case that is helpful: https://github.com/tattersoftware/codeigniter4-workflows/runs/2968297790?check_suite_focus=true

    Note: This is a work in progress, I realize some things in the depfile are wonky but I don't think that is the issue.

    opened by MGatner 11
  • Bump phpstan/phpstan-symfony from 1.2.14 to 1.2.19

    Bump phpstan/phpstan-symfony from 1.2.14 to 1.2.19

    Bumps phpstan/phpstan-symfony from 1.2.14 to 1.2.19.

    Release notes

    Sourced from phpstan/phpstan-symfony's releases.

    1.2.19

    • dac2474 - Add generics for PasswordUpgraderInterface
    • 72cf8cf - Update release-toot.yml
    • 4a920ef - Create release-toot.yml

    1.2.18

    • 3178f15 - Revert "Remove nullable type after calling HeaderBag::has"

    1.2.17

    • 7389207 - Remove nullable type after calling HeaderBag::has
    • c55237a - Update dessant/lock-threads action to v4
    • e088444 - Fix build

    1.2.16

    • d6ea162 - Fix Envelope::all() return type

    1.2.15

    • 7210072 - Improve Envelope::all() return type
    • e5e807b - Update metcalfc/changelog-generator action to v4
    Commits
    • dac2474 Add generics for PasswordUpgraderInterface
    • 72cf8cf Update release-toot.yml
    • 4a920ef Create release-toot.yml
    • 3178f15 Revert "Remove nullable type after calling HeaderBag::has"
    • 7389207 Remove nullable type after calling HeaderBag::has
    • c55237a Update dessant/lock-threads action to v4
    • e088444 Fix build
    • d6ea162 Fix Envelope::all() return type
    • 7210072 Improve Envelope::all() return type
    • e5e807b Update metcalfc/changelog-generator action to v4
    • See full diff in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Bump phpstan/phpdoc-parser from 1.13.0 to 1.15.3

    Bump phpstan/phpdoc-parser from 1.13.0 to 1.15.3

    Bumps phpstan/phpdoc-parser from 1.13.0 to 1.15.3.

    Release notes

    Sourced from phpstan/phpdoc-parser's releases.

    1.15.3

    • 61800f7 - Fix ConstExprArrayItemNode::__toString()
    • 57918d9 - Create release-toot.yml

    1.15.2

    1.15.1

    • 950bddf - Support unsealed array shapes

    1.15.0

    • 6ff970a - Fix tests
    • 2a4686e - Add generics support to @method definitions
    • c7c2609 - Update dessant/lock-threads action to v4

    1.14.0

    • df1a794 - Generics type projections (call-site variance)

    1.13.1

    • aac4411 - Add specialized tags support
    • 066f9d0 - Update send-pr.yml
    • 4f28c2e - Update metcalfc/changelog-generator action to v4
    Commits
    • 61800f7 Fix ConstExprArrayItemNode::__toString()
    • 57918d9 Create release-toot.yml
    • 5941477 Fix printing nodes
    • 950bddf Support unsealed array shapes
    • 6ff970a Fix tests
    • 2a4686e Add generics support to @method definitions
    • c7c2609 Update dessant/lock-threads action to v4
    • df1a794 Generics type projections (call-site variance)
    • aac4411 Add specialized tags support
    • 066f9d0 Update send-pr.yml
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • CodeClimate Report: location/path must be set from repository root

    CodeClimate Report: location/path must be set from repository root

    Hi,

    the code-climate report generated with -f codeclimate has an issue: The entry for location/path per issue must be set relative to the repository root. Currently this is set as an absolute path.

    This is a problem for GitLab CI which sets an URL in its interface relative to this path in the repository. This is also stated in the GitLab CI documentation: https://docs.gitlab.com/ee/ci/testing/code_quality.html#implementing-a-custom-tool

    location.path | The relative path to the file containing the code quality violation.

    F.e.:

    [
        {
            "type": "issue",
            "check_name": "Dependency violation",
            "description": "App\\GreetingService has uncovered dependency on App\\Greeting\\GreetingInterface (Interface)",
            "categories": [
                "Style",
                "Complexity"
            ],
            "severity": "major",
            "location": {
                "path": "\/builds\/group\/example\/src\/GreetingService.php",
                "lines": {
                    "begin": 9
                }
            }
        },
    

    which generates a URL in GitLab like https://gitlab.com/group/example/-/blob/9013bc9744e99436767e0ef57d0fbcf6a7f5//builds/group/example/src/GreetingService.php#L9

    Possible solution: Cut everything from the path up to the working directory of deptrac or determine path based on paths in the deptrac config/option.

    opened by codegain 0
  • Bump symfony/console from 6.1.7 to 6.2.2

    Bump symfony/console from 6.1.7 to 6.2.2

    Bumps symfony/console from 6.1.7 to 6.2.2.

    Release notes

    Sourced from symfony/console's releases.

    v6.2.2

    Changelog (https://github.com/symfony/console/compare/v6.2.1...v6.2.2)

    • bug #48681 Revert "bug #48089 Fix clear line with question in section (maxbeckers) (chalasr)
    • bug #48580 Fix missing command not matching namespace error message (Titouan Galopin)
    • bug #48089 Fix clear line with question in section (maxbeckers)

    v6.2.1

    Changelog (https://github.com/symfony/console/compare/v6.2.0...v6.2.1)

    • bug #48428 Fixed undefined variable error (Kevin Meijer)

    v6.2.0

    Changelog (https://github.com/symfony/console/compare/v6.2.0-RC2...v6.2.0)

    • no significant changes

    v6.2.0-RC2

    Changelog (https://github.com/symfony/console/compare/v6.2.0-RC1...v6.2.0-RC2)

    • no significant changes

    v6.2.0-RC1

    Changelog (https://github.com/symfony/console/compare/v6.2.0-BETA3...v6.2.0-RC1)

    • bug #48179 Support completion for bash functions (Chi-teck)

    v6.2.0-BETA3

    Changelog (https://github.com/symfony/console/compare/v6.2.0-BETA2...v6.2.0-BETA3)

    • bug #48217 Improve error message when shell is not detected in completion command (GromNaN)
    • bug #48210  Fix signal handlers called after event listeners and skip exit (GromNaN)
    • bug #47998 Fix console ProgressBar::override() after manual ProgressBar::cleanup() (maxbeckers)
    • bug #48085 Tell about messenger:consume invalid limit options (MatTheCat)

    v6.2.0-BETA2

    Changelog (https://github.com/symfony/console/compare/v6.2.0-BETA1...v6.2.0-BETA2)

    • bug #47907 Update Application.php (aleksandr-shevchenko)

    v6.2.0-BETA1

    Changelog (https://github.com/symfony/console/compare/v6.1.6...v6.2.0-BETA1)

    • feature #47750 Show available commands in namespace when running namespace as command (wouterj)
    • feature #47730 Ban DateTime from the codebase (WebMamba)
    • feature #47308 Allow limiting the height of a console section (wouterj)
    • feature #47588 Add warning for possibly truncated inputs in QuestionHelper (#47586) (pbek)
    • feature #38996 Remove the default values from setters with a nullable parameter (derrabus, nicolas-grekas)
    • feature #47407 Terminal Color Mode refactoring and force Color Mode (julien-boudry)
    • feature #47062 Don't cut Urls wrapped in SymfonyStyle block (fchris82, GromNaN)

    ... (truncated)

    Changelog

    Sourced from symfony/console's changelog.

    CHANGELOG

    6.2

    • Improve truecolor terminal detection in some cases
    • Add support for 256 color terminals (conversion from Ansi24 to Ansi8 if terminal is capable of it)
    • Deprecate calling *Command::setApplication(), *FormatterStyle::setForeground/setBackground(), Helper::setHelpSet(), Input*::setDefault(), Question::setAutocompleterCallback/setValidator()without any arguments
    • Change the signature of OutputFormatterStyleInterface::setForeground/setBackground() to setForeground/setBackground(?string)
    • Change the signature of HelperInterface::setHelperSet() to setHelperSet(?HelperSet)

    6.1

    • Add support to display table vertically when calling setVertical()
    • Add method __toString() to InputInterface
    • Added OutputWrapper to prevent truncated URL in SymfonyStyle::createBlock.
    • Deprecate Command::$defaultName and Command::$defaultDescription, use the AsCommand attribute instead
    • Add suggested values for arguments and options in input definition, for input completion
    • Add $resumeAt parameter to ProgressBar#start(), so that one can easily 'resume' progress on longer tasks, and still get accurate getEstimate() and getRemaining() results.

    6.0

    • Command::setHidden() has a default value (true) for $hidden parameter and is final
    • Remove Helper::strlen(), use Helper::width() instead
    • Remove Helper::strlenWithoutDecoration(), use Helper::removeDecoration() instead
    • AddConsoleCommandPass can not be configured anymore
    • Remove HelperSet::setCommand() and getCommand() without replacement

    5.4

    • Add TesterTrait::assertCommandIsSuccessful() to test command
    • Deprecate HelperSet::setCommand() and getCommand() without replacement

    5.3

    • Add GithubActionReporter to render annotations in a Github Action
    • Add InputOption::VALUE_NEGATABLE flag to handle --foo/--no-foo options
    • Add the Command::$defaultDescription static property and the description attribute on the console.command tag to allow the list command to instantiate commands lazily
    • Add option --short to the list command
    • Add support for bright colors
    • Add #[AsCommand] attribute for declaring commands on PHP 8
    • Add Helper::width() and Helper::length()
    • The --ansi and --no-ansi options now default to null.

    ... (truncated)

    Commits
    • 5a9bd5c Merge branch '6.1' into 6.2
    • c649f33 Revert "bug #48089 [Console] Fix clear line with question in section (maxbeck...
    • 0945e82 Merge branch '6.1' into 6.2
    • 578809f bug #48089 [Console] Fix clear line with question in section (maxbeckers)
    • a42df13 Fix missing command not matching namespace error message
    • 58f6cef Fixed undefined variable error
    • 75d4749 [Console] Fix OutputInterface options int-mask for PhpStan
    • 54f790f Merge branch '6.1' into 6.2
    • a71863e Merge branch '6.0' into 6.1
    • be29442 Merge branch '5.4' into 6.0
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 2
  • Bump symfony/dependency-injection from 6.1.5 to 6.2.2

    Bump symfony/dependency-injection from 6.1.5 to 6.2.2

    Bumps symfony/dependency-injection from 6.1.5 to 6.2.2.

    Release notes

    Sourced from symfony/dependency-injection's releases.

    v6.2.2

    Changelog (https://github.com/symfony/dependency-injection/compare/v6.2.1...v6.2.2)

    • bug #48591 Shared private services becomes public after a public service is accessed (alexpott)
    • bug #48449 Fix bug when tag name is a text node (BrandonlinU)
    • bug #48522 Generate different classes for ghost objects and virtual proxies (nicolas-grekas)
    • bug #48482 Revert "bug #48027 Don't autoconfigure tag when it's already set with attributes" (nicolas-grekas)

    v6.2.1

    Changelog (https://github.com/symfony/dependency-injection/compare/v6.2.0...v6.2.1)

    • bug #48502 Fix ContainerBuilder stats env usage with enum (alamirault)
    • bug #48483 Remove refs that point to container.excluded services when allowed (nicolas-grekas)
    • bug #48461 Fix possible memory-leak when using lazy-objects (nicolas-grekas)

    v6.2.0

    Changelog (https://github.com/symfony/dependency-injection/compare/v6.2.0-RC2...v6.2.0)

    • no significant changes

    v6.2.0-RC1

    Changelog (https://github.com/symfony/dependency-injection/compare/v6.2.0-BETA3...v6.2.0-RC1)

    • bug #48224 Process bindings in ServiceLocatorTagPass (MatTheCat)

    v6.2.0-BETA3

    Changelog (https://github.com/symfony/dependency-injection/compare/v6.2.0-BETA2...v6.2.0-BETA3)

    • bug #48093 don't move locator tag for service subscriber (RobertMe)
    • feature #48045 Allow enum as service parameter in php config files (alexndlm)
    • bug #48027 Don't autoconfigure tag when it's already set with attributes (nicolas-grekas)

    v6.2.0-BETA1

    Changelog (https://github.com/symfony/dependency-injection/compare/v6.1.6...v6.2.0-BETA1)

    • feature #47364 Allow array attributes for service tags (aschempp)
    • feature #47906 Allow injecting the current env into php config closures (HypeMC)
    • feature #47902 Add support for tagged iterators/locators exclude option to xml and yaml (HypeMC)
    • feature #47801 Allow array for the value of Autowire attribute (willemverspyck)
    • feature #47730 Ban DateTime from the codebase (WebMamba)
    • feature #47683 Deprecate numeric parameter names (HeahDude)
    • feature #38996 Remove the default values from setters with a nullable parameter (derrabus, nicolas-grekas)
    • feature #47236 Generate lazy-loading virtual proxies for non-ghostable lazy services (nicolas-grekas)
    • feature #47367 Handle INI arrays (MatTheCat)
    • feature #47101 Allow service subscribers to return SubscribedService[] (kbond)
    • feature #47196 Allow extending #[When] attribute (ruudk)
    • feature #46821 Add resolve-env option to debug:config command (alexandre-daubois)
    • feature #46752 Use lazy-loading ghost object proxies out of the box (nicolas-grekas)
    • feature #46883 Add shuffle env processor (ostrolucky)
    • feature #46564 Add Enum Env Var Processor (jack-worman)

    ... (truncated)

    Changelog

    Sourced from symfony/dependency-injection's changelog.

    CHANGELOG

    6.2

    • Use lazy-loading ghost objects and virtual proxies out of the box
    • Add arguments &$asGhostObject and $id to LazyProxy's DumperInterface to allow using ghost objects for lazy loading services
    • Add enum env var processor
    • Add shuffle env var processor
    • Allow #[When] to be extended
    • Change the signature of ContainerAwareInterface::setContainer() to setContainer(?ContainerInterface)
    • Deprecate calling ContainerAwareTrait::setContainer() without arguments
    • Deprecate using numeric parameter names
    • Add support for tagged iterators/locators exclude option to the xml and yaml loaders/dumpers
    • Allow injecting string $env into php config closures

    6.1

    • Add #[MapDecorated] attribute telling to which parameter the decorated service should be mapped in a decorator
    • Add #[AsDecorator] attribute to make a service decorates another
    • Add $exclude to TaggedIterator and TaggedLocator attributes
    • Add $exclude to tagged_iterator and tagged_locator configurator
    • Add an env function to the expression language provider
    • Add an Autowire attribute to tell a parameter how to be autowired
    • Allow using expressions as service factories
    • Add argument type closure to help passing closures to services
    • Deprecate ReferenceSetArgumentTrait
    • Add AbstractExtension class for DI configuration/definition on a single file

    6.0

    • Remove Definition::setPrivate() and Alias::setPrivate(), use setPublic() instead
    • Remove inline() in favor of inline_service() and ref() in favor of service() when using the PHP-DSL
    • Remove Definition::getDeprecationMessage(), use Definition::getDeprecation() instead
    • Remove Alias::getDeprecationMessage(), use Alias::getDeprecation() instead
    • Remove the Psr\Container\ContainerInterface and Symfony\Component\DependencyInjection\ContainerInterface aliases of the service_container service

    5.4

    • Add $defaultIndexMethod and $defaultPriorityMethod to TaggedIterator and TaggedLocator attributes
    • Add service_closure() to the PHP-DSL
    • Add support for autoconfigurable attributes on methods, properties and parameters
    • Make auto-aliases private by default
    • Add support for autowiring union and intersection types

    5.3

    ... (truncated)

    Commits
    • c33a5f6 Merge branch '6.1' into 6.2
    • bfa7df2 Merge branch '6.0' into 6.1
    • 91b31a3 Merge branch '5.4' into 6.0
    • 4fc0a1b bug #48591 [DependencyInjection] Shared private services becomes public after...
    • 69123ae [DependencyInjection] Shared private services becomes public after a public s...
    • 82953de [DI] Fix undefined class in test
    • 7dcae05 bug #48449 [DependencyInjection] Fix bug when tag name is a text node (Brando...
    • a8b127b [DependencyInjection] Fix bug when tag name is a text node
    • 96b1ef4 bug #48522 [DependencyInjection] Generate different classes for ghost objects...
    • 6d272bc Merge branch '6.1' into 6.2
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Bump friendsofphp/php-cs-fixer from 3.13.0 to 3.13.1

    Bump friendsofphp/php-cs-fixer from 3.13.0 to 3.13.1

    Bumps friendsofphp/php-cs-fixer from 3.13.0 to 3.13.1.

    Release notes

    Sourced from friendsofphp/php-cs-fixer's releases.

    v3.13.1 Oliva

    • bug: Align all the arrows inside the same array (#6590)
    • bug: Fix priority between modernize_types_casting and no_unneeded_control_parentheses (#6687)
    • bug: TrailingCommaInMultilineFixer - do not add trailing comma when there is no break line after last element (#6677)
    • docs: Fix docs for disabled rules in rulesets (#6679)
    • docs: fix the cookbook_fixers.rst (#6672)
    • docs: Update installation recommended commands for mkdir argument (-p insteadof --parents). (#6689)
    • Make static data providers that are not using dynamic calls (#6696)
    • minor: displaying number of checked files (#6674)
    Changelog

    Sourced from friendsofphp/php-cs-fixer's changelog.

    Changelog for v3.13.1

    • bug: Align all the arrows inside the same array (#6590)
    • bug: Fix priority between modernize_types_casting and no_unneeded_control_parentheses (#6687)
    • bug: TrailingCommaInMultilineFixer - do not add trailing comma when there is no break line after last element (#6677)
    • docs: Fix docs for disabled rules in rulesets (#6679)
    • docs: fix the cookbook_fixers.rst (#6672)
    • docs: Update installation recommended commands for mkdir argument (-p insteadof --parents). (#6689)
    • Make static data providers that are not using dynamic calls (#6696)
    • minor: displaying number of checked files (#6674)
    Commits
    • 78d2251 prepared the 3.13.1 release
    • a2bdba3 Make static data providers that are not using dynamic calls (#6696)
    • ad0a87e bug: Align all the arrows inside the same array (#6590)
    • 663f3fc docs: Update installation recommended commands for mkdir argument (-p ins...
    • 9c7070b bug: Fix priority between modernize_types_casting and `no_unneeded_control_...
    • 046ff90 docs: Fix docs for disabled rules in rulesets (#6679)
    • b577444 minor: displaying number of checked files (#6674)
    • bb94db0 bug: TrailingCommaInMultilineFixer - do not add trailing comma when there is ...
    • 3969f39 docs: fix the cookbook_fixers.rst (#6672)
    • a1a5570 bumped version
    • See full diff in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 2
Releases(1.0.2)
Owner
QOSSMIC GmbH
QOSSMIC GmbH
A static php code analysis tool using the Graph Theory

Mondrian Ok guyz, you have a master degree in Graph Theory, you follow Law of Demeter and you live on S.O.L.I.D principles ? Let's have some Fun ! (^ω

Florent Genette 391 Nov 30, 2022
Beautiful and understandable static analysis tool for PHP

PhpMetrics PhpMetrics provides metrics about PHP project and classes, with beautiful and readable HTML report. Documentation | Twitter | Contributing

PhpMetrics 2.3k Dec 22, 2022
PHP Architecture Tester - Easy to use architectural testing tool for PHP :heavy_check_mark:

Easy to use architecture testing tool for PHP Introduction ?? PHP Architecture Tester is a static analysis tool to verify architectural requirements.

Carlos A Sastre 765 Dec 30, 2022
A static analysis tool for finding errors in PHP applications

Psalm Psalm is a static analysis tool for finding errors in PHP applications. Installation To get started, check out the installation guide. Live Demo

Vimeo 5k Jan 2, 2023
A static analysis tool for security

progpilot A static analyzer for security purposes Only PHP language is currently supported Installation Option 1: use standalone phar Download the lat

null 271 Dec 27, 2022
Performs advanced static analysis on PHP code

PHP Analyzer Please report bugs or feature requests via our website support system ? in bottom right or by emailing [email protected]. Contri

Continuous Inspection 443 Sep 23, 2022
Static code analysis to find violations in a dependency graph

PhpDependencyAnalysis PhpDependencyAnalysis is an extendable static code analysis for object-oriented PHP-Projects to generate dependency graphs from

Marco Muths 546 Dec 7, 2022
The Exakat Engine : smart static analysis for PHP

Exakat The Exakat Engine is an automated code reviewing engine for PHP. Installation Installation with the phar Phar is the recommended installation p

Exakat 370 Dec 28, 2022
Static Analysis Results Baseliner

Static Analysis Results Baseliner (SARB) Why SARB Requirements Installing Using SARB Examples Further reading Why SARB? If you've tried to introduce a

Dave Liddament 151 Jan 3, 2023
Infection Static Analysis Plugin

Static analysis on top of mutation testing - prevents escaped mutants from being invalid according to static analysis

Roave, LLC 108 Jan 2, 2023
PHPCheckstyle is an open-source tool that helps PHP programmers adhere to certain coding conventions.

PHPCheckstyle Overview PHPCheckstyle is an open-source tool that helps PHP programmers adhere to certain coding conventions. The tools checks the inpu

PHPCheckstyle 157 Dec 5, 2022
Provides functionality that helps writing PHP code that has runtime-specific (PHP / HHVM) execution paths

sebastian/environment This component provides functionality that helps writing PHP code that has runtime-specific (PHP / HHVM) execution paths. Instal

Sebastian Bergmann 6.5k Jan 3, 2023
Tool helping us to analyze software projects

Qafoo Quality Analyzer This software is a tool to visualize metrics and source code. We use this software for Code Reviews together with our customers

Qafoo GmbH 494 Dec 29, 2022
A set of tools for lexical and syntactical analysis written in pure PHP.

Welcome to Dissect! master - this branch always contains the last stable version. develop - the unstable development branch. Dissect is a set of tools

Jakub Lédl 221 Nov 29, 2022
A project to add Psalm support for Drupal for security testing, focused only on taint analysis.

psalm-plugin-drupal A Drupal integration for Psalm focused on security scanning (SAST) taint analysis. Features Stubs for sinks, sources, and sanitize

Samuel Mortenson 38 Aug 29, 2022
Phan is a static analyzer for PHP. Phan prefers to avoid false-positives and attempts to prove incorrectness rather than correctness.

Phan is a static analyzer for PHP that prefers to minimize false-positives. Phan attempts to prove incorrectness rather than correctness. Phan looks f

null 5.4k Jan 7, 2023
A PHP code-quality tool

GrumPHP Sick and tired of defending code quality over and over again? GrumPHP will do it for you! This composer plugin will register some git hooks in

PHPro 3.9k Jan 1, 2023
A tool to automatically fix PHP Coding Standards issues by Dragon Code.

A tool to automatically fix PHP Coding Standards issues by Dragon Code.

The Dragon Code 24 Aug 27, 2022
A static analyzer for PHP version migration

PHP Migration Readme in Chinese 中文 This is a static analyzer for PHP version migration and compatibility checking. It can suppose your current code ru

Yuchen Wang 194 Sep 27, 2022