docker icon indicating copy to clipboard operation
docker copied to clipboard

we cant set error_reporting through envs when we use the php const

Open Scarbous opened this issue 4 months ago • 3 comments

Currently error_reporting get set through PHP_ERROR_REPORTING=E_ALL wich result in an empty error_reporting.

https://github.com/shopware/docker/blob/main/fpm/Dockerfile#L64 https://github.com/shopware/docker/blob/main/frankenphp/Dockerfile#L47

Scarbous avatar Sep 16 '25 15:09 Scarbous

❯ docker run --rm -e PHP_ERROR_REPORTING="E_ERROR | E_CORE_ERROR" ghcr.io/shopware/docker-dev:php8.3-node24-caddy php -i |  grep error_reporting
error_reporting => E_ERROR | E_CORE_ERROR => E_ERROR | E_CORE_ERROR

looks okayishh 🤔

shyim avatar Sep 19 '25 08:09 shyim

Its tricky, the result of php -i | grep error_reporting has to be an int. In your example it should be 17 but returned the string E_ERROR | E_CORE_ERROR . PHP dosn't parse it anymore. If you run php -r 'var_dump(error_reporting());' you see what I mean, it returns int(0) instead of in(17).

When error_reporting should be set through env it has to be an int.

Scarbous avatar Sep 22 '25 06:09 Scarbous

ahhh. can you open a issue at https://github.com/php/php-src/ it's then a general PHP bug 🙈

shyim avatar Sep 22 '25 06:09 shyim