Skip to content

Allow users to force Drush to recognize validity of Drupal root and site #342

@bangpound

Description

@bangpound

This is a long shot, but I figured I'd ask!

Would drush accept a pull request that creates a global option that forces drush_valid_drupal_root() to return true and also forces the return value of drush_drupal_version() to be a user specified value? (This would have to be an at-your-own-risk kind of option of course.)

I'm happy to do this work myself if Drush maintainers would consider committing it when it's complete. If so, do you have any advice about it? Should I try addressing the problem some other way?

Background

I am running Drupal 7 inside the Symfony framework. I've replaced Drupal's bootstrap and front controller, but more or less everything can work the same with Drush except that Drush searches for index.php to determine the validity of a Drupal root directory.

Symfony uses app.php, and if I symlink or copy app.php to index.php, there are unwelcome side effects. (In particular, the PHP built-in web server privileges index.php even when it is told to use a router script.)

For now, I've hacked Drush and replaced index.php with app.php in various places where it's needed. Since my use is very much an edge case, I don't expect Drush to change much to accommodate my use.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions