Skip to content

Tags: pts-contrib/symfony-demo

Tags

v2.1.0

Toggle v2.1.0's commit message
feature symfony#1339 Upgrade to Symfony 6.1 (javiereguiluz)

This PR was squashed before being merged into the main branch.

Discussion
----------

Upgrade to Symfony 6.1

Don't mind much about the `sanitize_html` Twig filter. I added it quickly to make the application work. We're discussing about how adding again this Twig filter in the Symfony HtmlSanitizer component.

-----

These are the remaining deprecations:

```
Remaining indirect deprecation notices (6)

  1x: The "DAMA\DoctrineTestBundle\Doctrine\DBAL\StaticDriver" class implements "Doctrine\DBAL\VersionAwarePlatformDriver" that is deprecated All drivers will have to be aware of the server version in the next major release.
    1x in PHPUnitExtension::executeBeforeFirstTest from DAMA\DoctrineTestBundle\PHPUnit

  1x: The "Symfony\Bridge\Doctrine\Logger\DbalLogger" class implements "Doctrine\DBAL\Logging\SQLLogger" that is deprecated Use {`@see` \Doctrine\DBAL\Logging\Middleware} or implement {`@see` \Doctrine\DBAL\Driver\Middleware} instead.
    1x in AddUserCommandTest::testCreateUserNonInteractive from App\Tests\Command

  1x: Method "ArrayAccess::offsetExists()" might add "bool" as a native return type declaration in the future. Do the same in implementation "Dflydev\DotAccessData\Data" now to avoid errors or add an explicit `@return` annotation to suppress this message.
    1x in BlogControllerTest::testAdminShowPost from App\Tests\Controller\Admin

  1x: Method "ArrayAccess::offsetGet()" might add "mixed" as a native return type declaration in the future. Do the same in implementation "Dflydev\DotAccessData\Data" now to avoid errors or add an explicit `@return` annotation to suppress this message.
    1x in BlogControllerTest::testAdminShowPost from App\Tests\Controller\Admin

  1x: Method "ArrayAccess::offsetSet()" might add "void" as a native return type declaration in the future. Do the same in implementation "Dflydev\DotAccessData\Data" now to avoid errors or add an explicit `@return` annotation to suppress this message.
    1x in BlogControllerTest::testAdminShowPost from App\Tests\Controller\Admin

  1x: Method "ArrayAccess::offsetUnset()" might add "void" as a native return type declaration in the future. Do the same in implementation "Dflydev\DotAccessData\Data" now to avoid errors or add an explicit `@return` annotation to suppress this message.
    1x in BlogControllerTest::testAdminShowPost from App\Tests\Controller\Admin
```

`@dmaicher` do you know how can we remove the deprecation notice about DoctrineTestBundle? Thanks!

`@derrabus` do you know how can we fix the deprecation about `Symfony\Bridge\Doctrine\Logger\DbalLogger`? Thanks!

Commits
-------

e79b100 Upgrade to Symfony 6.1

v2.0.2

Toggle v2.0.2's commit message
minor symfony#1315 Update PHP doc about annotations IsGranted (adpauly)

This PR was squashed before being merged into the main branch.

Discussion
----------

Update PHP doc about annotations IsGranted

The doc now suggests to use PHP attributes instead of "old" annotation for "IsGranted" instruction.
Sorry if my PR format doesn't match with your requirements. I just wanna help. :)

Commits
-------

81a39d8 Update PHP doc about annotations IsGranted

v2.0.1

Toggle v2.0.1's commit message
Minor tweaks

v2.0.0

Toggle v2.0.0's commit message
Rebuilt the frontend assets

v1.8.0

Toggle v1.8.0's commit message
feature symfony#1268 Upgrade to Symfony 5.4 (javiereguiluz)

This PR was squashed before being merged into the main branch.

Discussion
----------

Upgrade to Symfony 5.4

Commits
-------

825aa67 Upgrade to Symfony 5.4

v1.7.1

Toggle v1.7.1's commit message
minor symfony#1223 Fix deps (nicolas-grekas)

This PR was merged into the main branch.

Discussion
----------

Fix deps

  - Downgrading doctrine/cache (2.0.3 => 1.11.3)
  - Downgrading doctrine/dbal (2.13.x-dev 2c19354 => 2.13.1)

Commits
-------

3a59fd0 Fix deps

v1.7.0

Toggle v1.7.0's commit message
feature symfony#1217 Upgrade to Symfony 5.3 (javiereguiluz, nicolas-g…

…rekas)

This PR was merged into the main branch.

Discussion
----------

Upgrade to Symfony 5.3

For now, it's Symfony 5.3 RC1, but we'll keep updating this branch until 5.3 stable.

-----

Things that I found while upgrading:

### Missing UPGRADE guide entry?

In the UPGRADE guide (https://github.com/symfony/symfony/blob/5.3/UPGRADE-5.3.md) we don't even mention `enable_csrf`, but this change is needed in `config/packages/security.yaml`:

Replace this:

```yaml
form_login:
    csrf_token_generator: security.csrf.token_manager
```

by this:

```yaml
form_login:
    enable_csrf: true
```

-----

### Unexpected failures

The upgrade guide mentions this:

```
PropertyInfo:

Deprecated the Type::getCollectionKeyType() and Type::getCollectionValueType() methods,
use Type::getCollectionKeyTypes() and Type::getCollectionValueTypes() instead
```

But we have these test failures:

```

App\Tests\Controller\Admin\BlogControllerTest::testAdminNewPost
Error: Call to undefined method Symfony\Component\PropertyInfo\Type::getCollectionValueTypes()

demo/vendor/symfony/validator/Mapping/Loader/PropertyInfoLoader.php:122
demo/vendor/symfony/validator/Mapping/Loader/LoaderChain.php:54
demo/vendor/symfony/validator/Mapping/Factory/LazyLoadingMetadataFactory.php:101
demo/vendor/symfony/validator/Validator/RecursiveValidator.php:76
demo/vendor/symfony/validator/Validator/TraceableValidator.php:50
demo/vendor/symfony/form/Extension/Validator/ValidatorTypeGuesser.php:265
demo/vendor/symfony/form/Extension/Validator/ValidatorTypeGuesser.php:38
demo/vendor/symfony/form/FormTypeGuesserChain.php:47
demo/vendor/symfony/form/FormTypeGuesserChain.php:93
demo/vendor/symfony/form/FormTypeGuesserChain.php:48
demo/vendor/symfony/form/FormFactory.php:84
demo/vendor/symfony/form/FormBuilder.php:97
demo/vendor/symfony/form/FormBuilder.php:244
demo/vendor/symfony/form/FormBuilder.php:195
demo/vendor/symfony/form/FormFactory.php:28
demo/vendor/symfony/framework-bundle/Controller/AbstractController.php:359
demo/src/Controller/Admin/BlogController.php:78
demo/vendor/symfony/http-kernel/HttpKernel.php:157
demo/vendor/symfony/http-kernel/HttpKernel.php:79
demo/vendor/symfony/http-kernel/Kernel.php:196
demo/vendor/symfony/http-kernel/HttpKernelBrowser.php:63
demo/vendor/symfony/framework-bundle/KernelBrowser.php:159
demo/vendor/symfony/browser-kit/AbstractBrowser.php:402
demo/tests/Controller/Admin/BlogControllerTest.php:89
```

-----

### Unexpected direct deprecations

I see the following "direct deprecation" notices, but I don't know how they can be "direct deprecations". We don't use any of these in our code:

```
Remaining direct deprecation notices (7)

  1x: Since symfony/security-core 5.3: The "Symfony\Component\Security\Core\Encoder\SodiumPasswordEncoder" class is deprecated, use "Symfony\Component\PasswordHasher\Hasher\SodiumPasswordHasher" instead.
    1x in AddUserCommandTest::testCreateUserNonInteractive from App\Tests\Command

  1x: Since symfony/security-core 5.3: The "Symfony\Component\Security\Core\Encoder\PasswordEncoderInterface" class is deprecated, use "Symfony\Component\PasswordHasher\PasswordHasherInterface" instead.
    1x in AddUserCommandTest::testCreateUserNonInteractive from App\Tests\Command

  1x: Since symfony/security-core 5.3: The "Symfony\Component\Security\Core\Encoder\SelfSaltingEncoderInterface" interface is deprecated, use "Symfony\Component\PasswordHasher\LegacyPasswordHasherInterface" on hasher implementations that deal with salts instead.
    1x in AddUserCommandTest::testCreateUserNonInteractive from App\Tests\Command

  1x: Since symfony/security-core 5.3: The "Symfony\Component\Security\Core\Encoder\Pbkdf2PasswordEncoder" class is deprecated, use "Symfony\Component\PasswordHasher\Hasher\Pbkdf2PasswordHasher" instead.
    1x in AddUserCommandTest::testCreateUserNonInteractive from App\Tests\Command

  1x: Since symfony/security-core 5.3: The "Symfony\Component\Security\Core\Encoder\BasePasswordEncoder" class is deprecated, use "Symfony\Component\PasswordHasher\Hasher\CheckPasswordLengthTrait" instead.
    1x in AddUserCommandTest::testCreateUserNonInteractive from App\Tests\Command

  1x: Since symfony/security-core 5.3: The "Symfony\Component\Security\Core\Encoder\MessageDigestPasswordEncoder" class is deprecated, use "Symfony\Component\PasswordHasher\Hasher\MessageDigestPasswordHasher" instead.
    1x in AddUserCommandTest::testCreateUserNonInteractive from App\Tests\Command

  1x: Since symfony/security-core 5.3: The "Symfony\Component\Security\Core\Encoder\MigratingPasswordEncoder" class is deprecated, use "Symfony\Component\PasswordHasher\Hasher\MigratingPasswordHasher" instead.
    1x in AddUserCommandTest::testCreateUserNonInteractive from App\Tests\Command
```

-----

### Indirect deprecations to fix?

There are still these "indirect deprecations". Are we missing some dependency updates ... or are these really deprecations pending to be fixed?

```
Remaining indirect deprecation notices (24)

  19x: Since symfony/security-core 5.3: Not implementing method "loadUserByIdentifier()" in user provider "Symfony\Bridge\Doctrine\Security\User\EntityUserProvider" is deprecated. This method will replace "loadUserByUsername()" in Symfony 6.0.
    4x in BlogControllerTest::testAccessDeniedForRegularUsers from App\Tests\Controller\Admin
    4x in BlogControllerTest::testNewComment from App\Tests\Controller
    2x in BlogControllerTest::testAdminDeletePost from App\Tests\Controller\Admin
    2x in UserControllerTest::testEditUser from App\Tests\Controller
    2x in UserControllerTest::testChangePassword from App\Tests\Controller
    1x in BlogControllerTest::testAdminBackendHomePage from App\Tests\Controller\Admin
    1x in BlogControllerTest::testAdminNewPost from App\Tests\Controller\Admin
    1x in BlogControllerTest::testAdminNewDuplicatedPost from App\Tests\Controller\Admin
    1x in BlogControllerTest::testAdminShowPost from App\Tests\Controller\Admin
    1x in BlogControllerTest::testAdminEditPost from App\Tests\Controller\Admin

  4x: Since symfony/http-foundation 5.3: "Symfony\Component\HttpFoundation\RequestStack::getMasterRequest()" is deprecated, use "getMainRequest()" instead.
    4x in BlogControllerTest::testAccessDeniedForRegularUsers from App\Tests\Controller\Admin

  1x: The "DAMA\DoctrineTestBundle\Doctrine\DBAL\AbstractStaticDriverV2" class implements "Doctrine\DBAL\Driver\ExceptionConverterDriver" that is deprecated.
    1x in PHPUnitExtension::executeBeforeFirstTest from DAMA\DoctrineTestBundle\PHPUnit

Other deprecation notices (18)

  7x: Since symfony/security-bundle 5.3: The "security.password_encoder" service is deprecated, use "security.user_password_hasher" instead.
    2x in AddUserCommandTest::testCreateUserNonInteractive from App\Tests\Command
    2x in AddUserCommandTest::testCreateUserInteractive from App\Tests\Command
    2x in UserControllerTest::testChangePassword from App\Tests\Controller
    1x in UserControllerTest::testAccessDeniedForAnonymousUsers from App\Tests\Controller

  7x: Since symfony/security-bundle 5.3: The "security.encoder_factory.generic" service is deprecated, use "security.password_hasher_factory" instead.
    2x in AddUserCommandTest::testCreateUserNonInteractive from App\Tests\Command
    2x in AddUserCommandTest::testCreateUserInteractive from App\Tests\Command
    2x in UserControllerTest::testChangePassword from App\Tests\Controller
    1x in UserControllerTest::testAccessDeniedForAnonymousUsers from App\Tests\Controller

  1x: Since symfony/security-core 5.3: The "Symfony\Component\Security\Core\Encoder\UserPasswordEncoder" class is deprecated, use "Symfony\Component\PasswordHasher\Hasher\UserPasswordHasher" instead.
    1x in AddUserCommandTest::testCreateUserNonInteractive from App\Tests\Command

  1x: Since symfony/security-core 5.3: The "Symfony\Component\Security\Core\Encoder\UserPasswordEncoderInterface" interface is deprecated, use "Symfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterface" instead.
    1x in AddUserCommandTest::testCreateUserNonInteractive from App\Tests\Command

  1x: Since symfony/security-core 5.3: The "Symfony\Component\Security\Core\Encoder\EncoderFactory" class is deprecated, use "Symfony\Component\PasswordHasher\Hasher\PasswordHasherFactory" instead.
    1x in AddUserCommandTest::testCreateUserNonInteractive from App\Tests\Command

  1x: Since symfony/security-core 5.3: The "Symfony\Component\Security\Core\Encoder\EncoderFactoryInterface" class is deprecated, use "Symfony\Component\PasswordHasher\Hasher\PasswordHasherFactoryInterface" instead.
    1x in AddUserCommandTest::testCreateUserNonInteractive from App\Tests\Command
```

Commits
-------

2a9c975 Serializable is banned
58822bd composer up
b0f5db5 Update assets/
cfeb771 Update code for 5.3
a410db9 Better constraints
b6d91b2 Removed most deprecations
997ce81 Updated to Symfony 5.3 RC1

v1.6.4

Toggle v1.6.4's commit message
Updated backend dependencies

v1.6.3

Toggle v1.6.3's commit message
bug symfony#1173 Updated backend dependencies with Composer 2 (javier…

…eguiluz)

This PR was merged into the master branch.

Discussion
----------

Updated backend dependencies with Composer 2

Fixes symfony#1172.

Commits
-------

ed91bc7 Updated backend dependencies with Composer 2

v1.6.2

Toggle v1.6.2's commit message
minor symfony#1162 Move some constant to a better place (javiereguiluz)

This PR was squashed before being merged into the master branch.

Discussion
----------

Move some constant to a better place

This continues symfony#1160 to refactor some code.

Commits
-------

0de89e1 Move some constant to a better place