mailchimp-transactional-php icon indicating copy to clipboard operation
mailchimp-transactional-php copied to clipboard

Fix compatible with php 8.2

Open dimanovoseltsev opened this issue 2 years ago • 13 comments

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

dimanovoseltsev avatar Mar 02 '23 14:03 dimanovoseltsev

Cool, I need it too!

ch-tm avatar Mar 02 '23 14:03 ch-tm

Me too. Please merge this pull request.

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

TomMalbran avatar Apr 03 '23 15:04 TomMalbran

@Moishe Could you merge this pull request?

iukky avatar Apr 24 '23 08:04 iukky

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.

michelaerts avatar Apr 25 '23 10:04 michelaerts

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.

Moishe avatar Apr 25 '23 12:04 Moishe

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

att1sb avatar May 13 '23 12:05 att1sb

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.

Moishe avatar May 13 '23 13:05 Moishe

I made new pull request https://github.com/mailchimp/mailchimp-client-lib-codegen/pull/328/ please vote for it

ch avatar May 15 '23 06:05 ch

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.

michelaerts avatar May 15 '23 09:05 michelaerts

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.

ch avatar May 15 '23 10:05 ch

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

michelaerts avatar May 15 '23 11:05 michelaerts

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 https://github.com/mailchimp/mailchimp-client-lib-codegen/pull/328

ch avatar May 15 '23 12:05 ch

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

composer rm mailchimp/transactional
composer require otis22/transactional

otis22 avatar Oct 05 '23 08:10 otis22

Should be fixed according to https://github.com/mailchimp/mailchimp-transactional-php/pull/8#issuecomment-2049366041

pepijnolivier avatar Jul 18 '24 08:07 pepijnolivier

Closing as this has been fix already see https://github.com/mailchimp/mailchimp-client-lib-codegen/pull/348

Please upgrade to the most recent version, thanks

webkod3r avatar Jul 22 '24 16:07 webkod3r