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

Supporting phpspec 3 and Behat 3.2 #5

Open
richardmiller-zz opened this issue Sep 1, 2016 · 15 comments
Open

Supporting phpspec 3 and Behat 3.2 #5

richardmiller-zz opened this issue Sep 1, 2016 · 15 comments

Comments

@richardmiller-zz
Copy link
Owner

@pocky @docteurklein I'm going to look at getting the phpspec extension parts of BehatSpec working with phpspec 3, there is also the forthcoming change to Behat that should get rid of the need for ErrorExtension and that will also need some changes in BehatPhpspecExtension.

I'm not sure it will be possible to do all of this without branching various repos and then having branches of this one to support the different dependencies. I think it's also worth considering a stable release for the version that depends on Behat 3.2 once released and the hackier error handling can be removed. What are your thoughts on how best to approach these changes?

@docteurklein
Copy link
Collaborator

@richardmiller that's an excellent question. What about committing on master, but with a composer.json requiring behat/behat:^3.2 ? (same for other deps).

This way we wouldn't have to maintain branch spaghetti, and we would let composer handle the resolution.

Not even sure it would work :)

@richardmiller-zz
Copy link
Owner Author

I would really like to avoid branch spaghetti, would your approach just mean forcing the latest versions of behat and phpspec if you use the latest version of this and associated extensions? Given they are dev tools and someone can fall back to an old tag if they must have older versions then I think this could be ok.

@docteurklein
Copy link
Collaborator

docteurklein commented Sep 2, 2016

Yeah, the idea is that composer will choose the only possible choice depending on the constraints you have. Let's imagine some scenarios:

  1. user has no constraint (or behat 3.2)
    • he runs composer require rmiller/behatspec
    • composer installs latest versions (behat 3.2 and latest behatspec)
  2. user has behat 3.1
    • he runs composer require rmiller/behatspec
    • composer installs the latest compatible version with behat 3.1 (which is the previous version)

The same scenarios can be applied with phpspec.
If we put the correct constraints in our composer.json requirements, we can delegate everything to composer dependency resolver!

@ciaranmcnulty
Copy link

Why not make this a monorepo and turn the other extensions into subtree splits?

@ciaranmcnulty
Copy link

Do you need any help with this?

@richardmiller-zz
Copy link
Owner Author

What are the benefits of doing that? The main possible problem we may have is having to support various versions of behat and phpspec, will a monorepo help with that?

@ciaranmcnulty
Copy link

Monorepo would make coordinated change across the repos (when new versions come out) easier.

@pocky
Copy link
Collaborator

pocky commented Dec 3, 2016

@richardmiller Sorry for the delay, I think both ideas (monorepo and behat/phpspec integration) are great so I did a PR.

@ek9
Copy link
Contributor

ek9 commented Jan 21, 2017

Hey guys, any plans to release this? Possible the monorepo migration could be done separately, so we can have the PHPSpec3 support? I'd be willing to help with any needed PRs, please let me know.

@richardmiller-zz
Copy link
Owner Author

@ek9 there is plan here #13. Is there is anything you can help with that would be great. Sorry for the delay

@ek9
Copy link
Contributor

ek9 commented Feb 19, 2017

From my recent tests (in the past day) I believe the basic functionality is working correctly for the new versions after the subsplit merge + the namepsace fix ( #25 ) . Once all the tests are in one place ( #27 ) we can verify this by tests too and hopefully close this as basic support for phpspec 3 / Behat 3.2 is there.

I would then suggest to make a few more specific issues on what needs to be done before considering doing a stable release.

@ek9
Copy link
Contributor

ek9 commented Feb 19, 2017

I've made some issues and pulled some PRs for you to review / merge which should finalize most of the things. Please review / merge in this order to avoid conflicts:

Once this is ready to use I would suggest to cleanup the versions that do not work and do 0.6.0 / 0.6.x-dev #32

Otherwise I think this issue can be closed as main changes were done and we have separate issues for other tasks.

@richardmiller-zz
Copy link
Owner Author

One of the other changes, is that Behat 3.2 has it's own error listeners which can be used instead of the ones in the ErrorExtension. These should work better as well in terms of hopefully solving one of the issues with the way the current error observers work (richardmiller-zz/ErrorExtension#1)

@ek9
Copy link
Contributor

ek9 commented Feb 28, 2017

Good point, I've made #40 issue for this.

@Dragonrun1
Copy link

So it's now almost 2 years later and Behat is now on v3.5 and PHPSpec is on v5.1 and this still doesn't work so can we get an update at least of when it will?

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

No branches or pull requests

6 participants