Skip to content

Enable expose_php in the PHP-FPM test fixture - #2188

Merged
mnapoli merged 1 commit into
masterfrom
cursor/expose-php-in-fpm-test-fixture-e111
Sep 26, 2026
Merged

mnapoli merged 1 commit into
masterfrom
cursor/expose-php-in-fpm-test-fixture-e111

Conversation

@mnapoli

@mnapoli mnapoli commented Sep 26, 2026 •

Copy link
Copy Markdown
Member

Problem

Three FpmHandlerTest cases fail on a stock Debian/Ubuntu PHP install:

1) Bref\Test\FpmRuntime\FpmHandlerTest::test response with headers
Failed asserting that '' starts with "PHP/".
2) Bref\Test\FpmRuntime\FpmHandlerTest::test response with multivalue headers
3) Bref\Test\FpmRuntime\FpmHandlerTest::test response with error_log

They assert on the X-Powered-By header, which PHP only sends when expose_php is on. The Bref
layers enable it, so the assertion is right about production — but the distribution packages ship
expose_php = Off in /etc/php/<version>/fpm/php.ini (while leaving it on for the CLI SAPI), so
the tests depend on how the host PHP happens to be configured.

Found while setting up a Cloud Agent environment where PHP comes from ppa:ondrej/php.

Three FpmHandlerTest cases assert the X-Powered-By header, which PHP only
sends when expose_php is on. The Bref layers enable it, but distribution
php.ini files ship it off for the FPM SAPI, so the tests failed on a
stock Debian or Ubuntu PHP install.

Co-authored-by: matthieu <matthieu@mnapoli.fr>
@mnapoli
mnapoli marked this pull request as ready for review September 26, 2026 16:20
@mnapoli
mnapoli merged commit da2e791 into master Sep 26, 2026
8 checks passed
@mnapoli
mnapoli deleted the cursor/expose-php-in-fpm-test-fixture-e111 branch September 26, 2026 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants