Giter Site home page Giter Site logo

Comments (5)

remicollet avatar remicollet commented on June 3, 2024

@sebastianbergmann FYI

from php-mock-phpunit.

sebastianbergmann avatar sebastianbergmann commented on June 3, 2024

That is why one should not depend on private implementation details.

from php-mock-phpunit.

chrisminett avatar chrisminett commented on June 3, 2024

My first thought was that this might be similar to when this project failed to work against the minor update to PHPUnit 6.5 sebastianbergmann/phpunit-mock-objects#390 . In that case however, the underlying phpunit-mock-objects had a major version increase to v5.0.0 and the fix was not so simple: #20

This time a public method on the MockObject interface has changed its signature in a minor version of PHPUnit, which does seem like a BC break as any implementation of this method will no longer be compatible.

Fortunately updating the method signature in this project will work with PHPUnit 7.3 and 7.4 as the extra parameter in the implementation does not affect compatibility with the lack of the parameter in PHPUnit 7.3:

interface A {
    public function foo();
}
class B {
    public function foo(bool $newParam = true) {
        echo 'bar';
    }
}
(new B())->foo();

from php-mock-phpunit.

michalbundyra avatar michalbundyra commented on June 3, 2024

Fixed in #30 and released in version 2.1.2.

from php-mock-phpunit.

remicollet avatar remicollet commented on June 3, 2024

I confirm the fix is ok.
Thanks for the quick fix.

from php-mock-phpunit.

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.