Skip to content

Raise minimum PHP version to 8.0#157

Merged
JanTvrdik merged 2 commits intomasterfrom
raise-min-php-8.0
Feb 25, 2026
Merged

Raise minimum PHP version to 8.0#157
JanTvrdik merged 2 commits intomasterfrom
raise-min-php-8.0

Conversation

@JanTvrdik
Copy link
Copy Markdown
Member

Summary

  • Raise minimum PHP from 7.1 to 8.0
  • Drop support for library versions incompatible with PHP 8: dibi 3.x, doctrine/dbal 2.5–2.11, nextras/dbal 1.x–3.x
  • Simplify bridge adapters by removing compatibility shims for those old versions:
    • DibiAdapter: Remove proxy pattern, inline Dibi3Adapter implementation, delete Dibi3Adapter.php
    • DoctrineAdapter: Remove method_exists fallbacks for pre-2.12 fetchAll()/exec() API
    • NextrasAdapter: Remove v1 code path (convertToSql / IDriver::TYPE_*)
    • Symfony Configuration: Remove TreeBuilder compat check for Symfony < 4.2
  • Remove dibi3/dibi4 aliases from DI extension $dbals arrays and Symfony config enum
  • Remove PHP 7.1–7.4 from GitHub Actions matrix and Docker Compose services
  • Delete 16 test matrix files for library versions that can't run on PHP 8
  • Update PHP_VERSION_MIN to 80000 in 27 remaining test matrix files

Test plan

  • composer validate passes (lock file will need composer update)
  • Unit tests pass on PHP 8.0+
  • Integration tests pass on PHP 8.0+
  • No references to Dibi3Adapter remain in codebase
  • No test matrix files with PHP_VERSION_MAX < 80000 remain

- Update composer.json: PHP >=8.0, dibi ^4.0+, doctrine/dbal ^2.12+, nextras/dbal ^4.0+
- Remove DibiAdapter proxy pattern, inline Dibi3Adapter implementation
- Remove DoctrineAdapter method_exists fallbacks for pre-2.12 API
- Remove NextrasAdapter v1 code path (nextras/dbal 1.x-3.x)
- Remove Symfony Configuration compat for Symfony < 4.2
- Remove dibi3/dibi4 entries from DI extension $dbals arrays
- Remove PHP 7.1-7.4 from CI matrix and Docker Compose
- Delete 16 test matrix files for libraries incompatible with PHP 8
- Update PHP_VERSION_MIN to 80000 in 27 remaining matrix files
Copilot AI review requested due to automatic review settings February 25, 2026 19:54
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR raises the minimum PHP version from 7.1 to 8.0 and drops support for legacy library versions that are incompatible with PHP 8. The changes streamline the codebase by removing compatibility shims and version checks that are no longer needed, making the code more maintainable going forward.

Changes:

  • Updated minimum PHP requirement to 8.0 in composer.json and removed support for dibi 3.x, doctrine/dbal 2.5–2.11, and nextras/dbal 1.x–3.x
  • Simplified bridge adapters by removing compatibility code for old library versions (DibiAdapter inlined Dibi3Adapter, DoctrineAdapter removed method_exists checks, NextrasAdapter removed v1 code paths)
  • Removed PHP 7.x from CI/Docker infrastructure and deleted 16 test matrix files for incompatible library versions

Reviewed changes

Copilot reviewed 53 out of 53 changed files in this pull request and generated no comments.

Show a summary per file
File Description
composer.json Updated PHP requirement to >=8.0 and library version constraints to minimum supported versions
src/Bridges/Dibi/DibiAdapter.php Inlined Dibi3Adapter implementation, removed proxy pattern
src/Bridges/Dibi/Dibi3Adapter.php Deleted obsolete adapter for dibi 3.x
src/Bridges/DoctrineDbal/DoctrineAdapter.php Removed method_exists fallbacks for pre-2.12 API
src/Bridges/NextrasDbal/NextrasAdapter.php Removed v1 code path and unused IDriver import
src/Bridges/NetteDI/MigrationsExtension.php Removed dibi3/dibi4 aliases from $dbals array
src/Bridges/SymfonyBundle/DependencyInjection/NextrasMigrationsExtension.php Removed dibi3/dibi4 aliases from $dbals array
src/Bridges/SymfonyBundle/DependencyInjection/Configuration.php Removed TreeBuilder compatibility check for Symfony < 4.2 and dibi3/dibi4 from enum values
.github/workflows/qa.yaml Removed PHP 7.1–7.4 from test matrix
docker-compose.yaml Removed PHP 7.1–7.4 service definitions
tests/matrix/dbal/*.sh (27 files) Updated PHP_VERSION_MIN to 80000 in remaining test matrix files; deleted 16 files for unsupported library versions
tests/matrix/nette-di/*.sh (2 files) Updated PHP_VERSION_MIN to 80000
tests/matrix/symfony-bundle/*.sh (6 files) Updated PHP_VERSION_MIN to 80000

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

- Constructor property promotion across all classes
- Typed properties (PHP 7.4) replacing @var phpdoc
- Arrow functions replacing single-expression closures
- Native union types replacing @param/@return phpdoc
- match expressions replacing simple switch/if-elseif chains
- Null-safe operator (?->) where applicable
- str_starts_with()/str_ends_with() replacing manual checks
- mixed type for untyped parameters
@JanTvrdik JanTvrdik merged commit c17aae9 into master Feb 25, 2026
6 checks passed
@JanTvrdik JanTvrdik deleted the raise-min-php-8.0 branch February 25, 2026 20:44
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