-
Notifications
You must be signed in to change notification settings - Fork 9
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 services.php before configuration to allow container customizations #45
base: 2.0.x
Are you sure you want to change the base?
Load services.php before configuration to allow container customizations #45
Conversation
How does this help with overriding deptrac internal stuff? FYI: I'll try to do some testing next week. |
It allows you to define services section in the configuration file which can override the defaults from
I believe that the impact should be negligible, as the cache is still resolved as the very last step (once all services from both the services file and configuration are resolved). Better to properly measure than to just hypothesize, of course :D Thank you! |
…istent override behavior
@gennadigennadigennadi Do you have some specific set of benchmarks in mind? I can help you test that. I don't see any reason why the runtime performance should be affected by my changes. The flow is following:
I just ran the patched version on our codebase, and the cache works just fine :) And the service overrides as well. I have added one more commit, to make the "service override experience" unified. I'll test the results again. |
The total runtime for v1.0.2, 2.0.0 without patch and both patches here on our codebase (15 000+ files) is very consistent without any signs of degradation. |
I just went through the changes and hadn't had enough time to properly think about the changes. Right now I'm not sure what gets cached at all? I don't think the service definitions are. Also, even if this changes get merged, there is no guarantee it will stay like this. This is nothing but a hack, until Deptrac officially exposes its internals. And I don't think we will expose the Symfony container officially. |
I think this is fine. It would be great if it included a test for the order of operation so that the next refactor of the loader does not break this again. Furthermore, I think it would be good to expose more of Deptrac Interfaces in the contract. The individual Deptrac modules have been stable for quite a while now in terms of module boundaries. If @olsavmic and @janedbal could share the interfaces Shipmonk would be interested in overwriting, I could make some effort into putting them into the contract namespace. |
…ide consistent override behavior" This reverts commit 627dae0.
I have reverted the last commit to prevent the creation of a cache file when |
@patrickkusebauch We have two main use-cases, already discussed in:
|
I talked to Jan over lunch lasts week and we discussed having a Parser interface for you to use your custom parsing logic for creating the AST references and a Baseline mapper interface for you to have a custom baseline mapping implementation. |
@gennadigennadigennadi Can you please approve the workflow? Thank you! |
The pipeline is green, can I please get a review & merge? Even if we work on the extension points, this change helps to test customizations more quickly 🤔 Thank you! |
I would really like to see a test for it, too. Otherwise it looks good. |
I took over this MR in #90, please review the finalization there. Thx |
I think we can close this now |
Resolves qossmic/deptrac#1419