Support from Acquia helps fund testing for Drupal Acquia logo

Comments

JulienD created an issue. See original summary.

JulienD’s picture

Issue summary: View changes
JulienD’s picture

Services are injected using dependency injection

SylvainM’s picture

The command should be added in a drush.services.yml, think I

SylvainM’s picture

And in composer.json.
Patch attached

SylvainM’s picture

SylvainM’s picture

geek-merlin’s picture

Status: Needs review » Needs work

Thanks for working on that! As a maintainer, i see the issue that this patch will introduce code duplicated in 2 places which makes any subsequent patch cumbersome and error-prone. Fortunately the config-split guys have solved that problem well and - even better - documented their effort. It's super simple.
So if this patch is reworked that way, we can move it in.

(Please also include #2921750: Drush command doesn't work with verify option)

geek-merlin’s picture

fgm’s picture

Status: Needs work » Needs review
FileSize
6.48 KB

New version, tested with Drush 9.2.

geek-merlin’s picture

Status: Needs review » Needs work

What did you change? As far as i see it, stage_file_proxy.drush8.inc still contains dup code to the command service. See #8.

fgm’s picture

I did not "change" anything: I hadn't seen the earlier implementation so it has been redone independently. The situation wrt drush 8/9 code is similar to the one about Features, it seems.

JeroenT’s picture

* Removed code duplication
* Replaced deprecated Unicode::* calls with mb_*.
* Fixed some coding standards
* Added #2921750: Drush command doesn't work with verify option.

JeroenT’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 13: 2912779-13.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

JeroenT’s picture

Status: Needs work » Needs review
FileSize
5.87 KB
3.25 KB

fixed coding standards.

Status: Needs review » Needs work

The last submitted patch, 16: 2912779-16.patch, failed testing. View results

JeroenT’s picture

Status: Needs work » Needs review
FileSize
9.53 KB
493 bytes

This is the right patch.

Status: Needs review » Needs work

The last submitted patch, 18: 2912779-18.patch, failed testing. View results

JeroenT’s picture

Status: Needs work » Needs review
Chi’s picture

Title: Add Drush 9 command support » Add Drush 9+ command support

Drush 10 has just been released. It would be good to support it in this patch.
https://github.com/drush-ops/drush/releases/tag/10.0.0

greggles’s picture

@Chi did you test it? An example of upgrading is #3071228: Drush 10 compat which seems pretty lightweight.

betz’s picture

i am currently testing it from the contribution day on drupalcon :)
well, just the drush 9 one.
will report that

betz’s picture

patch fails against the 8.x-1.x branch.

betz’s picture

Status: Needs review » Needs work
Chi’s picture

@greggles, right, supporting Drush 10 is likely be one line change. So it makes sense to make it in this issue.

betz’s picture

Status: Needs work » Needs review
FileSize
9.5 KB

made the patch apply to 8.x-1.x branch again.
did not test yet.

betz’s picture

confirms patch @27 works for drush 9

betz’s picture

Status: Needs review » Reviewed & tested by the community

could we get this patch already submitted and have drush 10 for another issue?
It works for 9, this issue is 2 years old...

greggles’s picture

I'm fine with the approach of committing this for Drush9 and pushing drush10 to another issue in general, though the changes for 10 are likely pretty small.

Anyone else want to review this for 9. I personally don't use this functionality so I'm not well suited to test it.

moshe weitzman’s picture

Looks pretty good. I noticed

"stage_file_proxy.drush.services.yml": "^9"

Change this line in composer.json to ^9 || ^10 to get full Drush 10 support. Nothing more is needed.

$logger->error(
+        'Configure stage_file_proxy.settings.origin in your settings.php (see INSTALL.txt).'
+      );
+
+      return;

The convention is to throw an Exception in cases like this, not just log an error.

greggles’s picture

Status: Reviewed & tested by the community » Needs work

Needs work based on #31.

Thanks for the review, Moshe!

SylvainM’s picture

Here is a patch with #31 comment applied.

I'll submit just after a patch adding a skippable progress bar

I tested the two patches and both work

SylvainM’s picture

Status: Needs work » Needs review
FileSize
10.13 KB
1.02 KB

And here is the patch with the skippable progress bar

matio89’s picture

Fixed the patch to be applied correctly.

Attached the patch.

moshe weitzman’s picture

Last patch failed to apply correctly according to CI.

greggles’s picture

@moshe does #34 look good to you? Seems like it fixes your feedback and addresses another issue and it applies, according to testbot.

moshe weitzman’s picture

Yeah, looks good. There are still a couple instances of $logger->error() but it looks to me like thats not a true command error, but rather reporting results. So $logger->error() is fine for that use.

  • greggles committed df1ae7d on 8.x-1.x authored by JeroenT
    Issue #2912779 by SylvainM, JeroenT, betz, JulienD, fgm, matio89, geek-...
greggles’s picture

Status: Needs review » Fixed

Great, thanks, everyone for your help!

Now committed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.