-
Notifications
You must be signed in to change notification settings - Fork 7
Upgrading Laravel framework from 5.8 to 6.0 #1081
Conversation
$response->assertJson(['data' =>[0 => ['id' => $five->id, 'pending_count' => 5]]]); | ||
$response->assertJson(['data' =>[1 => ['id' => $four->id, 'pending_count' => 4]]]); | ||
$response->assertJson(['data' =>[2 => ['id' => $three->id, 'pending_count' => 3]]]); | ||
|
||
// Then, we'll use the last post's cursor to fetch the remaining two: | ||
$lastCursor = $response->json()['data'][2]['cursor']; | ||
$response = $this->withAdminAccessToken()->getJson($endpoint . '&cursor[after]=' . $lastCursor); | ||
$data = $response->json()['data']; | ||
|
||
$this->assertArraySubset(['id' => $two->id, 'pending_count' => 2], $data[0]); | ||
$this->assertArraySubset(['id' => $one->id, 'pending_count' => 1], $data[1]); | ||
$response->assertJson(['data' =>[0 => ['id' => $two->id, 'pending_count' => 2]]]); | ||
$response->assertJson(['data' =>[1 => ['id' => $one->id, 'pending_count' => 1]]]); |
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.
Updating to remove use of assertArraySubset()
which was deprecated in PHPUnit 8.0 and was throwing warnings. This approach seemed to work, if a little harder to read 🤷♂️
The Laravel Framework copied and has their own version of assertArraySubset()
, but apparently it's recommended only for use inside the test cases in the framework and not meant to be extended outside of it. Thus I went for an alternative approach which did end up passing the tests.
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 like this approach!
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.
Agreed, I think this is great!
FYI: I'm gonna pull together a list of ENV variables that have been changed/added so we can update both Heroku and Terraform. |
I've updated Heroku and added any new (revised names too) ENV variables for when this all gets merged into the main branch. |
e1a1a68
to
ad4ef05
Compare
* Updating composer packages. * Updating dependencies. * Removing unused files and updating index.php * Updating .htaccess. * Removing bootstrap/autoload call. * Updating TrustedProxy settings. * Removing mentions of Dusk in project since no longer used. * Upadating Hashing config. * Updating Logging. * Updating logger method name. * Bringing rest of files up to date and in sync with 5.6 framework files. * Reverting web routes file I was using for debugging. * Figuring out issues with running tests. * Updating composer. * StyleCI fix. * Updating dependencies for 5.7. * Updating assets. * Updating authorization. * Updating cache. * Updating tests. * Removing overridden mock() method since the signature changed and Laravel provides same method. * Removing unused imported class. * Removing CustomGate now that framework supports Guest User Gates. * Fixing up broken tests. * Composer lock update. * Wrapping up miscellaneous updates from 5.6 to 5.7. * Some miscellaneous updates from 5.7 to 5.8. * Updating dependencies and fixing API routes. * Updating testing. * Updating notifications. * Updating support. * Updating support with env() changes. * Updating env example vars. * Updates to env vars used and simplifying redis env settings. * Fixing up Tag tests and errors with notifications. * Updating cache config. * Removing deleted_at from array since automatically converted after upgrades. * Changing tag so it does not trigger notification, if not point of test. * Cleanup. * Fixing StyleCI issue. * StyleCI fixes. * StyleCI fixes. * Updating Trusted Proxies based on Heroku docs. * Type-hinting the Authenticateable class works. * Updating redis options. * Updating filesystems config and reivew app config. * Adding note regarding a potential future update. * Restoring the Good Submission tag and setting empty string var for slack webhook in PHPUnit settings. * Restoring old approach now that tests do not trigger notifications. * Updaing AWS_* env variables.
262f138
to
24fd8a7
Compare
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 think this is good to go!
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.
+1, excellent work on this! 🆙
* Updating composer packages. * Updating dependencies. * Removing unused files and updating index.php * Updating .htaccess. * Removing bootstrap/autoload call. * Updating TrustedProxy settings. * Removing mentions of Dusk in project since no longer used. * Upadating Hashing config. * Updating Logging. * Updating logger method name. * Bringing rest of files up to date and in sync with 5.6 framework files. * Reverting web routes file I was using for debugging. * Figuring out issues with running tests. * Updating composer. * StyleCI fix. * Updating dependencies for 5.7. * Updating assets. * Updating authorization. * Updating cache. * Updating tests. * Removing overridden mock() method since the signature changed and Laravel provides same method. * Removing unused imported class. * Removing CustomGate now that framework supports Guest User Gates. * Fixing up broken tests. * Composer lock update. * Wrapping up miscellaneous updates from 5.6 to 5.7. * Some miscellaneous updates from 5.7 to 5.8. * Updating dependencies and fixing API routes. * Updating testing. * Updating notifications. * Updating support. * Updating support with env() changes. * Updating env example vars. * Updates to env vars used and simplifying redis env settings. * Fixing up Tag tests and errors with notifications. * Updating cache config. * Removing deleted_at from array since automatically converted after upgrades. * Changing tag so it does not trigger notification, if not point of test. * Cleanup. * StyleCI fixes. * StyleCI fixes. * Updating Trusted Proxies based on Heroku docs. * Type-hinting the Authenticateable class works. * Updating redis options. * Updating filesystems config and reivew app config. * Adding note regarding a potential future update. * Restoring the Good Submission tag and setting empty string var for slack webhook in PHPUnit settings. * Restoring old approach now that tests do not trigger notifications. * Updaing AWS_* env variables. * Updating editorconfig file. * Upgrading Laravel Framework (#1071) * Updating composer packages. * Updating dependencies. * Removing unused files and updating index.php * Updating .htaccess. * Removing bootstrap/autoload call. * Updating TrustedProxy settings. * Removing mentions of Dusk in project since no longer used. * Upadating Hashing config. * Updating Logging. * Updating logger method name. * Bringing rest of files up to date and in sync with 5.6 framework files. * Reverting web routes file I was using for debugging. * Figuring out issues with running tests. * Updating composer. * StyleCI fix. * Updating dependencies for 5.7. * Updating assets. * Updating authorization. * Updating cache. * Updating tests. * Removing overridden mock() method since the signature changed and Laravel provides same method. * Removing unused imported class. * Removing CustomGate now that framework supports Guest User Gates. * Fixing up broken tests. * Composer lock update. * Wrapping up miscellaneous updates from 5.6 to 5.7. * Some miscellaneous updates from 5.7 to 5.8. * Updating dependencies and fixing API routes. * Updating testing. * Updating notifications. * Updating support. * Updating support with env() changes. * Updating env example vars. * Updates to env vars used and simplifying redis env settings. * Fixing up Tag tests and errors with notifications. * Updating cache config. * Removing deleted_at from array since automatically converted after upgrades. * Changing tag so it does not trigger notification, if not point of test. * Cleanup. * Fixing StyleCI issue. * StyleCI fixes. * StyleCI fixes. * Updating Trusted Proxies based on Heroku docs. * Type-hinting the Authenticateable class works. * Updating redis options. * Updating filesystems config and reivew app config. * Adding note regarding a potential future update. * Restoring the Good Submission tag and setting empty string var for slack webhook in PHPUnit settings. * Restoring old approach now that tests do not trigger notifications. * Updaing AWS_* env variables. * Restoring some items post rebase. * StyleCI fix. * Upgrading Laravel framework from 5.8 to 6.0 (#1081) * Removing CustomGate now that framework supports Guest User Gates. * Updating support. * Rebase fixes. * Rebase fixes. * Upgrading Laravel Framework (#1071) * Updating composer packages. * Updating dependencies. * Removing unused files and updating index.php * Updating .htaccess. * Removing bootstrap/autoload call. * Updating TrustedProxy settings. * Removing mentions of Dusk in project since no longer used. * Upadating Hashing config. * Updating Logging. * Updating logger method name. * Bringing rest of files up to date and in sync with 5.6 framework files. * Reverting web routes file I was using for debugging. * Figuring out issues with running tests. * Updating composer. * StyleCI fix. * Updating dependencies for 5.7. * Updating assets. * Updating authorization. * Updating cache. * Updating tests. * Removing overridden mock() method since the signature changed and Laravel provides same method. * Removing unused imported class. * Removing CustomGate now that framework supports Guest User Gates. * Fixing up broken tests. * Composer lock update. * Wrapping up miscellaneous updates from 5.6 to 5.7. * Some miscellaneous updates from 5.7 to 5.8. * Updating dependencies and fixing API routes. * Updating testing. * Updating notifications. * Updating support. * Updating support with env() changes. * Updating env example vars. * Updates to env vars used and simplifying redis env settings. * Fixing up Tag tests and errors with notifications. * Updating cache config. * Removing deleted_at from array since automatically converted after upgrades. * Changing tag so it does not trigger notification, if not point of test. * Cleanup. * Fixing StyleCI issue. * StyleCI fixes. * StyleCI fixes. * Updating Trusted Proxies based on Heroku docs. * Type-hinting the Authenticateable class works. * Updating redis options. * Updating filesystems config and reivew app config. * Adding note regarding a potential future update. * Restoring the Good Submission tag and setting empty string var for slack webhook in PHPUnit settings. * Restoring old approach now that tests do not trigger notifications. * Updaing AWS_* env variables. * Miscellaneous updates. * Updating miscellaneous. * Composer dependency updates. * Updating configuration. * Updating PHPUnit and fixing test with previously deprecated method. * Updating composer dependencies. * Reordering. * Cleanup. * Prefixing the SQS Env vars with AWS_ for consistency. * Post rebase cleanup * Fixing straggling merge conflicts. * Cleanup. * Updating url and endpoint settings.
What's this PR do?
This pull request upgrades Laravel from 5.8 to the latest LTS version, 6.0.
How should this be reviewed?
👀
Any background context you want to provide?
🌵
Relevant tickets
References Pivotal #172383643.
Checklist