function.php
29 lines
| 1 | <?php |
| 2 | |
| 3 | namespace Google\Site_Kit_Dependencies; |
| 4 | |
| 5 | /* |
| 6 | * This file is part of the Symfony package. |
| 7 | * |
| 8 | * (c) Fabien Potencier <fabien@symfony.com> |
| 9 | * |
| 10 | * For the full copyright and license information, please view the LICENSE |
| 11 | * file that was distributed with this source code. |
| 12 | */ |
| 13 | if (!\function_exists('Google\Site_Kit_Dependencies\trigger_deprecation')) { |
| 14 | /** |
| 15 | * Triggers a silenced deprecation notice. |
| 16 | * |
| 17 | * @param string $package The name of the Composer package that is triggering the deprecation |
| 18 | * @param string $version The version of the package that introduced the deprecation |
| 19 | * @param string $message The message of the deprecation |
| 20 | * @param mixed ...$args Values to insert in the message using printf() formatting |
| 21 | * |
| 22 | * @author Nicolas Grekas <p@tchwork.com> |
| 23 | */ |
| 24 | function trigger_deprecation(string $package, string $version, string $message, ...$args): void |
| 25 | { |
| 26 | @\trigger_error(($package || $version ? "Since {$package} {$version}: " : '') . ($args ? \vsprintf($message, $args) : $message), \E_USER_DEPRECATED); |
| 27 | } |
| 28 | } |
| 29 |