Skip to content

Commit ad2b271

Browse files
committed
Fix release wiki preview runtime install options (#318)
1 parent 6ef10c7 commit ad2b271

3 files changed

Lines changed: 73 additions & 1 deletion

File tree

.github/workflows/changelog.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ jobs:
270270
with:
271271
php-version: ${{ needs.resolve_php.outputs.php-version }}
272272
root-version: ${{ format('dev-{0}{1}', env.RELEASE_BRANCH_PREFIX, steps.version.outputs.value) }}
273-
install-options: --prefer-dist --no-progress --no-interaction --no-plugins --no-scripts
273+
install-options: --prefer-dist --no-progress --no-interaction --no-scripts
274274
safe-directories: |
275275
${{ github.workspace }}/.github/wiki
276276

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1313

1414
### Fixed
1515

16+
- Keep release-preparation wiki preview refreshes installing Composer plugins so `phpdocumentor/shim` still exposes `phpdoc` when release pull request creation rebuilds `.github/wiki` (#318)
1617
- Keep release-preparation pull requests refreshing their wiki preview and parent `.github/wiki` pointer before merge, then publish merged release wikis from that preview branch so branch protection no longer requires direct post-merge pointer commits to `main` (#315)
1718

1819
## [1.24.6] - 2026-04-30
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
/**
6+
* Fast Forward Development Tools for PHP projects.
7+
*
8+
* This file is part of fast-forward/dev-tools project.
9+
*
10+
* @author Felipe Sayão Lobato Abreu <github@mentordosnerds.com>
11+
* @license https://opensource.org/licenses/MIT MIT License
12+
*
13+
* @see https://github.com/php-fast-forward/
14+
* @see https://github.com/php-fast-forward/dev-tools
15+
* @see https://github.com/php-fast-forward/dev-tools/issues
16+
* @see https://php-fast-forward.github.io/dev-tools/
17+
* @see https://datatracker.ietf.org/doc/html/rfc2119
18+
*/
19+
20+
namespace FastForward\DevTools\Tests\GitHubActions;
21+
22+
use PHPUnit\Framework\Attributes\CoversNothing;
23+
use PHPUnit\Framework\Attributes\Test;
24+
use PHPUnit\Framework\TestCase;
25+
use Symfony\Component\Yaml\Yaml;
26+
27+
#[CoversNothing]
28+
final class ChangelogWorkflowTest extends TestCase
29+
{
30+
/**
31+
* @return void
32+
*/
33+
#[Test]
34+
public function prepareReleasePullRequestWillKeepComposerPluginsEnabledForWikiPreviewRefresh(): void
35+
{
36+
$workflow = Yaml::parseFile(__DIR__ . '/../../.github/workflows/changelog.yml');
37+
$steps = $workflow['jobs']['prepare_release_pull_request']['steps'] ?? null;
38+
39+
self::assertIsArray($steps);
40+
41+
$setupComposerStep = null;
42+
43+
foreach ($steps as $step) {
44+
if (! \is_array($step)) {
45+
continue;
46+
}
47+
48+
if (($step['name'] ?? null) !== 'Setup PHP and install dependencies') {
49+
continue;
50+
}
51+
52+
if (($step['if'] ?? null) !== '${{ steps.create_pr.outputs.pull-request-number != \'\' }}') {
53+
continue;
54+
}
55+
56+
$setupComposerStep = $step;
57+
58+
break;
59+
}
60+
61+
self::assertIsArray($setupComposerStep);
62+
self::assertSame(
63+
'--prefer-dist --no-progress --no-interaction --no-scripts',
64+
$setupComposerStep['with']['install-options'] ?? null,
65+
);
66+
self::assertStringNotContainsString(
67+
'--no-plugins',
68+
(string) ($setupComposerStep['with']['install-options'] ?? ''),
69+
);
70+
}
71+
}

0 commit comments

Comments
 (0)