Skip to content
This repository has been archived by the owner on Sep 30, 2021. It is now read-only.

Commit

Permalink
Add missing conditional statement
Browse files Browse the repository at this point in the history
We do not want the deprecation to be triggered when this is autoloaded
from the new class for BC reasons.
  • Loading branch information
greg0ire committed Jan 13, 2019
1 parent eb039fa commit 36b370f
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/CoreBundle/Validator/Constraints/InlineConstraint.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@

namespace Sonata\CoreBundle\Validator\Constraints;

@trigger_error(
'The '.__NAMESPACE__.'\InlineConstraint class is deprecated since version 3.x and will be removed in 4.0.'
.' Use Sonata\Form\Validator\Constraint\InlineConstraint instead.',
E_USER_DEPRECATED
);
if (!class_exists(Sonata\Form\Validator\Constraints\InlineConstraint::class, false)) {
@trigger_error(
'The '.__NAMESPACE__.'\InlineConstraint class is deprecated since version 3.x and will be removed in 4.0.'
.' Use Sonata\Form\Validator\Constraint\InlineConstraint instead.',
E_USER_DEPRECATED
);
}

class_alias(
\Sonata\Form\Validator\Constraints\InlineConstraint::class,
Expand Down

0 comments on commit 36b370f

Please sign in to comment.