Skip to content

feat: add docker environment to run the checks locally - #57

Merged
YvesCesar merged 7 commits into
mainfrom
feat/add-docker-environment
Sep 1, 2026
Merged

feat: add docker environment to run the checks locally#57
YvesCesar merged 7 commits into
mainfrom
feat/add-docker-environment

Conversation

@YvesCesar

Copy link
Copy Markdown
Contributor

Why

Running the checks locally depends on the host's PHP and OpenSSL, and on distributions where those differ from CI the suite fails for reasons that have nothing to do with the library. On Fedora 44 (PHP 8.5.9, OpenSSL 3.5.7) none of the three checks behave like they do on CI:

  • composer run test:unit fails with 6 errors and 2 failures, all of them setCertificate(): Argument #1 must be of type string, null given. The test helper calls openssl_csr_sign() without digest_alg, so PHP signs the generated certificate with SHA-1, and the distribution's crypto policy rejects it (rh-allow-sha1-signatures = no, error:03000098 ... invalid digest). The certificate comes back null. This affects Fedora and RHEL 9+ by default.
  • composer run psalm does not run at all. Psalm 6.5.0 turns PHP 8.5's SplObjectStorage::attach() deprecation into an uncaught Throwable and crashes before analysing anything. Silencing deprecations does not help, since the crash comes from Psalm's own error handler.
  • example/index.php dies with a fatal error, because PharData exceeds the default 128M memory limit just to open the JRE tarball. The fatal skips the catch, so the temporary .pfx is left behind with its private key.

Signed-off-by: YvesCesar <yvesamorim73@gmail.com>
Comment thread Dockerfile Outdated
Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread compose.yml Outdated
YvesCesar and others added 5 commits August 31, 2026 09:27
Co-authored-by: Vitor Mattos <vitor@php.rio>
Signed-off-by: YvesCesar <yvesamorim73@gmail.com>
…values

Signed-off-by: YvesCesar <yvesamorim73@gmail.com>
Signed-off-by: YvesCesar <yvesamorim73@gmail.com>
Signed-off-by: YvesCesar <yvesamorim73@gmail.com>
@YvesCesar
YvesCesar requested a review from vitormattos August 31, 2026 15:26

@vitormattos vitormattos left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I approved the PR but send only a small suggestion that don't block the merge.

Fell free to choose what you prefer to do.

Comment thread README.md
Co-authored-by: Vitor Mattos <vitor@php.rio>
@YvesCesar
YvesCesar merged commit f25beb8 into main Sep 1, 2026
8 checks passed
@YvesCesar
YvesCesar deleted the feat/add-docker-environment branch September 1, 2026 18:32
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