Deprecated.php 836 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. if (\PHP_VERSION_ID < 80100) {
  11. #[Attribute(Attribute::TARGET_METHOD | Attribute::TARGET_FUNCTION | Attribute::TARGET_CLASS_CONSTANT)]
  12. final class Deprecated
  13. {
  14. /**
  15. * @readonly
  16. */
  17. public ?string $message;
  18. /**
  19. * @readonly
  20. */
  21. public ?string $since;
  22. public function __construct(?string $message = null, ?string $since = null)
  23. {
  24. $this->message = $message;
  25. $this->since = $since;
  26. }
  27. }
  28. } elseif (\PHP_VERSION_ID < 80400) {
  29. require dirname(__DIR__).'/Deprecated.php';
  30. }