Use get_debug_type for reporting class and primitive type info

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Minor - P4
    • 1.8.0-rc1, 1.8.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      In this comment, andreas.braun pointed out that PHP 8's get_debug_type can be used to replace the following:

      is_object($expected) ? get_class($expected) : gettype($expected); 

      The above code is used throughout the library and its test suite. For earlier versions of PHP, we can rely on symfony/polyfill.

              Assignee:
              Andreas Braun
              Reporter:
              Jeremy Mikola
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: