Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Read PHPUnit configuration to check for listeners too#31649

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
alexpott wants to merge3 commits intosymfony:masterfromalexpott:phpunit-listeners

Conversation

@alexpott
Copy link
Contributor

QA
Branch?3.4
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?todo
Fixed tickets#...
LicenseMIT
Doc PRsymfony/symfony-docs#...

Trying to use simple-phpunit to get around phpunit dependency fun and support many versions of PHP in Drupal. Seehttps://www.drupal.org/project/drupal/issues/303934. We're running into an issue that we register the Symfony event listener in our phpunit.xml file. We need to do this because we wrap your listener and intercept some deprecations. Without this fix the symfony tests listener gets registered twice.

$configuration = Configuration::getInstance($this->arguments['configuration']);
}
foreach ($configuration->getListenerConfiguration()as$registeredListener) {
if (is_subclass_of($registeredListener['class'], SymfonyTestsListenerForV5::class)) {

Choose a reason for hiding this comment

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

ForV6?

Choose a reason for hiding this comment

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

orSymfony\Bridge\PhpUnit\SymfonyTestsListener in both classes?

Copy link
ContributorAuthor

@alexpottalexpottMay 28, 2019
edited
Loading

Choose a reason for hiding this comment

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

Yeah that was a mistake. Interestingly whilst debugging this locally doing
is_subclass_of($registeredListener['class'], SymfonyTestsListener::class) was not working even though
$registeredListener['class'] wasSymfony\Bridge\PhpUnit\SymfonyTestsListener ?!?!?

@nicolas-grekasnicolas-grekas modified the milestones:3.4,nextMay 29, 2019
@nicolas-grekas
Copy link
Member

Should target 3.4 since it's a bug fix?

@nicolas-grekasnicolas-grekas modified the milestones:next,3.4May 29, 2019
@nicolas-grekas
Copy link
Member

@greg0ire maybe you'd have some time to take over this PR? It'd be great :)

@greg0ire
Copy link
Contributor

I'll give it a look :)

@greg0ire
Copy link
Contributor

greg0ire pushed a commit to greg0ire/symfony that referenced this pull requestAug 3, 2019
The listener can be registered via configuration by the user. In thatcase, we do not want to add it again to the list of listeners.Closessymfony#31649
greg0ire pushed a commit to greg0ire/symfony that referenced this pull requestAug 3, 2019
The listener can be registered via configuration by the user. In thatcase, we do not want to add it again to the list of listeners.Closessymfony#31649
greg0ire pushed a commit to greg0ire/symfony that referenced this pull requestAug 3, 2019
The bridge listener can be registered via configuration by the user. In thatcase, we do not want to add it again to the list of listeners.Closessymfony#31649
greg0ire pushed a commit to greg0ire/symfony that referenced this pull requestAug 8, 2019
The bridge listener can be registered via configuration by the user. In thatcase, we do not want to add it again to the list of listeners.Closessymfony#31649
@fabpot
Copy link
Member

closing in favor of#32903

@fabpotfabpot closed thisAug 9, 2019
greg0ire pushed a commit to greg0ire/symfony that referenced this pull requestSep 2, 2019
The bridge listener can be registered via configuration by the user. In thatcase, we do not want to add it again to the list of listeners.Closessymfony#31649
nicolas-grekas added a commit that referenced this pull requestSep 2, 2019
This PR was merged into the 3.4 branch.Discussion----------[PHPUnit Bridge] Avoid registering listener twiceThe listener can be registered via configuration by the user. In thatcase, we do not want to add it again to the list of listeners.Closes#31649| Q             | A| ------------- | ---| Branch?       | 3.4| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets | n/a| License       | MIT| Doc PR        | n/aCommits-------b190536 Check phpunit configuration for listeners
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@nicolas-grekasnicolas-grekasnicolas-grekas left review comments

Assignees

No one assigned

Projects

None yet

Milestone

3.4

Development

Successfully merging this pull request may close these issues.

5 participants

@alexpott@nicolas-grekas@greg0ire@fabpot@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp