Skip to content

Conversation

@zakhar-huzenko
Copy link
Contributor

This pull request introduces several updates to modernize the codebase, improve compatibility with newer versions of PHP and Symfony, and enhance type safety. The most significant changes include raising the minimum required PHP and dependency versions, updating CI workflows, and refining type annotations throughout the codebase.

Dependency and compatibility updates:

  • Raised the minimum required PHP version to 8.1 and updated Symfony dependencies to support only 5.4, 6.4, and 7.1, dropping support for older versions in composer.json. Updated development dependencies to newer major versions, including phpunit, phpstan, and added doctrine/orm as a dev dependency.
  • Updated the PHPStan configuration by removing obsolete excludes and error messages for methods that now exist in supported Symfony versions. [1] [2]

Continuous Integration (CI) and workflow improvements:

  • Updated GitHub Actions workflow files to use actions/checkout@v4 and modernized the PHP/Symfony version matrix, removing unsupported versions and adding new ones (e.g., Symfony 6.4, 7.1, PHP 8.4). Removed unnecessary steps for requiring doctrine/orm during CI runs, as it is now a dev dependency. [1] [2] [3] [4] [5] [6]

Type safety and code quality enhancements:

  • Improved type annotations across the codebase, especially in ApiContext.php, by specifying generic array types, using intersection types (e.g., KernelInterface&TerminableInterface), and adding docblocks for better static analysis. Updated method implementations to align with stricter type expectations. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14]
  • Updated request handling logic in ApiContext.php to properly handle JSON requests by setting the request content when appropriate, and improved header and route parameter handling.

Testing improvements:

  • Changed the base test class for ApiContextTest to ApiContextTestCase for improved test structure and clarity.

These changes collectively modernize the codebase, improve maintainability, and ensure compatibility with the latest PHP and Symfony releases.

@zakhar-huzenko zakhar-huzenko merged commit 5e0dd29 into master Jan 29, 2026
18 checks passed
@codecov
Copy link

codecov bot commented Jan 29, 2026

Codecov Report

❌ Patch coverage is 96.15385% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 97.97%. Comparing base (8e938c5) to head (113b2ca).
⚠️ Report is 14 commits behind head on master.

Files with missing lines Patch % Lines
src/Context/ApiContext.php 96.15% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master      #51      +/-   ##
============================================
+ Coverage     88.66%   97.97%   +9.31%     
  Complexity       71       71              
============================================
  Files             5        5              
  Lines           247      247              
============================================
+ Hits            219      242      +23     
+ Misses           28        5      -23     

☔ View full report in Codecov by Sentry.
📢 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.

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.

1 participant