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

Upgrade to Laravel 5.6 #1063

Closed
wants to merge 13 commits into from
Closed

Upgrade to Laravel 5.6 #1063

wants to merge 13 commits into from

Conversation

weerd
Copy link
Contributor

@weerd weerd commented Jul 9, 2020

What's this PR do?

This pull request upgrades Rogue from Laravel 5.5 to Laravel 5.6.

How should this be reviewed?

...

Any background context you want to provide?

...

Relevant tickets

References Pivotal #.

Checklist

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

Request::HEADER_X_FORWARDED_PORT => 'X_FORWARDED_PORT',
Request::HEADER_X_FORWARDED_PROTO => 'X_FORWARDED_PROTO',
];
protected $headers = Request::HEADER_X_FORWARDED_ALL;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm less familiar with Trusted Proxy and want to make sure the new bit property is fine that should encompass the prior series of headers.

* proxy that connects directly to your server, but also proxies that connect to
* those proxies, and all the way back until you reach the original source IP.
*/
'proxies' => '*', // [<ip addresses>,], '*', '<ip addresses>,'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

According to the TrustedProxies Class in the package, the ** value is deprecated in favor of *. I checked and we use an env variable on each Rogue env on Heroku and specify it as **. By defaulting the config to * it should cover the same things and we can remove the env variables from each env on Heroku.

@weerd weerd changed the title Upgrade to laravel 56 Upgrade to Laravel 5.6 Jul 13, 2020
@weerd
Copy link
Contributor Author

weerd commented Jul 16, 2020

Noting here that after the upgrades and running tests I was running into an odd error with tests that use the withAdminAccessToken() method.

Instead of the expected series of method calls, after the 5.6 updates, there is a resulting call to the __isset() magic method in the HasAttributes trait utilized by the RemoteUser class in our Gateway package.

The only thing I could find related in Laravel 5.6 changes was a merged pull request that adds an __isset() to the Optional class (we do use this class within Rogue and within the method calls related to withAdminAccessToken()).

@weerd
Copy link
Contributor Author

weerd commented Jul 20, 2020

Closing in favor of #1071

As it turns out due to some Composer dependencies and the required update to Gateway to fix failing tests in Rogue on Laravel 5.6, we need to push through a few Laravel upgrades in a single PR instead of level by level PR as I had originally planned! I didn't want the branch name to be confusing since it specified only upgrading to 5.6 😉

@weerd weerd closed this Jul 20, 2020
@weerd weerd deleted the upgrade-to-laravel-56 branch July 20, 2020 18:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant