minor #33281 Backported return type violation bugfixes (derrabus)
This PR was merged into the 3.4 branch.
Discussion
----------
Backported return type violation bugfixes
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #33228
| License | MIT
| Doc PR | N/A
Fixed some doc blocks and broken return values discovered while working on #33279.
Commits
-------
8877a013d7
Backported return type violation bugfixes.
This commit is contained in:
commit
622ce1d0f4
@ -26,6 +26,7 @@ use Symfony\Component\Form\FormFactoryBuilder;
|
||||
use Symfony\Component\Form\FormFactoryInterface;
|
||||
use Symfony\Component\Validator\ConstraintViolation;
|
||||
use Symfony\Component\Validator\ConstraintViolationInterface;
|
||||
use Symfony\Component\Validator\ConstraintViolationList;
|
||||
use Symfony\Component\Validator\Context\ExecutionContextInterface;
|
||||
use Symfony\Component\Validator\Validation;
|
||||
use Symfony\Component\Validator\Validator\ValidatorInterface;
|
||||
@ -166,7 +167,7 @@ class DummyValidator implements ValidatorInterface
|
||||
|
||||
public function validate($value, $constraints = null, $groups = null)
|
||||
{
|
||||
return [$this->violation];
|
||||
return new ConstraintViolationList([$this->violation]);
|
||||
}
|
||||
|
||||
public function validateProperty($object, $propertyName, $groups = null)
|
||||
|
@ -17,5 +17,6 @@ class FooType extends AbstractType
|
||||
{
|
||||
public function getParent()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ interface EncoderAwareInterface
|
||||
* If the method returns null, the standard way to retrieve the encoder
|
||||
* will be used instead.
|
||||
*
|
||||
* @return string
|
||||
* @return string|null
|
||||
*/
|
||||
public function getEncoderName();
|
||||
}
|
||||
|
@ -69,6 +69,7 @@ final class User implements AdvancedUserInterface
|
||||
*/
|
||||
public function getSalt()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user