Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
jazithedev opened this issue Jan 12, 2024 · 2 comments
Closed

Comments

@jazithedev
Copy link

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
Copy link
Member

xabbuh commented Jan 12, 2024

looks like we need a release that contains #1251

@gennadigennadigennadi
Copy link
Member

@see #1243

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants