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

Fix compatible with php 8.2 #7

Closed

Conversation

dimanovoseltsev
Copy link

Error occurs when using php 8.2
Creation of dynamic property MailchimpTransactional\Api\AllowlistsApi::$config is deprecated.

@ch-tm
Copy link

ch-tm commented Mar 2, 2023

Cool, I need it too!

@TomMalbran
Copy link

TomMalbran commented Apr 3, 2023

Me too. Please merge this pull request.

By the way, there are still some errors in lib/Configuration.php

@iukky
Copy link

iukky commented Apr 24, 2023

@Moishe Could you merge this pull request?

@michelaerts
Copy link

michelaerts commented Apr 25, 2023

Me too. Please merge this pull request.

By the way, there are still some errors in lib/Configuration.php

Looks like you can not make them protected. They need to be public.

@Moishe
Copy link
Contributor

Moishe commented Apr 25, 2023

Hi there! As noted in this project's README, this is an autogenerated project. PRs should be sent to https://github.com/mailchimp/mailchimp-client-lib-codegen

I don't work at Mailchimp anymore so unfortunately can't merge any PRs to any projects. However I'll ping some folks who are still there to give them a heads-up that there might be a PR coming on the codegen project.

@att1sb
Copy link

att1sb commented May 13, 2023

The methods need to be made public, starting from allowlists to whitelists... would be grand to have that updated and merged.

@Moishe
Copy link
Contributor

Moishe commented May 13, 2023

As I said, I don't think anyone from Mailchimp is monitoring this thread (or this repo). You might have better luck over on the repo I linked to above.

@ch
Copy link

ch commented May 15, 2023

I made new pull request
mailchimp/mailchimp-client-lib-codegen#328
please vote for it

@michelaerts
Copy link

I made new pull request mailchimp/mailchimp-client-lib-codegen#328 please vote for it

Tnx for the pull-request. The properties need to public, not protected. Protected throws an error.

@ch
Copy link

ch commented May 15, 2023

I made new pull request mailchimp/mailchimp-client-lib-codegen#328 please vote for it

Tnx for the pull-request. The properties need to public, not protected. Protected throws an error.

show me error.
in my project all good.

@michelaerts
Copy link

michelaerts commented May 15, 2023

I made new pull request mailchimp/mailchimp-client-lib-codegen#328 please vote for it

Tnx for the pull-request. The properties need to public, not protected. Protected throws an error.

show me error. in my project all good.

class My_Class implements My_Interface {
    public function my_method() {
        $mailchimp = new MailchimpTransactional\ApiClient();
        $mailchimp->setApiKey('YOUR_API_KEY');

        $response = $mailchimp->users->ping();
    }
}

This generates following error:
PHP Fatal error: Uncaught Error: Cannot access protected property MailchimpTransactional\ApiClient::$users

@ch
Copy link

ch commented May 15, 2023

I made new pull request mailchimp/mailchimp-client-lib-codegen#328 please vote for it

Tnx for the pull-request. The properties need to public, not protected. Protected throws an error.

show me error. in my project all good.

class My_Class implements My_Interface {
    public function my_method() {
        $mailchimp = new MailchimpTransactional\ApiClient();
        $mailchimp->setApiKey('YOUR_API_KEY');

        $response = $mailchimp->users->ping();
    }
}

This generates following error: PHP Fatal error: Uncaught Error: Cannot access protected property MailchimpTransactional\ApiClient::$users

made in mailchimp/mailchimp-client-lib-codegen#328

Copy link

@necmettin necmettin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I can tell, renaming $Configuration to $config is pure personal preference and totally unnecessary. What's the reason for this change?

@otis22
Copy link

otis22 commented Oct 5, 2023

I've made my own fork with php8 support. I can't wait. For fix:

composer rm mailchimp/transactional
composer require otis22/transactional

@pepijnolivier
Copy link

Should be fixed according to #8 (comment)

@webkod3r
Copy link

Closing as this has been fix already
see mailchimp/mailchimp-client-lib-codegen#348

Please upgrade to the most recent version, thanks

@webkod3r webkod3r closed this Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet