Skip to content
This repository has been archived by the owner on Jan 29, 2021. It is now read-only.

Upgrading Laravel framework from 5.8 to 6.0 #1081

Merged
merged 18 commits into from Aug 5, 2020

Conversation

weerd
Copy link
Contributor

@weerd weerd commented Jul 30, 2020

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

  • This PR has been added to the relevant Pivotal card.
  • Documentation added for new features/changed endpoints.
  • Added appropriate feature/unit tests.

@weerd weerd changed the title Miscellaneous updates. Upgrading Laravel framework from 5.8 to 6.0 Jul 31, 2020
Comment on lines +196 to +205
$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]]]);
Copy link
Contributor Author

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.

Copy link
Contributor

Choose a reason for hiding this comment

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

I like this approach!

Copy link
Contributor

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!

@weerd weerd marked this pull request as ready for review August 3, 2020 17:19
@weerd weerd requested a review from a team as a code owner August 3, 2020 17:19
@weerd weerd requested review from Dinnall and removed request for a team August 3, 2020 17:19
@weerd
Copy link
Contributor Author

weerd commented Aug 3, 2020

FYI: I'm gonna pull together a list of ENV variables that have been changed/added so we can update both Heroku and Terraform.

@weerd weerd requested review from DFurnes and katiecrane and removed request for Dinnall August 3, 2020 17:20
.env.example Show resolved Hide resolved
config/filesystems.php Outdated Show resolved Hide resolved
config/filesystems.php Outdated Show resolved Hide resolved
@weerd
Copy link
Contributor Author

weerd commented Aug 3, 2020

I've updated Heroku and added any new (revised names too) ENV variables for when this all gets merged into the main branch.

@weerd weerd mentioned this pull request Aug 3, 2020
3 tasks
weerd added 14 commits August 3, 2020 17:54
* 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.
@weerd weerd force-pushed the upgrading-laravel-58-to-60 branch from 262f138 to 24fd8a7 Compare August 3, 2020 22:21
.editorconfig Show resolved Hide resolved
app/Http/Kernel.php Outdated Show resolved Hide resolved
Copy link
Contributor

@katiecrane katiecrane left a 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!

Copy link
Contributor

@DFurnes DFurnes left a 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! 🆙

@weerd weerd merged commit d78f2ab into all-laravel-upgrades Aug 5, 2020
@weerd weerd deleted the upgrading-laravel-58-to-60 branch August 5, 2020 20:08
weerd added a commit that referenced this pull request Aug 5, 2020
* 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.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants