theofidry / PsyshBundle

A command line REPL bundle for Symfony using PsySH.
MIT License
208 stars 29 forks source link

Add a Symfony 4 recipe #34

Closed antonmedv closed 6 years ago

antonmedv commented 6 years ago

Add support for symfony4.

theofidry commented 6 years ago

Symfony 4 should already be supported, what issue did you encounter?

antonmedv commented 6 years ago

No config created inside config/packages.

theofidry commented 6 years ago

Sorry but you'll have to be a bit more descriptive than that as it works for me:

composer create-project symfony/skeleton psysh-demo
cd psysh-demo
composer req theofidry/psysh-bundle
bin/console psysh
> PsySH starts...
antonmedv commented 6 years ago

It works. But config file config/packages/psysh.yaml does not created.

theofidry commented 6 years ago

I'm not sure why it's not created but I don't know what should be done for the package for it to be created so unless it's an issue for you I would post an issue on the flex repository or look at the code itself to know under what conditions those files are created

fgm commented 6 years ago

AIUI, this is performed within Symfony\Flex\Configurator\CopyFromPackageConfigurator::configure(), meaning the bundle needs to have an associated Flex recipe, registered via a PR to https://github.com/symfony/recipes-contrib

Also, even when copying services.xml manually to config/packages/dev/psysh.xml, the services are correctly recognized by the container, but the expected $container/$kernel/$parameters/$self variables are not available (and ls returns empty).

theofidry commented 6 years ago

Thanks for checking this out @FGM.

I would love Flex to be a bit more flexible and allow a simple config entry in the composer.json like they do with service providers in Laravel, but meanwhile I guess a recipe will be required.

Regarding the second issue that sounds much weirder...

fgm commented 6 years ago

Yes, this seems to be heavily requested, judging from issues on the Flex repo, but fabpot is firm on this for now. That's one good thing with Laravel 5 service providers (or Drupal modules, BTW) indeed.

theofidry commented 6 years ago

To be honest I would like the psysh alias so let's make a recipe for it

przemoli commented 6 years ago

What's the workaround to register $container and other variables manually?