Core and composer updates
This commit is contained in:
parent
a82634bb98
commit
62cac30480
1118 changed files with 21770 additions and 6306 deletions
web/vendor/symfony/serializer
|
@ -101,7 +101,7 @@ class JsonDecode implements DecoderInterface
|
|||
$recursionDepth = $context['json_decode_recursion_depth'];
|
||||
$options = $context['json_decode_options'];
|
||||
|
||||
if (PHP_VERSION_ID >= 50400) {
|
||||
if (\PHP_VERSION_ID >= 50400) {
|
||||
$decodedData = json_decode($data, $associative, $recursionDepth, $options);
|
||||
} else {
|
||||
$decodedData = json_decode($data, $associative, $recursionDepth);
|
||||
|
|
|
@ -301,11 +301,19 @@ class XmlEncoder extends SerializerAwareEncoder implements EncoderInterface, Dec
|
|||
$data = array();
|
||||
|
||||
foreach ($node->attributes as $attr) {
|
||||
if (ctype_digit($attr->nodeValue)) {
|
||||
$data['@'.$attr->nodeName] = (int) $attr->nodeValue;
|
||||
} else {
|
||||
if (!is_numeric($attr->nodeValue)) {
|
||||
$data['@'.$attr->nodeName] = $attr->nodeValue;
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
if (false !== $val = filter_var($attr->nodeValue, FILTER_VALIDATE_INT)) {
|
||||
$data['@'.$attr->nodeName] = $val;
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
$data['@'.$attr->nodeName] = (float) $attr->nodeValue;
|
||||
}
|
||||
|
||||
return $data;
|
||||
|
@ -460,7 +468,7 @@ class XmlEncoder extends SerializerAwareEncoder implements EncoderInterface, Dec
|
|||
*/
|
||||
private function needsCdataWrapping($val)
|
||||
{
|
||||
return preg_match('/[<>&]/', $val);
|
||||
return 0 < preg_match('/[<>&]/', $val);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -208,10 +208,22 @@ class ObjectNormalizer extends AbstractNormalizer
|
|||
|
||||
if (0 === strpos($name, 'get') || 0 === strpos($name, 'has')) {
|
||||
// getters and hassers
|
||||
$attributes[lcfirst(substr($name, 3))] = true;
|
||||
$propertyName = substr($name, 3);
|
||||
|
||||
if (!$reflClass->hasProperty($propertyName)) {
|
||||
$propertyName = lcfirst($propertyName);
|
||||
}
|
||||
|
||||
$attributes[$propertyName] = true;
|
||||
} elseif (strpos($name, 'is') === 0) {
|
||||
// issers
|
||||
$attributes[lcfirst(substr($name, 2))] = true;
|
||||
$propertyName = substr($name, 2);
|
||||
|
||||
if (!$reflClass->hasProperty($propertyName)) {
|
||||
$propertyName = lcfirst($propertyName);
|
||||
}
|
||||
|
||||
$attributes[$propertyName] = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
backupGlobals="false"
|
||||
colors="true"
|
||||
bootstrap="vendor/autoload.php"
|
||||
failOnRisky="true"
|
||||
failOnWarning="true"
|
||||
>
|
||||
<php>
|
||||
<ini name="error_reporting" value="-1" />
|
||||
|
|
Reference in a new issue