Skip to content

[symfony/panther] Add requires for extension #1422

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 4, 2025

Conversation

HypeMC
Copy link
Member

@HypeMC HypeMC commented May 29, 2025

Q A
License MIT
Doc issue/PR -

Related to symfony/flex#1055

@symfony-recipes-bot symfony-recipes-bot enabled auto-merge (squash) May 29, 2025 16:51
Copy link

github-actions bot commented May 29, 2025

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-1422/index.json
    # On Windows
    SET SYMFONY_ENDPOINT=https://raw.githubusercontent.com/symfony/recipes/flex/pull-1422/index.json
  2. Install the package(s) related to this recipe:

    composer req symfony/flex
    composer req 'symfony/panther:^1.0'
  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.

@HypeMC HypeMC force-pushed the panther-requires branch from f841365 to 2da4d86 Compare May 29, 2025 18:22
fabpot added a commit to symfony/flex that referenced this pull request Jul 4, 2025
…peMC)

This PR was merged into the 2.x branch.

Discussion
----------

Add option to specify version in add lines requires

Currently, when requiring `symfony/panther`, Flex adds the following two lines to `phpunit.dist.xml`:

```diff
<extensions>
+    <bootstrap class="Symfony\Component\Panther\ServerExtension" />
+    <extension class="Symfony\Component\Panther\ServerExtension" />
</extensions>
```

This isn't entirely correct: the `extension` tag is used for PHPUnit <10, while `bootstrap` is used for PHPUnit >=10.

This PR adds support for specifying the required package version for each line, so only the appropriate one is added.

Recipes PR: symfony/recipes#1422

Commits
-------

3319fcf Add option to specify version in add lines requires
@fabpot fabpot disabled auto-merge July 4, 2025 06:35
@fabpot fabpot merged commit 60dd462 into symfony:main Jul 4, 2025
1 of 2 checks passed
@HypeMC HypeMC deleted the panther-requires branch July 4, 2025 07:12
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.

2 participants