Skip to content

Conversation

@laravel-shift
Copy link

This is an automated pull request from Shift to update your package code and dependencies to be compatible with Laravel 12.x.

Before merging, you need to:

  • Checkout the l12-compatibility branch
  • Review all comments for additional changes
  • Thoroughly test your package

If you do find an issue, please report it by commenting on this PR to help improve future automation.

@laravel-shift
Copy link
Author

⚗️ Using this package? If you would like to help test these changes or believe them to be compatible, you may update your project to reference this branch.

To do so, temporarily add Shift's fork to the repositories property of your composer.json:

{
    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/laravel-shift/valet.git"
        }
    ]
}

Then update your dependency constraint to reference this branch:

{
    "require": {
        "laravel/valet": "dev-l12-compatibility",
    }
}

Finally, run: composer update

@drbyte drbyte mentioned this pull request Feb 28, 2025
@drbyte
Copy link
Contributor

drbyte commented Feb 28, 2025

The tests are failing here because of the upgrade to yoast/phpunit-polyfills:^4.0 which also internally upgrades PHPUnit to v12 which no longer supports the @dataProvider annotation.

TWO possible solutions:
a) just set yoast/phpunit-polyfills to ^3.0 instead of ^4.0, which will use PHPUnit 11

or
b) update the BrewTest tests as follows:

  1. Add use PHPUnit\Framework\Attributes\DataProvider; to BrewTest.php
  2. Add the DataProvider attribute to the two instances where @dataProvider is used:
    /**
     * @dataProvider supportedPhpLinkPathProvider
     */
+    #[DataProvider('supportedPhpLinkPathProvider')]

The coexistence of both will allow the backward support of older PHP versions which valet offers.

  1. AND make the data provider function static:
-    public function supportedPhpLinkPathProvider(): array
+    public static function supportedPhpLinkPathProvider(): array

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