PHP 8 Support (#782)
Thanks @kornrunner for these changes: * Test against PHP 8 * U-Tests: FFProbe: OptionsTester: handle phpunit deprecation of at * FiltersCollection: tweak for call_user_func_array and PHP 8 named arguments
This commit is contained in:
parent
6a61d67288
commit
a1a3281dbf
3 changed files with 9 additions and 9 deletions
|
|
@ -30,12 +30,14 @@ matrix:
|
||||||
- php: 7.2
|
- php: 7.2
|
||||||
- php: 7.3
|
- php: 7.3
|
||||||
- php: 7.4
|
- php: 7.4
|
||||||
|
- php: 8.0
|
||||||
|
dist: bionic
|
||||||
- php: nightly
|
- php: nightly
|
||||||
env:
|
env:
|
||||||
- COMPOSER_DEV_STABILITY=true
|
- COMPOSER_DEV_STABILITY=true
|
||||||
|
|
||||||
before_install:
|
before_install:
|
||||||
- sudo add-apt-repository ppa:mc3man/trusty-media -y
|
- sudo add-apt-repository ppa:mc3man/${TRAVIS_DIST}-media -y
|
||||||
- sudo apt-get update -q
|
- sudo apt-get update -q
|
||||||
- composer self-update
|
- composer self-update
|
||||||
- echo "$PHPUNIT_VERSION"
|
- echo "$PHPUNIT_VERSION"
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ class FiltersCollection implements \Countable, \IteratorAggregate
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return count(call_user_func_array('array_merge', $this->filters));
|
return count(call_user_func_array('array_merge', array_values($this->filters)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -51,7 +51,7 @@ class FiltersCollection implements \Countable, \IteratorAggregate
|
||||||
$this->sorted = $this->filters;
|
$this->sorted = $this->filters;
|
||||||
} else {
|
} else {
|
||||||
krsort($this->filters);
|
krsort($this->filters);
|
||||||
$this->sorted = call_user_func_array('array_merge', $this->filters);
|
$this->sorted = call_user_func_array('array_merge', array_values($this->filters));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -77,13 +77,11 @@ class OptionsTesterTest extends TestCase
|
||||||
->method('fetch')
|
->method('fetch')
|
||||||
->will($this->returnValue($data));
|
->will($this->returnValue($data));
|
||||||
|
|
||||||
$cache->expects($this->at(0))
|
$cache->expects($this->exactly(2))
|
||||||
->method('contains')
|
->method('contains')
|
||||||
->will($this->returnValue(false));
|
->willReturnOnConsecutiveCalls(
|
||||||
|
$this->returnValue(false),
|
||||||
$cache->expects($this->at(1))
|
$this->returnValue(true));
|
||||||
->method('contains')
|
|
||||||
->will($this->returnValue(true));
|
|
||||||
|
|
||||||
$cache->expects($this->once())
|
$cache->expects($this->once())
|
||||||
->method('save');
|
->method('save');
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue