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

[11.9.0] Event appears to be fired twice in test #51610

Closed
dwightwatson opened this issue May 29, 2024 · 1 comment
Closed

[11.9.0] Event appears to be fired twice in test #51610

dwightwatson opened this issue May 29, 2024 · 1 comment

Comments

@dwightwatson
Copy link
Contributor

Laravel Version

11.9.0

PHP Version

8.3.7

Database Driver & Version

No response

Description

After upgrading our app from 11.8.0 to 11.9.0 one of our tests started to fail.

We use Cashier and have an event that listens for Laravel\Cashier\Events\WebhookReceived and then performs some functionality for some other Stripe events. Our test was asserting that some particular function was fired once, but after upgrading to 11.9.0 that function now runs twice.

It appears that the entire event is being run twice. It appears that this may have been caused by #51343 as when I revert that change locally - specifically the change to getProvider - the problem goes away.

Steps To Reproduce

I am still working on a standalone reproduction - trying to determine if this is Laravel specific or related to using Cashier. Will update once I get it going, but opened the issue in case others have run into this issue.

@dwightwatson
Copy link
Contributor Author

I have isolated this to us having an existing EventServiceProvider (Laravel 10 app migrated to Laravel 11) which still implemented shouldDiscoverEvents (and returned true). I've removed that and the problem was resolved.

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

No branches or pull requests

1 participant