Compare commits

...

3 Commits

Author SHA1 Message Date
Grégoire Paris 8194721a1e Bump phpunit XSD version to 5.2
Some attributes being used in the phpunit configuration files, namely
failOnRisky and failOnWarning were introduced in phpunit 5.2.0. The
Composer configuration shows that tests should run with old versions of
phpunit, but phpunit only validates the configuration against the XSD
since phpunit 7.2.0.
These changes can be tested as follows:

wget http://schema.phpunit.de/5.2/phpunit.xsd
xargs xmllint --schema phpunit.xsd  1>/dev/null
find src -name phpunit.xml.dist| xargs xmllint --schema phpunit.xsd  1>/dev/null

See https://github.com/sebastianbergmann/phpunit/commit/7e06a82806be004cbfd30a02d92162e9ed4abc7c
See https://github.com/symfony/symfony/blob/46e3745a03e199e64cc0fcf3284a96b5a25dcee9/composer.json#L98
2018-11-11 12:18:13 +01:00
François-Xavier de Guillebon 5694f145b1 Fix ini_get() for boolean values 2018-10-30 17:24:01 +01:00
Gabriel Caruso 11b1f30ef9 [CS] Use combined assignment operators when possible 2018-10-01 23:42:26 -03:00
4 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -53,7 +53,7 @@ class ClassCollectionLoader
$classes = array_diff($classes, $declared);
// the cache is different depending on which classes are already declared
$name = $name.'-'.substr(hash('sha256', implode('|', $classes)), 0, 5);
$name .= '-'.substr(hash('sha256', implode('|', $classes)), 0, 5);
}
$classes = array_unique($classes);
+2 -2
View File
@@ -19,7 +19,7 @@ class ApcClassLoaderTest extends TestCase
{
protected function setUp()
{
if (!(ini_get('apc.enabled') && ini_get('apc.enable_cli'))) {
if (!(filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) && filter_var(ini_get('apc.enable_cli'), FILTER_VALIDATE_BOOLEAN))) {
$this->markTestSkipped('The apc extension is not enabled.');
} else {
apcu_clear_cache();
@@ -28,7 +28,7 @@ class ApcClassLoaderTest extends TestCase
protected function tearDown()
{
if (ini_get('apc.enabled') && ini_get('apc.enable_cli')) {
if (filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) && filter_var(ini_get('apc.enable_cli'), FILTER_VALIDATE_BOOLEAN)) {
apcu_clear_cache();
}
}
+2 -2
View File
@@ -21,7 +21,7 @@ class LegacyApcUniversalClassLoaderTest extends TestCase
{
protected function setUp()
{
if (ini_get('apc.enabled') && ini_get('apc.enable_cli')) {
if (filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) && filter_var(ini_get('apc.enable_cli'), FILTER_VALIDATE_BOOLEAN)) {
apcu_clear_cache();
} else {
$this->markTestSkipped('APC is not enabled.');
@@ -30,7 +30,7 @@ class LegacyApcUniversalClassLoaderTest extends TestCase
protected function tearDown()
{
if (ini_get('apc.enabled') && ini_get('apc.enable_cli')) {
if (filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) && filter_var(ini_get('apc.enable_cli'), FILTER_VALIDATE_BOOLEAN)) {
apcu_clear_cache();
}
}
+1 -1
View File
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.1/phpunit.xsd"
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/5.2/phpunit.xsd"
backupGlobals="false"
colors="true"
bootstrap="vendor/autoload.php"