Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Deprecation warnings with PHP 8.1 #40

Closed
ekvedaras opened this issue Dec 16, 2021 · 5 comments
Closed

Deprecation warnings with PHP 8.1 #40

ekvedaras opened this issue Dec 16, 2021 · 5 comments
Assignees

Comments

@ekvedaras
Copy link

ekvedaras commented Dec 16, 2021

Deprecated: Return type of ChargeBee_ListResult::rewind() should either be compatible with Iterator::rewind(): void,
or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
Deprecated: Return type of ChargeBee_ListResult::offsetExists($k) should either be compatible with
ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily
suppress the notice
Deprecated: Return type of ChargeBee_ListResult::offsetGet($k) should either be compatible with
ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily
suppress the notice
Deprecated: Return type of ChargeBee_ListResult::offsetSet($k, $v) should either be compatible with
ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to
temporarily suppress the notice
Deprecated: Return type of ChargeBee_ListResult::offsetUnset($k) should either be compatible with
ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily
suppress the notice
Deprecated: Return type of ChargeBee_ListResult::current() should either be compatible with Iterator::current(): mixed, or
the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
Deprecated: Return type of ChargeBee_ListResult::next() should either be compatible with Iterator::next(): void, or the 
[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
Deprecated: Return type of ChargeBee_ListResult::key() should either be compatible with Iterator::key(): mixed, or the 
[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
Deprecated: Return type of ChargeBee_ListResult::valid() should either be compatible with Iterator::valid(): bool, or the 
[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
Deprecated: Return type of ChargeBee_ListResult::rewind() should either be compatible with Iterator::rewind(): void, or the 
[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

PHP version: 8.1
Package version: 2.8.3

@ekvedaras
Copy link
Author

If I were to submit a PR to fix this, to which branch should it be targeted? I don't see v2 branch here 🤔

@scr4bble
Copy link

scr4bble commented Jan 19, 2022

Any update on this please? :)
Could maintainers advise where to target the pull request?

One more deprecated warning:

PHP Deprecated:  Return type of ChargeBee\ChargeBee\ListResult::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /paxflow/vendor/chargebee/chargebee-php/lib/ChargeBee/ListResult.php on line 39

@JeroenDeDauw
Copy link

My company is currently attempting to use ChargeBee. Perhaps we can't, if issues like this do not get fixed in a timely manner.

@cb-yateshmathuria
Copy link
Contributor

@ekvedaras & @scr4bble - As per README.md Chargebee supports two API versions - V1 and V2, of which V2 is the latest release. master branch is for API version V2 and chargebee-v1 branch is for V1. If you are using 2.x version of this library then we request you to upgrade to 3.x version. Please see this Legacy Support section.

So you can target the master branch for PR. Just curious if you will use #[\ReturnTypeWillChange] in the PR? We will be happy to see your PR if this is not the case :)

@JeroenDeDauw - we are working on it and will release it asap.

@cb-yateshmathuria cb-yateshmathuria self-assigned this Mar 29, 2022
@cb-yateshmathuria
Copy link
Contributor

This is fixed in the v3.5.1. If you are using older version then we request you to upgrade to the latest version.

We will be publishing migration document for v3 soon so that it will help you to migrate to 3.x from 2.x versions.

Closing this issue. Feel free to reopen it if you think it is not fixed.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants