Sylius icon indicating copy to clipboard operation
Sylius copied to clipboard

Symfony 7 support

Open loic425 opened this issue 2 years ago • 11 comments

Internal Components

  • [x] Addressing
  • [x] Attribute
  • [x] Channel
  • [x] Core
  • [x] Currency
  • [x] Customer
  • [x] Inventory
  • [x] Locale
  • [x] Order
  • [x] Payment
  • [x] Product
  • [x] Promotion
  • [x] Review
  • [x] Shipping
  • [x] Taxation
  • [x] Taxonomy
  • [x] User

Internal Bundles

  • [x] AddressingBundle https://github.com/Sylius/Sylius/pull/16499
  • [x] AttributeBundle https://github.com/Sylius/Sylius/pull/16389
  • [x] ChannelBundle https://github.com/Sylius/Sylius/pull/16400
  • [x] CurrencyBundle https://github.com/Sylius/Sylius/pull/16382
  • [x] CustomerBundle https://github.com/Sylius/Sylius/pull/16384
  • [x] InventoryBundle https://github.com/Sylius/Sylius/pull/16385
  • [x] LocaleBundle https://github.com/Sylius/Sylius/pull/16386
  • [x] PaymentBundle https://github.com/Sylius/Sylius/pull/16388
  • [x] ProductBundle https://github.com/Sylius/Sylius/pull/16399
  • [x] ReviewBundle https://github.com/Sylius/Sylius/pull/16493
  • [x] TaxationBundle https://github.com/Sylius/Sylius/pull/16403
  • [x] TaxonomyBundle https://github.com/Sylius/Sylius/pull/16372
  • [x] UiBundle https://github.com/Sylius/Sylius/pull/16497
  • [x] UserBundle https://github.com/Sylius/Sylius/pull/16404
  • [x] CoreBundle https://github.com/Sylius/Sylius/pull/16798
  • [ ] ApiBundle
  • [ ] AdminBundle https://github.com/Sylius/Sylius/pull/16800
  • [ ] ShopBundle https://github.com/Sylius/Sylius/pull/16801
  • [x] MoneyBundle https://github.com/Sylius/Sylius/pull/16757
  • [x] PromotionBundle https://github.com/Sylius/Sylius/pull/16777
  • [x] ShippingBundle https://github.com/Sylius/Sylius/pull/16775
  • [x] OrderBundle https://github.com/Sylius/Sylius/pull/16778
  • [x] PayumBundle https://github.com/Sylius/Sylius/pull/16783
  • [x] StateMachineAbstraction https://github.com/Sylius/Sylius/pull/16796

Internal PRs

Sylius technical packages

  • [x] sylius-labs/association-hydrator https://github.com/SyliusLabs/AssociationHydrator/pull/14
  • [x] sylius-labs/doctrine-migrations-extra-bundle https://github.com/SyliusLabs/DoctrineMigrationsExtraBundle/pull/15
  • sylius-labs/polyfill-symfony-framework-bundle not used anymore
  • sylius-labs/polyfill-symfony-security not used anymore
  • [x] sylius/mailer-bundle https://github.com/Sylius/SyliusMailerBundle/pull/222
  • [ ] sylius/resource-bundle https://github.com/Sylius/SyliusResourceBundle/pull/863 (to release)
  • [ ] sylius/grid-bundle https://github.com/Sylius/SyliusGridBundle/pull/324 (to release)
  • [x] sylius/fixtures-bundle https://github.com/Sylius/SyliusFixturesBundle/pull/110
  • [x] sylius/theme-bundle https://github.com/Sylius/SyliusThemeBundle/pull/131
  • [x] sylius/twig-hooks https://github.com/Sylius/Stack/pull/12

External Packages

  • [x] babdev/pagerfanta-bundle https://github.com/BabDev/PagerfantaBundle/blob/4.x/composer.json#L12
  • [x] behat/behat https://github.com/Behat/Behat/releases/tag/v3.14.0
  • [x] friends-of-behat/symfony-extension https://github.com/FriendsOfBehat/SymfonyExtension/releases/tag/v2.5.0
  • [x] friends-of-behat/test-context https://github.com/FriendsOfBehat/TestContext/releases/tag/v1.3.1
  • [x] friends-of-behat/mink-extension https://github.com/FriendsOfBehat/MinkExtension/releases/tag/v2.7.5
  • [x] friends-of-behat/variadic-extension https://github.com/FriendsOfBehat/VariadicExtension/pull/36
  • [x] friendsofsymfony/rest-bundle https://github.com/FriendsOfSymfony/FOSRestBundle/pull/2400
  • [x] jms/serializer-bundle https://github.com/schmittjoh/JMSSerializerBundle/pull/937
  • [x] hwi/oauth-bundle https://github.com/hwi/HWIOAuthBundle/releases/tag/2.1.0
  • [x] knplabs/knp-menu-bundle https://github.com/KnpLabs/KnpMenuBundle/releases/tag/v3.3.0
  • [x] lchrusciel/api-test-case
  • [x] lexik/jwt-authentication-bundle https://github.com/lexik/LexikJWTAuthenticationBundle/releases/tag/v2.20.0
  • [x] matthiasnoback/symfony-config-test https://github.com/SymfonyTest/SymfonyConfigTest/pull/76
  • [x] matthiasnoback/symfony-dependency-injection-test https://github.com/SymfonyTest/SymfonyDependencyInjectionTest/pull/149
  • [x] payum/payum-bundle https://github.com/Payum/PayumBundle/pull/555
  • [x] phpspec/phpspec https://github.com/phpspec/phpspec/releases/tag/7.5.0
  • [x] stof/doctrine-extensions-bundle https://github.com/stof/StofDoctrineExtensionsBundle/releases/tag/v1.10.1
  • [x] winzou/state-machine https://github.com/winzou/state-machine/releases/tag/0.4.4
  • [x] winzou/state-machine-bundle https://github.com/winzou/StateMachineBundle/releases/tag/v0.6.1

loic425 avatar Oct 30 '23 08:10 loic425

babdev/pagerfanta-bundle

I don't intend on making the 3.x branch compatible with Symfony 7; generally, I keep my Symfony bundles compatible with two LTS' and the next major (3.x supports Symfony 4.4, 5.4, and 6.x; 4.x will support Symfony 5.4, 6.4, and 7.x). So, Sylius will need to upgrade to PagerfantaBundle 4.0 for Symfony 7 support. In good news, the 3.x to 4.x upgrade is much lighter this time around compared to the 3.x releases which had all sorts of internal refactoring and cleanup.

mbabker avatar Oct 30 '23 13:10 mbabker

thx @mbabker for all your work on external packages.

loic425 avatar Nov 08 '23 09:11 loic425

Hi, I just want to clarify Symfony 7 support is about Sylius 2.x. Sylius 1.x won't support it.

jakubtobiasz avatar Dec 06 '23 15:12 jakubtobiasz

FOSRestBundle is released with Symfony 7 support aslong as you don't use the SensioExtraBundle features. Thx to @mbabker

alexander-schranz avatar Apr 05 '24 10:04 alexander-schranz

Ok that means that we are now ready to work on technical packages 🎉

loic425 avatar Apr 06 '24 07:04 loic425

Payum is also ready on master branch, @lchrusciel @diimpp are you ready to rumble?

loic425 avatar Apr 06 '24 07:04 loic425

Does this mean that you're going to convert all models/entities to use PHP attributes? That would be great because right now Sylius entities (which for some reason you call models) are very confusing given that the Maker Bundle creates entities with attributes by default (which I like - I really don't like the comments or XML approaches), while it seems that Sylius uses another approach (not sure if it uses comments or XML configurations or both - I've seen everything and nothing), which is confusing to me.

Also, could someone tell me which Maker Bundle version I should use, so that I create entities which are compatible with Sylius? Version ^1.59 is not compatible because it creates entities with attributes and if I try to migrate, nothing is migrated, i.e. entities are not recognized as such. I followed the official documentation to create a new entity.

nbro avatar May 22 '24 17:05 nbro

Hi @nbro,

  1. Sylius internally will stay with XML files, as it is a recommended way for bundles.
  2. AFAIR since 1.13 Sylius-Standard has attributes enabled by default. So, compare your config/packages/doctrine.yaml with the latest one (https://github.com/Sylius/Sylius-Standard/blob/1.13/config/packages/doctrine.yaml).
  3. The only drawback is for some plugins not defining attributes you might need to write attribute definitions on your own.

jakubtobiasz avatar May 22 '24 19:05 jakubtobiasz

@jakubtobiasz Thanks for the answer.

My config/packages/doctrine.yaml looked exactly like that one except that I had type: annotation instead of type: attribute. After this change, the migrations worked, so now I have my table!

However, I had created my local Sylius application with composer create-project sylius/sylius-standard MySyliusProject and I hadn't modified the doctrine.yaml (I think). And I did this just a few days ago, but maybe I'm mistaking or something. The installed Sylius version is ~1.13.0. I suppose this change is very recent and has not yet been released.

nbro avatar May 22 '24 22:05 nbro

@nbro Updated Sylius Standard wasn't available at day 0 of Sylius 1.13 release. So, despite you've got Sylius 1.13 installed (as a constraint was probably met), the configuration was from 1.12 times :). You can always try to run this command once again and check whether it works :).

jakubtobiasz avatar May 24 '24 06:05 jakubtobiasz

ThemeBundle is done :)

alexander-schranz avatar Jul 19 '24 10:07 alexander-schranz