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

Change log for 3.6.0 does not mention backwards compatibility breaking change (removal of parameter) in AMPQSSLConnection signature #1175

Open
caricare2 opened this issue May 11, 2024 · 0 comments

Comments

@caricare2
Copy link

caricare2 commented May 11, 2024

Version(s) affected 3.6.0

Description
The function signature for the AMQPSSLConnection construct was changed in 3.6.0. There were originally 9 parameters, now there are 8. The original 8th parameter was previously $ssl_protocol, which was a string. That parameter was removed, and now the 8th parameter is ?AMQPConnectionConfig $config (which was originally the 9th parameter). This causes a TypeError to be thrown if you were previously passing that parameter instead of relying on the default value (I'm guessing the reason more people didn't run into this issue is that they probably were using the default values).

There is no specific mention of this backwards compatibility breaking change in the change log. I had to hunt through the code to figure out it was changed here:
7e9e96d#diff-7ca812c052f6560fc53e2ba72fd1c40927c86467f86c80e2016ab92c107fc919L27

Construct in AMQPSSLConnection in 3.5.4:

public function __construct(
       $host,
       $port,
       $user,
       $password,
       $vhost = '/',
       $ssl_options = array(),
       $options = array(),
       $ssl_protocol = 'ssl', // This is the parameter that was removed
       ?AMQPConnectionConfig $config = null
 )

Construct in AMQPSSLConnection in 3.6.0:

public function __construct(
        $host,
        $port,
        $user,
        $password,
        $vhost = '/',
        $ssl_options = array(),
        $options = array(),
        ?AMQPConnectionConfig $config = null
)

Possible Solution
The change log should be updated to indicate this change so people upgrading can be prepared to adapt their code for it.

I am reposting this as requested with more details:
#1174

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