-
Notifications
You must be signed in to change notification settings - Fork 1.5k
[4.x] Laravel 7 #1988
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
[4.x] Laravel 7 #1988
Conversation
Remove phpcov, it's not compatible and suggested to be installed with phar instead of composer, see sebastianbergmann/phpcov#96
Remove php 7.1 which is EOL.
Bump dependencies for laravel 7
Make functions and tests compatible with laravel 7 Date serialization changes Laravel 7 uses a new date serialization format when using the toArray or toJson method on Eloquent models. To format dates for serialization, the framework now uses Carbon's toJSON method, which produces an ISO-8601 https://laravel.com/docs/7.x/upgrade#date-serialization laravel_7_comptability $model->getOriginal() was moved to getRawOriginal method See https://laravel.com/docs/7.x/upgrade#factory-types
This tests are failing even changing // test custom date format for json output
$json = $user->toArray();
$this->assertEquals($user->birthday->format('l jS \of F Y h:i:s A'), $json['birthday']);
$this->assertEquals($user->created_at->format('l jS \of F Y h:i:s A'), $json['created_at']); Error:
However, added another tests which was taken from here |
Codecov Report
@@ Coverage Diff @@
## develop #1988 +/- ##
=============================================
- Coverage 82.80% 82.65% -0.16%
Complexity 531 531
=============================================
Files 27 27
Lines 1210 1211 +1
=============================================
- Hits 1002 1001 -1
- Misses 208 210 +2
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## develop #1988 +/- ##
=============================================
- Coverage 82.8% 82.65% -0.16%
Complexity 531 531
=============================================
Files 27 27
Lines 1210 1211 +1
=============================================
- Hits 1002 1001 -1
- Misses 208 210 +2
Continue to review full report at Codecov.
|
Drop test collections correctly
@@ -223,36 +223,37 @@ public function getCasts() | |||
/** | |||
* {@inheritdoc} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest to remove this dock block and same in this file
Added Laravel 7 compatibility.