Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Use composers autoloader for path retrieval #2750

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

webflo
Copy link
Contributor

@webflo webflo commented Oct 1, 2016

No description provided.

@Saphyel
Copy link
Contributor

Saphyel commented Oct 1, 2016

I like the idea!

@webflo
Copy link
Contributor Author

webflo commented Oct 2, 2016

This is blocked by the facet that DrupalConsole, drupal-console-core and drupal-console-launcher use the same PSR-4 namespace. They have to use different namespaces.

@jmolivas Can we change drupal-console-core to Drupal\ConsoleCore and drupal-console-launcher to Drupal\ConsoleLauncher?

@enzolutions
Copy link
Contributor

I like the idea @webflo

@jmolivas
Copy link
Member

jmolivas commented Oct 5, 2016

@webflo What is the reason for renaming the namespace, if this is the case we will need to change code in core and contrib commands, may we search for another option?

@webflo
Copy link
Contributor Author

webflo commented Oct 7, 2016

Composer uses the namespace as array key in its PRS-4 autoload (look at an composer/autoload_psr4.php). It will only use DrupalConsole or drupal-console-core. You can't have both in one project. It fails if you try to pull both as dependency in your project.

@webflo
Copy link
Contributor Author

webflo commented Oct 7, 2016

I think its safe to start with the launcher. This component is separate, the change is easy. We have to do more planning for the other ones.

@jmolivas
Copy link
Member

@jmolivas
Copy link
Member

jmolivas commented Jun 6, 2017

@webflo We changed the constant definition extending DrupalFinder and using the getVendorDir value from DrupalFinder class.

https://github.com/hechoendrupal/drupal-console-core/blob/master/src/Utils/DrupalFinder.php#L26-L40

Do you think his fixes the reported issue?

@enzolutions
Copy link
Contributor

@webflo this idea is still valid, thanks in advance for any comment in regards to it.

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.

None yet

4 participants