SystemRequirements.php 1.4 KB

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. namespace Drupal\system;
  3. @trigger_error(__NAMESPACE__ . '\SystemRequirements is deprecated in Drupal 8.8.0 and will be removed before Drupal 9.0.0. All supported PHP versions support disabling multi-statement queries in MySQL. See https://www.drupal.org/node/3054692', E_USER_DEPRECATED);
  4. /**
  5. * Class for helper methods used for the system requirements.
  6. */
  7. class SystemRequirements {
  8. /**
  9. * Determines whether the passed in PHP version disallows multiple statements.
  10. *
  11. * @param string $phpversion
  12. *
  13. * @return bool
  14. *
  15. * @deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. All
  16. * supported PHP versions support disabling multi-statement queries in
  17. * MySQL.
  18. *
  19. * @see https://www.drupal.org/node/3054692
  20. */
  21. public static function phpVersionWithPdoDisallowMultipleStatements($phpversion) {
  22. @trigger_error(__NAMESPACE__ . '\SystemRequirements::phpVersionWithPdoDisallowMultipleStatements() is deprecated in Drupal 8.8.0 and will be removed before Drupal 9.0.0. All supported PHP versions support disabling multi-statement queries in MySQL. See https://www.drupal.org/node/3054692', E_USER_DEPRECATED);
  23. // PDO::MYSQL_ATTR_MULTI_STATEMENTS was introduced in PHP versions 5.5.21
  24. // and 5.6.5.
  25. return (version_compare($phpversion, '5.5.21', '>=') && version_compare($phpversion, '5.6.0', '<'))
  26. || version_compare($phpversion, '5.6.5', '>=');
  27. }
  28. }