Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DevKit updates for 5.x branch #1667

Merged
merged 5 commits into from
Dec 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@
HEADER;

$rules = [
'@PHP74Migration' => true,
'@PHP74Migration:risky' => true,
'@PHP80Migration' => true,
'@PHP80Migration:risky' => true,
'@PHPUnit84Migration:risky' => true,
'@PSR12' => true,
'@PSR12:risky' => true,
'@Symfony' => true,
Expand All @@ -42,6 +43,7 @@
'multiline_whitespace_before_semicolons' => ['strategy' => 'no_multi_line'],
'no_useless_else' => true,
'no_useless_return' => true,
'no_superfluous_elseif' => true,
'no_superfluous_phpdoc_tags' => ['allow_mixed' => true, 'remove_inheritdoc' => true],
'nullable_type_declaration_for_default_null_value' => ['use_nullable_type_declaration' => true],
'ordered_class_elements' => true,
Expand All @@ -51,16 +53,14 @@
['phpstan-template', 'phpstan-template-covariant', 'phpstan-extends', 'phpstan-implements', 'phpstan-var', 'psalm-var', 'phpstan-param', 'psalm-param', 'phpstan-return', 'psalm-return'],
['psalm-suppress', 'phpstan-ignore-next-line'],
['Assert\\*'],
['ODM\\*'],
['ORM\\*'],
]],
'php_unit_strict' => true,
'php_unit_test_case_static_method_calls' => true,
'php_unit_data_provider_name' => true,
'php_unit_data_provider_return_type' => true,
'php_unit_strict' => true,
'php_unit_test_case_static_method_calls' => true,
'phpdoc_to_comment' => ['ignored_tags' => ['psalm-suppress', 'phpstan-var']],
'single_line_throw' => false,
'static_lambda' => true,
'single_line_throw' => false,
'strict_comparison' => true,
'strict_param' => true,
'void_return' => false,
Expand Down
2 changes: 1 addition & 1 deletion src/Security/Authorization/Voter/UserAclVoter.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function supportsAttribute($attribute): bool
* @param mixed $subject
* @param mixed[] $attributes
*
* @return self::ACCESS_*
* @return self::ACCESS_ABSTAIN|self::ACCESS_DENIED
*/
public function vote(TokenInterface $token, $subject, array $attributes): int
{
Expand Down
3 changes: 3 additions & 0 deletions src/Security/UserProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
use Symfony\Component\Security\Core\User\UserInterface as SecurityUserInterface;
use Symfony\Component\Security\Core\User\UserProviderInterface;

/**
* @phpstan-implements UserProviderInterface<UserInterface>
*/
final class UserProvider implements UserProviderInterface
{
public function __construct(private UserManagerInterface $userManager)
Expand Down