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

Allow Symfony 7 #3067

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ jobs:
- description: 'Symfony 5.*'
php: '8.1'
symfony-versions: '^5.4'
- description: 'Symfony 6.*'
php: '8.1'
symfony-versions: '^6.4'
name: PHP ${{ matrix.php }} ${{ matrix.description }}
steps:
- name: Checkout
Expand Down
1 change: 0 additions & 1 deletion Form/Factory/FormFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ class FormFactory implements FactoryInterface
*
* @param string $name
* @param string $type
* @param array $validationGroups
*/
public function __construct(FormFactoryInterface $formFactory, $name, $type, array $validationGroups = null)
{
Expand Down
5 changes: 1 addition & 4 deletions Model/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,7 @@ public function addRole($role)
return $this;
}

/**
* @return void
*/
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.

this is a BC break for child classes. If this is required to support Symfony 7, it means we will have to release it as a new major version (in which case we might want to first do a new minor version to ensure that we have the appropriate @return everywhere so that our new major version can switch to native return types everywhere)

Copy link
Author

Choose a reason for hiding this comment

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

I can see you added the return types in #3069 but never released it. Can you do that?

Should I go ahead and add the native return types in this PR and then we could get new major version out or should that be separate PR?

{
$this->plainPassword = null;
}
Expand Down
10 changes: 2 additions & 8 deletions Security/UserChecker.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,7 @@
*/
class UserChecker implements UserCheckerInterface
{
/**
* @return void
*/
public function checkPreAuth(BaseUserInterface $user)
public function checkPreAuth(BaseUserInterface $user): void
{
if (!$user->isEnabled()) {
$ex = new DisabledException('User account is disabled.');
Expand All @@ -34,10 +31,7 @@ public function checkPreAuth(BaseUserInterface $user)
}
}

/**
* @return void
*/
public function checkPostAuth(BaseUserInterface $user)
public function checkPostAuth(BaseUserInterface $user): void
{
}
}
32 changes: 16 additions & 16 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,21 @@
"php": "^7.4 || ^8.0",
"ext-dom": "*",
"ext-json": "*",
"symfony/config": "^4.4 || ^5.0 || ^6.0",
"symfony/dependency-injection": "^4.4 || ^5.0 || ^6.0",
"symfony/event-dispatcher": "^4.4 || ^5.0 || ^6.0",
"symfony/config": "^4.4 || ^5.0 || ^6.0 || ^7.0",
"symfony/dependency-injection": "^4.4 || ^5.0 || ^6.0 || ^7.0",
"symfony/event-dispatcher": "^4.4 || ^5.0 || ^6.0 || ^7.0",
"symfony/event-dispatcher-contracts": "^1.1 || ^2.0 || ^3.0",
"symfony/form": "^4.4 || ^5.0 || ^6.0",
"symfony/framework-bundle": "^4.4 || ^5.0 || ^6.0",
"symfony/http-foundation": "^4.4 || ^5.0 || ^6.0",
"symfony/http-kernel": "^4.4 || ^5.0 || ^6.0",
"symfony/options-resolver": "^4.4 || ^5.0 || ^6.0",
"symfony/routing": "^4.4 || ^5.0 || ^6.0",
"symfony/security-bundle": "^4.4 || ^5.0 || ^6.0",
"symfony/security-core": "^4.4 || ^5.0 || ^6.0",
"symfony/translation": "^4.4 || ^5.0 || ^6.0",
"symfony/twig-bundle": "^4.4 || ^5.0 || ^6.0",
"symfony/validator": "^4.4 || ^5.0 || ^6.0",
"symfony/form": "^4.4 || ^5.0 || ^6.0 || ^7.0",
"symfony/framework-bundle": "^4.4 || ^5.0 || ^6.0 || ^7.0",
"symfony/http-foundation": "^4.4 || ^5.0 || ^6.0 || ^7.0",
"symfony/http-kernel": "^4.4 || ^5.0 || ^6.0 || ^7.0",
"symfony/options-resolver": "^4.4 || ^5.0 || ^6.0 || ^7.0",
"symfony/routing": "^4.4 || ^5.0 || ^6.0 || ^7.0",
"symfony/security-bundle": "^4.4 || ^5.0 || ^6.0 || ^7.0",
"symfony/security-core": "^4.4 || ^5.0 || ^6.0 || ^7.0",
"symfony/translation": "^4.4 || ^5.0 || ^6.0 || ^7.0",
"symfony/twig-bundle": "^4.4 || ^5.0 || ^6.0 || ^7.0",
"symfony/validator": "^4.4 || ^5.0 || ^6.0 || ^7.0",
"twig/twig": "^1.34 || ^2.4 || ^3.0"
},
"conflict": {
Expand All @@ -50,9 +50,9 @@
"doctrine/doctrine-bundle": "^1.3 || ^2",
"friendsofphp/php-cs-fixer": "^3.0.2, !=3.5.0",
"swiftmailer/swiftmailer": "^4.3 || ^5.0 || ^6.0",
"symfony/console": "^4.4 || ^5.0 || ^6.0",
"symfony/console": "^4.4 || ^5.0 || ^6.0 || ^7.0",
"symfony/phpunit-bridge": "^6.1",
"symfony/yaml": "^4.4 || ^5.0 || ^6.0"
"symfony/yaml": "^4.4 || ^5.0 || ^6.0 || ^7.0"
},
"config": {
"sort-packages": true
Expand Down