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

console directory appears in the root of my consumer project #366

Open
AlexSkrypnyk opened this issue Aug 28, 2019 · 6 comments

Comments

@AlexSkrypnyk
Copy link

commented Aug 28, 2019

Continuing discussion started in #364

I do not understand why something that I did not ask for (as an owner of the my consumer repo) was added to the root of my project? Could someone please clearly explain which exact project adds this and why?

Separately to this - if it is the drupal console (hechoendrupal/drupal-console-core) that adds the transaltion - can the logic of creating /console dir be modified to be added only if there is a flag in "extras" of my composer.json?

@AlexSkrypnyk

This comment has been minimized.

Copy link
Author

commented Aug 28, 2019

Looking at https://github.com/hechoendrupal/drupal-console-core/pull/364/files#diff-0af9161b4d83c4008a9a0d8ac7a4b6b3R83

Why the default value is outside of vendor? If I want to use transaltion in my workflow - I will force the location to be somewhere in my project myself; I do not want it to be forced on me by default.

@clemens-tolboom

This comment has been minimized.

Copy link

commented Aug 28, 2019

composer depends drupal/console-en
drupal/console-core  1.9.2      requires  drupal/console-en (1.9.2)  
drupal/drupal        8.7.x-dev  requires  drupal/console-en (^1.9)
@RobLoach

This comment has been minimized.

Copy link

commented Sep 4, 2019

Having the translations appear in root seems like an oversight. I understand the desire to allow application-level translations, but console-en feels like it should be in vendor.

@clemens-tolboom

This comment has been minimized.

Copy link

commented Sep 4, 2019

When having custom commands you have to add translations. Even to console-en.

I consider ./vendor a readonly directory so I understand the location ./console/. But it feels a little weird when not having the need to translate for console-en having it in there.

As it is similar to drupal scaffold I can live with it.

(my 2 cents)

@AlexSkrypnyk

This comment has been minimized.

Copy link
Author

commented Sep 4, 2019

@clemens-tolboom
I do not understand why polluting a root of the project is okay. No other dependency does this. What if every dependency start to create their own files and directories in the repo root?

Regarding vendor being read-only: I would agree that this is the case if you want to override the transaltion for your projects. However, by default, it would be expected for the translation directory to appear in the project root only if a developer added a key to composer.json into extra ot some other explicit way.

Drupal scaffold is different in a way that it once per project, but this project is required during composer install on each build (and the translation directory is created as well).

As I mentioned, the implication of this change are huge - I have to patch all projects using console to exclude this directory.

@jmolivas

This comment has been minimized.

Copy link
Member

commented Sep 9, 2019

@AlexSkrypnyk @clemens-tolboom @RobLoach This was related to an old PR composer/installers#311 merged to the composer/installers repository that is no longer required.

But got fixed on latest release of the drupal-console project
https://github.com/hechoendrupal/drupal-console/releases/tag/1.9.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.