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

php8.0不支持可选参数放中间了 #10

Open
menglikaibin opened this issue May 28, 2021 · 3 comments
Open

php8.0不支持可选参数放中间了 #10

menglikaibin opened this issue May 28, 2021 · 3 comments

Comments

@menglikaibin
Copy link

    function __construct(HttpClient $client, $instanceId = NULL, $topicName, $consumer, $messageTag = NULL)
    {
        if (empty($topicName)) {
            throw new InvalidArgumentException(400, "TopicName is null");
        }
        if (empty($consumer)) {
            throw new InvalidArgumentException(400, "TopicName is null");
        }

        $this->instanceId = $instanceId;
        $this->topicName = $topicName;
        $this->consumer = $consumer;
        $this->messageTag = $messageTag;
        $this->client = $client;
    }

$instanceId = NULL 这个默认值要去掉

@menglikaibin
Copy link
Author

menglikaibin commented May 28, 2021

Required parameter $topicName follows optional parameter $instanceId会报这个错

@eoaion
Copy link

eoaion commented Jul 23, 2021

class MQProducer
function __construct(HttpClient $client, $instanceId = Null, $topicName)
需要同样去掉

@ruoshuiyx
Copy link

放弃维护了吗这是

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