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

PHPUnit 7 supports ? #422

Closed
mariuszkrzaczkowski opened this issue Mar 8, 2018 · 39 comments · Fixed by #430
Closed

PHPUnit 7 supports ? #422

mariuszkrzaczkowski opened this issue Mar 8, 2018 · 39 comments · Fixed by #430
Assignees

Comments

@mariuszkrzaczkowski
Copy link

When is planned supports with PHPUnit 7

@okolesnyk
Copy link

Hello, any updates on this issue?

@viamage
Copy link

viamage commented Jun 5, 2018

+1, phpunit is at 7.2 already, can we expect this anytime soon ?

@giorgiosironi
Copy link
Owner

It's difficult to say what the extend of the changes would be (the changes to namespaces has been a bit disruptive for previous branches) but if someone wants to open and test a PR for master (would go into the 4.x series) I'd be happy to merge it.

@thewunder
Copy link
Collaborator

Anyone else working on this? If not, I will do it. We have a large suite of tests that we need to continue to move forward with. Switching to a new framework will certainly take more time than migrating this.

@luckydonald
Copy link

@thewunder any progress yet?

@thewunder
Copy link
Collaborator

@luckydonald Sorry I haven't started yet. PHPUnit 6 is EOL on February 8th. So it is time to get on this soon.

@natewallis
Copy link

How did this progress, I have been developing tests using PHPUnit 8 and this package conflicts with PHPUnit... any suggestions?

@thewunder
Copy link
Collaborator

Hey all, I'm finally starting this, I hope to have a pull request this week.

@thewunder
Copy link
Collaborator

For the interested https://github.com/thewunder/phpunit-selenium/tree/phpunit_7_plus

@giorgiosironi I have 9 failures, 105 pass, 51 ignored tests right now running on chrome, the vagrant box seems pretty hopelessly out of date.

@JaZo
Copy link

JaZo commented Apr 11, 2019

@thewunder, great work so far! Can I help to get this done?

Regarding the Vagrant box; we are using https://github.com/elgalu/docker-selenium in our CI and it works like a charm!

@iainfogg
Copy link

@giorgiosironi It'd be great to know if this is able to progress, as PhpUnit has been EOL for several months now. Is this something we can expect to see getting merged in, or should we be looking for something else to do PhpUnit / Selenium integration?

And thanks @thewunder for your work on this!

@joesaunderson
Copy link
Contributor

Do we have any update on progress on this?

@thewunder
Copy link
Collaborator

Giorgio gave me commit rights. But I would like to have one other person run the tests, take a look at code etc before I merge and release it.

@joesaunderson
Copy link
Contributor

I can have a look this weekend. Will this be supporting PHP unit 7 & 8? Or is this targeting PHP unit 7 specifically?

@thewunder
Copy link
Collaborator

RIght now I know everything runs in 8.x but with some deprecation notices.

I think we may need two separate releases because the deprecated class (which we would need for 7 support) was introduced in 7.x

@joesaunderson
Copy link
Contributor

I agree with the two releases. Maybe 5.* for 7 support and 6.* for 8 support?

What is the deprecated class?

@thewunder
Copy link
Collaborator

TestListener and TestListenerDefaultImplementation

@thewunder
Copy link
Collaborator

I think we should skip 6 and go directly to 7 then version 7 of the library supports PHPUnit 7, while version 8 supports 8.

Sound good all?

@joesaunderson
Copy link
Contributor

Sounds good, we’d also be skipping 5 too right?

@thewunder thewunder self-assigned this Jun 13, 2019
@JaZo
Copy link

JaZo commented Jun 21, 2019

For the interested https://github.com/thewunder/phpunit-selenium/tree/phpunit_7_plus

@giorgiosironi I have 9 failures, 105 pass, 51 ignored tests right now running on chrome, the vagrant box seems pretty hopelessly out of date.

@thewunder I have fixed some broken tests and changed the Travis config so the tests run on Sauce Labs. I also added a docker-compose.yml file for easy local testing (see https://github.com/JaZo/phpunit-selenium/tree/feature/selenium-docker). The builds are passing now: 118 pass, 28 skipped and 19 incomplete (https://travis-ci.org/JaZo/phpunit-selenium/jobs/548630157). Getting the mobile tests running is still a todo. I can create a PR for this, but we first need to apply for a free OS account at Sauce (https://saucelabs.com/open-source/open-sauce). Maybe @giorgiosironi, as the owner of this repo, can do that and supply me with the details so I can set it up and make a PR? When the tests are running on CI again we can continue the work on PHPUnit 7+ support.

@luckydonald
Copy link

Oh, great!
@JaZo How ready do you think it is, is it already usable?
We are currently planning to add unit and selenium tests to an existing project, and would also go for PHPUnit 8 while setting things up. Selenium however is a fixed requirement.

I'd love to help out manually testing it by trying to use it, if someone gives me some hints in how to install it into a project (are there pre-releases made for composer?)

@JaZo
Copy link

JaZo commented Jul 2, 2019

@luckydonald you can install it using composer by specifying the repository and branch from the PR (#430). It should be something like this (I haven't tried it):

{
	"repositories": [{
		"type": "git",
		"url": "https://github.com/thewunder/phpunit-selenium.git"
	}],
	"require": {
		"phpunit/phpunit-selenium": "dev-phpunit_7_plus"
	}
}

However, personally I would not recommend this package for new projects as it is not very well maintained. I help to keep it up-to-date because we have a project with a very big test suite relying on this package and it is more work to port all tests. We mostly use Cypress for browser tests now. If Selenium is a requirement, I think you are better off with something like Codeception with the WebDriver module which is properly maintained.

@filips123
Copy link

filips123 commented Jul 2, 2019

@JaZo

However, personally I would not recommend this package for new projects as it is not very well maintained.

Why? Alternatives that you listed aren't a good replacement for this project.

First, Codeception is a completely new testing framework. Although it is based on PHPUnit, it still needs to be installed separately. And some things might not be compatible with PHPUnit.

Also, Cypress is only for Node.js and it only supports Chrome. Not a replacement for good old Selenium and PHPUnit...

@luckydonald
Copy link

luckydonald commented Jul 2, 2019

@filips123 Sounds like some valid points here,

However I'm still very thankful for any good looking alternatives to evaluate,
thanks @JaZo.

I'm under the assumption that the fork of @thewunder will be merged into this project at some point, so there will be an upgrade path available in the future?

The composer.json worked, thanks:

	...
	"repositories": [
		{
			"url": "https://github.com/thewunder/phpunit-selenium.git",
			"type": "git"
		}
	],
        "require-dev": {
		"phpunit/phpunit-selenium": "dev-phpunit_7_plus",
	},
        ...

@thewunder
Copy link
Collaborator

@luckydonald Good to hear. After I do the same with my large test suite and get comparable results I will merge and release this as 7.0

@luckydonald
Copy link

luckydonald commented Jul 3, 2019

@thewunder I see the repo was deleted, can I now just install it like regular, I.e. is it released now?

@luckydonald
Copy link

luckydonald commented Jul 3, 2019

Aaaaaaa installs are breaking

@luckydonald
Copy link

luckydonald commented Jul 3, 2019

apparently no.

I'll try dev-master for now.

@luckydonald
Copy link

luckydonald commented Jul 3, 2019

Okey I can't get it to work.
I'll get

 phpunit/phpunit-selenium dev-master requires phpunit/phpunit >=6.0,<7.0 
-> satisfiable by phpunit/phpunit[
6.0.0, 6.0.1, 6.0.10, 6.0.11, 6.0.12, 6.0.13, 6.0.2, 6.0.3, 6.0.4, 6.0.5, 6.0.6,
6.0.7, 6.0.8, 6.0.9, 6.1.0, 6.1.1, 6.1.2, 6.1.3, 6.1.4, 6.2.0, 6.2.1, 6.2.2, 6.2.3,
6.2.4, 6.3.0, 6.3.1, 6.4.0, 6.4.1, 6.4.2, 6.4.3, 6.4.4, 6.5.0, 6.5.1, 6.5.10, 6.5.11,
6.5.12, 6.5.13, 6.5.14, 6.5.2, 6.5.3, 6.5.4, 6.5.5, 6.5.6, 6.5.7, 6.5.8, 6.5.9
] but these conflict with your requirements or minimum-stability.

@luckydonald
Copy link

@thewunder What is the current process to install it?

@filips123
Copy link

@luckydonald Paclagist still hasn't updated package. This is probably because they recently removed old github-packagist service which is probably used in this repository. There was a similar issue in hassankhan/config#119.

@thewunder @giorgiosironi One of the maintainers needs to update Packagist to use GitHub's webhook instead of service. See hassankhan/config#119 (comment) for details.

What is the current process to install it?

You have to wait until package is updated.

@thewunder
Copy link
Collaborator

@filips123 Yep, although I was given commit rights, I was not made the admin of the repo, so I need @giorgiosironi or possibly even @sebastianbergmann to fix the webhook.

@thewunder thewunder reopened this Jul 3, 2019
@luckydonald
Copy link

luckydonald commented Jul 3, 2019

I republished the deleted fork with 3129be3, so It can at least still be installed for now.

{
        ...
	"license": "Do not use!",
	"repositories": [
		{
			"url": "https://github.com/luckydonald-forks/phpunit-selenium.git",
			"type": "git"
		}
	],
	"require-dev": {
		"phpunit/phpunit": "^8",
		"phpunit/phpunit-selenium": "dev-phpunit_7_plus",
	}
}

@thewunder please next time wait with deletion until it is released.

Edit: The fork is now a bit newer after the merge in dev, having the added phpunit restriction removed again. As long as you don't need #432, it should be fine.

@JaZo
Copy link

JaZo commented Jul 3, 2019

@luckydonald, there is no need to keep the fork/branch open once it's merged. Usually dev-master should work but, as @filips123 mentions, the webhook to packagist is currently broken. As a temporary workaround you can define the repository in your composer.json:

{
	"repositories": [{
		"url": "https://github.com/giorgiosironi/phpunit-selenium.git",
		"type": "git"
	}],
	"require-dev": {
		"phpunit/phpunit": "^7",
		"phpunit/phpunit-selenium": "dev-master"
	}
}

Please note that master currently only supports PHPUnit 7!

@luckydonald
Copy link

luckydonald commented Jul 3, 2019

I was not able to get it to work, but I think i removed the "repositories" part as well, I thought that wouldn't be needed as it is the original repo now.

But yeah, that might work as well.

Gonna stick to the fork until a release is live. To make sure it isn't breaking again.
Trying to set up unit testing in my company, and if it doesn't install when the boss tries it is kinda a bad first impression lol.

@sebastianbergmann
Copy link
Contributor

I am not the maintainer of https://packagist.org/packages/phpunit/phpunit-selenium.

@thewunder
Copy link
Collaborator

I am not the maintainer of https://packagist.org/packages/phpunit/phpunit-selenium.

Thanks for taking the time to let me know I should continue to bother @giorgiosironi
I wasn't sure how the whole namespsace owner thing works over at packagist

@thewunder
Copy link
Collaborator

7.0.0 is released!

@luckydonald
Copy link

👍

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 a pull request may close this issue.