-
-
Notifications
You must be signed in to change notification settings - Fork 834
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
Upgrade Illuminate components to 6.x #2055
Comments
Status update: I'm almost done with getting rid of Laravel's The |
I'm likely misunderstanding here, but when I was working on the policy/model visibility scoping refactor, it seemed to me that we're really only using a very small part of Gate. Do we want to keep using it at all? It seems like we could make a gate-inspired system with much less overhead |
That's a good point, but I would rather see that happen with or after the policy rework. No need to block the Laravel upgrade with such a big change to such a central place. |
Yeah let's keep the changes for the upgrade to a minimum. @franzliedke Gate and Translator indeed where blocking the upgrade, I'd suggest implementing the required changes and exchange them with simpler components if possible before stable. |
The test from the previous commit proves this works as intended. :) This is one more step in trying to avoid the widespread usage of the `Application` godclass. Refs #2055.
Less usages of the Application god-class simplifies splitting it up. Refs #2055.
One less reason to inject the huge Application class. Refs #2055.
Made a little more progress with this. Moving this to Beta.14 now. A status update:
|
Would it be feasible to remove the Application contract and its implementation completely? Just using a Container implementation makes a lot more sense in the scope of our targeted code logic. |
Yes, I listed that point above. 😃 |
- Stop trying to implement Laravel's Application contract, which has no value for us. - Stop inheriting from the Container, injecting one works equally well and does not clutter up the interfaces. - Inject the Paths collection instead of unwrapping it again, for better encapsulation. This brings us one step closer toward upgrading our Laravel components (#2055), because we no longer need to adopt the changes to the Application contract.
@franzliedke i meant fully removing the application including contract... 😇 |
Isn't that what the PR does though? Remove the application contract? |
Also, as per Franz's earlier message, I am not envisioning us keeping Gate after the policy refactor, so that will go too. |
Yes, indeed. I removed the contract. The class is still there, but significantly Maybe we just need to figure out better names, the concepts themselves have been useful in my eyes. |
Apparently, this code was from back when we had a special "extensions" directory for Composer packages marked as Flarum extensions. While we're at it, we now inject the Paths instance instead of using one of the global helpers (which I am trying to get rid of). Refs #2055.
Gate is gone with #2181. For translator, as we actually use it (unlike gate), and that interface is commonly used, I'd say we should keep the interface. For events dispatcher, we can provide a BC layer for a few releases, and then drop that. ^^^ Is this more-or-less an accurate representation of the work left to be done (after #2155 is figured out and merged)? |
Core usages were actually removed quite a while ago in f4ab6f4, then the method itself was dropped for real when upgrading to Laravel 5.8. No BC planned here. (I might have a list of usages in community extensions laying around somewhere thanks to @clarkwinkelmann, but it wasn't very long.)
Totally agree.
According to what was noted in this issue and related PRs so far, yes. I will carefully go through the L6 upgrade guide to see whether there's anything else. But that's the next step, then we're done. 🥂 |
Went through the list and found the following things that need to be changed when upgrading to L6:
|
We could just add those methods as deprecated to the Locale\Translator.php object? And remove them in stable? Also make that change on the frontend translator as well? That repo doesn't seem to be maintained, but at the very least we should make it clear in the release announcements to avoid a situation like with SES. Also, perhaps FoF might be interested in picking it up?
Good catch! And maybe that'll solve the annoying deprecation warnings too :D |
This is in preparation for the upcoming upgrade to Laravel 6, which dropped this driver. Refs #2055.
We have used this transitive dependency (via illuminate/support) for a while, so let's make this explicit. Incidentally, we now also explicitly require version 2.x - the previous 1.x branch will no longer be supported after the upcoming upgrade to Laravel 6. Refs #2055.
Let's adopt the LTS release. See previous attempt in #1930.
Challenges
The text was updated successfully, but these errors were encountered: