Skip to content

Conversation

@outcomer
Copy link

@outcomer outcomer commented Jan 16, 2026

Q A
License MIT
Doc issue/PR n/a

Title: Fix exit code handling in create-project job

Summary

This PR fixes the exit code handling in the "Create-project with skeleton ^6" step so that the informational message is correctly displayed when a package doesn't support Symfony 6.

Related issues:

Issues Fixed

Missing $ prefix: The condition [[ EXIT_CODE -eq 2 ]] was missing the $ before EXIT_CODE, causing the check to always fail

Script exits before capturing exit code: GitHub Actions runs bash with -e flag, so when composer require fails, the script exits immediately before EXIT_CODE=$? can capture the exit code. Fixed by using EXIT_CODE=0 followed by composer require ... || EXIT_CODE=$?

Improved message formatting: Added a green-colored border box for better visibility in the logs

Before

composer require -W --ansi $PACKAGES
EXIT_CODE=$?                          # Never reached if composer fails
if [[ EXIT_CODE -eq 2 ]]; then        # Missing $ prefix

After

EXIT_CODE=0
composer require -W --ansi $PACKAGES || EXIT_CODE=$?
if [[ $EXIT_CODE -eq 2 ]]; then

@github-actions
Copy link

Thanks for the PR 😍

How to test these changes in your application

  1. Define the SYMFONY_ENDPOINT environment variable:

    # On Unix-like (BSD, Linux and macOS)
    export SYMFONY_ENDPOINT=https://raw.githubusercontent.com/symfony/recipes/flex/pull-1510/index.json
    # On Windows
    SET SYMFONY_ENDPOINT=https://raw.githubusercontent.com/symfony/recipes/flex/pull-1510/index.json
  2. Install the package(s) related to this recipe:

    composer req symfony/flex
    composer req 
  3. Don't forget to unset the SYMFONY_ENDPOINT environment variable when done:

    # On Unix-like (BSD, Linux and macOS)
    unset SYMFONY_ENDPOINT
    # On Windows
    SET SYMFONY_ENDPOINT=

Diff between recipe versions

In order to help with the review stage, I'm in charge of computing the diff between the various versions of patched recipes.
I'm going keep this comment up to date with any updates of the attached patch.

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.

1 participant