@@ -190,30 +190,6 @@ jobs:
190190 shell : bash
191191 run : echo "value=$(date -u +%Y-%W)" >> "$GITHUB_OUTPUT"
192192
193- # roave/security-advisories also conflicts with PHP releases that have known
194- # advisories, so it can't install on those (Roave/SecurityAdvisories#155).
195- # Drop it only when it conflicts with the PHP version in use. setup-php ships
196- # builds with security fixes backported, even for EOL versions, so this is
197- # safe on CI (shivammathur/setup-php#1139).
198- - name : Drop roave/security-advisories if it conflicts with this PHP version
199- shell : bash
200- run : |
201- php -r 'exit(isset(json_decode(file_get_contents("composer.json"), true)["require-dev"]["roave/security-advisories"]) ? 0 : 1);' || exit 0
202- export CONFLICT="$(composer show --available --format=json roave/security-advisories dev-latest | php -r 'echo json_decode(stream_get_contents(STDIN), true)["conflicts"]["php"] ?? "";')"
203- echo "roave/security-advisories conflicts with php ${CONFLICT:-(none)}"
204- if php -r '
205- foreach (preg_split("/\s*\|\|?\s*/", getenv("CONFLICT"), -1, PREG_SPLIT_NO_EMPTY) as $range) {
206- $hit = true;
207- foreach (preg_split("/\s*,\s*|\s+/", $range) as $c) {
208- preg_match("/^(<=|>=|<|>|==|=|!=)?v?(.+)$/", $c, $m);
209- $hit = $hit && version_compare(PHP_VERSION, $m[2], $m[1] ?: "==");
210- }
211- if ($hit) exit(0);
212- }
213- exit(1);'; then
214- composer remove --dev --no-update --no-interaction roave/security-advisories
215- fi
216-
217193 - name : Install Composer dependencies & cache dependencies
218194 uses : " ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda" # 4.0.0
219195 with :
0 commit comments