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

unknown collector type "superglobal" #671

Closed
staabm opened this issue Aug 23, 2021 · 5 comments · Fixed by #672
Closed

unknown collector type "superglobal" #671

staabm opened this issue Aug 23, 2021 · 5 comments · Fixed by #672

Comments

@staabm
Copy link
Contributor

staabm commented Aug 23, 2021

the example from https://github.com/qossmic/deptrac/blob/main/docs/collectors.md#superglobal-collector

applied like

paths:
  - controllers/
  - features/
  - lib/
  - models/
  - views/
layers:
  -   name: Foo
      collectors:
        -   type: superglobal
            names:
              - _POST
              - _GET

renders

PS C:\dvl\GitHub\philipp> composer deptrac
A script named bin would override a Composer command and has been skipped
> deptrac analyze app/portal/depfile.yml --report-uncovered --fail-on-uncovered
   0/288 [>---------------------------]   0%
 173/288 [================>-----------]  60%
 288/288 [============================] 100%
In Registry.php line 38:

  unknown collector type "superglobal", possible collectors are bool, className, functionName, classNameRegex, directory, inheritanceLevel, implements, extends, inherits, uses, method

using latest deptrac

PS C:\dvl\GitHub\philipp> .\vendor\bin\deptrac --version
deptrac 0.15.0
$ php -v
PHP 8.0.6 (cli) (built: May  4 2021 23:31:41) ( NTS Visual C++ 2019 x64 )
Copyright (c) The PHP Group
Zend Engine v4.0.6, Copyright (c) Zend Technologies
    with blackfire v1.64.0~win-x64-non_zts80, https://blackfire.io, by Blackfire

I tried different spellings like superGlobal but this didn't work either.
I am wondering that superglobal is not listed in the error message.

@staabm
Copy link
Contributor Author

staabm commented Aug 23, 2021

we are using the deptrac-shim.. maybe its related ... couldn't yet confirm

@patrickkusebauch
Copy link
Collaborator

patrickkusebauch commented Aug 23, 2021

Yeah, some dumb person forgot to add it to services.php. 😄 Sorry about that, my bad.

Off-topic: I really hate unit tests for deptrac. So many issues were missed because of having unit tests and not end-to-end (run deptrac with config file and check output) tests.

@patrickkusebauch
Copy link
Collaborator

Really shows the importance of #639

@dbrumann
Copy link
Collaborator

Yeah, some dumb person forgot to add it to services.php. 😄 Sorry about that, my bad.

We've all been there. One of my first additions had the same issue. 😄
Refactoring the config is on my radar and preventing this issue is on my list of things I want to improve.

I have just merged the PR and will create an 0.15.1 tomorrow morning

@staabm
Copy link
Contributor Author

staabm commented Aug 24, 2021

thank you guys. and no worries for making mistakes - we all do. <3.

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

Successfully merging a pull request may close this issue.

3 participants