Conversation
Let us check that we are running PHPUnit in the right conditions, otherwise we could get surprises such as no error output.
| if vendor/bin/phpunit --atleast-version 12.3.1 > /dev/null || | ||
| vendor/bin/phpunit --atleast-version 11.5.29 > /dev/null || | ||
| vendor/bin/phpunit --atleast-version 10.5.49 > /dev/null; then |
There was a problem hiding this comment.
Why is this logic so complicated? Isn't this the same as checking for 10.5.49 only?
There was a problem hiding this comment.
Here is the command that I've run to dertermine which constraints to use:
$ git tag --contains 4a39279a273a420fb1c2a2afc298982b3fb56c32
12.4.1
12.4.0
12.3.15
12.3.14
12.3.13
12.3.12
12.3.11
12.3.10
12.3.9
12.3.8
12.3.7
12.3.6
12.3.5
12.3.4
12.3.3
12.3.2
12.3.1
11.5.42
11.5.41
11.5.40
11.5.39
11.5.38
11.5.37
11.5.36
11.5.35
11.5.34
11.5.33
11.5.32
11.5.31
11.5.30
11.5.29
10.5.58
10.5.57
10.5.56
10.5.55
10.5.54
10.5.53
10.5.52
10.5.51
10.5.50
10.5.49
It seems to be that this was introduced in a patch version, then merged up. So I don't think it would work for e.g. 11.5.28
There was a problem hiding this comment.
It seems to be that this was introduced in a patch version, then merged up. So I don't think it would work for e.g. 11.5.28
I understand that. What I'm saying is, your command line does not exclude 11.5.28. In that case, your expression…
vendor/bin/phpunit --atleast-version 12.3.1 > /dev/null ||
vendor/bin/phpunit --atleast-version 11.5.29 > /dev/null ||
vendor/bin/phpunit --atleast-version 10.5.49 > /dev/null
… would evaluate to false || false || true which is true. Or am I missing something here?
There was a problem hiding this comment.
Oh no you're right, I'm the one missing something… so it should be even more complex than I originally thought 😭
Something like this:
if vendor/bin/phpunit --atleast-version 12.3.1 > /dev/null ||
vendor/bin/phpunit --atleast-version 11.5.29 > /dev/null && ! vendor/bin/phpunit --atleast-version 12.0.0 > /dev/null ||
vendor/bin/phpunit --atleast-version 10.5.49 > /dev/null && ! vendor/bin/phpunit --atleast-version 11.0.0; then
vendor/bin/phpunit --check-php-configuration;
fi
Let us check that we are running PHPUnit in the right conditions, otherwise we could get surprises such as no error output.