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

Add support for Laravel 9 #4094

Merged
merged 2 commits into from
Jan 19, 2022
Merged

Add support for Laravel 9 #4094

merged 2 commits into from
Jan 19, 2022

Conversation

tabacitu
Copy link
Member

WHY

BEFORE - What was wrong? What was happening before this PR?

Could not install Backpack on Laravel 9.

AFTER - What is happening after this PR?

Can install, but only Backpack 4.2. I think this is a good way to proceed, because if you have the time to upgrade Laravel, you should also have the time to upgrade Backpack.

HOW

How did you achieve that, in technical terms?

Bumped composer.json requirements.

Is it a breaking change or non-breaking change?

Non-breaking for 4.2.

How can we test the before & after?

Try installing without - shouldn't work. Try installing with - should work.

@tabacitu tabacitu self-assigned this Jan 19, 2022
@tabacitu
Copy link
Member Author

tabacitu commented Jan 19, 2022

While adding support, I've discovered quite a few issues in our dependencies. These ALL need to be fixed, in order to be able to provide full support for Laravel 9:

MUST-DOs, otherwise we can't say we provide support:

  • exception on all pages, because prologue/alerts AlertsMessageBag::count() declaration must be compatible with Illuminate\Support\MessageBag::count() in v9; fixed by add support for Laravel 9, remove support for everything else prologuephp/alerts#39
  • error on @php artisan package:discover because fideloper/proxy has not tagged a new version in 1.5 years (workaround - use dev-master as 4.4.99); solved by removing the fideloper/proxy dependency entirely, since the demo doesn't actually use it;

SHOULD-DOs, otherwise some Backpack addons won't work under Laravel 9:

@tabacitu
Copy link
Member Author

Turns out Backpack/CRUD doesn't really need much to support Laravel 9. So I'm going to merge this into 4.2, so we can also test against it. We still need to add support to two of our dependencies in order to "fully" support L9, though. But I've mentioned that in Laravel-Backpack/demo#342 which will stay open until we do (could take a few days).

@tabacitu tabacitu merged commit 961cd1d into 4.2 Jan 19, 2022
@tabacitu tabacitu deleted the support-laravel-9 branch January 19, 2022 09:56
@tabacitu tabacitu mentioned this pull request Jan 19, 2022
@tabacitu tabacitu mentioned this pull request Feb 4, 2022
Merged
@lakuapik
Copy link
Contributor

@tabacitu will this laravel 9 support lands on 4.x eventually or its only available for 5.x ?

@tabacitu
Copy link
Member Author

Hi @lakuapik ,

We don't plan on adding L9 support to Backpack 4.1 - it supports already L6, L7 and L8.

If we added L9 support to B4.1 it would mean people would be using it B4.1 for 1+ year going forward, which would mean bug reports and feature requests 1+ year going forwards. Unfortunately we don't have that kind of resources, we can only focus on one major version at a time - and right now that version is 5.x. We'll still add a few minor fixes we want in 4.1, and security fixes if they are ever needed... but we can't maintain it any longer, I'm afraid, so L9 support is a no-go.

Plus, v5 is a super-easy upgrade for most people, there's no reason not to upgrade.

Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants