You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have implemented the shell installer script. But once starting to use it, it appeared that it is not that convenient as using a composer-way to use composer create-project.
We need to remove init.sh in favour of composer plugin.
Note that the original config will still be needed.
Create Customizer.php class in .scaffold/Customizer.php as s copy from https://github.com/g1a/starter/blob/main/customize/Customizer.php and adjust as needed - update the namespace and add autoload.
a. The class should be asking the same questions as init.sh (except for the last question about removal of the script - that should always happen without questions)
b. The class should be updating the same files as init.sh
c. The class should be removing itself and any autoload records about itself from composer.json.
d. Class should be updating the fields in p1 above to their customized values.
Remove init.sh and BATs from the project completely.
Take test harness (test helpers etc and tests) from https://github.com/drevops/sandbox-multipackage/blob/main/scaffold/tests/ and adjust accordingly. Place it under .scaffold/tests/phpunit - it is super important to separate scaffold's code with the customizer's code and tests.
We have implemented the shell installer script. But once starting to use it, it appeared that it is not that convenient as using a composer-way to use
composer create-project
.We need to remove
init.sh
in favour of composer plugin.The inspiration comes from https://github.com/g1a/starter/blob/main/customize/Customizer.php
What needs to be done:
Update
composer.json
to be able to submit it to PackagistNote that the original config will still be needed.
Create
Customizer.php
class in.scaffold/Customizer.php
as s copy from https://github.com/g1a/starter/blob/main/customize/Customizer.php and adjust as needed - update the namespace and add autoload.a. The class should be asking the same questions as
init.sh
(except for the last question about removal of the script - that should always happen without questions)b. The class should be updating the same files as
init.sh
c. The class should be removing itself and any
autoload
records about itself fromcomposer.json
.d. Class should be updating the fields in p1 above to their customized values.
Remove
init.sh
and BATs from the project completely.Take test harness (test helpers etc and tests) from
https://github.com/drevops/sandbox-multipackage/blob/main/scaffold/tests/
and adjust accordingly. Place it under.scaffold/tests/phpunit
- it is super important to separate scaffold's code with the customizer's code and tests.Copy test https://github.com/drevops/sandbox-multipackage/blob/main/scaffold/tests/phpunit/Functional/ScaffoldCreateProjectTest.php and adjust accordingly.
The text was updated successfully, but these errors were encountered: