Repository navigation
Resolve SonarCloud findings in the CI test front controller - #163
Merged
Merged
Conversation
- php:S2003: include the autoloader with include_once - php:S2007 (x3): run the request handling in a static closure so no variables live in the global scope Same flow, no behavior change. Co-Authored-By: Claude <noreply@anthropic.com>
|
There was a problem hiding this comment.
🔵 Needs a closer look
The file-inclusion change warrants maintainer security confirmation, and runtime equivalence remains unverified.
No open issues 🎉
What changed in this PR
Addresses SonarCloud findings in the CI-only test front controller while preserving the visible request-handling order.
Changes:
- Uses
include_oncefor the autoloader. - Moves request handling into a static closure to avoid global variables.
| File | Description |
|---|---|
.github/ci/files/public/index_test.php |
Updates autoloader inclusion (line 15) and isolates request handling (lines 23–40). |
Review effort: Balanced
robertSt7
approved these changes
Oct 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Changes in this pull request
Part of pimcore/service-operations#1507: make the SonarCloud quality gate on the default branch green.
This fixes the findings in the CI test front controller
.github/ci/files/public/index_test.php. There is no behavior change:php:S2007×3 (blocker)staticclosure, so$request,$kerneland$responseno longer live in the global scope. Call order is unchangedphp:S2003(bug)include_onceAdditional info
index_test.phpis a CI-only front controller. No test suite or config in this repo refers to it, since there are only Unit tests here.php -lpasses.githubactions:S7637×2 in.github/workflows/copilot-setup-steps.yml. That file is synced frompimcore/workflows-collection-public(.github/sync-templates/copilot-setup-steps.yml), so a change here would be overwritten, and its version tags are kept on purpose. These two keep the gate red (security rating C, 2 major) until they're accepted in SonarCloud or handled in the sync template.🤖 Generated with Claude Code