Remove deprecated use of Assert::isType

Created on 16 June 2025, 28 days ago

Problem/Motivation

๐Ÿ“Œ Deprecate TestDiscovery test file scanning, use PHPUnit API instead Active added some new deprecations to the baseline. These were deprecated in https://github.com/sebastianbergmann/phpunit/issues/6052.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

๐Ÿ“Œ Task
Status

Active

Version

11.0 ๐Ÿ”ฅ

Component

phpunit

Created by

๐Ÿ‡ฆ๐Ÿ‡บAustralia mstrelan

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @mstrelan
  • Merge request !12389Resolve #3530453 "Remove deprecated use" โ†’ (Open) created by mstrelan
  • ๐Ÿ‡ฆ๐Ÿ‡บAustralia mstrelan
  • Pipeline finished with Success
    28 days ago
    Total: 995s
    #523839
  • ๐Ÿ‡ฎ๐Ÿ‡นItaly mondrake ๐Ÿ‡ฎ๐Ÿ‡น

    Iโ€™ve closed ๐Ÿ“Œ Assert::isType() is deprecated Active that is now a duplicate.

    The only question I have here is whether we should wait for PHPUnit 10 support to be removed, or add PHPUnit 10 polyfills for the new methods. PHPUnit 10 lacks them and we might still have someone testing locally core with it ATM.

  • ๐Ÿ‡ฆ๐Ÿ‡บAustralia mstrelan

    Oh I missed that one. A polyfill makes sense, but I wonder if it's worth it for 8 tests. Do we do still do test runs of 11.x with PHPUnit 10 or is it only 11 now? Do we need to keep BC for people running it in other environments?

  • ๐Ÿ‡ฎ๐Ÿ‡นItaly mondrake ๐Ÿ‡ฎ๐Ÿ‡น

    Do we do still do test runs of 11.x with PHPUnit 10 or is it only 11 now?

    Core in GitLabCI is now consistently on PHPUnit 11 (has been so for just a couple of days though, very fresh), but we canโ€™t say for contrib or people running core tests locally or via other CI tools.

  • ๐Ÿ‡ฎ๐Ÿ‡นItaly mondrake ๐Ÿ‡ฎ๐Ÿ‡น
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States smustgrave

    Seems to be just 4 more instances inside ParamConverterManagerTest

  • Pipeline finished with Success
    14 days ago
    #535645
  • ๐Ÿ‡ฆ๐Ÿ‡บAustralia mstrelan

    Updated ParamConverterManagerTest and rebased. Not sure who is best to answer #4.

  • Pipeline finished with Success
    14 days ago
    #535696
  • ๐Ÿ‡ฎ๐Ÿ‡นItaly mondrake ๐Ÿ‡ฎ๐Ÿ‡น

    No more isType calls reported in the baseline. RTBC

    Letโ€™s see what core committers think of #4.

    Now core is set on testing with PHPUnit 11 by default, so not sure itโ€™s worth the effort.

  • ๐Ÿ‡ฎ๐Ÿ‡นItaly mondrake ๐Ÿ‡ฎ๐Ÿ‡น
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States xjm

    Re: #4: It's been suggested that it was incorrect of us to drop support for PHPUnit 10 in 11.2, and that we should re-broaden core's constraint to be ^10 || ^11. We also discussed changing one of the daily or weekly core environments back to testing on PHPUnit 10 for that (because if we don't run the test suite on PHPUnit 10 occasionally then the lower minimum will be a lie). That said, even if we do both those things, I'd still lean toward "no polyfill" given the low number of usages.

Production build 0.71.5 2024