Skip to content
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

Automatically extract fixture dependencies #421

Merged
merged 1 commit into from
May 2, 2024

Commits on Apr 4, 2024

  1. Automatically extract fixture dependencies

    It is now no longer required to declare groups on all dependent
    fixtures, the fixture loader will now automatically find the required
    dependencies and load them without them being explicitly added
    to the groups being loaded.
    
    Before you were forced to declare groups all the way down the
    dependency chain, for example:
    
    ```
    TopLevelFixture (groups: default)
    ├─ SecondLevelFixture1 (groups: default, alternative)
    │  ├─ ThirdLevelFixture1 (groups: default, alternative)
    ├─ SecondLevelFixture2 (groups: default)
    │  ├─ ThridLevelFixture2 (groups: default)
    │  ├─ ThirdLevelFixture3 (groups: default, alternative)
    ```
    
    Now you only need to specify the groups at the highest level:
    
    ```
    TopLevelFixture (groups: default)
    ├─ SecondLevelFixture1 (groups: alternative)
    │  ├─ ThirdLevelFixture1 (groups: none)
    ├─ SecondLevelFixture2 (groups: none)
    │  ├─ ThridLevelFixture2 (groups: none)
    │  ├─ ThirdLevelFixture3 (groups: alternative)
    ```
    
    In both examples the groups `default` and `alternative` will load the
    same fixtures.
    
    Adds an additional PHPStan error to the baseline which appears to be
    caused by the backwards compatibility layer.
    cs278 committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    8b3d927 View commit details
    Browse the repository at this point in the history