public static function method($since = null, $suggest = '', $subject = 0): void
    {
        if ($subject === null || is_int($subject)) {
            [$subject, $function, $constructor] = static::getCaller($subject ?: 0);
        } else {
            Assert::stringNotEmpty($subject, 'Expected a non-empty string. Got: %s');
            $function = $subject;
            $constructor = false;
        }

        // Shortcut for suggested method
        if ($suggest && preg_match('/\s/', $suggest) === 0) {
            // Append () if it is a method/function (not a class)
            if (! class_exists($suggest)) {
                $suggest .= '()';
            } elseif (! $constructor && method_exists($suggest, $function)) {
                // $suggest is class that has matching method name and is not the constructor
                $suggest .= '::' . $function . '()';
            }
            $suggest = "Use ${suggest} instead.";
        }

        if (! $constructor) {
            $subject .= '()';
        }

        static::warn($subject, $since, $suggest);
    }
public static function method($since = null, $suggest = '', $subject = 0): void
    {
        if ($subject === null || is_int($subject)) {
            [$subject, $function, $constructor] = static::getCaller($subject ?: 0);
        } else {
            Assert::stringNotEmpty($subject, 'Expected a non-empty string. Got: %s');
            $function = $subject;
            $constructor = false;
        }

        // Shortcut for suggested method
        if ($suggest && preg_match('/\s/', $suggest) === 0) {
            // Append () if it is a method/function (not a class)
            if (! class_exists($suggest)) {
                $suggest .= '()';
            } elseif (! $constructor && method_exists($suggest, $function)) {
                // $suggest is class that has matching method name and is not the constructor
                $suggest .= '::' . $function . '()';
            }
            $suggest = "Use ${suggest} instead.";
        }

        if (! $constructor) {
            $subject .= '()';
        }

        static::warn($subject, $since, $suggest);
    }
public static function method ( $ since = null , $ suggest = '' , $ subject = 0 ) : void { if ( $ subject === null || is_int ( $ subject ) ) { [ $ subject , $ function , $ constructor ] = static :: getCaller ( $ subject ? : 0 ) ; } else { Assert :: stringNotEmpty ( $ subject , 'Expected a non-empty string. Got: %s' ) ; $ function = $ subject ; $ constructor = false ; } // Shortcut for suggested method if ( $ suggest && preg_match ( '/\s/' , $ suggest ) === 0 ) { // Append () if it is a method/function (not a class) if ( ! class_exists ( $ suggest ) ) { $ suggest .= '()' ; } elseif ( ! $ constructor && method_exists ( $ suggest , $ function ) ) { // $suggest is class that has matching method name and is not the constructor $ suggest .= '::' . $ function . '()' ; } $ suggest = "Use ${suggest} instead." ; } if ( ! $ constructor ) { $ subject .= '()' ; } static :: warn ( $ subject , $ since , $ suggest ) ; }
Shortcut for triggering a deprecation warning for a method.

Example:
class Foo
{
public function hello() {}

public function world()
{
Deprecated::method(3.3, 'hello');
}
}
Will trigger: "Foo::world() is deprecated since 3.3 and will be removed in 4.0. Use hello() instead."

@param float|null $since   The version it was deprecated in
@param string     $suggest a method or class or suggestion of what to use instead.
If it is a class and the class has a matching method name,
that will be the suggestion
@param string|int $subject The method or class name or the index of the call stack to reference
Shortcut for triggering a deprecation warning for a method .