Git Product home page Git Product logo

Comments (3)

sebastianbergmann avatar sebastianbergmann commented on June 12, 2024

Annotations such as @covers ClassName<extended> are deprecated since PHPUnit 9.0 and support for them will be removed in PHPUnit 10.0.

That being said, they should still work in PHPUnit 9.x.

from code-unit.

sebastianbergmann avatar sebastianbergmann commented on June 12, 2024

The documentation for @covers ClassName<extended> reads:

Specifies that the annotated test method covers all methods of a given class and its parent class(es).

HydratorAwareTrait is a trait, not a class. @covers Laminas\Hydrator\HydratorAwareTrait<extended> makes no sense and is not documented to work.

It is unfortunate that PHPUnit did not complain about this mistake in the past. I may consider a pull request for code-unit (which is the component that parses strings such as @covers ClassName<extended>) that lets PHPUnit accept this pointless annotation again. But I will not invest any time into this myself.

from code-unit.

michalbundyra avatar michalbundyra commented on June 12, 2024

@sebastianbergmann

Sorry, but the same issue we are getting on classes, not on traits:

https://github.com/laminas/laminas-hydrator/blob/d412da192b4ab70e6c80acda8f420f3b26a94793/test/Iterator/HydratingIteratorIteratorTest.php#L20-L23

https://github.com/laminas/laminas-hydrator/blob/d412da192b4ab70e6c80acda8f420f3b26a94793/src/Iterator/HydratingIteratorIterator.php#L22

I can agree with traits, as documentation does not specify that, but ignoring the issue for the classes is ignoring semver and reported BC Break in the library.

from code-unit.

Related Issues (3)

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.