Skip to content

Releases: mrcgrtz/php-shorten

Maple Syrup

19 Aug 12:17
420fb22

Choose a tag to compare

📖 Documentation

Update the package’s description.

🔗 Links

Walnut Grove

18 Aug 17:41

Choose a tag to compare

🚨 Breaking Changes

  • Minimum PHP version increased from 8.0 to 8.2 - This is a breaking change that requires PHP 8.2 or higher
  • Updated PHPUnit to v11.x for testing compatibility

✨ New Features & Enhancements

  • Enhanced emoji support: Improved handling of complex emojis with Zero Width Joiner (ZWJ) using grapheme clusters
  • Parameter validation: Added comprehensive parameter validation to prevent invalid input
  • Malformed HTML recovery: Enhanced ability to handle and recover from malformed HTML markup
  • Performance improvements: Optimized internal algorithms for better performance
  • PHP 8.4 compatibility: Added support and testing for PHP 8.4

🐛 Bug Fixes

  • Fixed recalculation of open HTML tags
  • Fixed potential bug with space position handling
  • Fixed wordsafe truncation when the last occurrence of delimiter is inside a tag
  • Fixed truncation of heading tags
  • Improved edge case handling throughout the library

🔧 Internal Improvements

  • Code refactoring: Split large monolithic function into several smaller, more maintainable functions
  • Improved test coverage: Massively expanded test suite with 300+ lines of comprehensive tests
  • Better documentation: Enhanced inline documentation and examples
  • Dependency updates: Updated all development dependencies to latest stable versions

📦 Dependencies

  • Updated: PHPUnit from 9.x to 11.x
  • Updated: Various Symfony components to latest versions
  • Updated: Code quality tools (PHP_CodeSniffer, PHP-Coveralls)

🧪 Testing

  • Added comprehensive test coverage for edge cases
  • Added tests for emoji and Unicode handling
  • Added tests for malformed HTML scenarios
  • Added performance testing for large content
  • Enhanced CI/CD pipeline with PHP 8.4 testing

📈 Performance

  • Optimized string handling algorithms
  • Improved memory usage for large content processing
  • Enhanced regex patterns for better performance

📋 Migration Guide

Users upgrading from v4 need to ensure they're running PHP 8.2 or higher. No API changes were made, so existing code should work without modifications once the PHP version requirement is met.

🔗 Links


Note: This is a major version release due to the PHP version requirement change. Please test thoroughly in your environment before deploying to production.

The Chosen One

08 Dec 23:06
ce2c25b

Choose a tag to compare

  • Breaking change: Requires PHP >= 8
  • Fixed an issue with non-XML styled self-closing tags (#5)
  • Improved documentation and examples
  • Replaced Travis CI with GitHub Actions
  • Added a Dependabot workflow to GitHub Actions to keep dependencies up-to-date
  • Added a funding link, buy me a ☕ if you use (and maybe even like) this

Full Changelog: 3.0.0...4.0.0

The One with The 🐘

29 Jun 18:41
5d9e976

Choose a tag to compare

  • Do not add HTML entities if there are none in input markup (#2)
  • Handle Emoji characters in input markup
  • Add tests

The Composition

02 May 14:38

Choose a tag to compare

Added Composer support. Install it using componser require marcgoertz/shorten.

The First One

19 Jun 14:21

Choose a tag to compare

1.0.0

Initial commit.