paulgibbs / behat-wordpress-extension

WordHat: Behat for WordPress
https://wordhat.info
GNU General Public License v3.0
106 stars 21 forks source link

Copy sample behat config file via Composer #117

Closed paulgibbs closed 7 years ago

paulgibbs commented 7 years ago

Our install instructions say "copy behat.yml.dist" into your project folder, etc, as a quick-start for Behat. We can do this automagically via Composer's scripts.post-install-cmd section.

https://github.com/solsoft/wordpress-boilerplate/blob/4.x/composer.json for inspiration

paulgibbs commented 7 years ago

Only works for root packages.

See https://github.com/composer/composer/issues/1193

stevector commented 7 years ago

I haven't used it yet, but I think Symfony Flex is meant to solve this problem space of extra file set up: https://symfony.com/doc/current/setup/flex.html

paulgibbs commented 7 years ago

That's interesting. As Flex itself is a Composer package, I think we'd have to require end-users to 1) use composer for their testing projects (we already sort of do), and 2) install symphony flex before wordhat.

problems:

1) I couldn't find a clear answer if Flex in a root package will work for the require'd package's dependencies. 2) we would need to add a wordhat thingy to https://github.com/symfony/recipes-contrib and I don't know how policed that repo is and how up they are for outside contributions. seem it could end up being a huge giant repo if this catches on, unless they're only supporting popular packages.

paulgibbs commented 7 years ago

I guess for point 1 I am thinking of this wrong, because we'd hook the script to the name of the WordHat project, so it would work there.

paulgibbs commented 7 years ago

I've found a post from the Symfony author who said that basically anything goes for the contrib repo, so I think this is worth spending time on (plus, it's interesting!).

http://fabien.potencier.org/symfony4-contributing-recipes.html

paulgibbs commented 7 years ago

Notes:

paulgibbs commented 7 years ago

Crap. After learning more about this and just about finishing it, I see this in the requirements: "The package must have an MIT or BSD license;"

WordHat is GPLv3+. 😳