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

Deprecation Symfony 6.2 - AsyncPersistPageHandler #1922

Open
youlead-bow opened this issue Aug 9, 2023 · 3 comments
Open

Deprecation Symfony 6.2 - AsyncPersistPageHandler #1922

youlead-bow opened this issue Aug 9, 2023 · 3 comments

Comments

@youlead-bow
Copy link

In my project in Symfony 6, I have had this deprecation for some time:

The "FOS\ElasticaBundle\Message\Handler\AsyncPersistPageHandler" class implements "Symfony\Component\Messenger\Handler\MessageHandlerInterface" that is deprecated since Symfony 6.2, use the {@see AsMessageHandler} attribute instead.

@boskos-q
Copy link

Just use attribute #[AsMessageHandler] and remove implements MessageHandlerInterface

@Lustmored
Copy link
Contributor

@boskos-q I think the code that generates the deprecation lives within this bundle (src/Message/Handler/AsyncPersistPageHandler.php), not in the app.

@youlead-bow
Copy link
Author

Yes the deprecation comes from the bundle, you simply have to replace the line in class AsyncPersistPageHandler:
class AsyncPersistPageHandler implements MessageHandlerInterface
by:

#[AsMessageHandler]
class AsyncPersistPageHandler

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

3 participants