-
-
Notifications
You must be signed in to change notification settings - Fork 53
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
First draft of the modules doc #103
Conversation
Signed-off-by: Anna Filina <[email protected]>
Signed-off-by: Anna Filina <[email protected]>
Signed-off-by: Anna Filina <[email protected]> Co-authored-by: Frank Brückner <[email protected]>
Signed-off-by: Anna Filina <[email protected]> Co-authored-by: Frank Brückner <[email protected]>
Signed-off-by: Anna Filina <[email protected]>
Package names are the preferred way to refer to components. Signed-off-by: Anna Filina <[email protected]>
@froschdesign I have a few questions:
|
The outline is only a draft, so changes are possible at any time and improvements even more so.
👍
Did you see the hints @Xerkus gave in the chat? |
I'll review it a bit later. A lot of things become obsoleted or not recommended. |
Point to the existing best practices page instead. Signed-off-by: Anna Filina <[email protected]>
@@ -0,0 +1,101 @@ | |||
# Modules | |||
|
|||
A module is a PHP namespace. It can contain controllers, classes, view scripts, configuration, tests, as well as public assets such as images, CSS, and JavaScript. For example, if you have an e-commerce application, you could have a module for presenting and selling products, and another for administrators to create products and manage orders. |
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.
A module is a PHP namespace. It can contain controllers, classes, view scripts, configuration, tests, as well as public assets such as images, CSS, and JavaScript. For example, if you have an e-commerce application, you could have a module for presenting and selling products, and another for administrators to create products and manage orders. | |
A module is a package of logically grouped resources in PHP namespace. It can contain controllers, classes, view scripts, configuration, tests, as well as public assets such as images, CSS, and JavaScript. For example, if you have an e-commerce application, you could have a module for presenting and selling products, and another for administrators to create products and manage orders. | |
Strictly speaking, for the application module is defined by the class `Module` in module namespace which is responsible for providing configuration necessary to setup the application. No assumptions are made about file or code structure. |
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.
There are two conflated concepts. A module that is a package in module/
and a module that is configuration provider referenced from modules list.
} | ||
``` | ||
|
||
### getModuleDependencies() |
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 think this is mostly irrelevant tbh. It was intended mostly to provide module loading order for configuration merging. I never seen it actually used outside of few edge cases. Config provider used by mezzio does not have or need such feature at all.
Description
I followed the recommended Module section as per this outline.
getConfig()
andgetModuleDependencies()
to theModule
class. I only have an into and one listener. I'll wait for feedback before doing the rest.We'll obviously need to remove some redundant sections from other pages, or even entire pages.