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!
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 |
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.
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()
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
, changegetMagentoVersions()
, where Magento versions are defined together with their PHP and framework version constraints. - In
dev/src/TravisJob.php
change the constantsLATEST_MAGENTO_VERSION
andDEV_BRANCH_JOBS
to define the current develop branch of Magento.
The template itself is licensed under WTFPL.
The initialization script (content of the dev/ directory) is licensed under MIT