Skip to content

Commit

Permalink
Merge pull request #25 from soluble-io/php8
Browse files Browse the repository at this point in the history
php8 support
  • Loading branch information
belgattitude authored Nov 14, 2020
2 parents 8b97668 + 65c08b8 commit 3c7b0ce
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 25 deletions.
25 changes: 14 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ cache:
before_install:
- |
if [ "x$REMOVE_QA" = "xyes" ]; then
composer remove vimeo/psalm infection/infection friendsofphp/php-cs-fixer phpstan/phpstan phpstan/phpstan-phpunit phpstan/phpstan-strict-rules jangregor/phpstan-prophecy --dev --no-interaction $COMPOSER_ARGS;
composer remove vimeo/psalm infection/infection friendsofphp/php-cs-fixer phpstan/phpstan phpstan/phpstan-phpunit phpstan/phpstan-strict-rules jangregor/phpstan-prophecy --dev --no-update --no-interaction $COMPOSER_ARGS;
fi
- |
if [ "x$REMOVE_HOOKS" = "xyes" ]; then
composer remove captainhook/captainhook captainhook/plugin-composer --dev --no-update --no-interaction $COMPOSER_ARGS;
fi
- |
if [ "x$XDEBUG" != "xyes" ]; then
Expand All @@ -30,16 +34,14 @@ install:
travis_retry composer -n update --prefer-dist --no-interaction $COMPOSER_ARGS;
fi
jobs:
allow_failures:
- php: nightly
- stage: No-leaks

include:
- stage: Tests
php: 7.3
php: 7.4
env: XDEBUG=yes INSTALL_FFMPEG=yes REMOVE_QA=no
script:
- ./vendor/bin/phpunit -v -c .travis/phpunit.9.3.xml --coverage-clover=coverage.xml
Expand All @@ -48,7 +50,7 @@ jobs:
- bash <(curl -s https://codecov.io/bash)

- stage: Tests
php: 7.4
php: 7.3
env: INSTALL_FFMPEG=yes REMOVE_QA=no
script:
- ./vendor/bin/phpunit -v -c .travis/phpunit.9.3.xml
Expand All @@ -61,15 +63,16 @@ jobs:

- stage: Tests
php: 7.1
env: INSTALL_FFMPEG=yes REMOVE_QA=no
env: INSTALL_FFMPEG=yes REMOVE_QA=no REMOVE_HOOKS=yes
script:
- composer require --dev phpunit/phpunit
- ./vendor/bin/phpunit -v -c .travis/phpunit.xml

- stage: Tests
php: 7.1
env: INSTALL_FFMPEG=yes DEPS=lowest REMOVE_QA=no
env: INSTALL_FFMPEG=yes DEPS=lowest REMOVE_QA=no REMOVE_HOOKS=yes
script:
- composer remove phpunit/phpunit
- composer remove --dev --no-interaction phpunit/phpunit
- composer require --dev phpunit/phpunit
- ./vendor/bin/phpunit -v -c .travis/phpunit.xml

Expand All @@ -80,7 +83,7 @@ jobs:
- ./vendor/bin/phpunit --testsuite unit -v -c .travis/phpunit.9.3.xml

- stage: PHPStan, Psalm and Code style
php: 7.3
php: 7.4
env: XDEBUG=false INSTALL_FFMPEG=no REMOVE_QA=no
script:
- composer phpstan
Expand All @@ -99,13 +102,13 @@ jobs:
- mkdocs build

- stage: Mutation (unit tests only)
php: 7.3
php: 7.4
env: XDEBUG=yes
script:
- ./vendor/bin/infection --configuration=./infection.json --test-framework=phpunit --test-framework-options='--testsuite=unit' --min-msi=60 --min-covered-msi=70 --threads=4

- stage: No-leaks
php: 7.3
php: 7.4
env: XDEBUG=yes INSTALL_FFMPEG=yes
script:
- composer require --dev roave/no-leaks
Expand Down
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,17 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## 2.2.0 (2020-11-12)

### Added

- Allow PHP 8 in composer.json, in [#25](https://github.com/soluble-io/soluble-mediatools/pull/25)

### Fixed

- [Minor] Composer 2 support, fix captainhook for development, in [#25](https://github.com/soluble-io/soluble-mediatools/pull/25)


## 2.1.2 (2020-09-04)

### Added
Expand Down
23 changes: 12 additions & 11 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
}
],
"require": {
"php": "^7.1",
"php": "^7.1 || ^8.0",
"ext-json": "*",
"ext-pcre": "*",
"psr/container": "^1.0",
Expand All @@ -38,25 +38,26 @@
"symfony/process": "^3.3 || ^4.0 || ^5.0"
},
"require-dev" : {
"captainhook/plugin-composer": "^4.0",
"captainhook/captainhook": "5.4.3",
"captainhook/plugin-composer": "5.2.2",
"consistence/coding-standard": "^3.10.1",
"fig/http-message-util": "^1.1.4",
"friendsofphp/php-cs-fixer": "^v2.16.4",
"friendsofphp/php-cs-fixer": "^v2.16.7",
"infection/infection": "^0.13 || ^0.14 || ^0.15",
"jangregor/phpstan-prophecy": "^0.6.2 || ^0.8.0",
"mikey179/vfsstream": "^1.6",
"jangregor/phpstan-prophecy": "^0.6.2 || ^0.8.1",
"laminas/laminas-servicemanager": "^3.4.1",
"mikey179/vfsstream": "^v1.6.8",
"monolog/monolog": "^1.23 | ^2.0",
"phpspec/prophecy": "^1.9.0 || ^1.11.1",
"phpstan/phpstan": "^0.12.42",
"phpstan/phpstan-phpunit": "^0.12.16",
"phpstan/phpstan-strict-rules": "^0.12.5",
"phpstan/phpstan": "0.12.54",
"phpstan/phpstan-phpunit": "0.12.16",
"phpstan/phpstan-strict-rules": "0.12.5",
"phpunit/phpunit": "^7.4 || ^8.0 || ^9.0",
"roave/security-advisories": "dev-master",
"slevomat/coding-standard": "^6.4.0",
"slevomat/coding-standard": "^6.4.1",
"squizlabs/php_codesniffer": "^3.4 || ^3.5",
"symfony/cache": "^4.3",
"vimeo/psalm": "^3.14.2",
"laminas/laminas-servicemanager": "^3.4"
"vimeo/psalm": "3.18.2"
},
"config": {
"optimize-autoloader": true,
Expand Down
2 changes: 1 addition & 1 deletion docs/_config/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ Markdown>=3.2
pymdown-extensions>=7
mkdocs>=1.1
Pygments>=2.6
mkdocs-material>=5.5
mkdocs-material>=6.1.4
mkdocs-material-extensions>=1.0b1
2 changes: 1 addition & 1 deletion psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
<issueHandlers>
<MoreSpecificImplementedParamType errorLevel="info" />
<LessSpecificImplementedReturnType errorLevel="info" />

<!-- exclusions specific for soluble-mediatool (false positive!) -->
<LessSpecificReturnType errorLevel="info" />
<RedundantConditionGivenDocblockType errorLevel="info" />
Expand All @@ -28,6 +27,7 @@
<TypeDoesNotContainType>
<errorLevel type="info">
<file name="src/Video/Info/VideoStream.php" />
<file name="src/Video/SeekTime.php" />
</errorLevel>
</TypeDoesNotContainType>

Expand Down
2 changes: 1 addition & 1 deletion src/Video/Adapter/FFMpegAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ private function getArgsWithExplodedValues(array $args): array
$exploded = [];
foreach ($args as $key => $value) {
$elems = explode(' ', $value);
$exploded[] = (string) array_shift($elems);
$exploded[] = array_shift($elems);
if (count($elems) <= 0) {
continue;
}
Expand Down

0 comments on commit 3c7b0ce

Please sign in to comment.