Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 16 commits into
base: master
Choose a base branch
from

Conversation

ek9
Copy link
Contributor

@ek9 ek9 commented Feb 19, 2017

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:

  • Added full configuration example to README.md of BehatSpec package so it would enable all of the extensions. If user installs BehatSpec then all of the extensions are provided by the same package, thus the configuration now shows how to configure all bundle of extensions.
  • Updated install examples to always install latest version. Pointing it to specific versions (e.g. like the previous 0.5 isn't necessary as you would always need to update the documentation. The correct version can be figured out by the composer).
  • Updated README.md for the extensions to include the updated configurations for PhpSpec3 as the format of defining extensions was changed.
  • Added notes regarding PhpSpec2 / PHP 5.4 support, with a link to phpspec2-support branch which has old instructions to set things up.
  • Moved a list of extensions used / provided by BehatSpec to the top of the page so people know about standalone extensions.
  • Some minor cleanup in main README.md. All the structure and content remained the same with some minor adjustments.
  • Updated README.md for all the extensions for standalone configuration to match latest behat / phpspec versions. Also the yaml confing examples used different kinds of indentation, so I standardized this to 4 space indentation so examples are consistent.
    Mentioned "Similar Extensions" inREADME.mdof all extensions. There is also awlays a link toBehatSpecpackage. This should make it easy for users of standalone extensions to find other extensions and mainBehatSpec` package.
  • The links to Behat / PhpSpec will now point to stable version of documentation instead of old 3.0.
  • Minor working updates

Merging this should close #31

@ek9
Copy link
Contributor Author

ek9 commented Feb 19, 2017

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 ek9 changed the title Readme updates for BehatSpec and extensions Readme updates for BehatSpec and extensions + merge phpspec2-support branch history to master Feb 19, 2017
README.md Outdated
RMiller\BehatSpec\Extension\BehatSpecExtension\BehatExtension:
path: bin/phpspec #default value is bin/phpspec
config: path/to/phpspec.yml #optional
RMiller\BehatSpec\Extension\ErrorExtension\ErrorExtension: ~
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This shouldn't be necessary RMiller\BehatSpec\Extension\BehatSpecExtension\BehatExtension registers the other two extensions and passes that config to them.

README.md Outdated

```yaml
# phpspec.yml
RMiller\BehatSpec\Extension\PhpSpecRunExtension\PhpSpecRunExtension: ~
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As before, RMiller\BehatSpec\Extension\BehatSpecExtension\PhpSpecExtension should register the other two extension automatically.

@ek9
Copy link
Contributor Author

ek9 commented Feb 27, 2017

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
Copy link
Owner

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
Copy link
Contributor Author

ek9 commented Feb 28, 2017

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
Copy link
Contributor Author

ek9 commented Mar 27, 2017

@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 b505126 )
  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 ( PhpSpecRunExtension: configuration no longer works #41 ) and did a quick fix for this which is on this branch too ( 18b9de5 ).

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 :)

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.

Update README according to new package structure
2 participants