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

Wrong phpdoc return types in several classes #314

Closed
Meyfarth opened this issue Mar 3, 2022 · 1 comment
Closed

Wrong phpdoc return types in several classes #314

Meyfarth opened this issue Mar 3, 2022 · 1 comment

Comments

@Meyfarth
Copy link

Meyfarth commented Mar 3, 2022

General information

  • SDK/Library version: 6.7.0
  • Environment: Sandbox
  • Language, language version, and OS: PHP 8.1

Issue description

After updating to the latest version of braintree_php, our static analysis tool didn't recognize the magic properties anymore (I saw in-between that @property annotations were removed, that would explain it).

I tried to bypass this by calling the __get() method (which is defined in the base class) directly, but then ended up having another error: can't call __get() on unknown class \Braintree\Error

The PHPDoc regarding this return type on few classes are not up to date. I already created a PR with the fix (#313), including each class that had a faulty PHPDoc.

Please feel free to close this when you merge the PR

@hollabaq86
Copy link
Contributor

👋 @Meyfarth thanks for reaching out, going to close this issue so that we can track all type fixes in one pinned issue (#305)

hollabaq86 pushed a commit that referenced this issue Jan 11, 2023
* set to php 7.2 in sdk docker image to get tests running

* Add unit tests for RiskData

* drop RiskDataScore integration check

* update README

* Require PHP >=7.3.0 (#309)

* Update README.md

* Remove AmexExpressCheckout

* Remove deviceSessionID and fraudMerchantID from lib/

* Update CreditCardTest integration

* Remove deviceSessionID and fraudMerchantID from rest of tests

* Remove masterpass (#311)

* Remove MasterpassCard, MasterpassCardDetails, and relevant tests

* Address remaining NEXT_MAJOR_VERSION notes (#314)
* Rename isUsingInstanceProxy to isUsingProxy
* Rename isAuthenticatedInstanceProxy to isAuthenticatedProxy
* Remove TRANSACTION_EXTERNAL_VAULT_CARD_TYPE_IS_INVALID  error code
* Remove snake case parameters

* Rename Android Pay to Google Pay (#310)

* Php 8 support (#308)

* update docker image to php8.0

* bump phpunit to >=9.0

* setUp and teardown must be void compatible

* rename CloseTagTest, fix breaking changes from phpunit7-> 9 in unit tests

* address phpunit deprecation warnings

* make integration tests setUp void compatible

* fix breaking changes in integration tests

* update tests to resolve deprecation warnings

* Don't create phpunit cache file

* correct phpunit semver in composer.json

* add phpunit result cache to gitignore just in case

* update Dockerfile for php8

* Audit sanity language use

* Rename isUsingInstanceProxy to isUsingProxy

* Rename isAuthenticatedInstanceProxy to isAuthenticatedProxy

* Remove TRANSACTION_EXTERNAL_VAULT_CARD_TYPE_IS_INVALID  error code

* better name for test to check we're omitting php closing tags

* fixup deprecated tests from result of merging major update branch

* DateTimeImmutable support (public issue #278) (#316)

* Remove TRANSACTION_EXTERNAL_VAULT_CARD_TYPE_IS_INVALID  error code

* support DateTimeImmutableObjects for date params

* Add `toArray` function to Base and Instance classes (resolves #289?) (#322)

* Final tweaks - Major version 6 (#323)

Co-authored-by: Samantha Cannillo <samantha.cannillo@getbraintree.com>
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

2 participants