Crell,
@Crell@phpc.social avatar

9 says to stop using assertObjectHasAttribute() in favor of assertObjectHasProperty(). But the latter doesn't exist in PHPUnit 9, only in PHPUnit 10.

Am I missing something obvious? Because that's not how deprecation warnings are supposed to work...

sebastian,
@sebastian@phpc.social avatar

@Crell I'll try to get us out of this mess today: https://github.com/sebastianbergmann/phpunit/issues/5478

sephster,
@sephster@fosstodon.org avatar

@sebastian @Crell appreciate this Sebastian. Upgrading a package just now and am hitting this very problem as not quite ready to jump to v10

sebastian,
@sebastian@phpc.social avatar

@Crell The assertion in question was removed without a replacement in PHPUnit 10.0.

PHPUnit 9.6 deprecated the assertion to warn about its removal in PHPUnit 10.0.

The assertion was introduced again, under new name, in PHPUnit 10.1 because users convinced me that it is useful (I never had to use it myself).

If you want to get your test suite deprecation-free with PHPUnit 9.6 then you can use @jrf_nl's polyfill.

stof,
@stof@phpc.social avatar

@sebastian havign a deprecation warning telling to use a method that does not exist is a bad experience though. /cc @Crell @jrf_nl

jrf_nl,
@jrf_nl@phpc.social avatar

@stof I can't change how this got to be as it is, but yes, with the PHPUnit Polyfills, the method is polyfilled, so it will be available in all supported PHPUnit versions and you can switch over without having to exclude select PHPUnit versions.

/cc @sebastian @Crell

joachim,
@joachim@drupal.community avatar

@Crell Yeah... I filed an issue about that problem, and I didn't understand the response from the maintainer: https://github.com/sebastianbergmann/phpunit/issues/5448 Maybe you'll have more luck!

bobmagicii,
@bobmagicii@phpc.social avatar

@joachim @Crell this and another dep warning being "not how you deprecate things" i had hit really fast, as in the night of release, and absolutely nobody appreciated pointing it out.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • php
  • kavyap
  • InstantRegret
  • ethstaker
  • DreamBathrooms
  • mdbf
  • magazineikmin
  • thenastyranch
  • Youngstown
  • tacticalgear
  • slotface
  • Durango
  • khanakhh
  • rosin
  • everett
  • Leos
  • vwfavf
  • normalnudes
  • osvaldo12
  • cubers
  • GTA5RPClips
  • cisconetworking
  • ngwrru68w68
  • anitta
  • provamag3
  • tester
  • modclub
  • megavids
  • JUstTest
  • All magazines