When you execute Composer, it uses the default PHP version. Sometimes, you will have problems if you use Composer with a different version that the one that executes the project.
Tag: composer
Install Composer 2 in a machine with Composer 1
In October 2020, Composer 2 was released. In some servers, I have some projects that need Composer 1 and others that need Composer 2. I will go to explain how to have both versions on the same server.
PHP Fatal error: Allowed memory size of 1610612736 bytes exhausted
Ejecutando
composer update
en una máquina virtual Linux (Laravel Homestead), obtengo este error:
PHP Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 72 bytes) in phar:///usr/local/bin/composer/src/Composer/DependencyResolver/RuleSetGenerator.php on line 64
Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 72 bytes) in phar:///usr/local/bin/composer/src/Composer/DependencyResolver/RuleSetGenerator.php on line 64
Check https://getcomposer.org/doc/articles/troubleshooting.md#memory-limit-errors for more info on how to handle out of memory errors.
PHP Composer killed
Executing the command
composer update
in a Laravel Homestead virtual machine with 2 GB of RAM, I can’t finish it because the command stops with the output
killed
[InvalidArgumentException] Composer could not find a composer.json file
I was trying to create a new Laravel project when I get this error:
Instalar PHP 7, Composer y WP-CLI en Windows 10
En este post voy a explicar cómo instalar Composer y WP-CLI en un Windows 10. Tanto Composer como WP-CLI necesitan que tengas instalado PHP (instalaré PHP 7.3), por lo que va a ser lo primero que explique.
Error with composer installing a Laravel 5.5 application in a Debian 9 with PHP 7.0
Installing a new Laravel 5.5 application in a Debian 9 with PHP 7.0.27, when I execute the “composer install” I get this error:
How to install composer globally
To install composer globally, you have to execute in a shell
curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
Instalar Composer de forma global en Debian (o en cualquier sistema Linux)
Para instalar Composer de forma global en Debian o encualquier otro sistema Linux puedes ejecutar este script.
Laravel bash alias
In this post I explain how to add some useful Laravel bash alias in the bash shell, so you haven’t to type this long commands.
I use this alias in the Homestead VM Vagrant machine.