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

Laravel 10 compatibility #2506

Merged
merged 11 commits into from Feb 12, 2023
Merged

Laravel 10 compatibility #2506

merged 11 commits into from Feb 12, 2023

Conversation

alcaeus
Copy link
Member

@alcaeus alcaeus commented Feb 9, 2023

This PR replaces #2501 and adapts the library to accommodate the BC breaks introduced in Laravel 10.

The most impactful change is the handling of dates, which requires people to update their models to no longer use the $dates property, but instead define a cast for date fields in the $casts property (except for the created_at and updated_at fields).

Note that we will use this BC break as an opportunity to remove auto-casting for ObjectId and Binary instances, which has been previously planned for version 4.0 of this library. This will require people that want to use auto-casting for identifiers and binary fields to update the $casts property accordingly. Since this is a significant BC break (along with other BC breaks introduced by Laravel), we may decide to release Laravel 10 support in a new major version. This will not necessarily all of the changes previously prepared for 4.0 to accelerate the timeline for Laravel 10 support.

Any testing users can do with Laravel 10 to alert us to potential problems with this library are highly appreciated; we value your feedback to let us know what we need to fix or can improve.

src/Eloquent/Model.php Outdated Show resolved Hide resolved
Copy link
Contributor

@divine divine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Honestly, we probably will need to separate each BC with a new PR.

README.md Show resolved Hide resolved
src/Auth/PasswordResetServiceProvider.php Show resolved Hide resolved
src/Eloquent/Model.php Show resolved Hide resolved
src/Eloquent/Model.php Show resolved Hide resolved
tests/AuthTest.php Show resolved Hide resolved
@alcaeus alcaeus requested review from divine and removed request for Smolevich February 10, 2023 12:50
@divine
Copy link
Contributor

divine commented Feb 10, 2023

Hello,

Since this PR affects dates maybe it will make sense to merge this PR #2376 here as well?

Thanks!

@alcaeus
Copy link
Member Author

alcaeus commented Feb 10, 2023

I'm not familiar with that PR and will have to check that separately, but it isn't near the top of my list at the moment.

@Smolevich Smolevich merged commit 7dab675 into mongodb:master Feb 12, 2023
@alcaeus alcaeus deleted the l10-compatibility branch September 28, 2023 12:11
@mongodb mongodb deleted a comment from codecov-commenter Feb 21, 2024
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.

None yet

4 participants