Skip to content

Latest commit

 

History

History
61 lines (38 loc) · 2.83 KB

README.md

File metadata and controls

61 lines (38 loc) · 2.83 KB

integer_net Magento 2 Module Template

To automatically replace all placeholders with custom values, run the following script:

dev/init

It runs interactively and tries to present you sensible default variables based on your repository.

To learn about additional options, run dev/init --help.

The dev/ directory can be removed after initialization!

Placeholders explained

Placeholder Purpose
Magento Repo Public Key Used for auth.json so that composer install works with repo.magento.com. See https://devdocs.magento.com/guides/v2.4/install-gde/prereq/connect-auth.html how to obtain keys.
The keys will be visible, so do not use an account used for commerce license or marketplace extensions!
Magento Repo Private Key see above
Vendor Vendor name for composer package, should match the name of your GitHub user or organization
Package Package name for composer package
Description A short description what the module does and for whom it is useful. Placed at the top of the README and as description in composer.json
Author name Main author name, used in composer.json and README
Author email Main author email, used in composer.json and README
Author github GitHub username of main author, used in README to link to the profile
Module namespace Top level PHP namespace (e.g. company name)
Module name Second level PHP namespace (module name)
Company Full company name, used in LICENSE
Year Current year, used in LICENSE

Magento Compatibility

You are asked which Magento versions you want so support. Based on the answer, version constraints for php and magento/framework are initialized in composer.json, and test jobs generated in .travis.yml. Feel free to change those later, for example if you don't want to support older PHP versions.

Developing the template

Adding placeholders

To add new placeholders, adjust the initialization script config in dev/src/Config.php

Files where placeholders are replaced are defined in getFilesToUpdate(), placeholders with their default values in getDefaultVariables()

Adding or removing a new Magento version

When new Magento versions should be added to the template or support for old ones dropped, the following changes are necessary:

  • In dev/src/Config.php, change getMagentoVersions(), where Magento versions are defined together with their PHP and framework version constraints.
  • In dev/src/TravisJob.php change the constants LATEST_MAGENTO_VERSION and DEV_BRANCH_JOBS to define the current develop branch of Magento.

License

Template

The template itself is licensed under WTFPL.

Initialization script

The initialization script (content of the dev/ directory) is licensed under MIT