Do you plan to make sylius/resource-bundle symfony 3.0 compatible?
What about these changes in composer
{
//
"require": {
//
"symfony/framework-bundle": "~2.3|3.0",
//
}
}
According to the good example in Symfony 3.0 support in FOSUserBundle
We're blocked by BC Breaks and will not be able to be compatibile with 3.0 soon...
@michalmarcinkowski why not to open ~1.x branches that can be symfony 3.0 compatible?
JMS Serializer follows that strategy afaik
@hanovruslan we have a big issue which makes Symfony 3.0 compatibility impossible at this time (https://twitter.com/pjedrzejewski/status/675239386670309376). We still need to be Symfony 2.7 compatibile, so all changes that are compatibile with 2.7 and 3.0 are welcomed in the master branch.
Why not upgrade to Symfony 2.8, which is compatible with SF2.7 and 3?
With SF2.8 we can use the new features, remove deprecated code anytime possible and use SF2.7 code only when it's necessary...
When all deprecated code was remove, including the SF2.7 code, the migration to SF3 should be easy
:+1: for uprgrading to 2.8
I'm also :+1: for upgrading to 2.8
:+1:
:+1:
Pretty much only major blocker from Symfony 3.0 compatibility is https://twitter.com/pjedrzejewski/status/673838287312654336. And it is pretty big issue, because I doubt Symfony will bring back form type names in 3.x...
Are you open for PRs enabling Symfony3 compatibility in selected components/bundles?
I'm working on the integration of Sylius in a Symfony 3.0 application. Due to the blockers it's not possible so I downgraded to Symfony 2.8 and started working on compatibility. There are more issues and PR's related to 2.8 compatibility. Are there more people working on compatibility? Maybe we can create a team to work together.
@pjedrzejewski I've created a quick proof of concept for adding back form aliases. I tried making a couple of forms and it seemed to work well. Not sure if there's a better way to create the original mapping or to just hard code it like I did (obviously a lot missing just trying to see if this would be useful): https://github.com/isometriks/LegacyFormBundle/blob/master/DependencyInjection/Compiler/FormRegistryCompilerPass.php
Any progress here?
@pjedrzejewski @isometriks i test the LegacyFormBundle and seem works well on Symfony 3.0.4. I use the following syntax:
sylius_resource:
resources:
app.book:
classes:
model: AppBundle\Entity\Book
form:
default: AppBundle\Form\BookType
choice: AppBundle\Form\BookChoiceType
@gperdomor we'll bump to Symfony 2.8 after the nearest release, so we'll be able to install that bundle then, there's an open issue related to type extensions @ isometriks/LegacyFormBundle#5.
We are running Symfony 2.8 with no issues since December, so why don't you consider upgrading to this intermediare step - at least?
We already bumped to Symfony 2.8, see composer.json :)
@michalmarcinkowski Good news! It's time to upgrade payum bundle to 2.x
Be carefull in doc to mention upgrade to 2.x as there are important deprecations removed
@Niiko sure, I'll add a note to Upgrade.md file
@michalmarcinkowski yeah, I was relying on composer create-project sylius/sylius that was bringing 0.18. it seems the bump to symfony 2.8 happened after tagging that.
@gabiudrescu that is true, the bump was after the 0.18 tag :)
Just a thought, but how about refactoring all form types to have 1 base type from the bundle itself. So for OrderBundle, you would always use the Sylius\Bundle\OrderBundle\Form\Type\OrderType, and the CoreBundle just provides a form type extension for it. What issues would this bring? I think this is the only proper/future proof solution to the new symfony 3.0 form type naming.
What do you guys think about this?
Hi guys, i'm trying to get the cartBundle on symfony 3.0.x
But I run into some issues, maybe someone could help me :
I've forked all the sylius dependencies of the cartBundle, change the maximum required version of symfony/framework-bundle to 3.0.*
Here is my composer.json :
"require": {
"php": ">=5.5.9",
"symfony/symfony": "3.0.* ",
"doctrine/orm": "2.* ",
"doctrine/doctrine-bundle": "1.* ",
"doctrine/doctrine-cache-bundle": "^1.2",
"symfony/swiftmailer-bundle": "^2.3",
"symfony/monolog-bundle": "^2.8",
"sensio/distribution-bundle": "^5.0",
"sensio/framework-extra-bundle": "^3.0.2",
"incenteev/composer-parameter-handler": "^2.0",
"symfony/assetic-bundle": "2.7.* ",
"sylius/resource": "dev-master",
"sylius/originator": "dev-master",
"sylius/registry": "dev-master",
"sylius/sequence": "dev-master",
"sylius/storage": "dev-master",
"sylius/order": "dev-master",
"sylius/money-bundle": "dev-master",
"sylius/resource-bundle": "dev-master",
"sylius/sequence-bundle": "dev-master",
"sylius/order-bundle": "dev-master",
"sylius/cart": "dev-master",
"sylius/cart-bundle": "dev-master"
},
"repositories": [
{
"type": "vcs",
"url": "https://github.com/PyRowMan/Resource.git"
},
{
"type": "vcs",
"url": "https://github.com/PyRowMan/Originator.git"
},
{
"type": "vcs",
"url": "https://github.com/PyRowMan/Registry.git"
},
{
"type": "vcs",
"url": "https://github.com/PyRowMan/Sequence.git"
},
{
"type": "vcs",
"url": "https://github.com/PyRowMan/Storage.git"
},
{
"type": "vcs",
"url": "https://github.com/PyRowMan/Order.git"
},
{
"type": "vcs",
"url": "https://github.com/PyRowMan/SyliusMoneyBundle.git"
},
{
"type": "vcs",
"url": "https://github.com/PyRowMan/SyliusResourceBundle.git"
},
{
"type": "vcs",
"url": "https://github.com/PyRowMan/SyliusSequenceBundle.git"
},
{
"type": "vcs",
"url": "https://github.com/PyRowMan/SyliusOrderBundle.git"
},
{
"type": "vcs",
"url": "https://github.com/PyRowMan/Cart.git"
},
{
"type": "vcs",
"url": "https://github.com/PyRowMan/SyliusCartBundle.git"
}
]
But i get this issue :
Problem 1
- sylius/money-bundle dev-master requires sylius/resource-bundle ^0.19 -> satisfiable by sylius/resource-bundle[0.19.x-dev].
- Conclusion: remove symfony/symfony v3.0.7
- Conclusion: don't install symfony/symfony v3.0.7
- Conclusion: don't install symfony/symfony v3.0.6
- Conclusion: don't install symfony/symfony v3.0.5
- Conclusion: don't install symfony/symfony v3.0.4
- Conclusion: don't install symfony/symfony v3.0.3
- Installation request for sylius/money-bundle dev-master -> satisfiable by sylius/money-bundle[dev-master].
- Conclusion: don't install symfony/symfony v3.0.2
- Conclusion: don't install symfony/symfony v3.0.1
- sylius/resource-bundle 0.19.x-dev requires symfony/validator ^2.8 -> satisfiable by symfony/validator[v2.8.0, v2.8.1, v2.8.2, v2.8.3, v2.8.4, v2.8.5, v2.8.6, v2.8.7].
- don't install symfony/validator v2.8.0|don't install symfony/symfony v3.0.0
- don't install symfony/validator v2.8.1|don't install symfony/symfony v3.0.0
- don't install symfony/validator v2.8.2|don't install symfony/symfony v3.0.0
- don't install symfony/validator v2.8.3|don't install symfony/symfony v3.0.0
- don't install symfony/validator v2.8.4|don't install symfony/symfony v3.0.0
- don't install symfony/validator v2.8.5|don't install symfony/symfony v3.0.0
- don't install symfony/validator v2.8.6|don't install symfony/symfony v3.0.0
- don't install symfony/validator v2.8.7|don't install symfony/symfony v3.0.0
- Installation request for symfony/symfony 3.0.* -> satisfiable by symfony/symfony[v3.0.0, v3.0.1, v3.0.2, v3.0.3, v3.0.4, v3.0.5, v3.0.6, v3.0.7].
At some point of theses changes the composer update have worked, but due to vm bugs I rolled back my changes to a previous version without saving...
So I thinks that the forked repositories are well configured.
@PyRowMan -> "sylius/resource". Your MoneyBundle has depends on Sylius resource component, but you didn't add a vsc repository to its composer.json, so it is looking for a dev-master branch on a main repository. So I would bet it is problem of forked repositories. But it is just a blind shot.
Also, just an advice. If you are willing to m of a package make such a change, I would suggest to you, to do it on separated branch rather then on a master. Lets say symfony-3-compatibility. First of all it would be more readable for others. Secondly, it would make your life easier, not only during a components updates but also it would help you to find bugs like this one in depending repositories.
@lchrusciel FIrst of all, thank you for your reply,
I will try tonight, but it seems that it's a good start, I effectively done something like that at first but then I hear that the repositories weren't recursively executed, so i've dropped them from the files.
I will also create a new symfony-3-compatibility branch as I should have done from the beginning :/
Thanks for the advices ! I will post the updates here (as it seems to interest a lot of people to have a compatibility on sf3)
Update :
The composer file is now working, with the vcs repositories, so the files are downloaded correctly in a symfony 3.0 project.
Here is the working composer.json requires :
"require": {
"php": ">=5.5.9",
"symfony/symfony": "3.0.*",
"doctrine/orm": "2.*",
"doctrine/doctrine-bundle": "1.*",
"doctrine/doctrine-cache-bundle": "^1.2",
"symfony/swiftmailer-bundle": "^2.3",
"symfony/monolog-bundle": "^2.8",
"sensio/distribution-bundle": "^5.0",
"sensio/framework-extra-bundle": "^3.0.2",
"incenteev/composer-parameter-handler": "^2.0",
"symfony/assetic-bundle": "2.7.*",
"friendsofsymfony/jsrouting-bundle": "^1",
"sylius/resource": "dev-symfony_3_compatibility",
"sylius/originator": "dev-symfony_3_compatibility",
"sylius/registry": "dev-symfony_3_compatibility",
"sylius/sequence": "dev-symfony_3_compatibility",
"sylius/storage": "dev-symfony_3_compatibility",
"sylius/order": "dev-symfony_3_compatibility",
"sylius/resource-bundle": "dev-symfony_3_compatibility",
"sylius/money-bundle": "dev-symfony_3_compatibility",
"sylius/sequence-bundle": "dev-symfony_3_compatibility",
"sylius/order-bundle": "dev-symfony_3_compatibility",
"sylius/cart": "dev-symfony_3_compatibility",
"sylius/cart-bundle": "dev-symfony_3_compatibility"
},
"repositories": [
{
"type": "vcs",
"url": "https://github.com/PyRowMan/Resource.git"
},
{
"type": "vcs",
"url": "https://github.com/PyRowMan/Originator.git"
},
{
"type": "vcs",
"url": "https://github.com/PyRowMan/Registry.git"
},
{
"type": "vcs",
"url": "https://github.com/PyRowMan/Sequence.git"
},
{
"type": "vcs",
"url": "https://github.com/PyRowMan/Storage.git"
},
{
"type": "vcs",
"url": "https://github.com/PyRowMan/Order.git"
},
{
"type": "vcs",
"url": "https://github.com/PyRowMan/SyliusMoneyBundle.git"
},
{
"type": "vcs",
"url": "https://github.com/PyRowMan/SyliusResourceBundle.git"
},
{
"type": "vcs",
"url": "https://github.com/PyRowMan/SyliusSequenceBundle.git"
},
{
"type": "vcs",
"url": "https://github.com/PyRowMan/SyliusOrderBundle.git"
},
{
"type": "vcs",
"url": "https://github.com/PyRowMan/Cart.git"
},
{
"type": "vcs",
"url": "https://github.com/PyRowMan/SyliusCartBundle.git"
}
]
The last thing I saw before my brain goes down and i have to go sleep yesterday was the
"Sylius\Bundle\MoneyBundle\SyliusMoneyBundle()" class not found in the kernel.php
(the sources were here and the others class like SyliusOrderBundle were found, so that was very weird)
Well guys, I tell you :
To be continued
See you at the next update !
Moving to Symfony 3.0 at a certain moment will be a must right, so accepting BC fixes that eventually will allow to upgrade sounds fair to me. What about extending the Travis matrix with Symfony 3 requirements, but allow failures on these tests? That way PRs can be send to start working on this.
@rvanlaak Makes sense, I will give it a bit more thought and hopefully we can setup it soon. :) /cc @pamil :D
btw at least at the moment in 3.0+ you can create a form extension which can accept and return arbitrary types, so you are not bound to use class names.
ping @pjedrzejewski already have news on the "road to 3.x" roadmap? Right now the promotion-bundle is the only thing keeping me from upgrading to Symfony 3.0. So, it would be great if devs can start working on making BC deprecation PRs on the Sylius codebase.
I'm not in favor of introducing "ugly" glue like the LegacyFormBundle, but can understand if that's the only way to make the requirement ^2.8|^3.0 happen. I see PHP already is bumped to ^5.6|^7.0 so the form aliases of the LegacyFormBundle only has to be activated if you are still working on 2.8.
Ping @pjedrzejewski ;) and what about starting with making the components sf3 compatible one by one?
As you can notice, we are already getting rid of deprications and we hope to make whole Sylius sf3 compatible soon. Feel free to help us with that! 😉
Ah that is great news! Are the open issues related to deprecations / upgrading tagged Deprecation, because I see the Symfony 3.0 label is empty:
https://github.com/Sylius/Sylius/issues?q=is%3Aopen+is%3Aissue+label%3ADeprecation
https://github.com/Sylius/Sylius/issues?q=is%3Aopen+is%3Aissue+label%3A%22Symfony+3.0%22
WIP over here 🚀 https://github.com/Sylius/Sylius/pull/6738
@pjedrzejewski @michalmarcinkowski How about making at least some components/bundles on their own symfony 3 compatible(^2.7 || ^3.0)? E.g. Resource or translations bundle, which can be used standalone in standard symfony projects.
So at least first steps for compatibility gets done :)
@patkar whole Sylius (all bundles) will be compatibile with Symfony 3.0 till Wednesday 😉
Most helpful comment
@patkar whole Sylius (all bundles) will be compatibile with Symfony 3.0 till Wednesday 😉