Skip to content

Commit

Permalink
Merge pull request #1 from imjoehaines/php-73
Browse files Browse the repository at this point in the history
PHP 5, 7.0 and 7.1 are entirely unsupported now and PHP 7.2 only receives security updates, so it seems like a good time to set 7.3 as the minimum supported version

Also adds:
- PHPStan
- Easy Coding Standard
- CI migration from Travis -> GitHub Actions
  • Loading branch information
imjoehaines authored Feb 9, 2020
2 parents 145ad96 + 3fa379c commit c80fd26
Show file tree
Hide file tree
Showing 37 changed files with 4,517 additions and 693 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/code-style.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: code-style

on: [push]

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
php-version: [7.3, 7.4]

steps:
- uses: actions/checkout@v1

- name: Setup PHP ${{ matrix.php-version }}
uses: shivammathur/setup-php@v1
with:
php-version: ${{ matrix.php-version }}
extensions: mbstring

- name: Get Composer cache directory
id: composer-cache
run: |
echo "::set-output name=path::$(composer config cache-files-dir)"
- uses: actions/cache@v1
with:
path: ${{ steps.composer-cache.outputs.path }}
key: ${{ runner.os }}-composer-${{ matrix.php-version }}-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-${{ matrix.php-version }}-
${{ runner.os }}-composer-
- name: Install Composer dependencies
run: php${{ matrix.php-version }} $(which composer) install --prefer-dist --no-progress --no-suggest

- name: Run Easy Coding Standard
run: php${{ matrix.php-version }} vendor/bin/ecs check src tests
39 changes: 39 additions & 0 deletions .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: phpstan

on: [push]

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
php-version: [7.3, 7.4]

steps:
- uses: actions/checkout@v1

- name: Setup PHP ${{ matrix.php-version }}
uses: shivammathur/setup-php@v1
with:
php-version: ${{ matrix.php-version }}
extensions: mbstring

- name: Get Composer cache directory
id: composer-cache
run: |
echo "::set-output name=path::$(composer config cache-files-dir)"
- uses: actions/cache@v1
with:
path: ${{ steps.composer-cache.outputs.path }}
key: ${{ runner.os }}-composer-${{ matrix.php-version }}-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-${{ matrix.php-version }}-
${{ runner.os }}-composer-
- name: Install Composer dependencies
run: php${{ matrix.php-version }} $(which composer) install --prefer-dist --no-progress --no-suggest

- name: Run PHPStan
run: php${{ matrix.php-version }} vendor/bin/phpstan analyse src tests
38 changes: 38 additions & 0 deletions .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: phpunit

on: [push]

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
php-version: [7.3, 7.4]

steps:
- uses: actions/checkout@v1

- name: Setup PHP ${{ matrix.php-version }}
uses: shivammathur/setup-php@v1
with:
php-version: ${{ matrix.php-version }}

- name: Get Composer cache directory
id: composer-cache
run: |
echo "::set-output name=path::$(composer config cache-files-dir)"
- uses: actions/cache@v1
with:
path: ${{ steps.composer-cache.outputs.path }}
key: ${{ runner.os }}-composer-${{ matrix.php-version }}-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-${{ matrix.php-version }}-
${{ runner.os }}-composer-
- name: Install Composer dependencies
run: php${{ matrix.php-version }} $(which composer) install --prefer-dist --no-progress --no-suggest

- name: Run PHPUnit
run: vendor/bin/phpunit tests --testdox
18 changes: 0 additions & 18 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Flowder [![Latest Stable Version](https://poser.pugx.org/imjoehaines/flowder/v/stable)](https://packagist.org/packages/imjoehaines/flowder) [![Build Status](https://travis-ci.org/imjoehaines/flowder.svg?branch=master)](https://travis-ci.org/imjoehaines/flowder) [![codecov](https://codecov.io/gh/imjoehaines/flowder/branch/master/graph/badge.svg)](https://codecov.io/gh/imjoehaines/flowder)
# Flowder [![Latest Stable Version](https://poser.pugx.org/imjoehaines/flowder/v/stable)](https://packagist.org/packages/imjoehaines/flowder)

Flowder is a (really) simple fixture loader for PHP 5.6+, supporting SQLite and MySQL.

Expand Down
30 changes: 19 additions & 11 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "imjoehaines/flowder",
"description": "A simple and extensible fixture loader for PHP 5.6+, supporting SQLite and MySQL",
"description": "A simple and extensible fixture loader for PHP 7.3+, supporting SQLite and MySQL",
"keywords": [
"fixtures",
"fixture-loading",
Expand All @@ -22,25 +22,33 @@
"test": "phpunit tests/"
},
"config": {
"platform": {
"php": "5.6"
}
"platform": {
"php": "7.3"
}
},
"suggest": {
"imjoehaines/flowdception": "Support for Flowder in Codeception test suites",
"imjoehaines/flowder-phpunit": "Support for Flowder in PHPUnit test suites"
},
"require": {
"php": "^7.3"
},
"require-dev": {
"phpunit/phpunit": "^5.0"
"phpunit/phpunit": "9.0.0",
"phpstan/phpstan": "^0.12.9",
"jangregor/phpstan-prophecy": "^0.6.1",
"phpstan/extension-installer": "^1.0",
"phpstan/phpstan-phpunit": "^0.12.6",
"symplify/easy-coding-standard": "^7.2"
},
"autoload": {
"psr-4": {
"Imjoehaines\\Flowder\\": "src/"
}
"psr-4": {
"Imjoehaines\\Flowder\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"Imjoehaines\\Flowder\\Test\\": "tests/"
}
"psr-4": {
"Imjoehaines\\Flowder\\Test\\": "tests/"
}
}
}
Loading

0 comments on commit c80fd26

Please sign in to comment.