Drop support for PHP 5.3

This commit is contained in:
Henrique Moody 2015-10-17 12:46:54 -03:00
parent ac8fb50400
commit 06ecd9c063
3 changed files with 2 additions and 8 deletions

View file

@ -5,7 +5,6 @@ language:
php
php:
- 5.3
- 5.4
- 5.5
- 5.6

View file

@ -12,7 +12,7 @@
}
],
"require": {
"php": ">=5.3.6"
"php": ">=5.4"
},
"require-dev": {
"egulias/email-validator": "~1.2",

View file

@ -106,12 +106,7 @@ class ValidationException extends InvalidArgumentException implements Validation
}
}
$options = 0;
if (version_compare(PHP_VERSION, '5.4.0', '>=')) {
$options = (JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
}
return (@json_encode($value, $options) ?: $value);
return (@json_encode($value, (JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE)) ?: $value);
}
/**