Skip to content

Conversation

@Kocal
Copy link
Member

@Kocal Kocal commented Apr 30, 2021

Q A
Bug fix? no
New feature? no
Tickets Fix #40
License MIT

This PR add a new link utility to link Symfony UX packages to an existing Symfony project. It's literally a copy/paste from the link utility from symfony/symfony but with different directories and an explicit dependency on Symfony Filesystem component.

Demo:
image
image

@Kocal
Copy link
Member Author

Kocal commented Apr 30, 2021

Looks like some of Turbo tests are not passing because of ClearMetadataCacheDoctrineCommand already defines an option em:

➜  app git:(GH-40) ✗ php public/index.php doctrine:schema:create -v
[critical] Error thrown while running command "'doctrine:schema:create' -v". Message: "An option named "em" already exists."


In InputDefinition.php line 234:
                                                        
  [Symfony\Component\Console\Exception\LogicException]  
  An option named "em" already exists.                  
                                                        

Exception trace:
  at /home/hugo/workspace-os/symfony-ux/src/Turbo/vendor/symfony/console/Input/InputDefinition.php:234
 Symfony\Component\Console\Input\InputDefinition->addOption() at /home/hugo/workspace-os/symfony-ux/src/Turbo/vendor/symfony/console/Command/Command.php:442
 Symfony\Component\Console\Command\Command->addOption() at /home/hugo/workspace-os/symfony-ux/src/Turbo/vendor/doctrine/doctrine-bundle/Command/Proxy/CreateSchemaDoctrineCommand.php:26
 Doctrine\Bundle\DoctrineBundle\Command\Proxy\CreateSchemaDoctrineCommand->configure() at /home/hugo/workspace-os/symfony-ux/src/Turbo/vendor/symfony/console/Command/Command.php:112
 Symfony\Component\Console\Command\Command->__construct() at /home/hugo/workspace-os/symfony-ux/src/Turbo/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Console/Command/AbstractEntityManagerCommand.php:18
 Doctrine\ORM\Tools\Console\Command\AbstractEntityManagerCommand->__construct() at /home/hugo/workspace-os/symfony-ux/src/Turbo/Tests/app/var/cache/dev/ContainerD6A5oeA/getDoctrine_SchemaCreateCommandService.php:26
 ContainerD6A5oeA\getDoctrine_SchemaCreateCommandService::do() at /home/hugo/workspace-os/symfony-ux/src/Turbo/Tests/app/var/cache/dev/ContainerD6A5oeA/App_KernelDevDebugContainer.php:297
 ContainerD6A5oeA\App_KernelDevDebugContainer->load() at /home/hugo/workspace-os/symfony-ux/src/Turbo/vendor/symfony/dependency-injection/Container.php:441
 Symfony\Component\DependencyInjection\Container->getService() at /home/hugo/workspace-os/symfony-ux/src/Turbo/vendor/symfony/dependency-injection/Argument/ServiceLocator.php:42
 Symfony\Component\DependencyInjection\Argument\ServiceLocator->get() at /home/hugo/workspace-os/symfony-ux/src/Turbo/vendor/symfony/console/CommandLoader/ContainerCommandLoader.php:45
 Symfony\Component\Console\CommandLoader\ContainerCommandLoader->get() at /home/hugo/workspace-os/symfony-ux/src/Turbo/vendor/symfony/console/Application.php:554
 Symfony\Component\Console\Application->has() at /home/hugo/workspace-os/symfony-ux/src/Turbo/vendor/symfony/console/Application.php:643
 Symfony\Component\Console\Application->find() at /home/hugo/workspace-os/symfony-ux/src/Turbo/vendor/symfony/framework-bundle/Console/Application.php:116
 Symfony\Bundle\FrameworkBundle\Console\Application->find() at /home/hugo/workspace-os/symfony-ux/src/Turbo/vendor/symfony/console/Application.php:255
 Symfony\Component\Console\Application->doRun() at /home/hugo/workspace-os/symfony-ux/src/Turbo/vendor/symfony/framework-bundle/Console/Application.php:82
 Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at /home/hugo/workspace-os/symfony-ux/src/Turbo/vendor/symfony/console/Application.php:167
 Symfony\Component\Console\Application->run() at /home/hugo/workspace-os/symfony-ux/src/Turbo/Tests/app/public/index.php:22

This option em is now defined in Doctrine's MetadataCommand in 2.9, but is not present in 2.8.

I've forced doctrine/orm to version ~2.8.0 until doctrine-bundle is fixed (doctrine/DoctrineBundle#1327).

Copy link
Member

@weaverryan weaverryan left a comment

Choose a reason for hiding this comment

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

This is a nice idea!

@Kocal Kocal requested a review from weaverryan May 6, 2021 15:28
weaverryan added a commit that referenced this pull request May 6, 2021
…ue (Kocal)

This PR was merged into the main branch.

Discussion
----------

fix(test:turbo): install doctrine/orm:~2.8.0 to prevent issue

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Tickets       | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License       | MIT

Cherry-picked commit 3574ff7 from #89 which fixes broken tests in CI.

Commits
-------

ec03c4b fix(test:turbo): install doctrine/orm:~2.8.0 to prevent issue
symfony-splitter pushed a commit to symfony/ux-turbo that referenced this pull request May 6, 2021
…ue (Kocal)

This PR was merged into the main branch.

Discussion
----------

fix(test:turbo): install doctrine/orm:~2.8.0 to prevent issue

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Tickets       | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License       | MIT

Cherry-picked commit symfony/ux@3574ff7 from symfony/ux#89 which fixes broken tests in CI.

Commits
-------

ec03c4b fix(test:turbo): install doctrine/orm:~2.8.0 to prevent issue
Copy link

@maxhelias maxhelias left a comment

Choose a reason for hiding this comment

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

It's nice to have that here too

@weaverryan
Copy link
Member

Thanks @Kocal!

@weaverryan weaverryan merged commit 5f6d7ad into symfony:main May 7, 2021
@Kocal Kocal deleted the GH-40 branch May 7, 2021 12:44
symfony-splitter pushed a commit to symfony/ux-turbo that referenced this pull request Sep 22, 2023
…ue (Kocal)

This PR was merged into the main branch.

Discussion
----------

fix(test:turbo): install doctrine/orm:~2.8.0 to prevent issue

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Tickets       | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License       | MIT

Cherry-picked commit symfony/ux@3574ff7 from symfony/ux#89 which fixes broken tests in CI.

Commits
-------

ec03c4b fix(test:turbo): install doctrine/orm:~2.8.0 to prevent issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Provide a test/playground app to facilitate development and contributing

3 participants