diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7a867533d8..c6f850ad53 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -20,7 +20,7 @@ jobs: fail-fast: false matrix: operating-system: [ ubuntu-18.04 ] - php: [ '5.4', '5.5', '5.6', '7.1', '7.2', '7.3', '7.4', '8.0' ] + php: [ '5.4', '5.5', '5.6', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1' ] db: [ mysql, pgsql ] include: - db: mysql @@ -33,6 +33,7 @@ jobs: dbuser: 'postgres' dbpass: 'password' dbname: 'eccube_db' + services: mysql: image: mysql:5.7 diff --git a/.github/workflows/phpstan.yml b/.github/workflows/phpstan.yml index e94b56e888..ec8e8b909a 100644 --- a/.github/workflows/phpstan.yml +++ b/.github/workflows/phpstan.yml @@ -35,7 +35,7 @@ jobs: - name: Setup PHP uses: nanasess/setup-php@master with: - php-version: '8.0' + php-version: '8.1' - name: composer install env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # 暫定対応 diff --git a/data/class/SC_Initial.php b/data/class/SC_Initial.php index 83c5aa204e..f4de21a1f4 100644 --- a/data/class/SC_Initial.php +++ b/data/class/SC_Initial.php @@ -147,7 +147,9 @@ public function phpconfigInit() ini_set('mbstring.http_input', CHAR_CODE); ini_set('mbstring.http_output', CHAR_CODE); } - ini_set('auto_detect_line_endings', 1); + if (PHP_VERSION_ID < 80100) { + ini_set('auto_detect_line_endings', 1); + } ini_set('default_charset', CHAR_CODE); ini_set('mbstring.detect_order', 'auto'); ini_set('mbstring.substitute_character', 'none'); diff --git a/data/class/helper/SC_Helper_CSV.php b/data/class/helper/SC_Helper_CSV.php index a7742414b1..7a2d0a7c77 100644 --- a/data/class/helper/SC_Helper_CSV.php +++ b/data/class/helper/SC_Helper_CSV.php @@ -386,7 +386,8 @@ public static function &fopen_for_output_csv($filename = 'php://output') */ class php_user_filter_lf2crlf extends php_user_filter { - function filter($in, $out, &$consumed, $closing) + #[\ReturnTypeWillChange] + public function filter($in, $out, &$consumed, $closing) { while ($bucket = stream_bucket_make_writeable($in)) { $bucket->data = preg_replace("/[\r\n]+$/", "\r\n", $bucket->data);