diff --git a/.github/workflows/bc.yml b/.github/workflows/bc.yml index b269391..53f9079 100644 --- a/.github/workflows/bc.yml +++ b/.github/workflows/bc.yml @@ -1,31 +1,24 @@ +name: backwards compatibility + on: pull_request: - paths-ignore: - - 'docs/**' - - 'README.md' - - 'CHANGELOG.md' - - '.gitignore' - - '.gitattributes' - - 'infection.json.dist' - - 'phpunit.xml.dist' - - 'psalm.xml' + paths: &paths + - '.github/workflows/bc.yml' + - '.roave-backward-compatibility-check.xml' + - 'config/**' + - 'src/**' + - 'composer.json' push: branches: ['master'] - paths-ignore: - - 'docs/**' - - 'README.md' - - 'CHANGELOG.md' - - '.gitignore' - - '.gitattributes' - - 'infection.json.dist' - - 'phpunit.xml.dist' - - 'psalm.xml' - -name: backwards compatibility + paths: *paths permissions: contents: read +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: roave_bc_check: uses: yiisoft/actions/.github/workflows/bc.yml@master @@ -33,4 +26,4 @@ jobs: os: >- ['ubuntu-latest'] php: >- - ['8.1'] + ['8.5'] diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3ba58fe..58112b7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,35 +1,30 @@ +name: build + on: pull_request: - paths-ignore: - - 'docs/**' - - 'README.md' - - 'CHANGELOG.md' - - '.gitignore' - - '.gitattributes' - - 'infection.json.dist' - - 'psalm.xml' - + paths: &paths + - '.github/workflows/build.yml' + - 'config/**' + - 'src/**' + - 'tests/**' + - 'composer.json' + - 'phpunit.xml.dist' push: branches: ['master'] - paths-ignore: - - 'docs/**' - - 'README.md' - - 'CHANGELOG.md' - - '.gitignore' - - '.gitattributes' - - 'infection.json.dist' - - 'psalm.xml' - -name: build + paths: *paths permissions: contents: read +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: phpunit: uses: yiisoft/actions/.github/workflows/phpunit.yml@master secrets: - codecovToken: ${{ secrets.CODECOV_TOKEN }} + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} with: os: >- ['ubuntu-latest', 'windows-latest'] diff --git a/.github/workflows/composer-require-checker.yml b/.github/workflows/composer-require-checker.yml index 1a56fef..eff6bd1 100644 --- a/.github/workflows/composer-require-checker.yml +++ b/.github/workflows/composer-require-checker.yml @@ -1,32 +1,25 @@ +name: Composer require checker + on: pull_request: - paths-ignore: - - 'docs/**' - - 'README.md' - - 'CHANGELOG.md' - - '.gitignore' - - '.gitattributes' - - 'infection.json.dist' - - 'phpunit.xml.dist' - - 'psalm.xml' - + paths: &paths + - '.github/workflows/composer-require-checker.yml' + - 'config/**' + - 'src/**' + - 'tests/**' + - 'composer.json' + - 'composer-require-checker.json' push: branches: ['master'] - paths-ignore: - - 'docs/**' - - 'README.md' - - 'CHANGELOG.md' - - '.gitignore' - - '.gitattributes' - - 'infection.json.dist' - - 'phpunit.xml.dist' - - 'psalm.xml' - -name: Composer require checker + paths: *paths permissions: contents: read +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: composer-require-checker: uses: yiisoft/actions/.github/workflows/composer-require-checker.yml@master diff --git a/.github/workflows/mutation.yml b/.github/workflows/mutation.yml index 4a9d869..0930ee8 100644 --- a/.github/workflows/mutation.yml +++ b/.github/workflows/mutation.yml @@ -1,28 +1,26 @@ +name: mutation test + on: pull_request: - paths-ignore: - - 'docs/**' - - 'README.md' - - 'CHANGELOG.md' - - '.gitignore' - - '.gitattributes' - - 'psalm.xml' - + paths: &paths + - '.github/workflows/mutation.yml' + - 'config/**' + - 'src/**' + - 'tests/**' + - 'composer.json' + - 'infection.json.dist' + - 'phpunit.xml.dist' push: branches: ['master'] - paths-ignore: - - 'docs/**' - - 'README.md' - - 'CHANGELOG.md' - - '.gitignore' - - '.gitattributes' - - 'psalm.xml' - -name: mutation test + paths: *paths permissions: contents: read +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: mutation: uses: yiisoft/actions/.github/workflows/roave-infection.yml@master diff --git a/.github/workflows/rector-cs.yml b/.github/workflows/rector-cs.yml index 6307f29..6fc82e1 100644 --- a/.github/workflows/rector-cs.yml +++ b/.github/workflows/rector-cs.yml @@ -20,6 +20,8 @@ concurrency: jobs: rector: + permissions: + contents: write # Required to push changes from Rector and PHP CS Fixer uses: yiisoft/actions/.github/workflows/rector-cs.yml@master with: php: '8.1' diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index cab5775..c292d03 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -1,30 +1,24 @@ +name: static analysis + on: pull_request: - paths-ignore: - - 'docs/**' - - 'README.md' - - 'CHANGELOG.md' - - '.gitignore' - - '.gitattributes' - - 'infection.json.dist' - - 'phpunit.xml.dist' - + paths: &paths + - '.github/workflows/static.yml' + - 'config/**' + - 'src/**' + - 'composer.json' + - 'psalm.xml' push: branches: ['master'] - paths-ignore: - - 'docs/**' - - 'README.md' - - 'CHANGELOG.md' - - '.gitignore' - - '.gitattributes' - - 'infection.json.dist' - - 'phpunit.xml.dist' - -name: static analysis + paths: *paths permissions: contents: read +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: psalm: uses: yiisoft/actions/.github/workflows/psalm.yml@master @@ -32,4 +26,4 @@ jobs: os: >- ['ubuntu-latest'] php: >- - ['8.1', '8.2', '8.3', '8.4'] + ['8.1', '8.2', '8.3', '8.4', '8.5'] diff --git a/.github/workflows/zizmor.yml b/.github/workflows/zizmor.yml index 430255d..6ff2a77 100644 --- a/.github/workflows/zizmor.yml +++ b/.github/workflows/zizmor.yml @@ -1,21 +1,21 @@ name: GitHub Actions Security Analysis with zizmor 🌈 on: - push: - branches: - - master - - main - paths: - - '.github/**.yml' - - '.github/**.yaml' pull_request: - paths: + paths: &paths - '.github/**.yml' - '.github/**.yaml' + push: + branches: ['master'] + paths: *paths permissions: - actions: read # Required by zizmor when reading workflow metadata through the API. - contents: read # Required to read workflow files. + actions: read # Required by zizmor when reading workflow metadata through the API + contents: read # Required to read workflow files + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true jobs: zizmor: diff --git a/.roave-backward-compatibility-check.xml b/.roave-backward-compatibility-check.xml new file mode 100644 index 0000000..b399121 --- /dev/null +++ b/.roave-backward-compatibility-check.xml @@ -0,0 +1,6 @@ + + + #\[BC\] SKIPPED: Roave\\BetterReflection\\Reflection\\ReflectionClass "Yiisoft\\Yii\\Debug# + + diff --git a/src/Method/HttpBasic.php b/src/Method/HttpBasic.php index 03c4851..52c000d 100644 --- a/src/Method/HttpBasic.php +++ b/src/Method/HttpBasic.php @@ -78,7 +78,7 @@ public function challenge(ResponseInterface $response): ResponseInterface * * If not set, the username information will be considered as an access token * while the password information will be ignored. - * The {@see \Yiisoft\Auth\IdentityWithTokenRepositoryInterface::findIdentityByToken()} + * The {@see IdentityWithTokenRepositoryInterface::findIdentityByToken()} * method will be called to authenticate an identity. */ public function withAuthenticationCallback(callable $authenticationCallback): self diff --git a/src/Method/HttpHeader.php b/src/Method/HttpHeader.php index fde77ca..91f7ea3 100644 --- a/src/Method/HttpHeader.php +++ b/src/Method/HttpHeader.php @@ -17,7 +17,7 @@ * HttpHeader supports HTTP authentication through HTTP Headers. * * The default implementation of HttpHeader uses the - * {@see \Yiisoft\Auth\IdentityWithTokenRepositoryInterface::findIdentityByToken()} + * {@see IdentityWithTokenRepositoryInterface::findIdentityByToken()} * and passes the value of the `X-Api-Key` header. This implementation is used mainly for authenticating API clients. */ class HttpHeader implements AuthenticationMethodInterface