Name: Magento-2-Module-Skeleton
Owner: AOE
Description: This Module provides a basic Skeleton for further Magento 2 Modules.
Created: 2017-04-17 14:58:16.0
Updated: 2017-09-23 22:08:06.0
Pushed: 2017-05-30 07:36:22.0
Size: 30
Language: PHP
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
If you decided to make an open source module, you should make sure that ever body understand what you did. To make your work less harder, I want to provide a Skeleton Module. Checkout this module, remove the parts you do not need and fill out the gabs you think they are useful.
This module provides a skeleton for a new Magento 2 Module. It comes with examples, best practice advices and useful templates for documentation, specification or testing.
If you think, you have alternative methods or another way of thinking, please feel free to contribute to this skeleton.
This Skeleton tries to cover several aspects:
The README is the first step to a good documentation. This file will be used by Github / Gitlab as a homepage and every developer will know, that there might be some useful information about the code and the structure.
The README File can contain the whole documentation, but if a module is getting bigger and bigger, it might be handy to
use a new directory. We call it `doc
`. Due to that, we will continue this documentation in the given directory.
Magento 2 uses a custom Mess Detector Ruleset. You will find it under:
/tests/static/testsuite/Magento/Test/Php/_files/phpmd/ruleset.xml
To run the Mess Detector via console, you can run:
n in Magento 2 root
vendor/bin/phpmd app/code/ text dev/tests/static/testsuite/Magento/Test/Php/_files/phpmd/ruleset.xml
or
n in Magento 2 root
bin/magento dev/test/run static
Magento 2 also comes with a custom Code Style Ruleset. You can run the Codesniffer via console with the following commands:
n in Magento 2 root
vendor/bin/phpcs .
Make sure, your composer Packages do not contain any security issues. Validate your composer files by:
The following resource links are a good entry point to document API's in generell.
To make sure, your project is perfectly maintained, I would recommend to use Semantic Versioning and a Changelog in a specific format. You will find more information about these two topics in the following links:
The following tools are personal recommandations and are used to handle common generating and/or documentating tasks.
https://github.com/skywinder/github-changelog-generator
https://github.com/WeAllJS/weallcontribute