Releases: johnnyxlemonade/component_meta
Releases · johnnyxlemonade/component_meta
v2.2.0 – Hreflang alternate links support
✨ Added
- New
AlternateLinkTagentity for rendering<link rel="alternate" hreflang="..."> MetaData::alternatesproperty for defining language variants- Automatic generation of alternate links
- Support for
x-defaultfallback
🔧 Improved
Metaentity now includes alternate link rendering alongside canonical and image_src
v2.1.1 – Extensibility + Entity order update
🔧 Changed
- Reordered default entities:
Meta→ priority 10Dc→ priority 20Facebook→ priority 30Twitter→ priority 40
v2.1.0 – Add extensibility & static analysis support
✨ Added
- MetaFactory::addEntity() for adding custom meta entities with priority
- MetaFactory::removeEntity() for removing previously added entities
- New PHPUnit tests covering add/remove entity behavior
- Integrated PHPStan (level 10) for static analysis
- Added support for phpstan/phpstan-strict-rules
🔧 Improved
- Cleaned up test suite (no unused properties in anonymous classes)
- All tests now pass with PHPUnit 10.5
- Project fully analysed with PHPStan level 10, strict mode enabled
v2.0.1 – Test suite & docs improvements
🛠 Fixed
- Updated PHPUnit tests to match new tag rendering (no trailing newlines)
- Ensured all meta tag classes are fully covered with unit tests
📚 Documentation
- Improved README.md (badges, clearer usage section, changelog link)
- Added instructions for running tests via
vendor\bin\phpunit
This is a patch release with no breaking changes.
v2.0.0 – Major Refactor & Clean API
This release introduces a major refactor of lemonade/component_meta.
- Cleaner and more extensible API
- Unified entity interface (
MetaEntityInterface) - Simplified tag classes with
AbstractTag MetaFactoryis nowStringableand easier to extend
Changelog
[2.0.0] - 2025-09-12
Changed
- Refactored tag classes:
- Introduced
AbstractTagfor shared logic MetaTag,OpenGraphTag,TwitterTag,DcTag,LinkTagnow extendAbstractTagTitleTagremains a special case withSimpleTagTrait
- Introduced
- Added
MetaEntityInterfaceto unify all meta entities - Updated
AbstractMetaEntityto use readonlyMetaDatainjection - Simplified
MetaFactory:- Uses collection of entities instead of hardcoded calls
- Now implements
Stringable
Breaking Changes
- Direct construction of tag classes may differ (all now require
key, content) MetaFactoryinternals refactored; behavior is the same but extending it requires changesMetaData::getTitle()replacessetDynamicTitle()
[1.0.0] - 2025-09-12
- Initial stable release of
lemonade/component_meta
[0.1.0] - 2018-05-01
- First experimental attempt at OOP meta handling
- Based on large associative arrays with many setters
- Entities used magic key names (
_appAuthor,_appKeywords, …) - Verbose and hard to extend
- Prototype version, never intended for production