TheNouillet / symfony-vscode

Symfony extension for Visual Studio Code
MIT License
20 stars 22 forks source link

do not require symfony/symfony to be present in composer.json #39

Open fritzmg opened 5 years ago

fritzmg commented 5 years ago

In some Symfony applications, like the Contao 4 Managed Edition, you will never have symfony/symfony or symfony/framework-bundle as a root dependency (neither of which are required anyway).

This extension should not rely on that.

cbastienbaron commented 5 years ago

instead of check sf/sf composer req, can we test if interface Psr\Container\ContainerInterface exist ?

dasraab commented 5 years ago

Got the same problem with pimcore framework (https://github.com/pimcore/pimcore) it uses composer merger plugin so same problem as above - symfony is not a root dependency in composer.json

jaikdean commented 4 years ago

Agreed. It should be fairly easy to look for the required individual Symfony packages in composer.lock. That way it doesn't matter if they're installed through symfony/symfony, symfony/framework-bundle, as individual packages or any anything else.

WhoSayIn commented 4 years ago

Same here. We don't use symfony/symfony but use a lot of different components of symfony.

We should have another way of enabling the extension.

JDDoesDev commented 4 years ago

Has there been any movement on this? I'm trying to use it on a Drupal project where symfony isn't required in the root composer.json but instead in docroot/core/composer.json

amaisano commented 3 years ago

I'm desperate for this in my Drupal 8.x project. Symfony/Console is present, but not the special console script.

amaisano commented 3 years ago

I wonder if we can leverage drupal/console, which is a fork of symfony/console? It has a debug:container command...

oojacoboo commented 3 years ago

To be honest, there doesn't seem much desire to provide this. So, unless someone plans to submit a PR, I wouldn't expect the maintainers to get on it.

amaisano commented 3 years ago

We'd need something to "bridge" the gap like https://github.com/Haehnchen/idea-php-drupal-symfony2-bridge does for PHP Storm. I'm working on a fork to parse drupal/console debug:container instead of symfony/console, but it's not going to be easy.

oojacoboo commented 1 year ago

@amaisano any progress on that fork?

JProffitt71 commented 11 months ago

Symfony's default installation through the symfony init command no longer includes symfony/symfony as a dependency, and in fact marks it as a conflict.

There needs to be a way to either ignore the requirement or have it fallback to detecting individual packages like symfony/console and symfony/framework-bundle.

Edit: Apparently it does check for symfony/framework-bundle. I'm noticing some errors in the extension host log so I am going to investigate those.