Releases: mrcgrtz/php-shorten
Releases · mrcgrtz/php-shorten
Maple Syrup
📖 Documentation
Update the package’s description.
🔗 Links
- Full Changelog: Compare changes
- Issues: Report bugs or request features on GitHub Issues
Walnut Grove
🚨 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
- Full Changelog: Compare changes
- Issues: Report bugs or request features on GitHub Issues
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
- 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 🐘
- Do not add HTML entities if there are none in input markup (#2)
- Handle Emoji characters in input markup
- Add tests
The Composition
Added Composer support. Install it using componser require marcgoertz/shorten.
The First One
1.0.0 Initial commit.