When you are creating new tests with PHPUnit, if you execute all tests, it can take some time to execute. To execute them faster, you can filter the tests you want to execute.
Category: PHP
Using Composer with a different PHP version than the default one
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.
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.
Incrementar el tamaño máximo de subida de archivo en PHP/WordPress
Si te encuentras con un WordPress u otro software PHP con una limitación de tamaño máximo de subida, resolverlo es muy fácil.
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.
Cómo localizar fechas y horas en PHP
En un proyecto PHP en el que estoy participando tenemos problemas para mostrar las fechas en el idioma que queremos, en este caso en español. En esta entrada te explico cómo localizar fechas y horas en PHP.
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
Update Debian to PHP 7.4
PHP 7.4 has been published on 28 Nov 2019.
To update the active version of PHP to this one in a Debian system, you can follow the next steps.
Entornos de desenvolvemento local para PHP
No seguinte enlace (PDF, 1,66 MB, galego) deixo as transparencias da presentación «Entornos de desenvolvemento local para PHP» da Meetup WordPress Pontevedra do día 28 de xuño de 2019.
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.