Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork125
Add Symfony CLI support for bootstrapping Sulu projects#645
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Add Symfony CLI support for bootstrapping Sulu projects#645
Uh oh!
There was an error while loading.Please reload this page.
Conversation
chirimoya commentedSep 9, 2025
@nicolas-grekas one question just to make sure I understood the code correctly that handles template selection for the cloud configuration: I need to contribute a new Sulu template tohttps://github.com/symfonycorp/cloud-templates in the |
tucksaun commentedSep 18, 2025
Because this might open the possibility to use others skeletons I would instead go with a string flag to specify the skeleton repository to use. This would let the user specify any repo and we could add some shortcut as WDYT? |
tucksaun commentedSep 18, 2025
Correct but only if you need specifics. If you don't the generic Symfony template might be sufficient
If you are ok with building the CLI locally, you can edit |
1cdab05 to032ba36Comparechirimoya commentedSep 19, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@tucksaun thanks for your feedback! I’ve refactored the code according to your suggestions. In the meantime, I’ve figured out how to test the upsun templates and forked the template repository (https://github.com/chirimoya/cloud-templates/tree/feature/sulu-upsun-template/upsun). So far it looks good, but I’m running into some challenges with the template definition and could use some input:
Any suggestions on how to solve these issues? /cc@nicolas-grekas |
032ba36 to8e1eaf0Comparetucksaun commentedSep 20, 2025
You might need to debug what
IIRC on SymfonyCloud one trick that was working was to use a "public" URL but protected with credentials. |
chirimoya commentedSep 24, 2025
@tucksaun ... do you have any suggestions on how to solve this issue? By “predefined services,” I am referring to Varnish. Most projects I know don’t use Varnish for local development, but we highly recommend it for production. |
tucksaun commentedSep 25, 2025
@chirimoya I'm not sure to understand your question because if I got it correctly by “predefined services” you are mostly referring to Varnish in production, but in such case the CLI is out of its scope here and won't be in use, so no interaction with “predefined services” whatsoever 🤔 |
chirimoya commentedSep 25, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@tucksaun ... by “predefined services” I’m referring to the |
33df8dc toe563228Compare
fabpot left a comment
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 looks good to me.
I'd like to better understand Oracle MySQL support here though.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
| }elseifstrings.Contains(strings.ToLower(service.Image),"mysql") { | ||
| dbType="oracle-mysql" |
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.
I don't understand this part. Can you explain?
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.
The previous implementation was not able to distinguish between MariaDB and MySQL because only the port was taken into consideration. And it’s connected to how Upsun handles MariaDB/MySQL:https://docs.upsun.com/add-services/mysql.html
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.
I may also need to mention this to make the changes clearer: handling service types likeoracle-mysql andredis-persistent in upsun required adding theEndpoint property to theCloudService struct, since the endpoint does not match the service type.
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 it beelse if strings.Contains(strings.ToLower(service.Image), "oracle-mysql") { then 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.
Don't think so. This method is about parsing the Dockercompose.yaml file and finding the matching upsun services. The Docker image name for Oracle MySQL ismysql. The matching service name on upsun isoracle-mysql. I know it's quite confusing. Seehttps://docs.upsun.com/add-services/mysql.html
Until now, only the port was taken into consideration. So everything matching port 3306 was defined as upsun servicemysql. Butmysql within upsun actually refers tomariadb. Especially with the version section, things got a bit messy. In our case, it tried to interpret the service as MariaDB with version 8.0 of MySQL. I hope my fix will improve the mapping from Docker to upsun.
ae27471 toca330faComparechirimoya commentedOct 16, 2025
fabpot commentedOct 17, 2025
Nothing you can do, it's a BC break upstream:platformsh/platformsh-docs#5067 (comment) |
nicolas-grekas commentedNov 7, 2025
PR unlocked by mergingsymfonycorp/cloud-templates#43 |
ca330fa to61f7d22Comparefabpot commentedNov 8, 2025
Thank you@chirimoya. |
afef23c intosymfony-cli:mainUh oh!
There was an error while loading.Please reload this page.
chirimoya commentedNov 8, 2025
@fabpot Thanks! |
Uh oh!
There was an error while loading.Please reload this page.
This pull request introduces initial support for creating new Sulu projects using the Symfony CLI.
e.g.
symfony new my-project --sulusymfony new my-project --skeleton=sulu