How to update laravel and its components like fortify, jetstream etc? - laravel

I am new to laravel and I am wondering how all these default templates are upgraded when a new minor(!) laravel version was released.
Let's say I've installed laravel via:
composer create-project laravel/laravel example-app
This pulls in a lot of files with basic templates to get started.
Now when I run composer outdated it shows me which versions are currently out of date. I guess that composer update will only update the vendor files, but not the files inside my project itself. But what if those template files were changed on an update? How do I get to know this change?
The same question applies to packages like sanctum, fortify and jetstream. How do I manage those updates? Or aren't the template files ever being corrected between minor versions?

Related

Installing Teams support in Laravel Jetstream after initial install

If I already have an existing Laravel Jetstream (Inertia) project which was installed without the --teams option is there a way to go back and install support for teams given that I have already created multiple controllers, models, migrations and other customizations within the app?
AS A TEST, I did it here on my Jetstream LIVEWIRE project, by reinstalling Jetstream with --teams. It's doable, but beware of some side effects.
What I did:
Publish Jetstream view files, if you haven't already:
php artisan vendor:publish --tag=jetstream-views
Update Jetstream to version 2.0 (upgrade guide)
Reinstall Jetstream with options --teams:
php artisan jetstream:install livewire --teams
Warning: This will install the remaining actions, models, factories, and tests and will update several files, among those some view files, including on the layout views folder, so be careful and have them in source control or in a backup BEFORE trying this. Some view files will change entirely, so you will have to manually merge the changes with your old ones.
Run the migrations that were created

ConfirmPasswordController doesn't exist after upgrade from Laravel 5.8 to 6.2

I am working on a project which is in Laravel 5.8, and recently, I upgraded it to Laravel 6.0 with its packages dependencies versions too. The project was running fine. But, today, I update the composer via composer update, and it upgraded to Laravel 6.2. After that, I faced an error:
App\Http\Controllers\Auth\ConfirmPasswordController does not exist
Then I installed a fresh Laravel-6.2 and generated basic scaffolding via php artisan ui vue, then, generated login/registration scaffolding via php artisan ui vue --auth. After that, I found ConfirmPasswordController.Then, I manually created ConfirmPasswordController in my running project and copied all of the codes from ConfirmPasswordController to my manually created ConfirmPasswordController. Then, the error has gone. Although I did not face any error related to this. But, I am confused about my approach. Is it right way what I did? Or it has a better way to solve this problem. I am confused about, If I face many issues for php artisan ui vue --auth in the next time. Would someone suggest me the right process, what should I do?
Laravel made the following additions and modifications from versions v6.0.0 to v6.2.0.
A app/Http/Controllers/Auth/ConfirmPasswordController.php
M app/Http/Controllers/Auth/ForgotPasswordController.php
M app/Http/Controllers/Auth/ResetPasswordController.php
M app/Http/Kernel.php
M config/auth.php
M resources/lang/en/validation.php
Please make sure these changes are in your Laravel instance though it sounds like they now are. You can see the diff of v6.0.0 to v6.2.0 here. If you need to see v5.8.0 changes through 6.2.0, please go here.
When upgrading, you will need to copy it from https://github.com/laravel/laravel/blob/master/app/Http/Controllers/Auth/ConfirmPasswordController.php
This is known, reference https://github.com/laravel/ui/pull/36#issuecomment-539921924.

filp/Whoops package still show old UI after upgrading to Laravel 5.5

With the release of Laravel 5.5 last week, the package filp/Whoops got revamped.
However, if you follow the official Laravel 5.5 upgrade guide, it does not mention anything about filp/Whoops.
As a result, you will still have the old filp/Whoops UI. So how do you get the new filp/Whoops version with Laravel 5.5?
OLD UI in Laravel 5.4:
New UI in Laravel 5.5:
Well, it turns out that you simply need to add it manually to your composer.json. This is undocumented in the official upgrade guide at the time of writing.
composer require filp/whoops
In fact you should look at https://github.com/laravel/laravel/blob/master/composer.json and make sure you have all the dependencies mentioned there in correct versions.
Probably when you are making such migration (from Laravel 5.4 to Laravel 5.5) you should also remove composer.lock file and vendor directory and run composer install to install latest versions of packages.

How to update CodeIgniter with Composer?

I switched from Symfony to CodeIgniter and I would like it to stay up-to-date with the framework.
I understand that you can easely install and update all kind of packages, I know how to do it as I did it over and over again with Symfony.
I already set $config['composer_autoload'] = TRUE; in application/config/config.php. (Thanks to a lot of other SO questions)
My problem: Composer seems to update all the packages fine, but not the framework itself. Is it possible or am I doomed to do it manually?
EDIT
Please consider using CodeIgniter 4, which is made to be used with Composer from the start. CodeIgniter 3 is old and should only be used on legacy projects.
You can update your codeigniter using composer by below method:
$ cd /path/to/codeigniter
$ composer update
Here you can get more info about this
CodeIgniter hasn't been made as a composer packageā€¦ except that someone eventually did it anyway!
It is possible to keep CodeIgniter up-to-date by installing it throught composer in the first place. The project is hosted on GitHub.
In order to use it, it's quite easy: composer create-project kenjis/codeigniter-composer-installer codeigniter should do the trick!

To what extent Laravel uses composer?

I try to run Laravel on a server that doesn't provide composer. I am aware of these issues which I've resolved:
1) Problem: installing the framework
Solution: installed on local machine and copied files over.
2) Problem: installing packages
Solution: installed them mannually by adding files and modifying autoloader files.
3) Problem: creating and rolling back migrations via artisan
Solution: not found yet. Probably new classes need to be manually added in composer autoloader file.
Is there any more tasks where composer is necessary? I'd like to know to what extent the framework really relies on in before starting development.

Resources