-
Notifications
You must be signed in to change notification settings - Fork 11
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
Stuck in concerts_with_a_published_at_date_are_published test because of PHP error #81
Comments
Which lesson/commit are you working with? |
@drbyte I'm in the lesson named Testing Query Scopes |
Everything up to this lesson was fine. This is the part that's failing:
Here's the scope in the Model:
And here's the call in the controller:
I've checked multiple times and the code is exactly the one from the lecture. Thanks. |
I think yours is a PHP 7.2 limitation, which requires a Laravel version that's been updated for compatibility. https://github.com/laravel/framework/blame/5.3/src/Illuminate/Database/Eloquent/Builder.php#L1231 I realize that bumping up to Laravel 5.5 is a bigger leap until you get through several more lessons to the one where Adam does a big refactor for that. Consuming the rest of this course will be easier if you can downgrade to PHP 7.1. |
@drbyte I just downgrade to PHP 7.1 and it worked fine! Thanks a lot (y)!!! |
Just in case anyone else is following along using 5.3 and runs into this issue, the easiest way to get around it is to use the latest unreleased version of Laravel 5.3. Run this in your terminal:
...or change your |
@adamwathan this note for php7.2 users should really be included in the beginning of the course, where you include the composer command to install Laravel 5.3... :) Just ran into the same issue, luckily I just installed Valet a couple days ago so it was only a Thanks for this course btw, it rocks, super happy and already learned a bunch of cool things. |
Hi.
I started my tests as recomended in the videos, using Laravel 5.3. When working on the test concerts_with_a_published_at_date_are_published I'm getting an issue, according to what I have found online, it is related to PHP7.2.
Here's the issue:
Is there a way to solve this without modifying the PHP version? I tried updating to Laravel 5.4 and followed the steps related to using BrowserKitTest but that didn't work either.
Thanks,
Sebastian
The text was updated successfully, but these errors were encountered: