This gist contains a BASH script that runs through all scenarios related to Dealerdirect/phpcodesniffer-composer-installer issues #105.
For v0.6.0
of phpcodesniffer-composer-installer, all scenario(s) fail.
These are the scenario reported in the issue and the scenario with 'composer run-script'
The test scenarios can be run like this:
bash ./reproduce_issue_105.sh /tmp
The test scenarios can also be run with a development version of the
phpcodesniffer-composer-installer
plugin. In order to do so, pass the path to
plugin as the second parameter:
bash ./reproduce_issue_105.sh /tmp ./phpcodesniffer-composer-installer
The following factors are involved in the scenarios:
- Running a composer command (A)
- Running composer run-script (B)
The Commands and Run Scripts are present in the scenarios in the following variations:
- install command (1)
- update command (2)
- post-install-cmd script (3)
- post-update-cmd script (4)
- install-codestandards script (5)
The scenarios all go through the same flow.
The above factors, in their variations, give us the following 5 possible scenarios:
- (A)
- (1)
- (2)
- (B)
- (3)
- (4)
- (5)
For v0.6.0
of phpcodesniffer-composer-installer, running the scenarios gives the following output:
❌ 01. Running scenario for command 'install'
❌ 02. Running scenario for command 'update'
❌ 03. Running scenario for script 'post-install-cmd'
❌ 04. Running scenario for script 'post-update-cmd'
❌ 05. Running scenario for script 'install-codestandards'
[ END ]
❌ Failure
Wow. I’ve still to take it all in. Good work.