Issue #2400407 by DuaelFr: Ensure vendor sebastian/exporter is on latest stable release

8.0.x
webchick 2015-09-04 18:45:29 -07:00
parent c2acf9784e
commit e6511dde9b
3 changed files with 84 additions and 90 deletions

10
core/composer.lock generated
View File

@ -1798,16 +1798,16 @@
}, },
{ {
"name": "sebastian/exporter", "name": "sebastian/exporter",
"version": "1.2.0", "version": "1.2.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/exporter.git", "url": "https://github.com/sebastianbergmann/exporter.git",
"reference": "84839970d05254c73cde183a721c7af13aede943" "reference": "7ae5513327cb536431847bcc0c10edba2701064e"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/84839970d05254c73cde183a721c7af13aede943", "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/7ae5513327cb536431847bcc0c10edba2701064e",
"reference": "84839970d05254c73cde183a721c7af13aede943", "reference": "7ae5513327cb536431847bcc0c10edba2701064e",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1860,7 +1860,7 @@
"export", "export",
"exporter" "exporter"
], ],
"time": "2015-01-27 07:23:06" "time": "2015-06-21 07:55:53"
}, },
{ {
"name": "sebastian/global-state", "name": "sebastian/global-state",

View File

@ -476,74 +476,6 @@
"description": "Provides functionality to recursively process PHP variables", "description": "Provides functionality to recursively process PHP variables",
"homepage": "http://www.github.com/sebastianbergmann/recursion-context" "homepage": "http://www.github.com/sebastianbergmann/recursion-context"
}, },
{
"name": "sebastian/exporter",
"version": "1.2.0",
"version_normalized": "1.2.0.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/exporter.git",
"reference": "84839970d05254c73cde183a721c7af13aede943"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/84839970d05254c73cde183a721c7af13aede943",
"reference": "84839970d05254c73cde183a721c7af13aede943",
"shasum": ""
},
"require": {
"php": ">=5.3.3",
"sebastian/recursion-context": "~1.0"
},
"require-dev": {
"phpunit/phpunit": "~4.4"
},
"time": "2015-01-27 07:23:06",
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.2.x-dev"
}
},
"installation-source": "dist",
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Jeff Welch",
"email": "whatthejeff@gmail.com"
},
{
"name": "Volker Dusch",
"email": "github@wallbash.com"
},
{
"name": "Bernhard Schussek",
"email": "bschussek@2bepublished.at"
},
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de"
},
{
"name": "Adam Harvey",
"email": "aharvey@php.net"
}
],
"description": "Provides the functionality to export PHP variables for visualization",
"homepage": "http://www.github.com/sebastianbergmann/exporter",
"keywords": [
"export",
"exporter"
]
},
{ {
"name": "sebastian/diff", "name": "sebastian/diff",
"version": "1.3.0", "version": "1.3.0",
@ -3484,5 +3416,73 @@
"compare", "compare",
"equality" "equality"
] ]
},
{
"name": "sebastian/exporter",
"version": "1.2.1",
"version_normalized": "1.2.1.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/exporter.git",
"reference": "7ae5513327cb536431847bcc0c10edba2701064e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/7ae5513327cb536431847bcc0c10edba2701064e",
"reference": "7ae5513327cb536431847bcc0c10edba2701064e",
"shasum": ""
},
"require": {
"php": ">=5.3.3",
"sebastian/recursion-context": "~1.0"
},
"require-dev": {
"phpunit/phpunit": "~4.4"
},
"time": "2015-06-21 07:55:53",
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.2.x-dev"
}
},
"installation-source": "dist",
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Jeff Welch",
"email": "whatthejeff@gmail.com"
},
{
"name": "Volker Dusch",
"email": "github@wallbash.com"
},
{
"name": "Bernhard Schussek",
"email": "bschussek@2bepublished.at"
},
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de"
},
{
"name": "Adam Harvey",
"email": "aharvey@php.net"
}
],
"description": "Provides the functionality to export PHP variables for visualization",
"homepage": "http://www.github.com/sebastianbergmann/exporter",
"keywords": [
"export",
"exporter"
]
} }
] ]

View File

@ -22,12 +22,6 @@ use SebastianBergmann\RecursionContext\Context;
* $exporter = new Exporter; * $exporter = new Exporter;
* print $exporter->export(new Exception); * print $exporter->export(new Exception);
* </code> * </code>
*
* @package Exporter
* @author Sebastian Bergmann <sebastian@phpunit.de>
* @copyright Sebastian Bergmann <sebastian@phpunit.de>
* @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
* @link https://github.com/sebastianbergmann/exporter
*/ */
class Exporter class Exporter
{ {
@ -44,8 +38,8 @@ class Exporter
* - Carriage returns and newlines are normalized to \n * - Carriage returns and newlines are normalized to \n
* - Recursion and repeated rendering is treated properly * - Recursion and repeated rendering is treated properly
* *
* @param mixed $value * @param mixed $value
* @param integer $indentation The indentation level of the 2nd+ line * @param int $indentation The indentation level of the 2nd+ line
* @return string * @return string
*/ */
public function export($value, $indentation = 0) public function export($value, $indentation = 0)
@ -60,8 +54,8 @@ class Exporter
*/ */
public function shortenedRecursiveExport(&$data, Context $context = null) public function shortenedRecursiveExport(&$data, Context $context = null)
{ {
$result = array(); $result = array();
$exporter = new Exporter(); $exporter = new self();
if (!$context) { if (!$context) {
$context = new Context; $context = new Context;
@ -88,7 +82,7 @@ class Exporter
} }
} }
return join(', ', $result); return implode(', ', $result);
} }
/** /**
@ -101,7 +95,7 @@ class Exporter
* Newlines are replaced by the visible string '\n'. Contents of arrays * Newlines are replaced by the visible string '\n'. Contents of arrays
* and objects (if any) are replaced by '...'. * and objects (if any) are replaced by '...'.
* *
* @param mixed $value * @param mixed $value
* @return string * @return string
* @see SebastianBergmann\Exporter\Exporter::export * @see SebastianBergmann\Exporter\Exporter::export
*/ */
@ -145,12 +139,12 @@ class Exporter
public function toArray($value) public function toArray($value)
{ {
if (!is_object($value)) { if (!is_object($value)) {
return (array)$value; return (array) $value;
} }
$array = array(); $array = array();
foreach ((array)$value as $key => $val) { foreach ((array) $value as $key => $val) {
// properties are transformed to keys in the following way: // properties are transformed to keys in the following way:
// private $property => "\0Classname\0property" // private $property => "\0Classname\0property"
// protected $property => "\0*\0property" // protected $property => "\0*\0property"
@ -197,9 +191,9 @@ class Exporter
/** /**
* Recursive implementation of export * Recursive implementation of export
* *
* @param mixed $value The value to export * @param mixed $value The value to export
* @param integer $indentation The indentation level of the 2nd+ line * @param int $indentation The indentation level of the 2nd+ line
* @param \SebastianBergmann\RecursionContext\Context $processed Previously processed objects * @param \SebastianBergmann\RecursionContext\Context $processed Previously processed objects
* @return string * @return string
* @see SebastianBergmann\Exporter\Exporter::export * @see SebastianBergmann\Exporter\Exporter::export
*/ */