Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This patch implements the ability to create a module with a "flat" structure.
While the recommended structure for modules is still the default, the Mezzio skeleton app also allows creating "flat" modules that contain only source code (no templates, tests, assets, or other items); this is particularly of interest when creating application-specific, API-facing modules where tests may exist at the application level, and no templates are needed.
As such, this patch now adds a "--flat" option to
mezzio:module:create
which will allow generating this simpler flat structure.In order to allow this, I needed to migrate away from consuming laminas-composer-autoloading for enabling/disabling autoloader rules for modules.
The reason is because laminas-composer-autoloading assumes a laminas-mvc structured module, which coincides with our recommended structure.
Since the flat structure is not part of the MVC ecosystem, it becomes specific to this Mezzio tooling, and thus requires "in-lining" the functionality.
In reality, it is a completely new approach to handling the tasks, and was written from the ground-up with testing in mind.
As such, this patch:
mezzio:module:register
andmezzio:module:deregister
commands to use the new functionality.Fixes #12