From ba2513721294ff8bb494aed171b51fa4f68433d6 Mon Sep 17 00:00:00 2001 From: Maxime Veber Date: Fri, 12 Apr 2024 09:52:49 +0200 Subject: [PATCH 1/2] Update php version in web_server_configuration.rst --- setup/web_server_configuration.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/setup/web_server_configuration.rst b/setup/web_server_configuration.rst index cfd4ec1a0b7..1f62d5e9af6 100644 --- a/setup/web_server_configuration.rst +++ b/setup/web_server_configuration.rst @@ -36,7 +36,7 @@ listen on. Each pool can also be run under a different UID and GID: .. code-block:: ini - ; /etc/php/7.4/fpm/pool.d/www.conf + ; /etc/php/8.3/fpm/pool.d/www.conf ; a pool called www [www] @@ -44,7 +44,7 @@ listen on. Each pool can also be run under a different UID and GID: group = www-data ; use a unix domain socket - listen = /var/run/php/php7.4-fpm.sock + listen = /var/run/php/php8.3-fpm.sock ; or listen on a TCP connection ; listen = 127.0.0.1:9000 @@ -72,7 +72,7 @@ directive to pass requests for PHP files to PHP FPM: # when using PHP-FPM as a unix socket - SetHandler proxy:unix:/var/run/php/php7.4-fpm.sock|fcgi://dummy + SetHandler proxy:unix:/var/run/php/php8.3-fpm.sock|fcgi://dummy # when PHP-FPM is configured to use TCP # SetHandler proxy:fcgi://127.0.0.1:9000 @@ -121,7 +121,7 @@ The **minimum configuration** to get your application running under Nginx is: location ~ ^/index\.php(/|$) { # when using PHP-FPM as a unix socket - fastcgi_pass unix:/var/run/php/php7.4-fpm.sock; + fastcgi_pass unix:/var/run/php/php8.3-fpm.sock; # when PHP-FPM is configured to use TCP # fastcgi_pass 127.0.0.1:9000; @@ -198,7 +198,7 @@ When using Caddy on the server, you can use a configuration like this: file_server # otherwise, use PHP-FPM (replace "unix//var/..." with "127.0.0.1:9000" when using TCP) - php_fastcgi unix//var/run/php/php7.4-fpm.sock { + php_fastcgi unix//var/run/php/php8.3-fpm.sock { # optionally set the value of the environment variables used in the application # env APP_ENV "prod" # env APP_SECRET "" From 82723f13a4e22cdf234158c9459f20b8d7ade092 Mon Sep 17 00:00:00 2001 From: Masaharu Suizu <30203831+suizumasahar01@users.noreply.github.com> Date: Wed, 10 Apr 2024 19:48:20 +0900 Subject: [PATCH 2/2] [Console] Update monolog_console.rst --- logging/monolog_console.rst | 1 + reference/constraints/UniqueEntity.rst | 12 ++++++------ reference/twig_reference.rst | 15 ++++++++++++--- 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/logging/monolog_console.rst b/logging/monolog_console.rst index 133185937c7..6df9111eca8 100644 --- a/logging/monolog_console.rst +++ b/logging/monolog_console.rst @@ -46,6 +46,7 @@ The example above could then be rewritten as:: public function __construct(LoggerInterface $logger) { + parent::__construct(); $this->logger = $logger; } diff --git a/reference/constraints/UniqueEntity.rst b/reference/constraints/UniqueEntity.rst index 0f089b2518b..5ae4b29e8ed 100644 --- a/reference/constraints/UniqueEntity.rst +++ b/reference/constraints/UniqueEntity.rst @@ -211,8 +211,8 @@ Consider this example: * @ORM\Entity * @UniqueEntity( * fields={"host", "port"}, - * errorPath="port", - * message="This port is already in use on that host." + * message="This port is already in use on that host.", + * errorPath="port" * ) */ class Service @@ -240,8 +240,8 @@ Consider this example: #[ORM\Entity] #[UniqueEntity( fields: ['host', 'port'], - errorPath: 'port', message: 'This port is already in use on that host.', + errorPath: 'port', )] class Service { @@ -259,8 +259,8 @@ Consider this example: constraints: - Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity: fields: [host, port] - errorPath: port message: 'This port is already in use on that host.' + errorPath: port .. code-block:: xml @@ -276,8 +276,8 @@ Consider this example: host port - + @@ -300,8 +300,8 @@ Consider this example: { $metadata->addConstraint(new UniqueEntity([ 'fields' => ['host', 'port'], - 'errorPath' => 'port', 'message' => 'This port is already in use on that host.', + 'errorPath' => 'port', ])); } } diff --git a/reference/twig_reference.rst b/reference/twig_reference.rst index 481cbd23898..1c20264352c 100644 --- a/reference/twig_reference.rst +++ b/reference/twig_reference.rst @@ -391,9 +391,18 @@ humanize ``text`` **type**: ``string`` -Makes a technical name human readable (i.e. replaces underscores by spaces -or transforms camelCase text like ``helloWorld`` to ``hello world`` -and then capitalizes the string). +Transforms the given string into a human readable string (by replacing underscores +with spaces, capitalizing the string, etc.) It's useful e.g. when displaying +the names of PHP properties/variables to end users: + +.. code-block:: twig + + {{ 'dateOfBirth'|humanize }} {# renders: Date of birth #} + {{ 'DateOfBirth'|humanize }} {# renders: Date of birth #} + {{ 'date-of-birth'|humanize }} {# renders: Date-of-birth #} + {{ 'date_of_birth'|humanize }} {# renders: Date of birth #} + {{ 'date of birth'|humanize }} {# renders: Date of birth #} + {{ 'Date Of Birth'|humanize }} {# renders: Date of birth #} .. _reference-twig-filter-trans: