Skip to content

Commit

Permalink
Merge pull request #65 from Elendev/support-composer2.3
Browse files Browse the repository at this point in the history
Add testing for composer 2.3
  • Loading branch information
Elendev authored Apr 5, 2022
2 parents 9739545 + 430274b commit 1ddd2d1
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 16 deletions.
26 changes: 12 additions & 14 deletions .github/workflows/testing-and-cs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2
- name: 'Composer install'
uses: docker://composer:1.9
uses: docker://composer:2.2
with:
args: install
- name: 'Code sniffing'
uses: docker://php:7.4-cli
uses: docker://php:8.1-cli
with:
args: "vendor/bin/php-cs-fixer fix src --dry-run"

Expand All @@ -23,9 +23,9 @@ jobs:
strategy:
fail-fast: false
matrix:
php: [7.2, 7.3, 7.4, 8.0, 8.1]
composer: ["1.10", 2.0, 2.1, 2.2]
symfony: [^4.0, ^5.0]
php: ["7.2", "7.3", "7.4", "8.0", "8.1"]
composer: ["1.10", "2.0", "2.1", "2.2"]
symfony: ["^4.0", "^5.0"]
steps:
- name: Checkout repository
uses: actions/checkout@v2
Expand All @@ -34,19 +34,18 @@ jobs:
with:
php-version: ${{ matrix.php }}
tools: composer:${{ matrix.composer }}
- run: composer install
- run: composer require "symfony/finder:${{ matrix.symfony }}" "symfony/filesystem:${{ matrix.symfony }}"
- run: composer update
- run: composer install
- run: vendor/bin/phpunit tests
PHPUnit-Symfony6:
PHPUnit-Symfony56:
name: PHPUnit testing
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: [8.0, 8.1]
composer: [2.0, 2.1, 2.2]
symfony: [^6.0]
php: ["8.0", "8.1"]
composer: ["2.0", "2.1", "2.2", "2.3"]
symfony: ["^5.4", "^6.0"]
steps:
- name: Checkout repository
uses: actions/checkout@v2
Expand All @@ -55,14 +54,13 @@ jobs:
with:
php-version: ${{ matrix.php }}
tools: composer:${{ matrix.composer }}
- run: composer install
- run: composer require "symfony/finder:${{ matrix.symfony }}" "symfony/filesystem:${{ matrix.symfony }}"
- run: composer update
- run: composer install
- run: vendor/bin/phpunit tests

BuildDone:
name: PHP full build
needs: [PHPCS, PHPUnit-Symfony45, PHPUnit-Symfony6]
needs: [PHPCS, PHPUnit-Symfony45, PHPUnit-Symfony56]
runs-on: ubuntu-latest
steps:
- run: "echo build done"
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.0.2] - 05.04.2022
* Add fixes for return code in execute command #64
* Fix testing with old versions of Symfony and code styling tool

## [1.0.1] - 05.04.2022
* Due to the backward compatibility issues with Composer 2.3, specify in composer.json that it's not yet supported.

Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
"class": "Elendev\\ComposerPush\\Plugin"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.4.0",
"friendsofphp/php-cs-fixer": "^2.18|^3.4.0",
"phpunit/phpunit": "^8 || ^9 || ^10",
"composer/composer": "^1.8 || >=2.0 <2.3"
"composer/composer": "^1.8 || ^2.0"
},
"replace": {
"elendev/nexus-composer-push": "*"
Expand Down
2 changes: 2 additions & 0 deletions src/PushCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,8 @@ protected function execute(InputInterface $input, OutputInterface $output)

$this->getIO()
->write('Archive correctly pushed to the ' . ucfirst($this->configuration->getType()) . ' server');

return 0;
} finally {
$this->getIO()
->write(
Expand Down

0 comments on commit 1ddd2d1

Please sign in to comment.