qossmic / deptrac

Keep your architecture clean.
https://qossmic.github.io/deptrac
MIT License
2.6k stars 135 forks source link

Generating image: Argument ($hiddenLayers) must be of type array null given #1343

Closed jazithedev closed 7 months ago

jazithedev commented 8 months ago

I'm trying to generate a graph

./vendor/bin/deptrac  --formatter=graphviz-image --output=./deptrac.png

and experiencing such error:

Warning: Undefined array key "hidden_layers" in phar:///my_path/vendor/qossmic/deptrac-shim/deptrac/src/Supportive/OutputFormatter/Configuration/ConfigurationGraphViz.php on line 13

Warning: Undefined array key "groups" in phar:///my_path/vendor/qossmic/deptrac-shim/deptrac/src/Supportive/OutputFormatter/Configuration/ConfigurationGraphViz.php on line 13

Warning: Undefined array key "point_to_groups" in phar:///my_path/vendor/qossmic/deptrac-shim/deptrac/src/Supportive/OutputFormatter/Configuration/ConfigurationGraphViz.php on line 13

 [ERROR]                                                                        

         Output formatter graphviz-image threw an Exception:                    

         Message:                                                               
         Qossmic\Deptrac\Supportive\OutputFormatter\Configuration\ConfigurationG
         raphViz::__construct(): Argument #1 ($hiddenLayers) must be of type    
         array, null given, called in                                           
         phar:///my_path/vendor/qossmic/deptrac-shim/deptr
         ac/src/Supportive/OutputFormatter/Configuration/ConfigurationGraphViz.p
         hp on line 13  

I'm at the newest version of Deptrac.

Here's the config:

parameters:
  paths:
    - ./src
  exclude_files:
    - 'Kernel.php'
  layers:
    - name: Application
      collectors:
        - { type: directory, regex: src/Application/.* }

    - name: Domain
      collectors:
        - { type: directory, regex: src/Domain/.* }

    - name: Infrastructure
      collectors:
        - { type: directory, regex: src/Infrastructure/.* }

  ruleset:
    Application:
      - Domain
    Domain: ~
    Infrastructure:
      - Application
      - Domain
xabbuh commented 8 months ago

looks like we need a release that contains #1251

gennadigennadigennadi commented 7 months ago

@see https://github.com/qossmic/deptrac/issues/1243