How to update CodeIgniter with Composer? - composer-php

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!

Related

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

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?

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.

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.

Laravel Download and Installation

I'm a webdeveloper and I'm starting a huge project requested by a company.
I'm trying to figure out if is best to use a PHP framework or not, and in case, which one.
I know Codeigniter, but I wanted to look around to see what's the best framework at the moment. I found out Laravel is trending at the top so I wanted to try it out.
Being used to Codeigniter I usually download the zip file with all the phps inside and start working. I'm trying to do the same with Laravel but I saw you are to download and use composer to install it.
I'm not really used to the Terminal and I wanted to ask if that's the only way of installing it or if there is a downloadable version as in Codeigniter, CakePHP, etc...
You can always download the ZIPped code directly from project's GitHub site. You can find the base application here: https://github.com/laravel/laravel - you'll find a link at the bottom of the right column. This code is what composer downloads when you use that to setup the application.
If you want to use Laravel you will have to use Composer as this is what the application uses to manage its dependencies. It's not hard, as you'll only need to run a few commands.
You can learn more about how to install and use composer in the docs: https://getcomposer.org/download/

How to install laravel on online website

I am new to laravel and i tryed installing it but i didn't managed to do it.I ran command prompt exactly in the folder with the files of my website and i introduced this command :
composer create-project laravel/laravel --prefer-dist
Laravel appears to be installed as every file is there so i managed to put it on my FTP(FileZila)
After that i tryed to go on mywebsite.com/laravel/ but this is what i get:
And this is what it shows me when i click on public:
Can someone please tell how to to correct this mistake ? or how to properly install laravel for my online website?
Your laravel site is in http://yourdomain.com/laravel/public/
Maybe you should install MAMP or WAMP on your own computer and try Laravel there before actually deploying it to a life server.
You're going to meet lots of issues that you might want to solve on a faster connection to your code.
I hope that you are aware that Laravel is a framework, not a CMS.

Resources