Example of how Customizer can be used in the template project
composer create-project alexskrypnyk/template-project-example my-projectExample questions and processing are defined in the customize.php file.
Automated tests for the example questions and processing are defined in the CreateProjectTest.php file.
Given template project composer.json before customization:
{
"name": "alexskrypnyk/template-project-example",
"description": "Example of how Customizer could be used in the project",
"type": "project",
"require": {
"php": ">=8.2"
},
"require-dev": {
"alexskrypnyk/customizer": "^0.4",
"composer/composer": "^2.7",
"phpunit/phpunit": "^11.1"
},
"minimum-stability": "dev",
"prefer-stable": true,
"autoload-dev": {
"psr-4": {
"AlexSkrypnyk\\Customizer\\Tests\\": "vendor/alexskrypnyk/customizer/tests/phpunit",
"AlexSkrypnyk\\TemplateProjectExample\\Tests\\": "tests"
}
},
"config": {
"allow-plugins": {
"alexskrypnyk/customizer": true
}
}
}and a README.md file with the following content:
Welcome to the alexskrypnyk/template-project-example example!
Some description on how to use the project.answering the questions with
Name: acme/my-project
Description: My project
License: MIT
will result in the composer.json:
{
"name": "acme/my-project",
"description": "My project",
"type": "project",
"require": {
"php": ">=8.2"
},
"minimum-stability": "dev",
"prefer-stable": true
}and the README.md file:
Welcome to the acme/my-project example!
Some description on how to use the project.