Closed finnlewis closed 4 months ago
@gregharvey - recreated your pull request here!
Just discussing this in Merge Monday.
We'll need to make sure that Lando and Ddev still work nicely, so update lines like:
https://github.com/localgovdrupal/localgov_project/blob/3.x/.lando.dist.yml#L79
And/or we add a sym link from /bin to /vendor/bin
@Adnan-cds mentions it is quicker to type when on a server.
@andybroomfield points out that people are unlikely to pull in updates to this repo.
I'll take a look at DDEV and lando and update the pull request as needed.
I have to admit that I'm used to having these things in a bin dir. Now Drush Launcher no longer works, I've started typing the path to drush and vendor/
is another 7 characters to type.
As the composer.json file in this repo is just s starter then people can easily change the bin location to their preference in production installs.
All just my personal preference, but I would vote against this change.
At the end of the day I don't really mind, but you're making your project different from all the other composer installed projects, so it will break any standard Drupal CI until whoever is trying to set it up realises what's going on. I find it an odd decision to be deliberately different when there is a standard.
PS - @finnlewis thanks for doing that, sorry I dragged my bum!
@gregharvey I'd argue /vendor/bin isn't a standard, it's just the default. I'm also one of the people who likes to relocate the bin dir to /bin. It's partly from also working on Symfony projects, where the console's at /bin/console by default, but also because every other project I work on at the moment is already set up like that. I think you might find that it's a more popular choice than you think :)
IMO if you want to script drush, you should look for it at /vendor/drush/drush/drush, because that's the one place it's always guaranteed to be.
Maybe we can get composer to symlink vendor/bin to bin to cater for both cases?
Just updated this pull request, in discussion with @andybroomfield
Acquia require the bin directory to be in vendor/bin, so I think this makes sense to stick with the default.
The symlink from bin to vendor/bin seems to work for drush inside Lando container.
Just testing ddev too.
Merged. If the symlink becomes an issue, we can deal with it.
…a link for /bin.