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

Improvements to Maho's autoloaders #1

Merged
merged 8 commits into from
Oct 10, 2024

Conversation

justinbeaty
Copy link
Contributor

See MahoCommerce/maho#40 (comment)

We hook into the dump event and build PSR-0 prefixes, as well as classmaps for controllers which do not follow PSR-0 naming convention.

We also need to read local.xml to check if we have disabled local modules, as we must exclude those from our prefixes / classmaps. It would be too messy to try to do that at runtime.

@fballiano
Copy link
Contributor

I think we should remove support for "disabled local modules", it kinda doesn't even make sense anymore

@fballiano
Copy link
Contributor

but otherwise we can merge as it is and tag a new release

@justinbeaty
Copy link
Contributor Author

I think we should remove support for "disabled local modules", it kinda doesn't even make sense anymore

I'm not opposed to it since users can just use composer remove my/module if needed, or set the module to disabled in the xml file.

@fballiano
Copy link
Contributor

no wait, for sure you can disable a single module in its app/etc/modules/xxxx.xml file, but I was referring to <disable_local_modules>false</disable_local_modules> in local.xml which seems to me something that is never used in production and only used for quick debug in development

@fballiano
Copy link
Contributor

actually I think we were in agreement ahahhaha sorry :-D

@justinbeaty
Copy link
Contributor Author

actually I think we were in agreement ahahhaha sorry :-D

yup 👍. Removing support in PR #40 too.

@fballiano
Copy link
Contributor

then I'll merge and tag this one!

@justinbeaty
Copy link
Contributor Author

Sounds good!

@fballiano fballiano merged commit 49fe8b7 into MahoCommerce:main Oct 10, 2024
@fballiano fballiano changed the title Autoloader improvements Improvements to Maho's autoloaders Oct 10, 2024
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.

2 participants