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

Add support for Symfony 7 #721

Merged
merged 1 commit into from
Jan 10, 2024
Merged

Conversation

morawskim
Copy link
Contributor

Hello,

This PR should resolve #720.
I mark this PR as draft, because I want to test some other scenarios and versions.

The main problem with upgrade to Symfony7 was with service container. Symfony 7 removed ContainerAwareInterface.
This interface was deprecated since 6.4

My solution is to pass ServiceContainer with public services via CompilerPass.

IMHO We should migrate to Service Locator(from my test this works too). There is only issue with backward compatibility.
The ServiceLocator implements ContainerInterface from Psr namespace not from Symfony.
The Symfony interface extends from Psr interface
In bundle I did not find any calls to those extra methods, but someone could call one and this break backward compatibility.

@mihaileu if you are interested with migration to ServiceLocator I can prepare another PR.

@mihaileu
Copy link
Collaborator

thx for PR, we should keep it compatible with symfony 5.4 in order to not maintain 2 branches/tags.

@alcohol
Copy link

alcohol commented Dec 24, 2023

thx for PR, we should keep it compatible with symfony 5.4 in order to not maintain 2 branches/tags.

Can you elaborate? I'm not sure I understand what you mean with this.

@morawskim
Copy link
Contributor Author

I mark this PR as ready for review.

I tested (with Symfony 7.0 and 6.4):

  • command rabbitmq:stdin-producer
  • producer
  • command rabbitmq:consumer
  • command rabbitmq:multiple-consumer

Everything works.

@morawskim morawskim marked this pull request as ready for review December 24, 2023 09:49
@mihaileu mihaileu requested a review from razvbir January 10, 2024 14:05
@mihaileu mihaileu merged commit a80937c into php-amqplib:master Jan 10, 2024
2 checks passed
@mihaileu
Copy link
Collaborator

Thx for this PR

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.

Symfony 7.0 support
3 participants