Skip to content

Conversation

@davidgorges
Copy link
Owner

Major Changes:

  • Remove mischiefcollective/colorjizz dependency
  • Require PHP 8.1+ instead of 5.4+
  • Implement custom Color class with RGB/Hex support
  • Modernize codebase with PHP 8.1+ features:
    • Constructor property promotion
    • Readonly classes and properties
    • Union types
    • Strict types throughout
    • Modern array syntax

Code Quality:

  • Add PHPStan at max level with strict rules
  • Add PHP_CodeSniffer with PSR-12 standards
  • Add comprehensive test suite (100+ tests)
  • Configure PHPUnit 10 with coverage reporting
  • Add GitHub Actions CI/CD workflow

Testing:

  • Expand ColorContrastTest with additional test cases
  • Create comprehensive ColorTest with 30+ test cases
  • Enhance LuminosityAlgorithmTest with more scenarios
  • Add ColorCombinationTest for data objects
  • Achieve full code coverage

Infrastructure:

  • Add phpunit.xml configuration
  • Add phpcs.xml for code style checks
  • Add phpstan.neon for static analysis
  • Add GitHub Actions workflow for CI
  • Update README with modern documentation
  • Add composer scripts for common tasks

Breaking Changes:

  • Minimum PHP version now 8.1
  • ColorJizz dependency removed
  • New Color class API
  • All classes are now final
  • Strict return types on all methods

🤖 Generated with Claude Code

Major Changes:
- Remove mischiefcollective/colorjizz dependency
- Require PHP 8.1+ instead of 5.4+
- Implement custom Color class with RGB/Hex support
- Modernize codebase with PHP 8.1+ features:
  * Constructor property promotion
  * Readonly classes and properties
  * Union types
  * Strict types throughout
  * Modern array syntax

Code Quality:
- Add PHPStan at max level with strict rules
- Add PHP_CodeSniffer with PSR-12 standards
- Add comprehensive test suite (100+ tests)
- Configure PHPUnit 10 with coverage reporting
- Add GitHub Actions CI/CD workflow

Testing:
- Expand ColorContrastTest with additional test cases
- Create comprehensive ColorTest with 30+ test cases
- Enhance LuminosityAlgorithmTest with more scenarios
- Add ColorCombinationTest for data objects
- Achieve full code coverage

Infrastructure:
- Add phpunit.xml configuration
- Add phpcs.xml for code style checks
- Add phpstan.neon for static analysis
- Add GitHub Actions workflow for CI
- Update README with modern documentation
- Add composer scripts for common tasks

Breaking Changes:
- Minimum PHP version now 8.1
- ColorJizz dependency removed
- New Color class API
- All classes are now final
- Strict return types on all methods

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Changes:
- Break long lines (>120 chars) into multiple lines
- Add proper spacing around string concatenation operators
- Split long conditional statements across multiple lines
- Format multi-line function calls with proper indentation
- Split long sprintf calls with multiple parameters
- Make InvalidColorException class final for consistency
- Fix declare(strict_types=1) spacing consistency
- Format test assertions with long messages across multiple lines

All files now comply with PSR-12 coding standards and
pass phpcs validation with Symfony code style rules.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Major Fixes:
1. Replace 'readonly class' syntax (PHP 8.2) with individual
   'readonly' properties (PHP 8.1)
   - Updated Color class
   - Updated ColorCombination class

2. Fix type consistency in WCAG constants
   - Changed MIN_CONTRAST_AAA from int 7 to float 7.0
   - Changed MIN_CONTRAST_AA_LARGE from int 3 to float 3.0
   - Tests use assertSame() which requires strict type matching

3. Add explicit type cast in Color::fromHexString()
   - Cast hexdec() result to int for type safety
   - Ensures strict typing compliance

These changes ensure the package works correctly with PHP 8.1
and all tests pass with strict type checking enabled.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
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