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

Replaced unsupported Medium attribute on methods with Group('slow') #118

Merged
merged 1 commit into from
Sep 17, 2024

Conversation

maryo
Copy link
Contributor

@maryo maryo commented Jul 31, 2024

#[Medium] attribute can target only classes, #[Group('medium')] also cannot be applied.
Group name "medium" is not allowed for method tests\integration\Cache\Psr6CacheTest::testExpiration
Therefore i used #[Group('slow')], or it can be dropped entirely, or a different name.

@maryo maryo force-pushed the fork branch 2 times, most recently from 8b0a39f to a2d58c3 Compare August 3, 2024 16:19
@maryo maryo changed the title Used PHPUnit attributes Added PHPUnit attributes to support PHPUnit 11 without deprecations Aug 3, 2024
@Nyholm
Copy link
Member

Nyholm commented Sep 17, 2024

Oh no.. I merged #119. I did not see this. Im sorry.

Is there anything left to do if you rebase on master?

@maryo maryo changed the title Added PHPUnit attributes to support PHPUnit 11 without deprecations Replaced unsupported Medium attribute on methods with Group('slow') Sep 17, 2024
@maryo
Copy link
Contributor Author

maryo commented Sep 17, 2024

Yes, rebased, there is still the issue with Medium attribute.

An error occurred inside PHPUnit.

Message:  Attribute "PHPUnit\Framework\Attributes\Medium" cannot target method (allowed targets: class)

@medium will be implemented as PHPUnit\Framework\Attributes\Medium (only allowed on classes; @medium was allowed on methods but it does not make sense to mix tests of different sizes in a test case class)
sebastianbergmann/phpunit#4502

I replaced it with Group('slow') (there is sleep(3)), or it can be dropped entirely, or do you prefer a different group name?

@Nyholm
Copy link
Member

Nyholm commented Sep 17, 2024

Thank you. I think it looks alright.

@xabbuh can you please review this?

@xabbuh
Copy link
Contributor

xabbuh commented Sep 17, 2024

👍 works for me

@Nyholm Nyholm merged commit fb7d787 into php-cache:master Sep 17, 2024
4 checks passed
@Nyholm
Copy link
Member

Nyholm commented Sep 17, 2024

Thank you

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.

3 participants