Sylius: The road to Symfony 5

Created on 11 Dec 2019  路  20Comments  路  Source: Sylius/Sylius

Symfony 5 has been released a few weeks ago, now's the time to make the effort to support it.

Dependencies

I've compiled a list of dependencies that either need to be updated on Sylius side (to next major releases) or need to support Symfony 5 first:

StatusPackageInstalled versionDetails
:white_check_mark:behat/behatv3.5.0Pull request
:white_check_mark:behat/mink1.7.x-devIssue
:white_check_mark:behat/mink-browserkit-driver1.3.3Issue
:white_check_mark:behat/mink-extension2.3.1Pull request
:white_check_mark:doctrine/doctrine-bundle1.12.2Supported in ^2.0
:white_check_mark:doctrine/doctrine-cache-bundle1.4.0Deprecated, will be solved by updating doctrine/doctrine-bundle
:white_check_mark:doctrine/doctrine-fixtures-bundlev2.4.1Supported in ^3.3
:white_check_mark:friends-of-behat/symfony-extensionv2.0.10Pull request
:white_check_mark:friends-of-behat/variadic-extensionv1.2.0Pull request
:white_check_mark:friendsofsymfony/oauth-server-bundle1.6.2Issue
:white_check_mark:friendsofsymfony/rest-bundle2.6.0Supported in master
:white_check_mark:hwi/oauth-bundle0.6.3Pull request
:white_check_mark:jms/serializer-bundle2.4.4Supported in ^3.5
:white_check_mark:knplabs/knp-gaufrette-bundlev0.5.3Supported in ^0.7
:white_check_mark:knplabs/knp-menu-bundlev2.3.0Supported in ^3.0
:white_check_mark:lchrusciel/api-test-casev3.1.4Pull request
:white_check_mark:liip/imagine-bundle2.2.0Pull request
:white_check_mark:matthiasnoback/symfony-dependency-injection-testv3.1.0Supported in ^4.1
:white_check_mark:payum/payum-bundle2.3.4Pull request
:white_check_mark:phpspec/phpspec5.1.2Supported in ^6.1
:white_check_mark:phpstan/phpstan0.11.19Supported in ^0.12
:white_check_mark:polishsymfonycommunity/symfony-mocker-containerv1.0.2v1.0.3 (will install automatically for Symfony 5)
:white_check_mark:sensiolabs/security-checkerv5.0.3Supported in ^6.0.3
:white_check_mark:sonata-project/block-bundle3.18.2Supported in ^4.0
:white_check_mark:sonata-project/intl-bundle2.7.0Pull request
:white_check_mark:stof/doctrine-extensions-bundlev1.3.0Pull request | Maintained port
:white_check_mark:sylius-labs/association-hydratorv1.1.1Issue
:white_check_mark:sylius/fixtures-bundlev1.4.1Issue
:white_check_mark:sylius/grid-bundledev-masterIssue
:white_check_mark:sylius/mailer-bundlev1.4.4Issue
:white_check_mark:sylius/resource-bundlev1.6.1Issue
:white_check_mark:sylius/sylius1.7.x-devLook below
:white_check_mark:sylius/theme-bundlev1.5.0Issue
:white_check_mark:white-october/pagerfanta-bundlev1.3.2Pull request
:white_check_mark:willdurand/hateoas2.12.0Supported in ^3.3
:white_check_mark:willdurand/hateoas-bundle1.4.0Supported in ^2.1
:white_check_mark:winzou/state-machine-bundlev0.3.1Supported in ^0.4.2

Please let me know in this issue if the information above become outdated. That'd be a great help.

Sylius

When it comes to Sylius (meaning sylius/sylius package), the master branch supports only Symfony ^4.3 and should support only Symfony ^4.4 soon.

There are some deprecated classes, methods and interfaces listed in Psalm configuration file (psalm.xml). Sections DeprecatedClass, DeprecatedInterface, DeprecatedMethod, TooManyArguments and InvalidArgument should be cleared from Symfony references, while keeping Psalm passing.

Packages split from Sylius (those in src/Sylius/Bundles and src/Sylius/Component) should also be updated once we're done with Sylius as a whole.

Help Wanted Maintenance RFC Roadmap Symfony 5

Most helpful comment

All done, thanks everyone! v1.9.0-ALPHA.2 has been released 馃帀

All 20 comments

@pamil: DoctrineBundle 1.12 and 2.0 are the same feature-wise, so once you fix all deprecations you can also allow 2.0 for that sweet Symfony 5 support 馃槉

I'm actively working with @iisisrael on friendsofsymfony/oauth-server-bundle , see this thread, would also appreciate more eyeballs to vet our work against my fork

Read about it here

I've updated the list 鉂わ笍

I've fixed my PR here for Intl component deprecations.
https://github.com/Sylius/Sylius/pull/10565

Regarding the Pagerfanta bundle: its continuation is https://github.com/BabDev/BabDevPagerfantaBundle, which seems to support SF5. The README of the original bundle now links to this fork and it looks like WhiteOctober plan to archive their repository when SF4.3 falls out of support: whiteoctober/WhiteOctoberPagerfantaBundle#223.

Thanks, @rimas-kudelis! We'll have to think about using it without causing BC breaks though, there's a namespace change 馃槩 Probably we'll need a polyfill, something like https://github.com/SyliusLabs/PolyfillSymfonyEventDispatcher.

Oh, and here's another good reason to switch to BabDevPagerfantaBundle: BabDev/BabDevPagerfantaBundle#2.
Regarding a polyfill: I suppose it wouldn't have to remain forever available in Sylius, but just for a couple releases or so?

@pamil fos/rest-bundle now supports Symfony 5 on 3.0 release
Here is my work on sylius/resource-bundle https://github.com/Sylius/SyliusResourceBundle/pull/167

The payum/payum together with payum/payum-bundle is practically abandoned.
https://github.com/Payum/Payum/issues/854#issuecomment-632094499

@pamil A pull request on StateMachineBundle to support Symfony 5 cause it's not enough with 0.4.2 release.
And this one on StateMachine component

@pamil Symfony 5.0 is supported by "friendsofsymfony/rest-bundle" version 3.0.

To migrate to this version, must change all usage of View object with call setTemplate. Because this method has been removed in targeted version.

@pamil Symfony 5.0 is supported by "friendsofsymfony/rest-bundle" version 3.0.

To migrate to this version, must change all usage of View object with call setTemplate. Because this method has been removed in targeted version.

Yes but it's already done on master for sylius Resource bundle.

@pamil Symfony 5.0 is supported by "friendsofsymfony/rest-bundle" version 3.0.
To migrate to this version, must change all usage of View object with call setTemplate. Because this method has been removed in targeted version.

Yes but it's already done on master for sylius Resource bundle.

But not in Sylius. Resource Bundle can be an example to apply in Sylius.

@macintoshplus It's not in repo, but ready as PR: https://github.com/Sylius/Sylius/pull/11804

@macintoshplus It's not in repo, but ready as PR: #11804

Thanks for information.

When? :)

@alexsoftdev #12084 allowing us to install Symfony 5 is green, then #12148 will add that ability and add it to the build. We plan to include Symfony 5 support within Sylius 1.9, which will be released around 01.03 - and soon, there'll be a first 1.9-ALPHA release tagged for early adopters.

All done, thanks everyone! v1.9.0-ALPHA.2 has been released 馃帀

Good job everyone! :)

Was this page helpful?
0 / 5 - 0 ratings