Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement: Run dependency analysis with maglnet/composer-require-checker #223

Merged
merged 6 commits into from
Apr 28, 2022
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
19 changes: 10 additions & 9 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
/.github/ export-ignore
/.phive/ export-ignore
/tests/ export-ignore
/.editorconfig export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.php-cs-fixer.dist.php export-ignore
/box.json.dist export-ignore
/phpunit.xml.dist export-ignore
/.github/ export-ignore
/.phive/ export-ignore
/tests/ export-ignore
/.editorconfig export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.php-cs-fixer.dist.php export-ignore
/box.json.dist export-ignore
localheinz marked this conversation as resolved.
Show resolved Hide resolved
/composer-require-checker.json export-ignore
/phpunit.xml.dist export-ignore
26 changes: 26 additions & 0 deletions .github/workflows/integrate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,32 @@ jobs:
- name: "Run friendsofphp/php-cs-fixer"
run: ".phive/php-cs-fixer fix --ansi --diff --dry-run --verbose"

dependency-analysis:
name: "Dependency Analysis"

runs-on: "ubuntu-latest"

strategy:
matrix:
php-version:
- "7.4"

steps:
- name: "Checkout"
uses: "actions/checkout@v3"

- name: "Set up PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "${{ matrix.php-version }}"

- name: "Install dependencies with composer"
run: "composer install --ansi --no-progress"

- name: "Run maglnet/composer-require-checker"
run: ".phive/composer-require-checker check --config-file=$(pwd)/composer-require-checker.json"

tests:
name: "Tests"

Expand Down
Binary file added .phive/composer-require-checker
Binary file not shown.
1 change: 1 addition & 0 deletions .phive/phars.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<phive xmlns="https://phar.io/phive">
<phar name="php-cs-fixer" version="^3.8.0" installed="3.8.0" location="./.phive/php-cs-fixer" copy="true"/>
<phar name="composer-require-checker" version="^3.8.0" installed="3.8.0" location="./.phive/composer-require-checker" copy="true"/>
</phive>
20 changes: 20 additions & 0 deletions composer-require-checker.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"symbol-whitelist": [
"array",
"bool",
"callable",
"false",
"float",
"int",
"iterable",
"null",
"object",
"parent",
"self",
"split",
"static",
"string",
"true",
"void"
]
}
4 changes: 4 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
],
"require": {
"php": "^7.4 || ^8.0",
"ext-ctype": "*",
"ext-json": "*",
"ext-mbstring": "*",
"ext-simplexml": "*",
"symfony/console": "^4.4 || ^5.3 || ^6.0",
"symfony/filesystem": "^4.4 || ^5.3 || ^6.0",
"symfony/finder": "^4.4 || ^5.3 || ^6.0"
Expand Down