Skip to content

Commit

Permalink
Merge branch 'release/v0.2.1' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
betterthanclay committed Mar 9, 2022
2 parents b0fa5d7 + 4f46482 commit 90a30cc
Show file tree
Hide file tree
Showing 7 changed files with 82 additions and 38 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: PHP Composer

on:
push:
branches: [ develop ]
pull_request:
branches: [ develop ]

jobs:
build:

runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ubuntu-latest]
php-versions: ['7.2', '7.3', '7.4', '8.0', '8.1']
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: intl #optional
ini-values: "post_max_size=256M" #optional

- name: Validate composer.json and composer.lock
run: composer validate --strict

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v2
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
run: composer install --prefer-dist --no-progress

- name: Run PHPStan
run: composer run-script analyze -- --no-interaction

- name: Run ECS
run: composer run-script psr12
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ composer.lock
Thumbs.db
/phpunit.xml
/.idea
/.vscode
26 changes: 0 additions & 26 deletions .travis.yml

This file was deleted.

4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## v0.2.1 (2022-03-09)
* Transitioned from Travis to GHA
* Updated PHPStan and ECS dependencies

## v0.2.0 (2021-03-18)
* Enable PHP8 testing

Expand Down
30 changes: 23 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,32 @@
# Fluidity

[![PHP from Packagist](https://img.shields.io/packagist/php-v/decodelabs/fluidity?style=flat-square)](https://packagist.org/packages/decodelabs/fluidity)
[![Latest Version](https://img.shields.io/packagist/v/decodelabs/fluidity.svg?style=flat-square)](https://packagist.org/packages/decodelabs/fluidity)
[![Total Downloads](https://img.shields.io/packagist/dt/decodelabs/fluidity.svg?style=flat-square)](https://packagist.org/packages/decodelabs/fluidity)
[![Build Status](https://img.shields.io/travis/com/decodelabs/fluidity/main.svg?style=flat-square)](https://travis-ci.com/decodelabs/fluidity)
[![PHPStan](https://img.shields.io/badge/PHPStan-enabled-44CC11.svg?longCache=true&style=flat-square)](https://github.com/phpstan/phpstan)
[![License](https://img.shields.io/packagist/l/decodelabs/fluidity?style=flat-square)](https://packagist.org/packages/decodelabs/fluidity)
[![PHP from Packagist](https://img.shields.io/packagist/php-v/decodelabs/fluidity?style=flat)](https://packagist.org/packages/decodelabs/fluidity)
[![Latest Version](https://img.shields.io/packagist/v/decodelabs/fluidity.svg?style=flat)](https://packagist.org/packages/decodelabs/fluidity)
[![Total Downloads](https://img.shields.io/packagist/dt/decodelabs/fluidity.svg?style=flat)](https://packagist.org/packages/decodelabs/fluidity)
[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/decodelabs/fluidity/PHP%20Composer)](https://github.com/decodelabs/fluidity/actions/workflows/php.yml)
[![PHPStan](https://img.shields.io/badge/PHPStan-enabled-44CC11.svg?longCache=true&style=flat)](https://github.com/phpstan/phpstan)
[![License](https://img.shields.io/packagist/l/decodelabs/fluidity?style=flat)](https://packagist.org/packages/decodelabs/fluidity)

Tools for creating fluent interfaces.

## Installation

## Method chaining
Install via Composer:

```bash
composer require decodelabs/fluidity
```

### PHP version

_Please note, the final v1 releases of all Decode Labs libraries will target **PHP8** or above._

Current support for earlier versions of PHP will be phased out in the coming months.


## Usage

### Method chaining

```php
namespace DecodeLabs\Fluidity;
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
},
"require-dev": {
"phpunit/phpunit": "^8",
"phpstan/phpstan": "^0.12.45",
"phpstan/phpstan": "^1",
"phpstan/extension-installer": "^1.0",
"decodelabs/phpstan-decodelabs": "^0.4",
"symplify/easy-coding-standard": "^8.3"
"decodelabs/phpstan-decodelabs": "^0.5",
"symplify/easy-coding-standard": "^10"
},
"autoload": {
"psr-4": {
Expand Down
4 changes: 3 additions & 1 deletion ecs.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
use Symplify\EasyCodingStandard\ValueObject\Set\SetList;

return static function (ContainerConfigurator $containerConfigurator): void {
$containerConfigurator->import(SetList::CLEAN_CODE);
$containerConfigurator->import(SetList::PSR_12);

$parameters = $containerConfigurator->parameters();
$parameters->set(Option::PATHS, [__DIR__ . '/src']);
$parameters->set(Option::SETS, [SetList::CLEAN_CODE, SetList::PSR_12]);
};

0 comments on commit 90a30cc

Please sign in to comment.