-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Executable tests on Sylius-Standard & remove duplicated configs #5058
Executable tests on Sylius-Standard & remove duplicated configs #5058
Conversation
pamil
commented
May 18, 2016
Q | A |
---|---|
Bug fix? | no |
New feature? | no |
BC breaks? | yes |
Related tickets | - |
License | MIT |
General note, I have not reviewed it in full yet: We need to have same structure as Symfony Standard whenever possible, even if this means duplication of some configs. I don't want to write a whole chapter in docs about why configs are splitted and included separately and answering questions: "where is configuration X, in Symfony it is right there!". I'd rather still live with a small duplication. |
@pjedrzejewski I agree, but there are over 1500 lines of configuration compared to 100 lines of Symfony Standard, so we must think through what we can duplicate and what rather not. |
The Sylius defaults should not be duplicated of course and I believe they could stay in the Sylius[Shop/Admin/Core accordingly]Bundle, just like they are right now. In main config files I would leave the basic Symfony/Doctrine settings you find in all Symfony apps and anything that's cannot be overriden (fos_rest paths IIRC are an example) |
a6b385d
to
9838545
Compare
- { resource: @SyliusCoreBundle/Resources/config/app/main.yml } | ||
- { resource: @SyliusAdminBundle/Resources/config/app/main.yml } | ||
- { resource: "security.yml" } | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameters.yml
shouldn't be there also?
9838545
to
ebd931f
Compare
strict_variables: "%kernel.debug%" | ||
exception_controller: "FOS\\RestBundle\\Controller\\ExceptionController::showAction" | ||
|
||
winzou_state_machine: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO this should be extracted to a separate file.
|
form: | ||
default: Sylius\Bundle\CoreBundle\Form\Type\ProductVariantType | ||
model: Sylius\Component\Product\Model\ProductAssociation | ||
interface: Sylius\Component\Product\Model\ProductAssociationInterface |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a concern of this PR, but this shouldn't live in ProductBundle
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This way we would couple ProductBundle with AssociationBundle.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sylius\Component\Product\Model\ProductAssociation
- it is already coupled with component :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And probably with the bundle (composer.json).
4ec82ac
to
4127d04
Compare
|
I think it's all for this iteration, if there aren't any more issues, it would be nice to get this PR merged so I can open the another one on Sylius-Standard. |
class: TestKernel | ||
path: app/TestKernel.php | ||
class: TestAppKernel | ||
path: app/TestAppKernel.php |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't path have "
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not required in this case.
21b5676
to
6989fc1
Compare
@@ -17,7 +8,7 @@ | |||
/** | |||
* Auto-generated Migration: Please modify to your needs! | |||
*/ | |||
class Version20160516131553 extends AbstractMigration | |||
class Version20160523143611 extends AbstractMigration |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this migration was not removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's the first one made after v0.18 was tagged
# This file is part of the Sylius package. | ||
# (c) Paweł Jędrzejewski | ||
|
||
jms_serializer: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should not be here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
… to current coding standards
c7c73bb
to
5c1865b
Compare
Good job! 👍 |
[Sylius] Fixes for changes from #5058
@pamil why where all migrations removed ??? That seems a bit drastic for upgrading. |
@pamil @pjedrzejewski |
@psyray We will publish old migrations in a separate repo probably, because we need to generate new ones and figure out proper upgrade strategy that considers application + sylius migrations together. |
OK, right, but meanwhile there is no possibility to cleanly migrate old sylius for those who wants. |
The old migrations didn't work for anyone with a DB that has content because they didn't consider any data - they just did structure. So you would get a same result by just doing a |
I'm not agree with you. Another example is channel, which insert default channel and update the whole channel tables. More recent, option_value translation I'm agree that a lot of migrations was obsolete and was just a And finally as @pjedrzejewski said, the needs to put a proper upgrade strategy is inevitable and I think it's urgent So I think the above migrations file should deletion should be reverted (and maybe another ones) |