Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When installing Console, core composer.json is modified and components are put into core/vendor. Is there a way to avoid this? Tried using Composer Manager module but couldn't solve the issue yet.
Comment | File | Size | Author |
---|
Comments
Comment #1
jmolivas CreditAttribution: jmolivas commentedModifying the composer.json file is a common behavior in Symfony applications, but not drupal. We are just adding a fee new vendor libraries, the issue is related to vendor directory is inside core directory.
I haven't try Composer Manager yet, would you mind to share what you did and what was the reason didn't work @kpv ?
We are aware of this and still trying to figure out if there is something we can do, I recall at earlier versions we provided a console.phar file this was a stand alone console distribution that could be a solution.
Comment #2
jmolivas CreditAttribution: jmolivas commentedComment #3
Fabianx CreditAttribution: Fabianx commentedTalked with @jmolivas about this at DrupalCon:
The idea to fix this is to allow the following workflow:
For any further command:
So to expose the debug console to drush.
That is as simple as providing a drush command like - registry_rebuiild module.
And having no .module file.
Its also installed system wide for all drupal sites, which is a big plus!
In a more advanced version all commands of the debug console could be exposed via hook_drush_command directly, which combines both worlds nicely.
Comment #4
kpv CreditAttribution: kpv commentedIt looks logical to use console as drush extension rather than a module (if you mean that). But I'll just point out the case when some other module would like to use console functionality (such as Entity Construction Kit) - wouldn't it be too complex for an average user to make it work?
Comment #5
slashrsm CreditAttribution: slashrsm commentedI tried to use composer_manager to a project we're working on. It looks that the main problem was in bin directory. Console assumes it will be in root folder but I wasn't able to convince composer_manager to install it there. Would it be possible to make installation dir configurable? Maybe by using an env variable?
Comment #6
Fabianx CreditAttribution: Fabianx commentedWell, the Entity Construction Kit would just register the services or not? - which should work even with it being globally installed.
Comment #7
kpv CreditAttribution: kpv commentedThen user should be able to work with command prompt and install drush. It's not always the case.
Also not sure if we should concern too much about this.
Comment #8
kpv CreditAttribution: kpv commented#1975220: Allow a Composer user to manage Drupal, modules, and PHP dependencies with a custom root composer.json should fix the issue.
Comment #9
jmolivas CreditAttribution: jmolivas commentedwe just release an installer & executable phar file for the project
When using the new installer method, we are no longer modifying the composer.json & composer.lock files or adding extra libraries to "core/vendor" directory.
Next step is make as global installation once that is done we can try to work on the drush integration
Comment #10
jmolivas CreditAttribution: jmolivas commentedWe just did a new release and this is how the system wide installation looks like
More information: http://jmolivas.com/install-drupal-console-globally
Comment #11
dmouseWith the phar file You not change the Drupal Core
Comment #12
kpv CreditAttribution: kpv commentedPropose to keep this issue open until we get a generic solution.
Comment #13
jmolivas CreditAttribution: jmolivas commentedI spent two days working with Greg Anderson on a console/drush integration the result was several updates to Console plus this PR to drush:
https://github.com/drush-ops/drush/pull/1337
Comment #14
kpv CreditAttribution: kpv commentedComment #15
darol100 CreditAttribution: darol100 as a volunteer and commentedClosing this issue since DrupalConsole does not support Drush anymore. Lets kill the bridge between Drupal Console and Drush #1520