diff --git a/.github/workflows/integrationtest.yml b/.github/workflows/integrationtest.yml index 1f55a3b3..e82d4e48 100644 --- a/.github/workflows/integrationtest.yml +++ b/.github/workflows/integrationtest.yml @@ -10,6 +10,12 @@ on: # Allow manually triggering the workflow. workflow_dispatch: +# Cancels all previous workflow runs for the same branch that have not yet completed. +concurrency: + # The concurrency group contains the workflow name and the branch name. + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: test: runs-on: ubuntu-latest @@ -145,21 +151,21 @@ jobs: uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php }} - ini-values: error_reporting=E_ALL, display_errors=On + ini-values: error_reporting=-1, display_errors=On coverage: none - name: 'Composer: set PHPCS version for tests' - run: composer require --no-update --no-scripts squizlabs/php_codesniffer:"${{ matrix.phpcs_version }}" + run: composer require --no-update --no-scripts squizlabs/php_codesniffer:"${{ matrix.phpcs_version }}" --no-interaction # Install PHPCompatibility 7.x/8.x for PHPCS < 2.3. - name: 'Composer: set PHPCompatibility version for tests (PHPCS < 2.3)' if: ${{ matrix.phpcompat != 'composer' }} - run: composer require --dev --no-update --no-scripts phpcompatibility/php-compatibility:"${{ matrix.phpcompat }}" + run: composer require --dev --no-update --no-scripts phpcompatibility/php-compatibility:"${{ matrix.phpcompat }}" --no-interaction # Install dependencies and handle caching in one go. # @link https://github.com/marketplace/actions/install-composer-dependencies - name: 'Install Composer dependencies' - uses: "ramsey/composer-install@v1" + uses: "ramsey/composer-install@v2" with: composer-options: --no-scripts --optimize-autoloader diff --git a/.github/workflows/linting.yaml b/.github/workflows/linting.yaml index 2f5c3fda..ab6595e3 100644 --- a/.github/workflows/linting.yaml +++ b/.github/workflows/linting.yaml @@ -7,11 +7,17 @@ on: - pull_request - workflow_dispatch +# Cancels all previous workflow runs for the same branch that have not yet completed. +concurrency: + # The concurrency group contains the workflow name and the branch name. + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: validate-composer: runs-on: ubuntu-18.04 steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - name: Validate composer.json and composer.lock uses: "docker://composer" with: @@ -20,7 +26,7 @@ jobs: lint-json: runs-on: ubuntu-18.04 steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - name: Lint json uses: "docker://pipelinecomponents/jsonlint:latest" with: @@ -29,20 +35,20 @@ jobs: yamllint: runs-on: ubuntu-18.04 steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - name: Check yaml for issues uses: pipeline-components/yamllint@master php-codesniffer: runs-on: ubuntu-18.04 steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - name: Check php for code style and php cross-version compatibility issues uses: pipeline-components/php-codesniffer@master lint-remark: runs-on: ubuntu-18.04 steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - name: Check markdown uses: pipeline-components/remark-lint@master diff --git a/.github/workflows/phplint.yml b/.github/workflows/phplint.yml index 12c8f850..3f2d6642 100644 --- a/.github/workflows/phplint.yml +++ b/.github/workflows/phplint.yml @@ -8,6 +8,12 @@ on: # Allow manually triggering the workflow. - workflow_dispatch +# Cancels all previous workflow runs for the same branch that have not yet completed. +concurrency: + # The concurrency group contains the workflow name and the branch name. + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: phplint: runs-on: ubuntu-latest @@ -32,7 +38,7 @@ jobs: # Install dependencies and handle caching in one go. # @link https://github.com/marketplace/actions/install-composer-dependencies - name: Install Composer dependencies - uses: "ramsey/composer-install@v1" + uses: "ramsey/composer-install@v2" - name: Lint against parse errors run: composer lint -- --checkstyle | cs2pr diff --git a/.github/workflows/quicktest.yml b/.github/workflows/quicktest.yml index f6155942..c27e5592 100644 --- a/.github/workflows/quicktest.yml +++ b/.github/workflows/quicktest.yml @@ -9,6 +9,12 @@ on: # Allow manually triggering the workflow. workflow_dispatch: +# Cancels all previous workflow runs for the same branch that have not yet completed. +concurrency: + # The concurrency group contains the workflow name and the branch name. + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: #### QUICK TEST STAGE #### # This is a much quicker test which only runs the integration tests against a limited set of @@ -45,21 +51,21 @@ jobs: uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php }} - ini-values: error_reporting=E_ALL, display_errors=On + ini-values: error_reporting=-1, display_errors=On coverage: none - name: 'Composer: set PHPCS version for tests' - run: composer require --no-update --no-scripts squizlabs/php_codesniffer:"${{ matrix.phpcs_version }}" + run: composer require --no-update --no-scripts squizlabs/php_codesniffer:"${{ matrix.phpcs_version }}" --no-interaction # Install PHPCompatibility 7.x/8.x for PHPCS < 2.3. - name: 'Composer: set PHPCompatibility version for tests (PHPCS < 2.3)' if: ${{ matrix.phpcompat != 'composer' }} - run: composer require --dev --no-update --no-scripts phpcompatibility/php-compatibility:"${{ matrix.phpcompat }}" + run: composer require --dev --no-update --no-scripts phpcompatibility/php-compatibility:"${{ matrix.phpcompat }}" --no-interaction # Install dependencies and handle caching in one go. # @link https://github.com/marketplace/actions/install-composer-dependencies - name: 'Install Composer dependencies' - uses: "ramsey/composer-install@v1" + uses: "ramsey/composer-install@v2" with: composer-options: --no-scripts --optimize-autoloader diff --git a/.github/workflows/securitycheck.yml b/.github/workflows/securitycheck.yml index 3800428e..79a56e3e 100644 --- a/.github/workflows/securitycheck.yml +++ b/.github/workflows/securitycheck.yml @@ -8,6 +8,12 @@ on: # Allow manually triggering the workflow. - workflow_dispatch +# Cancels all previous workflow runs for the same branch that have not yet completed. +concurrency: + # The concurrency group contains the workflow name and the branch name. + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: security-check: runs-on: ubuntu-latest @@ -30,13 +36,13 @@ jobs: # Install dependencies and handle caching in one go. # @link https://github.com/marketplace/actions/install-composer-dependencies - name: Install Composer dependencies - uses: "ramsey/composer-install@v1" + uses: "ramsey/composer-install@v2" - name: Download security checker - run: wget -P . https://github.com/fabpot/local-php-security-checker/releases/download/v1.0.0/local-php-security-checker_1.0.0_linux_amd64 + run: wget -P . https://github.com/fabpot/local-php-security-checker/releases/download/v1.2.0/local-php-security-checker_1.2.0_linux_amd64 - name: Make security checker executable - run: chmod +x ./local-php-security-checker_1.0.0_linux_amd64 + run: chmod +x ./local-php-security-checker_1.2.0_linux_amd64 - name: Check against insecure dependencies - run: ./local-php-security-checker_1.0.0_linux_amd64 --path=composer.lock + run: ./local-php-security-checker_1.2.0_linux_amd64 --path=composer.lock diff --git a/src/Plugin.php b/src/Plugin.php index 93ea7290..5ae09d03 100644 --- a/src/Plugin.php +++ b/src/Plugin.php @@ -34,7 +34,6 @@ */ class Plugin implements PluginInterface, EventSubscriberInterface { - const KEY_MAX_DEPTH = 'phpcodesniffer-search-depth'; const MESSAGE_ERROR_WRONG_MAX_DEPTH =