Skip to content

Commit

Permalink
Merge branch 'release/1.2.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
stelgenhof committed Feb 23, 2023
2 parents 2178fe5 + 608584b commit ce8fba5
Show file tree
Hide file tree
Showing 24 changed files with 535 additions and 102 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/coding-standard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
fail-fast: false
matrix:
operating-system: [ ubuntu-latest, windows-latest, macOS-latest ]
php-versions: [ '7.4', '8.0', '8.1' ]
php-versions: [ '8.0', '8.1', '8.2' ]

steps:
- name: Set git to use LF
Expand Down Expand Up @@ -46,7 +46,9 @@ jobs:
run: composer validate --strict

- name: Install dependencies
run: composer install --no-progress --prefer-dist --optimize-autoloader --no-suggest
run: composer install --no-progress --prefer-dist --optimize-autoloader

- name: Check Code Style
run: vendor/bin/php-cs-fixer --allow-risky=yes --diff --dry-run -v fix
run: vendor/bin/php-cs-fixer --diff --dry-run -v fix
env:
PHP_CS_FIXER_IGNORE_ENV: 1
52 changes: 52 additions & 0 deletions .github/workflows/mutation-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: "Mutations testing"

on:
- push
- pull_request

jobs:
run:
name: "CI"
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ ubuntu-latest ]
php-versions: [ '8.0', '8.1', '8.2' ]

steps:
- name: Set git to use LF
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: 1

- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
coverage: pcov

- name: Get Composer Cache Directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Cache Composer dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-

- name: Check Composer configuration
run: composer validate --strict

- name: Install dependencies
run: composer install --no-progress --prefer-dist --optimize-autoloader

- name: Run Mutation tests
run: vendor/bin/infection run -j 2
55 changes: 55 additions & 0 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: "Static analysis"

on:
- push
- pull_request

jobs:
run:
name: "CI"
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ ubuntu-latest, windows-latest, macOS-latest ]
php-versions: ['8.0', '8.1', '8.2' ]

steps:
- name: Set git to use LF
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: 1

- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
coverage: pcov

- name: Get Composer Cache Directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Cache Composer dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-

- name: Check Composer configuration
run: composer validate --strict

- name: Install dependencies
run: composer install --no-progress --prefer-dist --optimize-autoloader

- name: Run static analysis - PHPStan
run: composer phpstan

- name: Run static analysis - Psalm
run: vendor/bin/psalm
52 changes: 52 additions & 0 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: "Testing"

on:
- push
- pull_request

jobs:
run:
name: "CI"
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ ubuntu-latest, windows-latest, macOS-latest ]
php-versions: [ '8.0', '8.1', '8.2' ]

steps:
- name: Set git to use LF
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: 1

- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
coverage: pcov

- name: Get Composer Cache Directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Cache Composer dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-

- name: Check Composer configuration
run: composer validate --strict

- name: Install dependencies
run: composer install --no-progress --prefer-dist --optimize-autoloader

- name: Run unit tests
run: vendor/bin/phpunit --coverage-clover=build/logs/clover.xml
32 changes: 0 additions & 32 deletions .github/workflows/validate.yml

This file was deleted.

8 changes: 5 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
vendor
composer.lock
.phpunit.result.cache
.idea/
.php-cs-fixer.cache
.phpunit.cache
.phpunit.result.cache
composer.lock
var
vendor
2 changes: 1 addition & 1 deletion .phan/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
// Note that the **only** effect of choosing `'5.6'` is to infer that functions removed in php 7.0 exist.
// (See `backward_compatibility_checks` for additional options)
// Automatically inferred from composer.json requirement for "php" of "^7.4 || ^8.0"
'target_php_version' => '7.4',
'target_php_version' => '8.0',

// If enabled, missing properties will be created when
// they are first seen. If false, we'll report an
Expand Down
7 changes: 4 additions & 3 deletions .php-cs-fixer.php
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
<?php

declare(strict_types=1);
/**
* This file is part of the WAQI (World Air Quality Index) package.
*
* Copyright (c) 2017 - 2022 AzuyaLabs
* Copyright (c) 2017 - 2023 AzuyaLabs
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @author Sacha Telgenhof <me@sachatelgenhof.com>
* @author Sacha Telgenhof <me at sachatelgenhof dot com>
*/

$finder = PhpCsFixer\Finder::create()->in(__DIR__);
$finder = PhpCsFixer\Finder::create()->in(__DIR__)->notPath('var');

$config = new PhpCsFixer\Config();
$config->setRiskyAllowed(true)->setRules([
Expand Down
38 changes: 33 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,32 @@ to [Semantic Versioning](http://semver.org).

### Removed

## [1.2.0] 2023-02-23

### Added

- Support for PHP version 8.1 and 8.2.
- Rector configuration for easy refactoring.
- Added PHP Mutation Testing.
- Contribution Guidelines and Code of Conduct.
- Security document explaining policy around security vulnerabilities and supported PHP versions.

### Changed

- Split GitHub Actions in separate workflow steps (mutation testing, code checks, testing, etc.).
- Updated copyright year.
- Upgraded Psalm to version 5.7.
- Upgraded Guzzle to version 7.4.
- Upgraded PHPStan to version 1.4.

### Fixed

- Various code style improvements and fixes.

### Removed

- PHP 7.4 Support.

## [1.1.0] 2022-01-16

### Added
Expand All @@ -35,7 +61,7 @@ to [Semantic Versioning](http://semver.org).
- Renamed the script for formatting code to a more concise name.
- Replaced FQN by use of imports.
- Dropped unnecessary arguments in some functions as they are the same as the default.
- Included conversion from StreamInterface to string when receiving the response from the HTTP client.
- Included conversion from `StreamInterface` to string when receiving the response from the HTTP client.
- Removed the 'Exception' part of the exception class names as it is superfluous.
- Replaced deprecated `Psr7\str` and `Psr7\copy_to_string` function calls.

Expand All @@ -46,15 +72,15 @@ to [Semantic Versioning](http://semver.org).

### Removed

- Travis CI and StyleCI in favour of GitHub Actions.
- Travis CI and Style CI in favour of GitHub Actions.
- Support for PHP 7.3.
- Throwing an exception as methods allows for a null value parameter.

## [1.0.1] 2018-10-31

### Added

- Added missing catch clause for GuzzleException.
- Added missing catch clause for `GuzzleException`.

### Changed

Expand All @@ -77,10 +103,12 @@ to [Semantic Versioning](http://semver.org).

- Initial release

[Unreleased]: https://github.com/azuyalabs/waqi/compare/1.1.0...HEAD
[Unreleased]: https://github.com/azuyalabs/waqi/compare/1.2.0...HEAD

[1.2.0]: https://github.com/azuyalabs/waqi/compare/1.1.0...1.2.0

[1.1.0]: https://github.com/azuyalabs/waqi/compare/1.0.1...1.1.0

[1.0.1]: https://github.com/azuyalabs/waqi/compare/1.0.0...1.0.1

[1.0.0]: https://github.com/azuyalabs/waqi/releases/tag/1.0.0
[1.0.0]: https://github.com/azuyalabs/waqi/releases/tag/1.0.0
Loading

0 comments on commit ce8fba5

Please sign in to comment.