Composer is a package management system for the PHP programming language that allows to install and in general the packages or libraries also known as dependencies in a simple and efficient way through commands; we can add dependencies to our project as packages to manage excel, social login, among others; these packages can be easily added or removed via commands.
Apart from being able to manage the dependencies, we have a hidden addition and that is that it allows these dependencies to be easily updated; since, in the end, a project that uses a framework like CodeIgniter ultimately consists of several dependencies that can be managed through Composer as we mentioned before.
Composer packages are hosted in the Packagist Repository, making it easy to find and install new packages.
Composer and CodeIgniter
This is the preferred option for working with CodeIgniter 4 just like any modern PHP framework; Being the most direct and the one that offers the best scope due to the potential of being able to use Composer in the development of applications. We are going to use Composer that we installed in the previous section to create a project in CodeIgniter 4, we have the following command that we took from the official page:
$ composer create-project codeigniter4/appstarter NameProyect
Where NameProyect is the name of our project, in our case it will be movies:
$ composer create-project codeigniter4/appstarter movies
With this simple command, we already have a project ready in CodeIgniter 4 to be able to create our applications.
- Andrés Cruz
![Andrés Cruz Andrés Cruz](/public/images/perfil.jpg)
Develop with Laravel, Django, Flask, CodeIgniter, HTML5, CSS3, MySQL, JavaScript, Vue, Android, iOS, Flutter