Skip to content

1.0.0-rc3 - PHP 8.2+ Migration

Pre-release
Pre-release

Choose a tag to compare

@koriym koriym released this 11 Nov 09:29
f7dfff9

Breaking Changes

Minimum PHP Version: 8.2

  • Dropped support for PHP 8.1
  • Added support for PHP 8.2, 8.3, 8.4, and 8.5

New Features

MediaQuerySqlModule - Simplified API

Introduces a new high-level API for easier SQL query integration:

// New simplified way (recommended)
$this->install(new MediaQuerySqlModule('/path/to/interfaces', '/path/to/sql'));

// Old way (still supported, marked as @internal low-level API)
$queries = Queries::fromDir('/path/to/interfaces');
$this->install(new MediaQueryModule($queries, [new DbQueryConfig('/path/to/sql')]));

Benefits:

  • One-line module installation for typical use cases
  • Automatic discovery of query interfaces
  • Clear separation between high-level and low-level APIs
  • Full backward compatibility

Removed Dependencies

The following dependencies have been removed as they are no longer needed:

  • nikic/php-parser - Not used in the codebase (still available as transitive dependency via PHPUnit)
  • koriym/attributes - No longer required
  • symfony/polyfill-php81 - Not needed for PHP 8.2+
  • symfony/polyfill-php83 - Not needed for PHP 8.2+

Updated Dependencies

  • ray/aura-sql-module: ^1.12.0 → ^1.13.7

Internal API Documentation

  • MediaQueryModule: Now marked as @internal low-level API for advanced use cases
  • MediaQueryBaseModule: Marked as @internal (common bindings)
  • MediaQueryDbModule: Marked as @internal (SQL-specific bindings)

CI/Testing Changes

  • Removed PHP 8.1 from CI test matrix
  • Added PHP 8.5 to CI test matrix
  • Test coverage: PHP 8.2, 8.3, 8.4 (highest and lowest dependencies)
  • Test coverage: PHP 8.5 (highest dependencies only)
  • Excluded PHP 8.4+ lowest dependencies testing due to aura/sql v4 incompatibility

Migration Guide

If you are upgrading from a previous version:

  1. Update PHP version: Ensure your environment runs PHP 8.2 or higher
  2. Update dependencies: Run composer update
  3. Update module installation (optional, recommended):
    // From:
    $queries = Queries::fromDir('/path/to/interfaces');
    $this->install(new MediaQueryModule($queries, [new DbQueryConfig('/path/to/sql')]));
    
    // To:
    $this->install(new MediaQuerySqlModule('/path/to/interfaces', '/path/to/sql'));
  4. Test your application: All existing functionality remains compatible

Notes

  • No breaking changes to existing public APIs
  • All 82 tests passing on PHP 8.2, 8.3, 8.4, and 8.5
  • 100% static analysis coverage (Psalm & PHPStan)
  • Full backward compatibility maintained