Skip to content

feat: add PHP 8.3, 8.4 and 8.5 compatibility#94

Open
joelmiguelvalente wants to merge 7 commits into
jbowens:masterfrom
joelmiguelvalente:feature/php8-compatibility
Open

feat: add PHP 8.3, 8.4 and 8.5 compatibility#94
joelmiguelvalente wants to merge 7 commits into
jbowens:masterfrom
joelmiguelvalente:feature/php8-compatibility

Conversation

@joelmiguelvalente

Copy link
Copy Markdown

PHP 8.3, 8.4 and 8.5 Compatibility

This PR updates jBBCode to work with PHP 8.3, 8.4 and future 8.5 versions.

Changes made

  • ✅ Added return types (: string, : void, : bool, : array, : self, etc.)
  • ✅ Added property types (string $tagName, array $tokens, ?CodeDefinition $codeDefinition, etc.)
  • ✅ Updated InputValidator interface to validate(string $input): bool
  • ✅ Fixed syntax errors in SmileyVisitor (extra parenthesis)
  • ✅ Fixed namespace in TagCountingVisitor (JBBcodeJBBCode)
  • ✅ Improved regex in CssColorValidator (A-zA-Za-z)
  • ✅ Updated Tokenizer with proper types
  • ✅ Fixed deprecated setters in CodeDefinition to return : void
  • ✅ Updated composer.json (PHPUnit 9.6, PHP 8.3+ requirement)

Backward Compatibility

  • PHP 7.4 and below are no longer supported
  • Existing code that does not rely on implementation details should continue to work

Tests

All existing unit tests pass with PHP 8.3.

Related Issues

Fixes compatibility with PHP 8.x

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.

1 participant