Skip to content
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

Symfony 4 directory structure #9643

Merged
merged 21 commits into from
Aug 20, 2018
Merged

Symfony 4 directory structure #9643

merged 21 commits into from
Aug 20, 2018

Conversation

pamil
Copy link
Contributor

@pamil pamil commented Aug 9, 2018

Q A
Branch? master
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? yes
Related tickets -
License MIT

This PR switches Sylius to Symfony 4 directory structure. The PR introducing Symfony Flex in Sylius will follow shortly 🎉

@pamil pamil added Feature New feature proposals. Maintenance CI configurations, READMEs, releases, etc. labels Aug 9, 2018
@pamil pamil force-pushed the symfony-flex branch 2 times, most recently from 659da4e to 9351e1b Compare August 9, 2018 17:39
@pamil pamil force-pushed the symfony-flex branch 5 times, most recently from 3f99ed6 to 14e6221 Compare August 13, 2018 06:54
@pamil pamil changed the title [WIP] Symfony Flex + Symfony 4 directory structure Symfony 4 directory structure Aug 13, 2018
.env.dist Outdated
# Format described at http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url
# For a sqlite database, use: "sqlite:///%kernel.project_dir%/var/data.db"
# Set "serverVersion" to your server version to avoid edge-case exceptions and extra database calls
DATABASE_URL=mysql://root@127.0.0.1/sylius_${APP_ENV}?serverVersion=5.5
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

composer.json Outdated
@@ -191,7 +185,7 @@
"psr-4": {
"Sylius\\Tests\\": "tests/"
},
"classmap": ["app/AppKernel.php", "app/AppCache.php", "app/TestAppKernel.php"]
"classmap": ["src/Kernel.php"]
},
"config": {
"bin-dir": "bin"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be removed.

composer.json Outdated
@@ -203,9 +197,6 @@
"symfony-web-dir": "web",
Copy link
Contributor

@teohhanhui teohhanhui Aug 13, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be removed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It'll be removed after adding Symfony Flex and removing SensioDistributionBundle in the next PR, I'll change it to public before that.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But why in a separate PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one is already +500 -800, the diff is getting unreadable and I want to make tests passing before proceeding further. It's master so there's still over one and a half month until the next release.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nevertheless, Symfony 4 config structure and Symfony Flex are two different changes, that could go separately.

@pamil pamil force-pushed the symfony-flex branch 2 times, most recently from c722d00 to d794fb2 Compare August 14, 2018 05:49
@pamil pamil force-pushed the symfony-flex branch 4 times, most recently from 87ef5ee to 27071b9 Compare August 16, 2018 05:57
@@ -23,6 +23,9 @@ imports:
- { resource: "@SyliusCoreBundle/Resources/config/app/state_machine.yml" }
- { resource: "@SyliusCoreBundle/Resources/config/app/fixtures.yml" }

parameters:
sylius_core.public_dir: "%kernel.project_dir%/web"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is of course wrong. But also, is it really necessary for this to be configurable?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is introduced only to make the changes backwards compatible - so that it won't fail if you upgrade from 1.2 to 1.3. It is overwritten in config/_sylius.yaml to %kernel.project_dir%/public.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, I wish we could take this opportunity to remove this file altogether...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The relevant parts should be moved into the config.yml of Sylius-Standard and of the test app, respectively.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Introducing more config files here is only gonna create a bigger problem than we already have.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you mean by introducing more config files? config/packages/_sylius.yaml follows the Symfony 4 standard of having config files for each package. We can't remove the config files in bundles in 1.x branch. As for configs in Sylius-Standard and PluginSkeleton and their synchronisation, this is a whole different issue to be handled and I believe doing it all at once (Symfony 4 directory structure, Symfony Flex, config files synchronisation) would result in not having anything that works (and if it does, it would probably result in some nasty BC breaks).

@pamil pamil merged commit 2cf1602 into Sylius:master Aug 20, 2018
@pamil
Copy link
Contributor Author

pamil commented Aug 20, 2018

Merging it for now, if there's any change needed, we can still revert it or customise before v1.3.0 release in late September.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New feature proposals. Maintenance CI configurations, READMEs, releases, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants