mirror of
https://github.com/gantry/gantry5.git
synced 2026-08-17 16:34:55 -05:00
PHP 8.3 Compatibility Test Suite for Gantry5
This test suite is designed to validate Gantry5 compatibility with PHP 8.3. It includes tests for critical components that may be affected by PHP 8.3 changes.
Test Categories
Framework Tests
Tests core Gantry framework functionality:
- Gantry instance creation and container access
- Service registration and retrieval
- Debug functionality
Platform Tests
Tests platform-specific functionality:
- Platform detection
- Joomla-specific features
- WordPress-specific features
Component Tests
Tests individual components:
- PHP 8.3 type system (nullable and union types)
- Trait compatibility
- Twig integration (filters, functions, extensions)
Running Tests
Run the tests using PHPUnit:
# From the Gantry5 root directory
vendor/bin/phpunit
Adding New Tests
To add new PHP 8.3 compatibility tests:
-
Create a new test file in the appropriate directory:
tests/php83/Framework/for core framework teststests/php83/Platform/for platform-specific teststests/php83/Component/for component tests
-
Tests should extend
PHPUnit\Framework\TestCase -
Focus on PHP 8.3 specific features like:
- Proper handling of nullable and union types
- Deprecation warnings or errors
- New language feature compatibility
Reporting Issues
If you find PHP 8.3 compatibility issues, please open an issue on GitHub with:
- Detailed description of the issue
- Steps to reproduce
- PHP 8.3 error messages or warnings
- Suggestions for fixes if available