Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc46dbe0

Browse files
derrabusnicolas-grekas
authored andcommitted
Fixed tests on the Security and Form components
1 parentcf272e8 commitc46dbe0

File tree

6 files changed

+10
-4
lines changed

6 files changed

+10
-4
lines changed

‎src/Symfony/Component/Form/Tests/Extension/Validator/EventListener/ValidationListenerTest.php‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
useSymfony\Component\Form\FormFactoryInterface;
2727
useSymfony\Component\Validator\ConstraintViolation;
2828
useSymfony\Component\Validator\ConstraintViolationInterface;
29+
useSymfony\Component\Validator\ConstraintViolationList;
2930
useSymfony\Component\Validator\ConstraintViolationListInterface;
3031
useSymfony\Component\Validator\Context\ExecutionContextInterface;
3132
useSymfony\Component\Validator\Mapping\MetadataInterface;
@@ -169,7 +170,7 @@ public function hasMetadataFor($value): bool
169170

170171
publicfunctionvalidate($value,$constraints =null,$groups =null):ConstraintViolationListInterface
171172
{
172-
return [$this->violation];
173+
returnnewConstraintViolationList([$this->violation]);
173174
}
174175

175176
publicfunctionvalidateProperty($object,$propertyName,$groups =null):ConstraintViolationListInterface

‎src/Symfony/Component/Form/Tests/Fixtures/FooType.php‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,6 @@ class FooType extends AbstractType
1717
{
1818
publicfunctiongetParent(): ?string
1919
{
20+
returnnull;
2021
}
2122
}

‎src/Symfony/Component/Security/Core/Encoder/EncoderAwareInterface.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ interface EncoderAwareInterface
2222
* If the method returns null, the standard way to retrieve the encoder
2323
* will be used instead.
2424
*
25-
* @return string
25+
* @return string|null
2626
*/
2727
publicfunctiongetEncoderName();
2828
}

‎src/Symfony/Component/Security/Core/Security.php‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@ public function __construct(ContainerInterface $container)
3434
$this->container =$container;
3535
}
3636

37-
publicfunctiongetUser(): ?UserInterface
37+
/**
38+
* @return UserInterface|null
39+
*/
40+
publicfunctiongetUser()
3841
{
3942
if (!$token =$this->getToken()) {
4043
returnnull;

‎src/Symfony/Component/Security/Core/Tests/Encoder/EncoderFactoryTest.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ class EncAwareUser extends SomeUser implements EncoderAwareInterface
164164
{
165165
public$encoderName ='encoder_name';
166166

167-
publicfunctiongetEncoderName():string
167+
publicfunctiongetEncoderName():?string
168168
{
169169
return$this->encoderName;
170170
}

‎src/Symfony/Component/Security/Core/User/User.php‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ public function getPassword(): ?string
7171
*/
7272
publicfunctiongetSalt(): ?string
7373
{
74+
returnnull;
7475
}
7576

7677
/**

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp