Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions .github/workflows/bc.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,28 @@
name: backwards compatibility

on:
pull_request:
paths:
paths: &paths
- 'src/**'
- '.github/workflows/bc.yml'
- '.roave-backward-compatibility-check.xml'
- 'composer.json'
push:
branches: ['master']
paths:
- 'src/**'
- '.github/workflows/bc.yml'
- 'composer.json'

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
with:
os: >-
['ubuntu-latest']
php: >-
['8.4']
['8.5']
34 changes: 15 additions & 19 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,24 @@
name: build

on:
pull_request:
paths-ignore:
- 'docs/**'
- 'README.md'
- 'CHANGELOG.md'
- '.gitignore'
- '.gitattributes'
- 'infection.json.dist'
- 'psalm.xml'

paths: &paths
- 'src/**'
- 'tests/**'
- 'phpunit.xml.dist'
- 'composer.json'
- '.github/workflows/build.yml'
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
Expand All @@ -33,3 +27,5 @@ jobs:
['ubuntu-latest', 'windows-latest']
php: >-
['8.1', '8.2', '8.3', '8.4', '8.5']
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
27 changes: 27 additions & 0 deletions .github/workflows/composer-dependency-analyser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: composer dependency analyser

on:
pull_request:
paths: &paths
- 'src/**'
- 'tests/**'
- '.github/workflows/composer-dependency-analyser.yml'
- 'composer.json'
- 'composer-dependency-analyser.php'
push:
branches: ['master']
paths: *paths

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
composer-dependency-analyser:
uses: yiisoft/actions/.github/workflows/composer-dependency-analyser.yml@master
with:
php: >-
['8.1', '8.2', '8.3', '8.4', '8.5']
37 changes: 0 additions & 37 deletions .github/workflows/composer-require-checker.yml

This file was deleted.

4 changes: 4 additions & 0 deletions .github/workflows/zizmor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ permissions:
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:
uses: yiisoft/actions/.github/workflows/zizmor.yml@master
6 changes: 6 additions & 0 deletions .roave-backward-compatibility-check.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<roave-bc-check xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/roave/backward-compatibility-check/Resources/schema.xsd">
<baseline>
<ignored-regex>#An enum expression .* is not supported#</ignored-regex>
</baseline>
</roave-bc-check>
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## 2.0.1 under development

Enh #246: Explicitly import functions and constants in "use" section (@mspirkov)
- Enh #246: Explicitly import functions and constants in "use" section (@mspirkov)

## 2.0.0 December 13, 2025

Expand Down
11 changes: 11 additions & 0 deletions composer-dependency-analyser.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

declare(strict_types=1);

use ShipMonk\ComposerDependencyAnalyser\Config\Configuration;

return (new Configuration())
->disableComposerAutoloadPathScan()
->setFileExtensions(['php'])
->addPathToScan(__DIR__ . '/src', isDev: false)
->addPathToScan(__DIR__ . '/tests', isDev: true);
6 changes: 4 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,12 @@
"yiisoft/arrays": "^3.0"
},
"require-dev": {
"ext-ctype": "*",
"bamarni/composer-bin-plugin": "^1.8.3",
"friendsofphp/php-cs-fixer": "^3.91.3",
"maglnet/composer-require-checker": "^4.7.1",
"phpunit/phpunit": "^10.5.60",
"rector/rector": "^2.2.14",
"shipmonk/composer-dependency-analyser": "^1.8",
"spatie/phpunit-watcher": "^1.24"
},
"autoload": {
Expand Down Expand Up @@ -71,6 +72,7 @@
"test": "phpunit --testdox --no-interaction",
"test-watch": "phpunit-watcher watch",
"cs-fix": "php-cs-fixer fix",
"mutation": "infection --threads=max --min-covered-msi=100"
"mutation": "infection --threads=max --min-covered-msi=100",
"dependency-analyser": "composer-dependency-analyser"
}
}
6 changes: 3 additions & 3 deletions docs/internals.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ use either newest or any specific version of PHP:

## Dependencies

This package uses [composer-require-checker](https://github.com/maglnet/ComposerRequireChecker) to check if all
dependencies are correctly defined in `composer.json`. To run the checker, execute the following command:
Use [Composer Dependency Analyser](https://github.com/shipmonk-rnd/composer-dependency-analyser) to detect unknown,
shadow, and unused [Composer](https://getcomposer.org) dependencies:

```shell
./vendor/bin/composer-require-checker
./vendor/bin/composer-dependency-analyser
```