Skip to content

Conversation

@segy
Copy link
Member

@segy segy commented Dec 1, 2025

No description provided.

claude and others added 8 commits December 1, 2025 20:31
- Update composer.json dependencies to CakePHP ^4.0
- Update PHP requirement to >=7.4 (required for CakePHP 4)
- Update PHPUnit to ^8.5|^9.3 for compatibility
- Update phpstan and php-cs-fixer versions
- Add void return types to initialize() methods (CakePHP 4 requirement)
- Add void return types to setUp() and tearDown() test methods (PHPUnit 8+ requirement)
- Update TableRegistry::get() to TableRegistry::getTableLocator()->get() (CakePHP 4 pattern)
- Update README to reflect CakePHP 4.x compatibility
- Add GitHub Actions workflow for automated testing
  - Test on PHP 7.4, 8.0, 8.1, 8.2, 8.3
  - Test with lowest and highest dependencies
  - Run PHPStan static analysis
  - Run PHP CS Fixer code style checks
- Update phpunit.xml for PHPUnit 8/9 compatibility
  - Replace deprecated listeners with extensions
  - Replace whitelist with coverage/include
  - Remove deprecated syntaxCheck attribute
  - Fix test suite name
- Add phpstan.neon configuration for static analysis
- Add .php-cs-fixer.dist.php for PHP-CS-Fixer 3.0 compatibility
- Set default database value to ':memory:' for SQLite when env var not set
- Use proper null coalescing for database connection parameters
- Add quoteIdentifiers and cacheMetadata to connection config
- Update .gitignore to exclude PHPUnit and PHP-CS-Fixer cache files

This fixes the "database key needs to be a non-empty string" error
when running tests in CakePHP 4.
- Replace deprecated $fields and $records properties
- Implement init() method for record initialization
- Implement _buildSchema() method using TableSchema API
- Use addColumn(), addConstraint(), and addIndex() methods
- This fixes the "Cannot describe table. It has 0 columns" error

The new format is compatible with CakePHP 4.x test fixtures
and provides better type safety and clarity.
- Use getTableSchema() method instead of _buildSchema()
- Use $records property instead of init() method
- Create and return TableSchema object directly
- Remove parent::init() call that was causing table lookup errors

This fixes "Cannot describe schema for table. The table does not exist" error.
- Update minimum PHP version to 8.0 in composer.json
- Remove PHP 7.4 from GitHub Actions test matrix
- Test lowest dependencies on PHP 8.0 instead

PHP 7.4 reached end of life in November 2022.
@segy segy merged commit 31750e9 into master Dec 2, 2025
5 checks passed
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.

3 participants