sonata-project / SonataCoreBundle

[deprecated] SonataCoreBundle
MIT License
318 stars 138 forks source link

Fixed signature of InlineConstraint::__sleep #716

Closed Devristo closed 5 years ago

Devristo commented 5 years ago

Subject

Symfony 4.4 adds typehints throughout the codebase. The public API should remain backward-compatible. However \Sonata\Form\Validator\Constraints\InlineConstraint overrides the @internal __sleep method and breaks because of the change in signature. The AbstractAdmin attaches this inline constraint for each admin.

This commit works around the issue, however it still overrides an @internal method

I am targeting this branch, because the change should be backwards-compatible.

Closes #715

Changelog

### Fixed
- Symfony 4.4 compatibility: Fixed signature of InlineConstraint::__sleep
Devristo commented 5 years ago

@core23 It seems that one is already correct:

https://github.com/sonata-project/form-extensions/blob/035e166f34ea952d5674dfd832e7ab6760e72ba0/src/Validator/Constraints/InlineConstraint.php#L52-L62

core23 commented 5 years ago

Thanks @Devristo

jaikdean commented 4 years ago

Any chance of a release containing this fix?

OskarStark commented 4 years ago

@core23 do we need this fix in sonata-project/form-extensions ?

jaikdean commented 4 years ago

@core23 do we need this fix in sonata-project/form-extensions ?

It's already there: https://github.com/sonata-project/form-extensions/blob/master/src/Validator/Constraints/InlineConstraint.php