-
Notifications
You must be signed in to change notification settings - Fork 66
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 to Laravel 5.4 #227
Conversation
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.
Thanks for this!
app/Providers/AppServiceProvider.php
Outdated
@@ -20,8 +20,8 @@ class AppServiceProvider extends ServiceProvider | |||
*/ | |||
public function boot() | |||
{ | |||
\Blade::setRawTags('{{', '}}'); | |||
\Blade::setContentTags('{{{', '}}}'); | |||
// \Blade::setRawTags('{{', '}}'); |
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.
If we're going to escape this, we need to make sure we change the output style everywhere.
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.
Done!
config/app.php
Outdated
@@ -165,7 +165,7 @@ | |||
'Collective\Html\HtmlServiceProvider', | |||
'Thomaswelton\LaravelGravatar\LaravelGravatarServiceProvider', | |||
'Thujohn\Twitter\TwitterServiceProvider', | |||
'Maknz\Slack\SlackServiceProvider', | |||
M1guelpf\Slack\SlackServiceProvider::class, |
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.
??
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.
The other package is no longer supported, and is not Laravel5.4-compatible.
resources/views/dashboard.blade.php
Outdated
No talks yet. | ||
</li> | ||
@endforelse | ||
@each('partials.talk-in-list', $talks, 'talk', 'partials.talk-in-list-empty') |
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.
too many spaces indent
@@ -0,0 +1 @@ | |||
No talks yet. |
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.
Wouldn't this need an
tests/AccountTest.php
Outdated
@@ -2,11 +2,11 @@ | |||
|
|||
use App\User; | |||
use Laracasts\TestDummy\Factory; | |||
use MailThief\Testing\InteractsWithMail; | |||
// use MailThief\Testing\InteractsWithMail; |
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.
If we don't need this we can delete it
tests/Api/DummyAuthorizer.php
Outdated
{ | ||
public $userId; | ||
|
||
public function __construct() |
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.
Is constructor necessary?
tests/PublicSpeakerProfileTest.php
Outdated
@@ -5,12 +5,12 @@ | |||
use Illuminate\Foundation\Testing\DatabaseMigrations; | |||
use Illuminate\Support\Facades\Session; | |||
use Laracasts\TestDummy\Factory; | |||
use MailThief\Testing\InteractsWithMail; | |||
// use MailThief\Testing\InteractsWithMail; |
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.
same as in previous; if we don't need it then you can delete it
tests/SubmissionTest.php
Outdated
// $this->assertEquals(0, $conference->submissions->count()); | ||
// $this->assertFalse($conference->submissions->contains($revision)); | ||
// } | ||
// } |
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.
? This is not OK
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 temporally commented it out because it was failing for an unknown reason.
tests/Api/DummyAuthorizer.php
Outdated
|
||
namespace Tests\Api; | ||
|
||
class DummyAuthorizer extends Authorizer |
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.
Why introduce a class that's never used?
@@ -3,7 +3,7 @@ | |||
namespace App\Handlers\Events; | |||
|
|||
use Illuminate\Support\Facades\App; | |||
use Maknz\Slack\Facades\Slack; | |||
use Slack; |
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.
Importing façades with their FQCN is an intentional decision.
@@ -1,4 +1,5 @@ | |||
<div class="pull-right"> |
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.
Fixed
@mattstauffer I think I need help with the failing/commented out tests. The feature works in my browser, but fails in the tests... |
@m1guelpf Hi Miguel, thank you for all of your work on this upgrade! I took some time this morning to review the failing/commented out tests that you noted and was able to get to the bottom of it. I wanted to take a moment to outline what the issues were, as they were definitely a bit obscure. The majority of the tests that were causing issues were in the
The error message was saying that it failed to "assert that false is true", meaning that the When you call
You can see that on line 87 of Alternatively, here's the code that gets run when you call
This one you can see on line 83 of As you can tell, in 5.3
The
and then call
You're going to see it returns
Now if you call So, that was the underlying issue here. We were passing an Eloquent model into the The one other test that was failing was the Anyway, here's the relevant portion of the code from that test:
As you can see, we grab the reset token from the database, and then we pass that into the reset password URL for the test. However, after a bit of Googling, I found out that there was an undocumented change in how password reset tokens worked between 5.3 and 5.4. You can read more about it here, but essentially the tokens are now hashed before they are stored in the database. However, the un-hashed version is still what goes in the URL in the email that gets sent to the user. So, essentially, we were trying to use the hashed version of the token in the URL (because we got it from the database directly), when what we really needed was the un-hashed version. This led me down a bit of a rabbit hole of trying to figure out how to get that un-hashed version (since it's not stored anywhere in the DB). Luckily, I eventually found this Stackoverflow that held the answer. By using a Notification fake in the test, we can get the un-hashed version via a callback, and use it successfully in our test. If you have any questions about any of this, I'd be happy to answer. Thanks again for all the hard work! |
@imjohnbon So this is ready now? |
@imjohnbon thanks for your hard work sussing that out! @m1guelpf nope, not ready. John is going to move the Slack notifications over to native Laravel notifications and then I'll review the whole thing again. |
@mattstauffer Thanks! The Slack notifications have now been fully converted over to native Laravel notifications. |
@mattstauffer ping |
Upgrading Vue and Axios etc. broke the Vue content. Currently deciding whether to upgrade it or just downgrade the dependencies. |
Ugh. Also this requires 7.1 and symposium is currently hosted on 7.0. |
@mattstauffer Would you accept another PR for 5.5? |
@m1guelpf Sure! I'll try to get this on a 7.1 server soon. Thanks! |
@m1guelpf it's now on a 7.1 server, so you're welcome to PR 5.5 if you'd like. Thanks! |
@mattstauffer I've submitted lucadegasperi/oauth2-server-laravel#777, but the project is no longer mantained, so I guess the first thing to do would be switching to Passport. |
This pull request upgrades Symposium to Laravel 5.4