Skip to content

Conversation

@herbertroth
Copy link
Member

This pull request refactors how integer parameters are retrieved from HTTP requests in both AdminController.php and ClassController.php. Instead of using the native Symfony getInt method, the code now consistently uses ParameterBagHelper::getInt. This change improves robustness and consistency in parameter handling across the controllers.

Parameter retrieval improvements:

  • All integer parameters from request objects in AdminController.php are now retrieved using ParameterBagHelper::getInt instead of $request->query->getInt or $request->request->getInt. This affects object and config IDs in methods such as initializeAction, getOutputConfigsAction, resetOutputConfigAction, getOutputConfigAction, getOrCreateOutputConfigAction, and saveOutputConfigAction. [1] [2] [3] [4] [5] [6] [7] [8]

Consistency applied to ClassController.php:

  • Integer parameters in ClassController.php are now also retrieved using ParameterBagHelper::getInt, specifically for oid and target_oid in relevant methods. [1] [2]

General codebase consistency:

  • The ParameterBagHelper import was added to both controllers to support the new retrieval method. [1] [2]

…ler to use ParameterBagHelper for improved consistency and readability.
@herbertroth herbertroth added this to the 6.2.0 milestone Oct 23, 2025
@sonarqubecloud
Copy link

sonarqubecloud bot commented Oct 23, 2025

Quality Gate Passed Quality Gate passed

Issues
0 New issues
3 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarQube Cloud

@herbertroth herbertroth merged commit 0fd897f into 6.x Oct 23, 2025
2 checks passed
@herbertroth herbertroth deleted the symfony7-next-steps branch October 23, 2025 12:37
@github-actions github-actions bot locked and limited conversation to collaborators Oct 23, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants