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

Rule with null is interpreted as empty string #580

Closed
dbrumann opened this issue Jun 12, 2021 · 1 comment
Closed

Rule with null is interpreted as empty string #580

dbrumann opened this issue Jun 12, 2021 · 1 comment

Comments

@dbrumann
Copy link
Collaborator

Assuming you have a configuration with a ruleset where a layer does not define any dependencies, e.g. this one:

paths:
  - ./src
exclude_files:
  - '#.*test.*#'
layers:
  - name: Controllers
    collectors:
      - type: className
        regex: ^App\\Controller\\.*
ruleset:
  Controllers: ~ # or its equivalent: null

This will produce the following error:

In ArrayNode.php line 260:

  Invalid type for path "deptrac.ruleset.Controllers". Expected "array", but got "string"

The current workaround is to assign an empty list, i.e. Controllers: [], but it would be nice, if null/ ~ would work as well.

@dbrumann
Copy link
Collaborator Author

I can't reproduce this anymore, so closed for now

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

No branches or pull requests

1 participant