Giter VIP home page Giter VIP logo

Comments (3)

LordPachelbel avatar LordPachelbel commented on June 11, 2024 2

These deprecation notices were annoying enough that I forked and patched the code on our servers with the #[\ReturnTypeWillChange] attribute, but it should be fixed for everyone.

I can't submit a pull request for this, apparently, as per the project guidelines:

Part of the SDK is auto-generated based on the XML schema. Due to this auto-generation, we cannot merge contributions for request or response classes. You are welcome to open an issue to report problems or suggest improvements. Auto-generated classes include all files inside contract/v1 and controller folders, except controller/base.

Temporary fixes:

  • There are 175 jsonSerialize() method signatures, so if you want to patch your own fork, here's a regex to fix them all quickly:

    • Find: \n(\s+)(.+)function jsonSerialize
    • Replace: \n$1#[\\ReturnTypeWillChange]\n$1$2function jsonSerialize
  • Or you can use our fork by updating composer.json:

    "require": {
      ...
      "authorizenet/authorizenet": "dev-php8_1-jsonSerialize-deprecation-fix#b53902ebcd7d095cf5271da69db02d823ddc23d3",
      ...
    },
    ...
    "repositories": [
      {
        "type": "vcs",
        "url": "https://github.com/BrownBoots/authorizenet-sdk-php.git"
      }
    ]
    

from sdk-php.

LordPachelbel avatar LordPachelbel commented on June 11, 2024 2

@Zelfapp To be clear, my fork only suppresses the messages. The AuthorizeNet team might want to instead change the return type to mixed for all of the functions. It depends on how they're going to handle compatibility — that return type didn't exist before PHP 8.0 — i.e. whether they're going to maintain a separate PHP branch, or if they're going to continue with one release branch for all PHP versions.

from sdk-php.

Zelfapp avatar Zelfapp commented on June 11, 2024

@LordPachelbel thank you for fork. PR's seem to be stuck for PHP 8.1 issues. Anet team, please get these PHP 8.1 updates pulled in.

from sdk-php.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.