From 69b374d982e7139fc904cc61757e7fede1d9c3d8 Mon Sep 17 00:00:00 2001 From: Demin Yin Date: Fri, 8 Dec 2023 09:56:23 -0800 Subject: [PATCH] run phplint on PHP 8.3, along with other CI updates Signed-off-by: Demin Yin --- .github/workflows/coding_style_checks.yml | 4 ++-- .github/workflows/syntax_checks.yml | 6 +++--- .gitignore | 1 + .php-cs-fixer.dist.php | 1 + 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/coding_style_checks.yml b/.github/workflows/coding_style_checks.yml index 853bf611..bf8cd60a 100644 --- a/.github/workflows/coding_style_checks.yml +++ b/.github/workflows/coding_style_checks.yml @@ -8,7 +8,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Run Coding Style Checks - run: docker run --rm -v "$(pwd):/project" -w /project -i jakzal/phpqa:php8.2 php-cs-fixer fix --dry-run + run: docker run -q --rm -v "$(pwd):/project" -w /project -i jakzal/phpqa:php8.2 php-cs-fixer fix --dry-run diff --git a/.github/workflows/syntax_checks.yml b/.github/workflows/syntax_checks.yml index 160e20ac..586370b3 100644 --- a/.github/workflows/syntax_checks.yml +++ b/.github/workflows/syntax_checks.yml @@ -8,14 +8,14 @@ jobs: strategy: fail-fast: true matrix: - php: ["8.0", "8.1", "8.2"] + php: ["8.0", "8.1", "8.2", "8.3"] name: Syntax Checks Under PHP ${{ matrix.php }} steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Run Syntax Checks run: | - docker run --rm -v "$(pwd):/project" -w /project -i jakzal/phpqa:php${{ matrix.php }} phplint src + docker run -q --rm -v "$(pwd):/project" -w /project -i jakzal/phpqa:php${{ matrix.php }} phplint src diff --git a/.gitignore b/.gitignore index 6765ea36..87fe088c 100644 --- a/.gitignore +++ b/.gitignore @@ -13,6 +13,7 @@ .DS_Store # Ignore files created by GitLab Actions +/.phplint.cache /.phplint-cache # Ignore Composer files diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index 87bbf0a4..6fa7fa66 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -44,6 +44,7 @@ 'phpdoc_summary' => false, 'ordered_class_elements' => true, 'ordered_imports' => ['imports_order' => ['class', 'function', 'const'], 'sort_algorithm' => 'alpha'], + 'ordered_types' => ['null_adjustment' => 'always_last', 'sort_algorithm' => 'none'], 'single_line_comment_style' => ['comment_types' => []], 'single_line_comment_spacing' => false, 'single_line_empty_body' => false,