Following Symfony migration on Rector, I guess we can have that automation as well for Laravel. List of versions:
Also, make use of CHANGELOG-5.x.md files in Framework's core. Some useful and undocumented changes may be found there :man_technologist:
EDIT by @TomasVotruba
Closing as Laravel migrations usually adds new folders struct, new helper methods, and bugfixes. Out of scope for Rector now.
Also handled better by https://laravelshift.com
We can now focus in improving Symfony and architecture Rectors.
On the other hand, since it's paid and needs the service full access to the code, it can't change sensitive code, so in the end it's usable only to smaller projects.
In the meantime, looks like the author of Laravel Shifts is taking care of the products: https://medium.com/@jasonmccreary/laravel-by-the-numbers-262a1cdd9c72
I really like it and price seems affordable. I also don't want decrease somebody's working business just because I can.
Let's focus on projects that do not have such a service - Symfony, Guzzle, Doctrine etc.
On the other hand, it might be useful many freelancers who use own free projects.
After hangout with core team, it's not a priority for 2019.
Use https://laravelshift.com/ instead
But are you still open for PR's? No urgent plans yet, but the Cache minutes (for 5.7.) or seconds (5.8) to DateTime instances seems like a good first migration; https://laravel.com/docs/5.8/upgrade#cache-ttl-in-seconds.
// Laravel 5.7 - Store item for 30 minutes...
Cache::put('foo', 'bar', 30);
// Laravel 5.8 - Store item for 30 seconds...
Cache::put('foo', 'bar', 30);
// Laravel 5.7 / 5.8 - Store item for 30 seconds...
Cache::put('foo', 'bar', now()->addSeconds(30));
But are you still open for PR's?
Definitely! :+1: If features has tests and helps people, no reason to not merge it.
If you want to contribute, there is vendor/bin/rector create command that uses create-rector.yaml.dist (remove ".dist" part before use). There you can create boiler plate code for tests, level config and description.
Re-open inspired by https://medium.freecodecamp.org/moving-away-from-magic-or-why-i-dont-want-to-use-laravel-anymore-2ce098c979bd
There is no need to swtich frameworks to switch the dependency passing pattern.
// Return a 301 redirect...
-Route::redirect('/foo', '/bar', 301);
+Route::permanentRedirect('/foo', '/bar');
[x] The addRoute method of the Illuminate\Routing\Router class has been changed from protected to public
[x] The raw method was changed from protected to public visibility. In addition, it was added to the hIlluminateContractsAuthAccessGate` contract:
[x] The unused options argument of the Illuminate\Foundation\Application class register method has been removed.
[x] The authenticate method of the Illuminate\Auth\Middleware\Authenticate
-protected function authenticate(array $guards)
+protected function authenticate($request, array $guards)
[x] The protected sendResetResponse method of the lluminate\Foundation\Auth\ResetsPasswords trait
-protected function sendResetResponse($response)
+protected function sendResetResponse(Request $request, $response)
[x] The protected sendResetResponse method of the lluminate\Foundation\Auth\SendsPasswordResetEmails trait
-protected function sendResetLinkResponse($response)
+protected function sendResetLinkResponse(Request $request, $response)
[x] This getDateFormat method is now public instead of protected, probably https://github.com/laravel/framework/blob/e6c8aa0e39d8f91068ad1c299546536e9f25ef63/src/Illuminate/Database/Grammar.php#L196
[x] The validate method of the Illuminate\Validation\ValidatesWhenResolvedTrait and Illuminate\Contracts\Validation\ValidatesWhenResolved interface / trait has been renamed to validateResolved in order to avoid conflicts with the $request->validate method.
[x] Illuminate\Console\Command - fire() → handle()
[x] Illuminate\Database\Eloquent\Concerns\HasEvents - property renamed: events → dispatchesEvents
[x] Illuminate\Database\Eloquent\Relations\Pivot - property parent → pivotParent
[x] The Illuminate\Translation\LoaderInterface interface has been moved to Illuminate\Contracts\Translation\Loader.
Most helpful comment
On the other hand, it might be useful many freelancers who use own free projects.