Skip to content

Commit

Permalink
Merge pull request #21 from swiffer/master
Browse files Browse the repository at this point in the history
Flysystem v2, PHPStan, AsyncAWS, GitHub Actions
  • Loading branch information
WyriHaximus authored May 31, 2020
2 parents c142377 + 2ab348f commit 64fd985
Show file tree
Hide file tree
Showing 15 changed files with 1,844 additions and 501 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@

name: Main
on: [push, pull_request]
jobs:
run:
runs-on: ubuntu-latest
strategy:
matrix:
dependencies: ['lowest', 'highest']
php-versions: ['7.2', '7.3', '7.4']
name: PHP ${{ matrix.php-versions }} Test with ${{ matrix.dependencies }} dependencies on ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring, intl
coverage: xdebug
tools: cs2pr

- name: Setup problem matchers for PHP
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"

- name: Setup problem matchers for PHPUnit
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"

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

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

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

- name: Use lowest dependencies
if: ${{ matrix.dependencies == 'lowest' }}
run: composer update --prefer-lowest --no-progress --no-suggest

- name: Use highest dependencies
if: ${{ matrix.dependencies == 'highest' }}
run: composer update --no-progress --no-suggest

- name: PHP CodeSniffer
run: composer phpcs

- name: PHPUnit
run: composer phpunit

- name: PHPStan
run: composer stan -- --error-format=checkstyle | cs2pr
19 changes: 0 additions & 19 deletions .scrutinizer.yml

This file was deleted.

53 changes: 0 additions & 53 deletions .travis.yml

This file was deleted.

6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@ per case basis as extra composer packages. For all supported adapters see:

## Example Data Source Names ##

| Adapter | Data Source Name |
| -------------- | --------------------------------------------------------------------------- |
| AwsS3v3Adapter | `s3://key:secret@bucket/path?region={{region}}&version={{latest\|version}}` |
| Adapter | Data Source Name |
| ------------ | ----------------------------------------------- |
| AwsS3Adapter | `s3://key:secret@bucket/path?region={{region}}` |

## CakePHP version compatibility matrix ##

Expand Down
28 changes: 15 additions & 13 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,19 @@
}
],
"require": {
"php": ">=7.2",
"php": "^7.2.5",
"cakephp/cakephp": "^4.0",
"league/flysystem": "^1.0.61"
"league/flysystem": "^2.0.0-alpha.2"
},
"require-dev": {
"async-aws/flysystem-s3": "^0.4.0",
"cakephp/debug_kit": "^4.0",
"phpunit/phpunit": "~8.5.0",
"lorenzo/piping-bag": "^1.0",
"phake/phake": "3.*",
"squizlabs/php_codesniffer": "~3.5.0",
"lorenzo/piping-bag": "^1.0"
"phpstan/phpstan": "^0.12.14",
"phpunit/phpunit": "~8.5.0",
"ray/di": "^2.2",
"squizlabs/php_codesniffer": "~3.5.0"
},
"autoload": {
"psr-4": {
Expand All @@ -39,24 +42,23 @@
"tests/functions.php"
]
},
"suggest": {
"async-aws/flysystem-s3": "Needed to support the AwsS3Adapter Factory"
},
"scripts": {
"all": [
"@phpcs",
"@stan",
"@phpunit"
],
"travis": [
"@phpcs",
"@phpunit-travis"
],
"phpcs": "phpcs -p",
"phpunit": "phpunit --coverage-text",
"phpunit-travis": "phpunit --coverage-text --coverage-clover ./build/logs/clover.xml",
"travis-coverage": "if [ -f ./build/logs/clover.xml ]; then wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover ./build/logs/clover.xml; fi"
"stan": "phpstan analyse src/ -vvv",
"phpunit": "phpunit --coverage-text"
},
"config": {
"sort-packages": true,
"platform": {
"php": "7.2"
"php": "7.2.5"
}
}
}
Loading

0 comments on commit 64fd985

Please sign in to comment.