Skip to content

v1.6.0 — Improved Nullable Detection and Doctrine-Bundle 3 Support

Choose a tag to compare

@CreativeNative CreativeNative released this 29 Nov 10:52
· 114 commits to master since this release

What's Changed

  • Fixed: Nullable detection now uses PHP type hints instead of Doctrine column attributes
  • Added: Support for nullable embeddables and other Doctrine mapping types
  • Improved: AttributeHelper code structure to eliminate duplicate code
  • Updated: Doctrine bundle dependency to support ^3.0

Why It Matters

  • Robust Nullable Handling: The bundle now correctly detects nullable properties for all Doctrine mapping types (Embeddables, Relations, etc.), not just Column fields. This resolves issues where @EmptyOnTranslate validation failed incorrectly for nullable embeddables.

  • Future-Proof Architecture: The refactored AttributeHelper provides a cleaner, more maintainable codebase while maintaining full backward compatibility.

  • Doctrine 3 Ready: Explicit support for doctrine/doctrine-bundle ^3.0 ensures compatibility with the latest Doctrine ecosystem.

Breaking Changes

None - This release maintains full backward compatibility while improving internal logic.

Technical Details

  • AttributeHelper::isNullable() now uses ReflectionProperty::getType()->allowsNull() instead of checking Doctrine's @Column(nullable)
  • Centralized attribute checking logic eliminates code duplication
  • Better support for complex entity structures with inheritance and embeddables

Full Changelog: v1.5.6...v1.6.0