Skip to content

Commit

Permalink
Remove support for Composer 1.x
Browse files Browse the repository at this point in the history
  • Loading branch information
cs278 committed Feb 18, 2025
1 parent 8bfc909 commit 8e6daee
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 176 deletions.
33 changes: 0 additions & 33 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,36 +61,3 @@ jobs:
echo "::group::Tests (w/ phar composer/composer)"
COMPOSER_AUDIT_TEST_COMPOSER_BINARY=$(which composer) vendor/bin/simple-phpunit --verbose
echo "::endgroup::"
# Verifies that the plugin entry point still parses on PHP 5.3, users of 5.3
# cannot use this Composer plugin but at least it won't break their Composer.
legacy:
runs-on: ubuntu-latest
name: PHP 5.3
steps:
- uses: actions/checkout@v2
- uses: shivammathur/setup-php@d30ad8b1843ace22e6698ab99bbafaa747b6bd0d
with:
php-version: 5.3
tools: composer:2.2
coverage: none
- name: Syntax check
run: |
while read file; do
php -l "$file"
done < <(find src/Legacy -type f -name "*.php")
- name: Integration test
run: |
composer global config allow-plugins.cs278/composer-audit true
composer global config repositories.0 path "$(pwd)"
composer global require --ignore-platform-reqs symfony/yaml '~4.4'
composer global require --ignore-platform-reqs cs278/composer-audit '*@dev'
set +e
composer global audit -vvv
result=$?
set -e
if [ $result -ne 2 ]; then
echo "Expected audit command to exit with error code 2, got: ${result}" >&2
exit 1
fi
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
],
"minimum-stability": "stable",
"require": {
"php": ">= 7.1",
"composer-plugin-api": "^1.1 || ^2",
"php": ">= 7.2",
"composer-plugin-api": "^2",
"symfony/yaml": "^4.4 || ^5 || ^6 || ^7"
},
"require-dev": {
Expand All @@ -35,6 +35,6 @@
"sort-packages": true
},
"extra": {
"class": "Cs278\\ComposerAudit\\Legacy\\ComposerPlugin"
"class": "Cs278\\ComposerAudit\\ComposerPlugin"
}
}
29 changes: 0 additions & 29 deletions src/AdvisoriesInstallerV1.php

This file was deleted.

47 changes: 0 additions & 47 deletions src/Legacy/AuditNotCompatibleCommand.php

This file was deleted.

18 changes: 0 additions & 18 deletions src/Legacy/CommandProvider.php

This file was deleted.

44 changes: 0 additions & 44 deletions src/Legacy/ComposerPlugin.php

This file was deleted.

2 changes: 0 additions & 2 deletions src/Legacy/README

This file was deleted.

0 comments on commit 8e6daee

Please sign in to comment.