Skip to content

Limit CFLAGS suppression to PHP 8.1 only#284

Open
bobstrecansky wants to merge 2 commits intomainfrom
8.1-cflags-scoped-v3
Open

Limit CFLAGS suppression to PHP 8.1 only#284
bobstrecansky wants to merge 2 commits intomainfrom
8.1-cflags-scoped-v3

Conversation

@bobstrecansky
Copy link
Copy Markdown
Contributor

Summary

  • Scopes the -Wno-error=incompatible-pointer-types CFLAGS to PHP 8.1 only, where the fopencookie signature mismatch is a known issue
  • Removes the unconditional ENV CFLAGS from Dockerfile.alpine and conditionally sets it in the build step for both alpine and debian
  • Addresses review feedback from Add CFLAGS environment variable to Dockerfile #280

Test plan

  • Verify PHP 8.1 builds succeed on both alpine and debian
  • Verify PHP 8.2+ builds are unaffected (no unnecessary suppression)

PHP 8.1.34 has a known issue where the stream cookie functions' signatures don't match the fopencookie API expectations on certain platforms. The compiler is treating this as an error (-Werror).

Updating the Dockerfile to add a compiler flag that treats this specific incompatibility as a warning rather than an error.
The -Wno-error=incompatible-pointer-types flag is only needed for PHP
8.1 due to a known fopencookie signature mismatch. Newer PHP versions
build without it, so scope the suppression to 8.1 only.
@bobstrecansky bobstrecansky requested a review from a team as a code owner April 1, 2026 13:51
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