richardmiller-zz / BehatSpec

Extensions to integrate Behat and PhpSpec
MIT License
51 stars 6 forks source link

Readme updates for BehatSpec and extensions + merge phpspec2-support branch history to master #35

Open ek9 opened 7 years ago

ek9 commented 7 years ago

This PR does some basic readme updates / cleanup according to updated subtreesplit structure. I believe this will be a small improvement and will clean up some minor inconsistencies in the documentation of the extensions.

Main updates:

Merging this should close #31

ek9 commented 7 years ago

This PR would also make sure phpspec2-support branches history would be merged to master (so phpspec2-support can be removed in the future, but all it's history would remain in master branch).

I also wanted to add "Copyright / License" information to the README.md of the packages, but decided to keep my cleanup / restructure to what I currently have to not make too many changes in one PR.

Let me know what you think, you can check how the new README.md look at:

ek9 commented 7 years ago

Thanks for catching this. I've updated it accordingly. I am not sure if rerunner configuration pars needs to be there or not. If it must be there, then I believe it should be moved under extension's configuration ( http://www.phpspec.net/en/stable/cookbook/extensions.html ) instead of rerunner namespace. However, that's a separate issue (if it needs to be there) so I am leaving it out of this PR.

richardmiller-zz commented 7 years ago

I'm not sure off the top of my head about teh rerunner config. I think there were some changes to the way phpspec's config worked at some point. I'll double check and open a separate PR.

ek9 commented 7 years ago

In phpspec3 they changed the way you should write the configuration. The configuration should now be under extension's namespace instead, like this:

extensions:
    RMiller\BehatSpec\Extension\BehatSpecExtension\PhpSpecExtension:
        path: vendor/bin/phpspec
        commands: [describe, exemplify, your_own_fancy_command]
        config: path/to/phpspec.yml #optional

I've checked in the code and I see that the extension itself still relies on checking for defined rerunner config, so perhaps this has to be adjusted too after update to phpspec3.

I agree this has to be sorted in a separate PR as this one should only be README / docs cleanup with no functional changes.

ek9 commented 7 years ago

@richardmiller I've got some time and tested the current master branch. I've issued 2 more commits:

  1. I have update the README regarding rerunner configuration. It does not have to be defined, however in case you want to customize things, you have to define it. The updated readme now has a comment regarding this (main README.md and README.md of PhpSpecRunExtension) (commit https://github.com/richardmiller/BehatSpec/pull/35/commits/b50512623c49cac97931cec2960572b1584e022b )
  2. While checking this, I found that the configuration of PhpSpecRunExtension was not used and it would always use the defaults. I've made an issue ( #41 ) and did a quick fix for this which is on this branch too ( https://github.com/richardmiller/BehatSpec/pull/35/commits/18b9de5d2650c00df1a4dd4af99dfab97e5fce55 ).

I believe this one is safe to be merged now as it provides correct / updated information for main README.md and the ones in the extensions.

Otherwise, I had to rebase this against master due to conflict in composer.json. It would be nice to merge this :)