Skip to content

Add Interceptor Autoloader #345

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

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

navarr
Copy link

@navarr navarr commented Jul 9, 2025

This PR adds an autoloader for ...\Interceptor classes.

TODO:

  • Test that it works
  • Unit Tests

Will resolve #342

navarr added 7 commits July 9, 2025 16:17
- Fix non-variadic parameters being variadic
- Ensure it extends the original class
- If intercepting an interface, set implemented interfaces - otherwise set extended class
- Add Interceptor trait
@navarr navarr marked this pull request as ready for review July 11, 2025 19:59
@navarr
Copy link
Author

navarr commented Jul 11, 2025

@shochdoerfer Looking forward to your thoughts here.

Unfortunately, Magento's stuff was built heavily around saving directly to a file (with a hard requirement on Magento\Framework\Code\Generator\Io which has a hard requirement on Magento\Framework\Filesystem\Driver\File. An alternative approach would've been extending File and rewriting everything it does in file handling so that we could grab the string and then call Magento's generator specifically, but the approach I took was copy/paste.

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 this pull request may close these issues.

Feature Request: Interceptor Autoload
1 participant