Make WordPress Core


Ignore:
Timestamp:
11/01/2019 12:39:04 AM (5 years ago)
Author:
SergeyBiryukov
Message:

Code Modernization: Pass an appropriate error level to trigger_error() in _doing_it_wrong() and related functions:

  • _deprecated_function()
  • _deprecated_argument()
  • _deprecated_constructor()
  • _deprecated_file()

The error level passed is E_USER_DEPRECATED for the deprecated function group and E_USER_NOTICE for _doing_it_wrong().

Props jrf.
Fixes #36561.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/includes/phpunit6/compat.php

    r46586 r46625  
    66    class_alias( 'PHPUnit\Framework\Exception', 'PHPUnit_Framework_Exception' );
    77    class_alias( 'PHPUnit\Framework\ExpectationFailedException', 'PHPUnit_Framework_ExpectationFailedException' );
     8    class_alias( 'PHPUnit\Framework\Error\Deprecated', 'PHPUnit_Framework_Error_Deprecated' );
    89    class_alias( 'PHPUnit\Framework\Error\Notice', 'PHPUnit_Framework_Error_Notice' );
    910    class_alias( 'PHPUnit\Framework\Error\Warning', 'PHPUnit_Framework_Error_Warning' );
Note: See TracChangeset for help on using the changeset viewer.