Skip to content
This repository has been archived by the owner on Dec 3, 2023. It is now read-only.

Allow PHPUnit 8.0 #1416

Merged
merged 8 commits into from
Feb 7, 2019
Merged

Allow PHPUnit 8.0 #1416

merged 8 commits into from
Feb 7, 2019

Conversation

enumag
Copy link
Member

@enumag enumag commented Feb 4, 2019

I'd like to speed up my tests by using pcov instead of xdebug for code coverage. This however requires PHPUnit 8.0.

Considering that EasyCodingStandardTester is a small and simple package, I don't expect any issues with allowing this.

@TomasVotruba
Copy link
Member

👍

Since this is monorepo, it must be in all packages. The easiest way is to change it in root composer.json, then run composer propagate.

@enumag enumag changed the title [EasyCodingStandardTester] Allow PHPUnit 8.0 Allow PHPUnit 8.0 Feb 4, 2019
@enumag
Copy link
Member Author

enumag commented Feb 4, 2019

Ok I did that. Let's see what the CI will say...

@enumag
Copy link
Member Author

enumag commented Feb 7, 2019

I fixed some issues, now there are only some deprecations such as Assert::getObjectAttribute(). What should we use instead? The related issue in PHPUnit is TLDR but I saw you commented there so I guess you already have a solution in mind for Rector.

@TomasVotruba
Copy link
Member

TomasVotruba commented Feb 7, 2019

Where exactly?

The related issue in PHPUnit is TLDR but I saw you commented there so I guess you already have a solution in mind for Rector.

Not really.

], $containerBuilder->getParameterBag()->all());
$parameters = $containerBuilder->getParameterBag()->all();
$this->assertArrayHasKey('cache_directory', $parameters);
$this->assertSame('new_value', $parameters['cache_directory']);
Copy link
Member

Choose a reason for hiding this comment

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

👍

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

Can this be done better with assertContains or some other method?

Copy link
Member

Choose a reason for hiding this comment

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

It depends on the case. I think this specific code cannot be done better than your way.

@TomasVotruba TomasVotruba merged commit e22061c into master Feb 7, 2019
@TomasVotruba
Copy link
Member

Thank you @enumag 👍

I've also improved Rector PHPUnit 8 set. There were many reverts before tagging it

@TomasVotruba TomasVotruba deleted the enumag-patch-1 branch February 7, 2019 21:02
@enumag
Copy link
Member Author

enumag commented Feb 7, 2019

Oh you finished it already. Thanks. :-)

@TomasVotruba
Copy link
Member

TomasVotruba commented Feb 7, 2019

👍

Next time you can automate 90 % changes with Rector updated set:

vendor/bin/rector process packages --level phpunit80

@deprecated-packages deprecated-packages locked as resolved and limited conversation to collaborators Oct 26, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants