Skip to content

[RFC] Bump the component to 4.0 #112

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

Closed
wants to merge 1 commit into from
Closed
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
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand All @@ -36,7 +36,7 @@ jobs:
run: composer config minimum-stability dev

- name: Composer install
uses: ramsey/composer-install@v1
uses: ramsey/composer-install@v2
with:
dependency-versions: '${{ matrix.deps }}'

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/psalm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,22 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'
php-version: '8.2'
ini-values: "memory_limit=-1"
coverage: none

- name: Checkout target branch
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
ref: ${{ github.base_ref }}

- name: Checkout PR
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Install dependencies
run: |
composer remove --dev --no-update --no-interaction symfony/phpunit-bridge
composer require --no-update vimeo/psalm phpunit/phpunit:^9.5 psalm/plugin-phpunit
composer require --no-update vimeo/psalm phpunit/phpunit:^9.6 psalm/plugin-phpunit
composer update --no-progress --ansi
git checkout -- composer.json

Expand Down
8 changes: 4 additions & 4 deletions Tests/Domain/SecurityIdentityRetrievalStrategyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ public function __construct($name)
$this->name = $name;
}

public function __toString()
public function __toString(): string
{
return $this->name;
}
Expand All @@ -284,7 +284,7 @@ public function getRoles(): array
return [];
}

public function eraseCredentials()
public function eraseCredentials(): void
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

befire this PR, we should have one on 3.x that adds all missing @return don't you think?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes.

{
}

Expand All @@ -293,12 +293,12 @@ public function getUserIdentifier(): string
return $this->name;
}

public function getPassword()
public function getPassword(): ?string
{
return null;
}

public function getSalt()
public function getSalt(): ?string
{
return null;
}
Expand Down
8 changes: 3 additions & 5 deletions Voter/AclVoter.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ public function __construct(AclProviderInterface $aclProvider, ObjectIdentityRet
$this->allowIfObjectIdentityUnavailable = $allowIfObjectIdentityUnavailable;
}

public function supportsAttribute($attribute)
public function supportsAttribute($attribute): bool
{
return \is_string($attribute) && $this->permissionMap->contains($attribute);
}

public function vote(TokenInterface $token, $subject, array $attributes)
public function vote(TokenInterface $token, $subject, array $attributes): int
{
foreach ($attributes as $attribute) {
if (!$this->supportsAttribute($attribute)) {
Expand Down Expand Up @@ -137,10 +137,8 @@ public function vote(TokenInterface $token, $subject, array $attributes)
* class.
*
* @param string $class The class name
*
* @return bool
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@param too can be removed

*/
public function supportsClass($class)
public function supportsClass(string $class): bool
{
return true;
}
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
},
"extra": {
"branch-alias": {
"dev-main": "3.x-dev"
"dev-main": "4.x-dev"
}
}
}