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

Use Yoast PHPUnit Polyfill #61

Merged
merged 1 commit into from
Feb 7, 2023
Merged

Use Yoast PHPUnit Polyfill #61

merged 1 commit into from
Feb 7, 2023

Conversation

kraftbj
Copy link
Contributor

@kraftbj kraftbj commented Feb 6, 2023

Fixes #52
Closes Automattic/jetpack#28784

Adds Yoast's polyfill and switches to that base class.

With this, we can remove the phpunit from composer's require-dev and need to determine the version bump needed.

I added this branch as a dependent of the Blaze package in the Jetpack monorepo with an example of the use case for this, as can be seen at Automattic/jetpack#28784

Copy link
Collaborator

@szepeviktor szepeviktor left a comment

Choose a reason for hiding this comment

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

Thank you!
This seems very simple.

@kraftbj
Copy link
Contributor Author

kraftbj commented Feb 7, 2023

Thanks! Let's give it a spin. I'll work up doc changes and push separately.

@kraftbj kraftbj merged commit 84d9fe0 into master Feb 7, 2023
@kraftbj kraftbj deleted the add/yoast-polyfill branch February 7, 2023 13:11
anomiex added a commit to Automattic/jetpack that referenced this pull request Feb 7, 2023
This is never necessary, but doesn't break with normal PHPUnit.

With Automattic/wordbless#61, however, now that parent `setUp()` itself
calls `set_up()`, leading to infinite loops and stack exhaustion.

To fix this, we remove the bogus parent calls.
anomiex added a commit to Automattic/jetpack that referenced this pull request Feb 7, 2023
This is never necessary, but doesn't break with normal PHPUnit.

With Automattic/wordbless#61, however, now that parent `setUp()` itself
calls `set_up()`, leading to infinite loops and stack exhaustion.

To fix this, we remove the bogus parent calls.
@kraftbj
Copy link
Contributor Author

kraftbj commented Feb 7, 2023

The downside with this is if you were adding the unneeded parent::setup fixtures, it would end up segfaulting :-/

Automattic/jetpack#28808

matticbot pushed a commit to Automattic/jetpack-connection that referenced this pull request Feb 7, 2023
This is never necessary, but doesn't break with normal PHPUnit.

With Automattic/wordbless#61, however, now that parent `setUp()` itself
calls `set_up()`, leading to infinite loops and stack exhaustion.

To fix this, we remove the bogus parent calls.

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/4115811065
matticbot pushed a commit to Automattic/jetpack-stats that referenced this pull request Feb 7, 2023
This is never necessary, but doesn't break with normal PHPUnit.

With Automattic/wordbless#61, however, now that parent `setUp()` itself
calls `set_up()`, leading to infinite loops and stack exhaustion.

To fix this, we remove the bogus parent calls.

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/4115811065
matticbot pushed a commit to Automattic/jetpack-stats-admin that referenced this pull request Feb 7, 2023
This is never necessary, but doesn't break with normal PHPUnit.

With Automattic/wordbless#61, however, now that parent `setUp()` itself
calls `set_up()`, leading to infinite loops and stack exhaustion.

To fix this, we remove the bogus parent calls.

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/4115811065
matticbot pushed a commit to Automattic/jetpack-search-plugin that referenced this pull request Feb 7, 2023
This is never necessary, but doesn't break with normal PHPUnit.

With Automattic/wordbless#61, however, now that parent `setUp()` itself
calls `set_up()`, leading to infinite loops and stack exhaustion.

To fix this, we remove the bogus parent calls.

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/4115811065
matticbot pushed a commit to Automattic/jetpack-storybook that referenced this pull request Feb 7, 2023
This is never necessary, but doesn't break with normal PHPUnit.

With Automattic/wordbless#61, however, now that parent `setUp()` itself
calls `set_up()`, leading to infinite loops and stack exhaustion.

To fix this, we remove the bogus parent calls.

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/4115811065
matticbot pushed a commit to Automattic/jetpack-production that referenced this pull request Feb 7, 2023
This is never necessary, but doesn't break with normal PHPUnit.

With Automattic/wordbless#61, however, now that parent `setUp()` itself
calls `set_up()`, leading to infinite loops and stack exhaustion.

To fix this, we remove the bogus parent calls.

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/4115811065
@anomiex
Copy link
Contributor

anomiex commented Feb 7, 2023

The downside with this is if you were adding the unneeded parent::setup fixtures, it would end up segfaulting :-/

Automattic/jetpack#28808

It's more that if you were declaring your own set_up function, then from that strangely calling parent::setUp() even though that's totally not necessary, it will now break because the Yoast polyfill class has that setUp() call set_up().

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.

Use Yoast Polyfill?
3 participants