fix-pdo-constant.php 352 B

1234567891011121314151617
  1. <?php
  2. if (PHP_VERSION_ID < 80500) {
  3. exit(0);
  4. }
  5. $file = __DIR__.'/../vendor/laravel/framework/config/database.php';
  6. if (! file_exists($file)) {
  7. exit(0);
  8. }
  9. file_put_contents($file, str_replace(
  10. 'PDO::MYSQL_ATTR_SSL_CA',
  11. '(PHP_VERSION_ID >= 80500 ? Pdo\\Mysql::ATTR_SSL_CA : PDO::MYSQL_ATTR_SSL_CA)',
  12. file_get_contents($file),
  13. ));