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

Custom database resetter #770

Open
Nyholm opened this issue Dec 23, 2024 · 1 comment · May be fixed by #779
Open

Custom database resetter #770

Nyholm opened this issue Dec 23, 2024 · 1 comment · May be fixed by #779
Labels
bug Something isn't working

Comments

@Nyholm
Copy link
Contributor

Nyholm commented Dec 23, 2024

Documentation says to extend OrmResetter::class, however, that does not work in 2.3.1.

You need to tag your service with (the internal) tag: .foundry.persistence.database_resetter.

    services:
        App\Tests\Integration\DatabaseResetter:
            tags:
                - { name: .foundry.persistence.database_resetter, priority: -10 }
final readonly class DatabaseResetter implements OrmResetter
{
    // ...
@nikophil
Copy link
Member

nikophil commented Dec 23, 2024

Hi @Nyholm

hum you're right., thanks for reporting.. I don't know why I didn't notice this while I was testing this feature 🤔

I was naively thinking that with decoration, the decorator would inherit the tags from the decorated service...

I'm gonna fix this and add some tests around this mechanism

@nikophil nikophil added enhancement New feature or request bug Something isn't working and removed enhancement New feature or request labels Dec 23, 2024
@nikophil nikophil linked a pull request Jan 5, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

Successfully merging a pull request may close this issue.

2 participants