sonata-project / SonataCoreBundle

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

Fixed deprecation message for InlineConstraint always displayed #750

Closed jorrit closed 4 years ago

jorrit commented 4 years ago

Subject

I noticed that the following deprecation message was displayed all the time, even when the deprecated class wasn't called:

User Deprecated: The Sonata\CoreBundle\Validator\Constraints\InlineConstraint class is deprecated since version 3.13.0 and will be removed in 4.0. Use Sonata\Form\Validator\Constraint\InlineConstraint instead.

The reason is a small omission in the code. The following line:

if (!class_exists(Sonata\Form\Validator\Constraints\InlineConstraint::class, false)) {

should have been:

if (!class_exists(\Sonata\Form\Validator\Constraints\InlineConstraint::class, false)) {

The InlineConstraint class is the only class with this bug, all the other deprecated classes work correctly in this respect.

I am targeting this branch, because it's a backwards compatible change.

Changelog

### Fixed
- Deprecation message for InlineConstraint was always displayed
jorrit commented 4 years ago

The items found by FlintCI are not related to this PR.

core23 commented 4 years ago

The items found by FlintCI are not related to this PR.

Also they are not related, can you fix them and create a new PR for this? Otherwise we cannot merge this.

jorrit commented 4 years ago

@core23 I think I based the PR on a wrong commit because the problems found by FlintCI disappeared after I rebased the commit.

jordisala1991 commented 4 years ago

Thank you @jorrit !