-
Notifications
You must be signed in to change notification settings - Fork 136
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
Load Collectors by FQCN #320
Conversation
56a0981
to
83797c1
Compare
I had this implementation also in mind then I created the issue. It will works when you directly require deptrac via composer (which is not recommended) but we need to check if it is working with the phar file. |
I will look into it :) |
I just tested it with a generated phar. I used for this an example depfile ( Should i check more? |
Can you create your own / custom collector and use the FQCN in the depfile? I think it doesn't work. Probably we need to check if there is a autoload file and load it. Probably we also need to enable the https://github.com/humbug/php-scoper in Box config. |
Yeah, this is not working. I will look into it later |
I updated the PR to load the autoload file if exists. Maybe you can already have a look on this. |
@smoench i activated the php-scoper with the default configuration and tried to execute deptrac. I get an error which i could not resolve, maybe you can help with that.
I did some research but found nothing that helped me. |
I think this is a problem with the cache file. With Can you try to add a config for php-scoper with excluding |
You were right, with So this would be finished from my side and would also fix #19 or not? |
Thank you @DanielBadura! I will try it out on Friday and give you feedback |
@smoench did you had time to try it out? |
Sorry, I was on vacation. I will try it out asap. |
No problem! Hope you had a nice vacation! :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried it out https://github.com/smoench/deptrac-custom-collector. Works fine so far.
Can you write a documentation chapter in the README.md
?
Nice! Yeah i will do it the next days :) |
… to load collectors via FQCN
Readme is updated 👍 |
Thank you @DanielBadura ! |
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