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

Fix image style generation for d7 #2501

Merged
merged 1 commit into from
May 2, 2017
Merged

Fix image style generation for d7 #2501

merged 1 commit into from
May 2, 2017

Conversation

acrollet
Copy link
Contributor

This is an update to the PR in #1658

I've split d8 and d7 code into separate files. The PR is against 8.x because master no longer supports Drupal 7.

$extra = ' "' . __DIR__ . '/d8-rs-router.php"';
}
elseif (drush_drupal_major_version() == 7) {
$extra = ' "' . __DIR__ . '/d7-rs-router.php"';
}
Copy link
Member

Choose a reason for hiding this comment

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

This looks fine in terms of functionality. The only feedback I would have would be if it would be worth considering using the core "engines" hooks to manage this, rather than a conditional include - see https://github.com/drush-ops/drush/blob/master/includes/engines.inc for details. This would be part of the "drupal" engine type, which would provide automatic selection of the include based on the core version - similar to the "pm" engine you can see defined in https://github.com/drush-ops/drush/blob/master/commands/core/core.drush.inc#L33 and https://github.com/drush-ops/drush/tree/master/commands/core/drupal. Apart from organization and making the engines available to other commands (that do rs-type stuff), this could allow the engines to supplement the rs command docs (if they provide additional options etc).

Copy link

Choose a reason for hiding this comment

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

Given that the current code is already doing a conditional, this PR isn't making the situation any worse. I'd propose putting off improving the organization to a follow-up PR after fixing the bug.

Copy link
Member

Choose a reason for hiding this comment

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

That sounds fine to me

@dsnopek
Copy link

dsnopek commented May 1, 2017

I tested this PR with the Panopoly test suite on Travis-CI, and this got the image styles generating correctly! 👍

@grugnog grugnog merged commit ac3c9df into drush-ops:8.x May 2, 2017
@dsnopek
Copy link

dsnopek commented May 8, 2017

Huzzah! Thanks, Everyone :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants