-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
NFR: Add module name to module class name format in Application::registerModules #12252
Comments
This comment was marked as abuse.
This comment was marked as abuse.
Also what about adding option to load whole module on bootstraping ? Like execute |
This comment was marked as abuse.
This comment was marked as abuse.
Yea i know, but what if someone need such a feature ? Right now you need to do some nasty things like create module class on your own and call methods, or register namespaces from other module and set proper services in other module and such stuff. |
This comment was marked as abuse.
This comment was marked as abuse.
This comment was marked as abuse.
This comment was marked as abuse.
Closing in favor of #13855. Will revisit if the community votes for it, or in later versions. |
Currently Phalcon module setup is a bit hacky because there is some overlap of concerns between the Loader and Application and modules. The Application class has been doing a poor man's loading to get the module definitions loaded up when the normal Loader class is fully capable of being used with the
Loader::registerClasses
method.Currently if one wants to use the more correct approach then the following format must be used:
I propose that this could be made to look like the following while maintaining BC with the semver 3 series.
Then I propose that late into
3.*
series (1-2 years from now) that theclassName => ...
format should throw a deprecation warning and then this format should be removed in the 4.0 series for a breaking change.Update This is also possible:
The text was updated successfully, but these errors were encountered: