Skip to content

Convert to Drush 9 commands#18

Open
fgm wants to merge 9 commits into
dawehner:8.x-1.xfrom
fgm:17-drush_9_commands
Open

Convert to Drush 9 commands#18
fgm wants to merge 9 commits into
dawehner:8.x-1.xfrom
fgm:17-drush_9_commands

Conversation

@fgm

@fgm fgm commented Oct 10, 2017

Copy link
Copy Markdown

Commands converted on top of the current 8.x-1.x drupal.org HEAD.

@fgm fgm force-pushed the 17-drush_9_commands branch 9 times, most recently from 7a8bb7c to dc3b648 Compare October 11, 2017 11:22
@fgm fgm force-pushed the 17-drush_9_commands branch from dc3b648 to ef1d248 Compare October 11, 2017 11:27
@fgm fgm changed the title [WIP] Convert to Drush 9 commands Convert to Drush 9 commands Oct 11, 2017
@fgm fgm force-pushed the 17-drush_9_commands branch from dab1e97 to 5e50bf9 Compare October 11, 2017 15:12

@andypost andypost left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see only enable/disable needs work

}

// Skip already-enabled languages.
if ($languages[$langcode]->enabled) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I bet it should use status() instead of property

$messageArgs = ['langcode' => $langcode];

// In the foreach loop because the list changes on successful iterations.
$languages = $this->languageManager->getLanguages();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please move it out of loop

}

// FIXME find the D8 equivalent: this is D7 logic.
db_update('languages')

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Guess it ->enable()->save()


// FIXME probably needs a more generic invalidation.
// Changing the language settings impacts the interface.
$this->cachePage->deleteAll();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe better to clear all caches? IIRR mostly all caches are depends on language & IMO better to clear them conditionally if any language actually changed

@fgm

fgm commented Oct 21, 2017

Copy link
Copy Markdown
Author

@andypost interesting comments, but IMHO off-topic: this is just about converting from the Drush 8 format to the Drush 9 format, so that it can be merged sooner. Actually fixing the commands is another topic. Very much needed too, but separate.

@dawehner

Copy link
Copy Markdown
Owner

+1 for not trying to change the world!
@andypost Would you be okay with merging it otherwise?

@andypost

Copy link
Copy Markdown
Contributor

@dawehner

dawehner commented Nov 28, 2017

Copy link
Copy Markdown
Owner

I think we should merge this, at least there is something which works for someone.

@fgm fgm force-pushed the 17-drush_9_commands branch from c5cfd41 to 44eda66 Compare November 28, 2017 21:10
@andypost

Copy link
Copy Markdown
Contributor

Yes, lets start 2.x brach with drush 9

@dawehner

dawehner commented Nov 29, 2017 via email

Copy link
Copy Markdown
Owner

@geek-merlin

Copy link
Copy Markdown
Contributor

Hmm, confusing that we moved from the d.o issue to here.

I agree, a new branch is not necessary and only doubles our maintenance workload.

Please see my comment here.

@FlorentTorregrosa

Copy link
Copy Markdown

@FlorentTorregrosa

Copy link
Copy Markdown

@andypost: enable and disable commands have been removed because languages in Drupal 8 don't have this attribute anymore.

Also the default language command neither worked or had been used.

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.

5 participants