Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from CPS-IT/feature/php7.4-compatibility
[FEATURE] Compatibility with PHP 7.3+ and Composer 2.0
- Loading branch information
Showing
21 changed files
with
361 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: Tests | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
tests: | ||
name: PHP ${{ matrix.php-version }} & Composer ${{ matrix.composer-version }} | ||
|
||
runs-on: ubuntu-18.04 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php-version: [8.0, 7.4, 7.3, 7.2, 7.1] | ||
composer-version: [2, 1] | ||
include: | ||
- php-version: 8.0 | ||
composer-version: 2 | ||
coverage: 1 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
# Prepare environment | ||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-version }} | ||
tools: composer:v${{ matrix.composer-version }} | ||
coverage: xdebug | ||
|
||
# Define Composer cache | ||
- name: Define Composer cache | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.composer/cache | ||
key: tests-php-${{ matrix.php-version }}-composer-${{ matrix.composer-version }} | ||
restore-keys: tests-php-${{ matrix.php-version }}-composer- | ||
|
||
# Install Composer dependencies | ||
- name: Install Composer dependencies | ||
run: composer require --dev composer/composer:"^${{ matrix.composer-version }}" --no-progress | ||
|
||
# Run tests | ||
- name: Run tests | ||
run: composer test -- --coverage-text | ||
|
||
# Report coverage | ||
- name: Fix coverage path | ||
working-directory: .build/log/coverage | ||
run: sed -i 's/\/home\/runner\/work\/auditor\/auditor\//\/github\/workspace\//g' clover.xml | ||
if: ${{ matrix.coverage }} | ||
- name: Run SonarCloud scan | ||
uses: sonarsource/sonarcloud-github-action@master | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
if: ${{ matrix.coverage }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
composer.phar | ||
/vendor/ | ||
.build/ | ||
.phpunit.result.cache | ||
|
||
# Commit your application's lock file https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control | ||
# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file | ||
composer.lock | ||
src/BundleDescriber.php | ||
/tests/Build/test-application/vendor/ | ||
/tests/Build/test-application/composer.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,31 @@ | ||
Auditor | ||
========= | ||
# Auditor | ||
|
||
This is a composer plugin. It allows to access information about the current (root) package. | ||
This is a Composer plugin. It allows to access information about the current (root) package. | ||
|
||
### Requirements | ||
* composer | ||
## Requirements | ||
|
||
* Composer | ||
* PHP >= 7.1 | ||
|
||
### Usage | ||
### Version matrix | ||
|
||
| | PHP 8.0 | PHP 7.4 | PHP 7.3 | PHP 7.2 | PHP 7.1 | | ||
| ------------ | ------- | ------- | ------- | ------- | ------- | | ||
| Composer 1.x | 0.5.x | 0.5.x | 0.5.x | 0.1.0 - 0.5.x | 0.1.0 - 0.5.x | ||
| Composer 2.x | 0.5.x | 0.5.x | 0.5.x | 0.5.x | 0.5.x | | ||
|
||
## Usage | ||
|
||
In your project root | ||
|
||
````bash | ||
```bash | ||
composer require cpsit/auditor | ||
```` | ||
|
||
**Note:** The package is not yet available on packagist.org. | ||
Please add `https://github.com/CPS-IT/auditor` to the list of repositories in your | ||
`composer.json` | ||
``` | ||
|
||
After installation or update via composer a class `CPSIT\Auditor\BundleDescriber` is generated. | ||
After installation or update via Composer a class `CPSIT\Auditor\BundleDescriber` is generated. | ||
|
||
It allows to access each property of your bundle (root package). | ||
|
||
```php | ||
$name = \CPSIT\Auditor\BundleDescriber::getProperty('name'); | ||
|
||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.