Skip to content

Asserted the 'php' container PHP settings through 'php-fpm -i' in the Docker Compose workflow test. - #3223

Merged
AlexSkrypnyk merged 1 commit into
mainfrom
feature/fpm-ini-test
Oct 21, 2026
Merged

AlexSkrypnyk merged 1 commit into
mainfrom
feature/fpm-ini-test

Conversation

@AlexSkrypnyk

@AlexSkrypnyk AlexSkrypnyk commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

Summary

subtestDockerComposePhpConfig() checks the php container with php-fpm -i instead of php --ini and php -i. A single call asserts Server API => FPM/FastCGI, the parsed /usr/local/etc/php/conf.d/custom.ini and session.upload_progress.enabled => Off => Off.

The earlier assertions ran the PHP CLI binary inside the php container. That proved custom.ini sits in the shared scan directory, but it didn't show that the FPM SAPI serving web requests reads it. A probe script behind nginx can't cover that: Lagoon's nginx-drupal config routes every direct *.php request to Drupal's front controller (location ~* ^.+\.php$ { try_files /dev/null @drupal; }), so the script would never run.

The workflow test now fails if a later image change gives PHP-FPM a different php.ini or scan directory from the CLI binary. The cli container assertion stays on php --ini, because the CLI SAPI is what that container runs. Nothing outside .vortex/tests/ changes.

Before / After

BEFORE (php container)

docker compose exec -T php php --ini  ──►  CLI SAPI
                                           └─ custom.ini parsed
docker compose exec -T php php -i     ──►  CLI SAPI
                                           └─ session.upload_progress.enabled => Off => Off
AFTER (php container)

docker compose exec -T php php-fpm -i ──►  FPM/FastCGI SAPI
                                           ├─ Server API => FPM/FastCGI
                                           ├─ custom.ini parsed
                                           └─ session.upload_progress.enabled => Off => Off

Changes

  • In .vortex/tests/phpunit/Traits/Subtests/SubtestDockerComposeTrait.php, subtestDockerComposePhpConfig() merges the 2 php container assertions into 1 php-fpm -i call with 3 * substring expectations.
  • Running php-fpm -i in an image built from .docker/php.dockerfile on uselagoon/php-8.4-fpm:26.9.0 prints all 3 expected strings.

Summary by CodeRabbit

  • Tests
    • Updated PHP configuration validation to run through the PHP-FPM runtime.
    • Added checks for the FastCGI server API, the expected custom configuration path, and disabled session upload progress.
    • Removed validation based on the CLI PHP runtime.

@coderabbitai

coderabbitai Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: ASSERTIVE
  • Plan: Team
  • Run ID: 891be1c2-8021-41d5-8d81-f1916383f4ec
📥 Commits

Reviewing files that changed from the base of the PR and between 6eefbea and d6a5901.

📒 Files selected for processing: 1
  • .vortex/tests/phpunit/Traits/Subtests/SubtestDockerComposeTrait.php

Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 3 reviews per hour.

Walkthrough

The Docker Compose PHP configuration subtest now uses php-fpm -i to check the FPM/FastCGI server API, the loaded custom.ini path, and disabled session upload progress. It removes the previous CLI configuration checks.

Changes

PHP-FPM configuration check

Layer / File(s) Summary
PHP-FPM configuration inspection
.vortex/tests/phpunit/Traits/Subtests/SubtestDockerComposeTrait.php
The subtest uses php-fpm -i to verify the server API, custom.ini loading, and that session.upload_progress.enabled is Off. It removes the CLI php --ini and php -i checks.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~5 minutes

Change: Other

Merge Risk: ⚪ Minimal · up to d6a59

The PHP-FPM configuration checks are aligned with the stated test objective and are mergeable.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and specifically summarizes the main change: the test now validates the PHP container settings through php-fpm -i.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

A rabbit checks the FPM stream,
custom.ini appears in view.
Upload progress stays turned off,
The FastCGI check comes through.
Then hops away beneath the moon.

Comment @coderabbitai help to get the list of available commands.

@github-actions

This comment has been minimized.

@AlexSkrypnyk

This comment has been minimized.

@github-actions

This comment has been minimized.

@AlexSkrypnyk

This comment has been minimized.

@github-actions

Copy link
Copy Markdown

Code coverage (threshold: 90%)

  Classes: 100.00% (1/1)
  Methods: 100.00% (2/2)
  Lines:   100.00% (233/233)
Per-class coverage
Drupal\ys_demo\Plugin\Block\CounterBlock
  Methods: 100.00% ( 2/ 2)   Lines: 100.00% ( 10/ 10)

@AlexSkrypnyk

Copy link
Copy Markdown
Member Author

Code coverage (threshold: 90%)

  Classes: 100.00% (1/1)
  Methods: 100.00% (2/2)
  Lines:   100.00% (233/233)
Per-class coverage
Drupal\ys_demo\Plugin\Block\CounterBlock
  Methods: 100.00% ( 2/ 2)   Lines: 100.00% ( 10/ 10)

@codecov

codecov Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.09%. Comparing base (6eefbea) to head (d6a5901).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3223      +/-   ##
==========================================
- Coverage   92.29%   92.09%   -0.20%     
==========================================
  Files         113      105       -8     
  Lines        5099     4933     -166     
  Branches       49        3      -46     
==========================================
- Hits         4706     4543     -163     
+ Misses        393      390       -3     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

Copy link
Copy Markdown

📖 Documentation preview for this pull request has been deployed to Netlify:

https://6ad873a69a6bc0745ec0b51c--vortex-docs.netlify.app

This preview is rebuilt on every commit and is not the production documentation site.

@AlexSkrypnyk AlexSkrypnyk added the Needs review Pull request needs a review from assigned developers label Oct 21, 2026
@AlexSkrypnyk
AlexSkrypnyk merged commit 1fa8510 into main Oct 21, 2026
36 checks passed
@AlexSkrypnyk
AlexSkrypnyk deleted the feature/fpm-ini-test branch October 21, 2026 09:18
@github-project-automation github-project-automation Bot moved this from BACKLOG to Release queue in Vortex 1.x Oct 21, 2026
@AlexSkrypnyk AlexSkrypnyk added this to the 1.42.0 milestone Oct 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs review Pull request needs a review from assigned developers

Projects

Status: Released in 1.42.0

Development

Successfully merging this pull request may close these issues.

1 participant