Skip to content

Conversation

@dxops
Copy link
Contributor

@dxops dxops commented Feb 8, 2017

@TomasVotruba
Copy link

TomasVotruba commented Feb 8, 2017

Why not put it to composer.json? This is so complex and not readable

{
    "require-dev": {
         "phpunit/phpunit": "^6.0"
    }
}

@dxops
Copy link
Contributor Author

dxops commented Feb 8, 2017

@TomasVotruba well, changing composer will not test listener together with different PHPUnit versions, it will install PHPUnit 6 only

@erunion
Copy link

erunion commented Feb 8, 2017

Why remove the EOL comments?

@dxops
Copy link
Contributor Author

dxops commented Feb 8, 2017

@erunion,

https://github.com/sebastianbergmann/phpunit/wiki/Preparing-for-PHPUnit-6

PHPUnit 5.7 is the current stable release. It is supported on PHP 5.6, PHP 7.0, and PHP 7.1. The support for PHPUnit 5.7 ends on February 2, 2018.
PHPUnit 4.8 is the old stable release. It is supported on PHP 5.3, PHP 5.4, PHP 5.5, and PHP 5.6. The support for PHPUnit 4.8 ends on February 3, 2017.

It changes a lot, dates moved each minor release, so let's try to support as much as we can. Once old version broke, we stop to support it

@TomasVotruba
Copy link

@SergeyZ Even with --prefer-lowest?

@TomasVotruba
Copy link

You can drop 4.x and 5.x as well, as there is already tagged version for that.

Releasing now version doesn't delete old tags.

@johnkary
Copy link
Owner

johnkary commented Feb 8, 2017

I would like to release one last stable v1.1 tag that maintains support for PHP 5.4+ and PHPUnit <= 5.7.

We could then migrate the listener to support new PHPUnit 6 namespaces, set minimum PHP compatibility to 7.0+ and minimum PHPUnit compatibility to 6.0+.

What do you think?

@TomasVotruba
Copy link

TomasVotruba commented Feb 8, 2017

@johnkary What would be different there compared to last version?

@johnkary
Copy link
Owner

johnkary commented Feb 8, 2017

@TomasVotruba I double-checked and there were no added features since 1.0.1 tag, so you're right, no need for a 1.1 tag.

Let's target 2.0 for PHP 7.0+ and PHPUnit 6.0+. @SergeyZ If you remove older PHP and PHPUnit versions from Travis we can merge this.

@ericpoe
Copy link

ericpoe commented Feb 8, 2017

Since this is going for a 2.0 release, it looks like the namespacing will need to be updated. Goodbye, "PHPUnit_Framework_TestCase." Hello, "PHPUnit\Framework\TestCase."

@dxops
Copy link
Contributor Author

dxops commented Feb 8, 2017

@johnkary here is the reason to do 1.1 according to semver
v1.0.1...master#diff-6bfb4c24ca1ddf68af5169768d198975R75

Please tag 1.1 and I will update this PR

@dxops
Copy link
Contributor Author

dxops commented Feb 9, 2017

@johnkary PR is ready

@dxops
Copy link
Contributor Author

dxops commented Feb 9, 2017

@TomasVotruba

Even with --prefer-lowest?

You can drop 4.x and 5.x as well, as there is already tagged version for that.

So, two versions then, 5.7 and 4.7. There was an issue with PHPUnit 5.1 and addWarning method (it was removed first and reverted back afterward)

@johnkary
Copy link
Owner

johnkary commented Feb 9, 2017

@SergeyZ I'm a bit confused on which direction this PR is heading.

I would like for master branch to move toward v2.0 tag that supports PHP 7.0+ and PHPUnit 6.0+.

@johnkary here is the reason to do 1.1 according to semver
v1.0.1...master#diff-6bfb4c24ca1ddf68af5169768d198975R75

Please tag 1.1 and I will update this PR

You're right, the merged addition of addWarning() could require a 1.1.

However, the last PR we merged bumped minimum PHP requirement from 5.3 to 5.6. PHPUnit 4.7 allows PHP >= 5.3.3. If we were to release a 1.1 it should probably support 5.3.3+.

The last merged PR also added PHPUnit 6 to the build matrix. Right now Travis is failing on master because we haven't yet added PHPUnit 6 namespace support to phpunit-speedtrap Listener. @TomasVotruba has begun work on this in #25. Right now his PR makes all the changes contained in this PR.

Is this PR still needed?

@dxops
Copy link
Contributor Author

dxops commented Feb 9, 2017

@johnkary

I'm trying to fix master and prepare it for 1.1 release. There is no 1.1 maintenance branch ATM, so this PR goes to master.

I'm not sure I need to do something related to PHPUnit 6, @TomasVotruba works on it, so PHPUnit 6 removed from Travis in this PR and master branch becomes green once we merge it. Let's create 1.1 branch and tag afterward

In case of PHP 5.3 support, we have to tweak matrix because PHPUnit 5.x requires PHP 5.6 according to
https://github.com/sebastianbergmann/phpunit/blob/5.0/composer.json#L23

The best option here is to support PHP 5.3 in 1.0 release branch, PHP 5.6 in 1.1 release branch and master goes for PHP 7

@johnkary
Copy link
Owner

@SergeyZ I see now, thank you for helping me understand.

OK, let's do as you say. After merging this I will:

  • On master: Update composer.json "dev-master": "1.1-dev"
  • Create a branch named 1.1
  • Create a tag v1.1.0
  • On master: Update composer.json "dev-master": "2.0-dev"

We can then continue working with @TomasVotruba on #25 to support PHPUnit 6.

Sound like a good plan?

@johnkary johnkary merged commit ad242a6 into johnkary:master Feb 13, 2017
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.

6 participants