Skip to content

Commit b020a01

Browse files
authored
Merge pull request #3077 from stof/bump_min_version
Bump min versions to Symfony 6.4 and PHP 8.1
2 parents 095260b + 431db88 commit b020a01

22 files changed

+33
-321
lines changed

.github/workflows/ci.yaml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,11 @@ jobs:
1515
fail-fast: false
1616
matrix:
1717
php:
18-
- '7.4'
19-
- '8.0'
2018
- '8.1'
2119
- '8.2'
2220
- '8.3'
2321
symfony-versions: [false]
2422
include:
25-
- description: 'Symfony 4.*'
26-
php: '7.4'
27-
symfony-versions: '^4.4'
28-
- description: 'Symfony 5.*'
29-
php: '8.1'
30-
symfony-versions: '^5.4'
3123
- description: 'Symfony 6.*'
3224
php: '8.2'
3325
symfony-versions: '^6.4'

composer.json

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -21,41 +21,42 @@
2121
}
2222
],
2323
"require": {
24-
"php": "^7.4 || ^8.0",
24+
"php": "^8.1",
2525
"ext-dom": "*",
2626
"ext-json": "*",
27-
"symfony/config": "^4.4 || ^5.0 || ^6.0 || ^7.0",
28-
"symfony/dependency-injection": "^4.4 || ^5.0 || ^6.0 || ^7.0",
27+
"symfony/config": "^6.4 || ^7.0",
28+
"symfony/dependency-injection": "^6.4 || ^7.0",
2929
"symfony/deprecation-contracts": "^2.5 || ^3.5",
30-
"symfony/event-dispatcher": "^4.4 || ^5.0 || ^6.0 || ^7.0",
30+
"symfony/event-dispatcher": "^6.4 || ^7.0",
3131
"symfony/event-dispatcher-contracts": "^1.1 || ^2.0 || ^3.0",
32-
"symfony/form": "^4.4 || ^5.0 || ^6.0 || ^7.0",
33-
"symfony/framework-bundle": "^4.4 || ^5.0 || ^6.0 || ^7.0",
34-
"symfony/http-foundation": "^4.4 || ^5.0 || ^6.0 || ^7.0",
35-
"symfony/http-kernel": "^4.4 || ^5.0 || ^6.0 || ^7.0",
36-
"symfony/options-resolver": "^4.4 || ^5.0 || ^6.0 || ^7.0",
37-
"symfony/routing": "^4.4 || ^5.0 || ^6.0 || ^7.0",
38-
"symfony/security-bundle": "^4.4 || ^5.0 || ^6.0 || ^7.0",
39-
"symfony/security-core": "^4.4 || ^5.0 || ^6.0 || ^7.0",
40-
"symfony/translation": "^4.4 || ^5.0 || ^6.0 || ^7.0",
41-
"symfony/twig-bundle": "^4.4 || ^5.0 || ^6.0 || ^7.0",
42-
"symfony/validator": "^4.4 || ^5.0 || ^6.0 || ^7.0",
43-
"twig/twig": "^1.34 || ^2.4 || ^3.0"
32+
"symfony/form": "^6.4 || ^7.0",
33+
"symfony/framework-bundle": "^6.4 || ^7.0",
34+
"symfony/http-foundation": "^6.4 || ^7.0",
35+
"symfony/http-kernel": "^6.4 || ^7.0",
36+
"symfony/options-resolver": "^6.4 || ^7.0",
37+
"symfony/password-hasher": "^6.4 || ^7.0",
38+
"symfony/routing": "^6.4 || ^7.0",
39+
"symfony/security-bundle": "^6.4 || ^7.0",
40+
"symfony/security-core": "^6.4 || ^7.0",
41+
"symfony/translation": "^6.4 || ^7.0",
42+
"symfony/twig-bundle": "^6.4 || ^7.0",
43+
"symfony/validator": "^6.4 || ^7.0",
44+
"twig/twig": "^2.13 || ^3.0"
4445
},
4546
"conflict": {
4647
"doctrine/doctrine-bundle": "<1.3",
4748
"doctrine/persistence": "<1.3",
48-
"symfony/doctrine-bridge": "<4.4"
49+
"symfony/doctrine-bridge": "<6.4"
4950
},
5051
"require-dev": {
5152
"doctrine/doctrine-bundle": "^1.3 || ^2",
5253
"friendsofphp/php-cs-fixer": "^3.0.2, !=3.5.0",
5354
"swiftmailer/swiftmailer": "^4.3 || ^5.0 || ^6.0",
54-
"symfony/console": "^4.4 || ^5.0 || ^6.0 || ^7.0",
55-
"symfony/mailer": "^4.4 || ^5.0 || ^6.0 || ^7.0",
56-
"symfony/mime": "^4.4 || ^5.0 || ^6.0 || ^7.0",
57-
"symfony/phpunit-bridge": "^6.1",
58-
"symfony/yaml": "^4.4 || ^5.0 || ^6.0 || ^7.0"
55+
"symfony/console": "^6.4 || ^7.0",
56+
"symfony/mailer": "^6.4 || ^7.0",
57+
"symfony/mime": "^6.4 || ^7.0",
58+
"symfony/phpunit-bridge": "^6.4 || ^7.0",
59+
"symfony/yaml": "^6.4 || ^7.0"
5960
},
6061
"config": {
6162
"sort-packages": true

src/Command/ActivateUserCommand.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,6 @@
2828
#[AsCommand(name: 'fos:user:activate', description: 'Activate a user')]
2929
final class ActivateUserCommand extends Command
3030
{
31-
// BC with Symfony <5.3
32-
protected static $defaultName = 'fos:user:activate';
33-
3431
private $userManipulator;
3532

3633
public function __construct(UserManipulator $userManipulator)
@@ -43,9 +40,6 @@ public function __construct(UserManipulator $userManipulator)
4340
protected function configure(): void
4441
{
4542
$this
46-
// BC with Symfony <5.3
47-
->setName('fos:user:activate')
48-
->setDescription('Activate a user')
4943
->setDefinition([
5044
new InputArgument('username', InputArgument::REQUIRED, 'The username'),
5145
])

src/Command/ChangePasswordCommand.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,6 @@
2626
#[AsCommand(name: 'fos:user:change-password', description: 'Change the password of a user.')]
2727
final class ChangePasswordCommand extends Command
2828
{
29-
// BC with Symfony <5.3
30-
protected static $defaultName = 'fos:user:change-password';
31-
3229
private $userManipulator;
3330

3431
public function __construct(UserManipulator $userManipulator)
@@ -41,9 +38,6 @@ public function __construct(UserManipulator $userManipulator)
4138
protected function configure(): void
4239
{
4340
$this
44-
// BC with Symfony <5.3
45-
->setName('fos:user:change-password')
46-
->setDescription('Change the password of a user.')
4741
->setDefinition([
4842
new InputArgument('username', InputArgument::REQUIRED, 'The username'),
4943
new InputArgument('password', InputArgument::REQUIRED, 'The password'),

src/Command/CreateUserCommand.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,6 @@
3131
#[AsCommand(name: 'fos:user:create', description: 'Create a user.')]
3232
final class CreateUserCommand extends Command
3333
{
34-
// BC with Symfony <5.3
35-
protected static $defaultName = 'fos:user:create';
36-
3734
private $userManipulator;
3835

3936
public function __construct(UserManipulator $userManipulator)
@@ -46,9 +43,6 @@ public function __construct(UserManipulator $userManipulator)
4643
protected function configure(): void
4744
{
4845
$this
49-
// BC with Symfony <5.3
50-
->setName('fos:user:create')
51-
->setDescription('Create a user.')
5246
->setDefinition([
5347
new InputArgument('username', InputArgument::REQUIRED, 'The username'),
5448
new InputArgument('email', InputArgument::REQUIRED, 'The email'),

src/Command/DeactivateUserCommand.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,6 @@
2828
#[AsCommand(name: 'fos:user:deactivate', description: 'Deactivate a user')]
2929
final class DeactivateUserCommand extends Command
3030
{
31-
// BC with Symfony <5.3
32-
protected static $defaultName = 'fos:user:deactivate';
33-
3431
private $userManipulator;
3532

3633
public function __construct(UserManipulator $userManipulator)
@@ -43,9 +40,6 @@ public function __construct(UserManipulator $userManipulator)
4340
protected function configure(): void
4441
{
4542
$this
46-
// BC with Symfony <5.3
47-
->setName('fos:user:deactivate')
48-
->setDescription('Deactivate a user')
4943
->setDefinition([
5044
new InputArgument('username', InputArgument::REQUIRED, 'The username'),
5145
])

src/Command/DemoteUserCommand.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,11 @@
2424
#[AsCommand(name: 'fos:user:demote', description: 'Demote a user by removing a role')]
2525
final class DemoteUserCommand extends RoleCommand
2626
{
27-
// BC with Symfony <5.3
28-
protected static $defaultName = 'fos:user:demote';
29-
3027
protected function configure(): void
3128
{
3229
parent::configure();
3330

3431
$this
35-
// BC with Symfony <5.3
36-
->setName('fos:user:demote')
37-
->setDescription('Demote a user by removing a role')
3832
->setHelp(<<<'EOT'
3933
The <info>fos:user:demote</info> command demotes a user by removing a role
4034

src/Command/PromoteUserCommand.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,11 @@
2626
#[AsCommand(name: 'fos:user:promote', description: 'Promotes a user by adding a role')]
2727
final class PromoteUserCommand extends RoleCommand
2828
{
29-
// BC with Symfony <5.3
30-
protected static $defaultName = 'fos:user:promote';
31-
3229
protected function configure(): void
3330
{
3431
parent::configure();
3532

3633
$this
37-
// BC with Symfony <5.3
38-
->setName('fos:user:promote')
39-
->setDescription('Promotes a user by adding a role')
4034
->setHelp(<<<'EOT'
4135
The <info>fos:user:promote</info> command promotes a user by adding a role
4236

src/CompatibilityUtil.php

Lines changed: 0 additions & 35 deletions
This file was deleted.

src/Controller/ChangePasswordController.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
namespace FOS\UserBundle\Controller;
1313

14-
use FOS\UserBundle\CompatibilityUtil;
1514
use FOS\UserBundle\Event\FilterUserResponseEvent;
1615
use FOS\UserBundle\Event\FormEvent;
1716
use FOS\UserBundle\Event\GetResponseUserEvent;
@@ -40,7 +39,7 @@ final class ChangePasswordController extends AbstractController
4039

4140
public function __construct(EventDispatcherInterface $eventDispatcher, FactoryInterface $formFactory, UserManagerInterface $userManager)
4241
{
43-
$this->eventDispatcher = CompatibilityUtil::upgradeEventDispatcher($eventDispatcher);
42+
$this->eventDispatcher = $eventDispatcher;
4443
$this->formFactory = $formFactory;
4544
$this->userManager = $userManager;
4645
}

0 commit comments

Comments
 (0)