Skip to content

Conversation

@gapple
Copy link
Contributor

@gapple gapple commented Jul 25, 2017

When trying to test making corresponding changes to multiple components of Drupal Console, I used drupal-project, and added some repository overrides in composer.json to use the local packages:

{
    "repositories": [
        {
            "type": "path",
            "url": "/Users/geoff/git/drupal-console"
        },
        {
            "type": "path",
            "url": "/Users/geoff/git/drupal-console-core"
        },
        {
            "type": "path",
            "url": "/Users/geoff/git/drupal-console-extend-plugin"
        }
}

However, this means that when searching for the autoloader, __DIR__ corresponds to the target of the symlinks rather than to the path within the drupal-project's vendor directory and execution fails.

This PR adds another path to check for the autoloader based on the current working directory and the path to the drupal script, which is unnaffected by the symlinks.

@jmolivas
Copy link
Member

@gapple we add a command and instructions to achieve this without all this changes, can you try this instructions?

https://docs.drupalconsole.com/en/contributing/running-the-project.html

@jmolivas
Copy link
Member

jmolivas commented Jul 25, 2017

@gapple The project search at bin/drupal.php for an autoload.local.php file
https://github.com/hechoendrupal/drupal-console/blob/master/bin/drupal.php#L19-L20

The new develop:create:symlinks command provided by the drupal/console-develop project, takes care of copying the autoload.local.php.dist file at the repo as autoload.local.php.

@gapple
Copy link
Contributor Author

gapple commented Jul 25, 2017

That's what I get for diving in without reading the documentation 😝.

autoload.local.php worked as well, though I needed to copy it manually due to my setup. I'll write up my strategy for using composer repositories and version aliasing to handle the package linking another time.

@gapple gapple closed this Jul 25, 2017
@jmolivas
Copy link
Member

@gapple We are devs, we only read the docs when everything else fails ;)

Thank you for the great working with the symfony dependencies it was one of the main blockers to tag the stable release.

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.

2 participants