Skip to content

Bootstrap GitHub Actions runtime#2

Open
coisa wants to merge 3 commits intomainfrom
task/1-bootstrap-console-runtime
Open

Bootstrap GitHub Actions runtime#2
coisa wants to merge 3 commits intomainfrom
task/1-bootstrap-console-runtime

Conversation

@coisa
Copy link
Copy Markdown
Contributor

@coisa coisa commented Apr 29, 2026

Summary

  • Bootstrap fast-forward/github-actions as a Composer-installable Symfony Console runtime.
  • Add initial commands for GitHub output/summary writing, PHP project surface detection, and release branch version resolution.
  • Depend on fast-forward/dev-tools while keeping its Composer plugin disabled in this repository so no .github or .agents sync runs during the initial bootstrap.
  • Add local docs, package metadata, coding-standard config, PHPUnit tests, and changelog entry.

Testing

  • composer install --no-scripts --prefer-dist --no-progress --no-interaction
  • vendor/bin/dev-tools dev-tools:standards --no-logo --no-interaction --no-ansi
  • composer validate --strict
  • vendor/bin/phpunit --no-coverage
  • find src tests bin -type f \( -name '*.php' -o -path 'bin/fast-forward-actions' \) -print -exec php -l {} \;
  • bin/fast-forward-actions changelog:resolve-merged-version release/v0.1.0 --github-output --output-file <tmp>
  • bin/fast-forward-actions php:detect-project --working-dir . --github-output --output-file <tmp>
  • bin/fast-forward-actions summary:write '## Fast Forward smoke' --summary-file <tmp>

Closes #1

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0301443394

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".


$githubOutputWriter = new GitHubOutputWriter();

$application->addCommand(new ChangelogResolveMergedVersionCommand($githubOutputWriter));
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Replace addCommand() to preserve Symfony 7.3 compatibility

This call uses Application::addCommand(), but composer.json allows symfony/console ^7.3, and that API is only available starting in Symfony 7.4. On installations that resolve to 7.3.x, the CLI will crash at startup with an undefined-method error before any command can run. Either switch these registrations to add() or raise the minimum supported console version to 7.4.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 39b9f026f8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +263 to +266
return array_values(array_filter(
self::SUPPORTED_MINORS,
static fn(string $version): bool => version_compare($version, $resolved, '>='),
));
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Honor upper-bound constraints when building PHP matrix

Build the test matrix from the full require.php constraint, not just the inferred minimum version. At this point the matrix includes every supported minor >= the resolved lower bound, so a constraint like >=8.3 <8.5 still yields 8.5 in the matrix. Because upper bounds are ignored during resolution, workflows can run on PHP versions the package explicitly declares unsupported, causing avoidable CI failures for otherwise valid constraints.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 28da75de2b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +198 to +199
if (\in_array($operator, ['', '=', '==', '^', '~', '>='], true)) {
$lowerBounds[] = $normalized;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Handle hyphenated constraints when deriving minimum PHP

Composer allows hyphenated ranges like 8.3 - 8.4, but this parser treats both numbers as bare lower-bound tokens and then returns the highest one, resolving the minimum to 8.4 instead of 8.3. That causes the generated matrix to skip the actual minimum supported minor for a valid constraint, so CI can miss compatibility regressions on the lower end of the declared support window.

Useful? React with 👍 / 👎.

Comment on lines +116 to +119
try {
$payload = json_decode(file_get_contents($composerJson), true, 512, \JSON_THROW_ON_ERROR);
} catch (JsonException) {
return [null, 'composer.json could not be parsed'];
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Catch unreadable composer.json as a recoverable fallback

This code only catches JsonException, but Safe\file_get_contents() throws filesystem exceptions when composer.json exists but cannot be read (permissions, transient I/O errors). In that case the command terminates with an uncaught exception instead of following the existing fallback path used for other metadata failures, which can hard-fail workflows unexpectedly.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bootstrap the GitHub Actions console runtime

1 participant