понедельник, 16 сентября 2019 г.

Symfony doesnt update minor version fix

If you cannot update your Symfony project to new minor version (for example, from 4.2 to 4.3), and your packages only checks packages only previous versions like this:

The requested package symfony/security-bundle 4.3.4 exists as symfony/security-bundle[4.2.x-dev, v4.2.0, v4.2.0-BETA1, v4.2.0-BETA2, v4.2.0-RC1, v4.2.1, v4.2.10, v4.2.11, v4.2.2, v4.2.3, v4.2.4, v4.2.5, v4.2.6, v4.2.7, v4.2.8, v4.2.9] but these are rejected by your constraint.
  Problem 2
    - The requested package symfony/translation ^4.3 exists as symfony/translation[4.2.x-dev, v4.2.0, v4.2.0-BETA1, v4.2.0-BETA2, v4.2.0-RC1, v4.2.1, v4.2.10, v4.2.11, v4.2.2, v4.2.3, v4.2.4, v4.2.5, v4.2.6, v4.2.7, v4.2.8, v4.2.9] but these are rejected by your constraint.
  Problem 3
    - The requested package symfony/twig-bundle ^4.3 exists as symfony/twig-bundle[4.2.x-dev, v4.2.0, v4.2.0-BETA1, v4.2.0-BETA2, v4.2.0-RC1, v4.2.1, v4.2.10, v4.2.11, v4.2.2, v4.2.3, v4.2.4, v4.2.5, v4.2.6, v4.2.7, v4.2.8, v4.2.9] but these are rejected by your constraint.

it means you should to change extra node in your composer.json file:
"extra": {
        "symfony": {
            "allow-contrib": false,
            "require": "4.3.*"
        }
    }

воскресенье, 1 сентября 2019 г.

Ways to optimize a Sylius project in dev mode

If you feel that your Sylius dev configuration is slow, try this:

1) use nginx (or docker with nginx) instead of php bin/console server:run
2) be sure XDebug is disabled
3) add these lines to your php.ini:

opcache.memory_consumption=256
opcache.max_accelerated_files=20000
realpath_cache_size=4096K

How to fix "504 gateway timeout" [php] [xdebug]

At the long PHP debug browser responds with "504 gateway timeout". If you want to increase this debugging period,

1) set in /etc/nginx/nginx.conf:
http {
    ...
    fastcgi_read_timeout 3600;
    ...
}
2) set this line in php.ini:
request_terminate_timeout = 3600s

3) restart nginx or restart containers.

It also possible to do in your Docker configuration.