Skip to content

Commit 11b2b5c

Browse files
authored
Merge pull request #309 from wp-cli/remove-roave-workaround
Remove the roave/security-advisories workaround
2 parents 7bc2548 + 0fa66cf commit 11b2b5c

2 files changed

Lines changed: 0 additions & 48 deletions

File tree

‎.github/workflows/reusable-functional.yml‎

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -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:

‎.github/workflows/reusable-unit.yml‎

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -61,30 +61,6 @@ jobs:
6161
shell: bash
6262
run: echo "value=$(date -u +%Y-%W)" >> "$GITHUB_OUTPUT"
6363

64-
# roave/security-advisories also conflicts with PHP releases that have known
65-
# advisories, so it can't install on those (Roave/SecurityAdvisories#155).
66-
# Drop it only when it conflicts with the PHP version in use. setup-php ships
67-
# builds with security fixes backported, even for EOL versions, so this is
68-
# safe on CI (shivammathur/setup-php#1139).
69-
- name: Drop roave/security-advisories if it conflicts with this PHP version
70-
shell: bash
71-
run: |
72-
php -r 'exit(isset(json_decode(file_get_contents("composer.json"), true)["require-dev"]["roave/security-advisories"]) ? 0 : 1);' || exit 0
73-
export CONFLICT="$(composer show --available --format=json roave/security-advisories dev-latest | php -r 'echo json_decode(stream_get_contents(STDIN), true)["conflicts"]["php"] ?? "";')"
74-
echo "roave/security-advisories conflicts with php ${CONFLICT:-(none)}"
75-
if php -r '
76-
foreach (preg_split("/\s*\|\|?\s*/", getenv("CONFLICT"), -1, PREG_SPLIT_NO_EMPTY) as $range) {
77-
$hit = true;
78-
foreach (preg_split("/\s*,\s*|\s+/", $range) as $c) {
79-
preg_match("/^(<=|>=|<|>|==|=|!=)?v?(.+)$/", $c, $m);
80-
$hit = $hit && version_compare(PHP_VERSION, $m[2], $m[1] ?: "==");
81-
}
82-
if ($hit) exit(0);
83-
}
84-
exit(1);'; then
85-
composer remove --dev --no-update --no-interaction roave/security-advisories
86-
fi
87-
8864
- name: Install Composer dependencies & cache dependencies
8965
uses: "ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda" # 4.0.0
9066
with:

0 commit comments

Comments
 (0)