laravel-server-side-rendering icon indicating copy to clipboard operation
laravel-server-side-rendering copied to clipboard

Laravel 11.x Compatibility

Open laravel-shift opened this issue 1 year ago • 11 comments

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

Before merging, you need to:

  • Checkout the l11-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 avatar Feb 27 '24 16:02 laravel-shift

:warning: The latest version of Laravel has a dependency for phpunit/phpunit of ^10.5. If you would like to also upgrade your tests, you may run the PHPUnit 10 Shift for free.

laravel-shift avatar Feb 27 '24 16:02 laravel-shift

:warning: Shift detected GitHub Actions which run jobs using a version matrix. Shift attempted to update your configuration for Laravel 11. However, you should review these changes to ensure the desired combination of versions are built for your package.

laravel-shift avatar Feb 27 '24 16:02 laravel-shift

:alembic: 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/laravel-server-side-rendering.git"
        }
    ]
}

Then update your dependency constraint to reference this branch:

{
    "require": {
        "spatie/laravel-server-side-rendering": "dev-l11-compatibility",
    }
}

Finally, run: composer update

laravel-shift avatar Feb 27 '24 16:02 laravel-shift

@laravel-shift The L11 tests are failing here, could you take a look?

freekmurze avatar Feb 28 '24 10:02 freekmurze

@freekmurze, my guess is the upstream dependency is not yet compatible.

jasonmccreary avatar Feb 28 '24 11:02 jasonmccreary

Any chance this can get merged? We need to upgrade L11 and I see this PR is 3 weeks old. Thanks!

elijahworkz avatar Mar 19 '24 16:03 elijahworkz

Looks like tagging main on the server-side-rendering dep as v0.3.3 would likely fix the above, as that would allow compat with symfony/process v7, which Laravel 11 requires. I just got things to composer update successfully in a L11 Shift with the following composer.json mods:

        "spatie/laravel-server-side-rendering": "dev-l11-compatibility@dev",
	"spatie/server-side-rendering": "dev-main@dev as 0.3.3",
		"repositories": [
			{
				"type": "vcs",
				"url": "https://github.com/laravel-shift/laravel-server-side-rendering"
			}
		],

Once I get the rest of the L11 Shift squared away, we'll see whether this passes CI, as we should be able to confirm SSR as part of our test suite. I should have an answer later tonight, given that I've started down this rabbit hole.

iansltx avatar Mar 21 '24 01:03 iansltx

Yep, things do seem to work for us if you use the newer version of the underlying dep (the one that supports Symfony Process 7.x).

iansltx avatar Mar 21 '24 05:03 iansltx

Could you make sure that all tests pass? Feel free to drop support for older Laravel / PHP / package versions.

freekmurze avatar Mar 23 '24 11:03 freekmurze

To confirm, should I get that prior to the underlying package being tagged, or wait for you to tag 0.3.3?

Thinking that once 0.3.3 is tagged on the base SSR package, rerunning tests here will turn everything green, but if it's useful to pin the dep to dev-main as a proof of concept, I'll fork off of this branch with that tweak and do so.

iansltx avatar Mar 23 '24 15:03 iansltx

Let's see if this works... https://github.com/iansltx/laravel-server-side-rendering/actions/runs/8403029210

iansltx avatar Mar 23 '24 16:03 iansltx