Description
Overview
The Makefiles
in core and apps have a range of different targets for build, dist, dev, clean and so on.
For example, we currently have Makefile
targets like:
make clean
make clean-build
make clean-dist
make clean-deps
make clean-composer-deps
make clean-nodejs-deps
make clean-js-deps
make clean-test
make clean-test-acceptance
make clean-test-results
make clean-docs
(examples above were found by looking in the core and password_policy Makefiles - there will be others, I suspect)
In various apps we have been adding make test-php-style
make test-php-phan
make test-php-phpstan
Those things put dependencies under a vendor-bin
folder. The dependencies get "sorted out" and loaded by composer when you first run the relevant type of test. Versions of dependencies will get loaded to match the version of PHP that the developer happens to be running.
If the developer switches to using a different version of PHP (e.g. when testing "interesting stuff" locally), specially if they switch back to PHP 5.6, then the loaded dependencies might not be correct any more.
It would be handy if there is a way to clean
these loaded dependencies so that the developer can quickly start-over and have composer sort out new dependencies to match the current PHP version.
Issue
Decide some "standard" targets for:
- build-dist-release process (whatever it will be called)
- making an app ready in a developer environment (
make ddev
or whatever) - cleaning stuff like these
vendor-bin
dependency files, other composer, yarn, JS whatever artifacts - produce a "standard"
Makefile
in one app and agree on it, merge it - design a way to be able to put common parts of it somewhere that can be "pulled in" to minimize duplication of the script across apps
- implement in all apps