Laravel version update

Laravel version update
This commit is contained in:
Manish Verma
2018-08-06 18:48:58 +05:30
parent d143048413
commit 126fbb0255
13678 changed files with 1031482 additions and 778530 deletions

View File

@@ -1,9 +1,4 @@
.idea
phpunit.xml
composer.lock
composer.phar
vendor/
cache.properties
build/LICENSE
build/README.md
build/*.tgz
/.idea
/composer.lock
/vendor
/.php_cs.cache

77
vendor/sebastian/exporter/.php_cs vendored Normal file
View File

@@ -0,0 +1,77 @@
<?php
$header = <<<'EOF'
This file is part of the exporter package.
(c) Sebastian Bergmann <sebastian@phpunit.de>
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
EOF;
return PhpCsFixer\Config::create()
->setRiskyAllowed(true)
->setRules(
[
'array_syntax' => ['syntax' => 'short'],
'binary_operator_spaces' => [
'align_double_arrow' => true,
'align_equals' => true
],
'blank_line_after_namespace' => true,
'blank_line_before_return' => true,
'braces' => true,
'cast_spaces' => true,
'concat_space' => ['spacing' => 'one'],
'elseif' => true,
'encoding' => true,
'full_opening_tag' => true,
'function_declaration' => true,
'header_comment' => ['header' => $header, 'separate' => 'none'],
'indentation_type' => true,
'line_ending' => true,
'lowercase_constants' => true,
'lowercase_keywords' => true,
'method_argument_space' => true,
'no_alias_functions' => true,
'no_blank_lines_after_class_opening' => true,
'no_blank_lines_after_phpdoc' => true,
'no_closing_tag' => true,
'no_empty_phpdoc' => true,
'no_empty_statement' => true,
'no_extra_consecutive_blank_lines' => true,
'no_leading_namespace_whitespace' => true,
'no_singleline_whitespace_before_semicolons' => true,
'no_spaces_after_function_name' => true,
'no_spaces_inside_parenthesis' => true,
'no_trailing_comma_in_list_call' => true,
'no_trailing_whitespace' => true,
'no_unused_imports' => true,
'no_whitespace_in_blank_line' => true,
'phpdoc_align' => true,
'phpdoc_indent' => true,
'phpdoc_no_access' => true,
'phpdoc_no_empty_return' => true,
'phpdoc_no_package' => true,
'phpdoc_scalar' => true,
'phpdoc_separation' => true,
'phpdoc_to_comment' => true,
'phpdoc_trim' => true,
'phpdoc_types' => true,
'phpdoc_var_without_name' => true,
'self_accessor' => true,
'simplified_null_return' => true,
'single_blank_line_at_eof' => true,
'single_import_per_statement' => true,
'single_line_after_imports' => true,
'single_quote' => true,
'ternary_operator_spaces' => true,
'trim_array_spaces' => true,
'visibility_required' => true,
]
)
->setFinder(
PhpCsFixer\Finder::create()
->files()
->in(__DIR__ . '/src')
->name('*.php')
);

View File

@@ -1,23 +1,26 @@
language: php
before_script:
- composer self-update
- composer install --no-interaction --prefer-source --dev
php:
- 5.3.3
- 5.3
- 5.4
- 5.5
- 5.6
- hhvm
- 7.0
- 7.0snapshot
- 7.1
- 7.1snapshot
- master
sudo: false
before_install:
- composer self-update
- composer clear-cache
install:
- travis_retry composer update --no-interaction --no-ansi --no-progress --no-suggest --optimize-autoloader --prefer-stable
script:
- ./vendor/bin/phpunit --coverage-clover=coverage.xml
after_success:
- bash <(curl -s https://codecov.io/bash)
notifications:
email: false
webhooks:
urls:
- https://webhooks.gitter.im/e/6668f52f3dd4e3f81960
on_success: always
on_failure: always
on_start: false

View File

@@ -1,6 +1,6 @@
Exporter
Copyright (c) 2002-2015, Sebastian Bergmann <sebastian@phpunit.de>.
Copyright (c) 2002-2017, Sebastian Bergmann <sebastian@phpunit.de>.
All rights reserved.
Redistribution and use in source and binary forms, with or without

View File

@@ -162,10 +162,11 @@ LONG_STRING
## Installation
To add Exporter as a local, per-project dependency to your project, simply add a dependency on `sebastian/exporter` to your project's `composer.json` file. Here is a minimal example of a `composer.json` file that just defines a dependency on Exporter 1.0:
You can add this library as a local, per-project dependency to your project using [Composer](https://getcomposer.org/):
composer require sebastian/exporter
If you only need this library during development, for instance to run your project's test suite, then you should add it as a development-time dependency:
composer require --dev sebastian/exporter
{
"require": {
"sebastian/exporter": "1.0.*"
}
}

View File

@@ -1,27 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="exporter">
<project name="exporter" default="setup">
<target name="setup" depends="clean,composer"/>
<target name="clean" description="Cleanup build artifacts">
<delete dir="${basedir}/vendor"/>
<delete file="${basedir}/composer.lock"/>
</target>
<target name="composer" depends="clean" description="Install dependencies with Composer">
<tstamp>
<format property="thirty.days.ago" pattern="MM/dd/yyyy hh:mm aa" offset="-30" unit="day"/>
</tstamp>
<delete>
<fileset dir="${basedir}">
<include name="composer.phar" />
<date datetime="${thirty.days.ago}" when="before"/>
</fileset>
</delete>
<get src="https://getcomposer.org/composer.phar" dest="${basedir}/composer.phar" skipexisting="true"/>
<exec executable="php">
<arg value="composer.phar"/>
<arg value="install"/>
<exec executable="composer" taskname="composer">
<arg value="update"/>
<arg value="--no-interaction"/>
<arg value="--no-progress"/>
<arg value="--no-ansi"/>
<arg value="--no-suggest"/>
<arg value="--optimize-autoloader"/>
<arg value="--prefer-stable"/>
</exec>
</target>
</project>

View File

@@ -27,11 +27,11 @@
}
],
"require": {
"php": ">=5.3.3",
"sebastian/recursion-context": "~1.0"
"php": "^7.0",
"sebastian/recursion-context": "^3.0"
},
"require-dev": {
"phpunit/phpunit": "~4.4",
"phpunit/phpunit": "^6.0",
"ext-mbstring": "*"
},
"autoload": {
@@ -41,7 +41,7 @@
},
"extra": {
"branch-alias": {
"dev-master": "1.3.x-dev"
"dev-master": "3.1.x-dev"
}
}
}

19
vendor/sebastian/exporter/phpunit.xml vendored Normal file
View File

@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/6.0/phpunit.xsd"
bootstrap="vendor/autoload.php"
forceCoversAnnotation="true"
beStrictAboutCoversAnnotation="true"
beStrictAboutOutputDuringTests="true"
beStrictAboutTodoAnnotatedTests="true"
verbose="true">
<testsuite>
<directory suffix="Test.php">tests</directory>
</testsuite>
<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">src</directory>
</whitelist>
</filter>
</phpunit>

View File

@@ -1,21 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
bootstrap="vendor/autoload.php"
beStrictAboutTestsThatDoNotTestAnything="true"
beStrictAboutOutputDuringTests="true"
beStrictAboutTodoAnnotatedTests="true"
checkForUnintentionallyCoveredCode="true"
forceCoversAnnotation="true"
verbose="true">
<testsuites>
<testsuite name="exporter">
<directory>tests</directory>
</testsuite>
</testsuites>
<filter>
<whitelist addUncoveredFilesFromWhitelist="true" processUncoveredFilesFromWhitelist="true">
<directory>src</directory>
</whitelist>
</filter>
</phpunit>

View File

@@ -1,6 +1,6 @@
<?php
/*
* This file is part of the Exporter package.
* This file is part of the exporter package.
*
* (c) Sebastian Bergmann <sebastian@phpunit.de>
*
@@ -38,8 +38,9 @@ class Exporter
* - Carriage returns and newlines are normalized to \n
* - Recursion and repeated rendering is treated properly
*
* @param mixed $value
* @param int $indentation The indentation level of the 2nd+ line
* @param mixed $value
* @param int $indentation The indentation level of the 2nd+ line
*
* @return string
*/
public function export($value, $indentation = 0)
@@ -48,36 +49,34 @@ class Exporter
}
/**
* @param mixed $data
* @param Context $context
* @param mixed $data
* @param Context $context
*
* @return string
*/
public function shortenedRecursiveExport(&$data, Context $context = null)
{
$result = array();
$result = [];
$exporter = new self();
if (!$context) {
$context = new Context;
}
$array = $data;
$context->add($data);
foreach ($data as $key => $value) {
foreach ($array as $key => $value) {
if (is_array($value)) {
if ($context->contains($data[$key]) !== false) {
$result[] = '*RECURSION*';
}
else {
} else {
$result[] = sprintf(
'array(%s)',
$this->shortenedRecursiveExport($data[$key], $context)
);
}
}
else {
} else {
$result[] = $exporter->shortenedExport($value);
}
}
@@ -94,14 +93,16 @@ class Exporter
* Newlines are replaced by the visible string '\n'.
* Contents of arrays and objects (if any) are replaced by '...'.
*
* @param mixed $value
* @param mixed $value
*
* @return string
*
* @see SebastianBergmann\Exporter\Exporter::export
*/
public function shortenedExport($value)
{
if (is_string($value)) {
$string = $this->export($value);
$string = str_replace("\n", '', $this->export($value));
if (function_exists('mb_strlen')) {
if (mb_strlen($string) > 40) {
@@ -113,7 +114,7 @@ class Exporter
}
}
return str_replace("\n", '\n', $string);
return $string;
}
if (is_object($value)) {
@@ -138,7 +139,8 @@ class Exporter
* Converts an object to an array containing all of its private, protected
* and public properties.
*
* @param mixed $value
* @param mixed $value
*
* @return array
*/
public function toArray($value)
@@ -147,7 +149,7 @@ class Exporter
return (array) $value;
}
$array = array();
$array = [];
foreach ((array) $value as $key => $val) {
// properties are transformed to keys in the following way:
@@ -183,10 +185,10 @@ class Exporter
}
foreach ($value as $key => $val) {
$array[spl_object_hash($val)] = array(
$array[spl_object_hash($val)] = [
'obj' => $val,
'inf' => $value->getInfo(),
);
];
}
}
@@ -196,10 +198,12 @@ class Exporter
/**
* Recursive implementation of export
*
* @param mixed $value The value to export
* @param int $indentation The indentation level of the 2nd+ line
* @param \SebastianBergmann\RecursionContext\Context $processed Previously processed objects
* @param mixed $value The value to export
* @param int $indentation The indentation level of the 2nd+ line
* @param \SebastianBergmann\RecursionContext\Context $processed Previously processed objects
*
* @return string
*
* @see SebastianBergmann\Exporter\Exporter::export
*/
protected function recursiveExport(&$value, $indentation, $processed = null)
@@ -235,7 +239,13 @@ class Exporter
}
return "'" .
str_replace(array("\r\n", "\n\r", "\r"), array("\n", "\n", "\n"), $value) .
str_replace('<lf>', "\n",
str_replace(
["\r\n", "\n\r", "\r", "\n"],
['\r\n<lf>', '\n\r<lf>', '\r<lf>', '\n<lf>'],
$value
)
) .
"'";
}
@@ -250,11 +260,12 @@ class Exporter
return 'Array &' . $key;
}
$array = $value;
$key = $processed->add($value);
$values = '';
if (count($value) > 0) {
foreach ($value as $k => $v) {
if (count($array) > 0) {
foreach ($array as $k => $v) {
$values .= sprintf(
'%s %s => %s' . "\n",
$whitespace,

View File

@@ -10,10 +10,12 @@
namespace SebastianBergmann\Exporter;
use PHPUnit\Framework\TestCase;
/**
* @covers SebastianBergmann\Exporter\Exporter
*/
class ExporterTest extends \PHPUnit_Framework_TestCase
class ExporterTest extends TestCase
{
/**
* @var Exporter
@@ -51,15 +53,15 @@ class ExporterTest extends \PHPUnit_Framework_TestCase
$storage->foo = $obj2;
return array(
array(null, 'null'),
array(true, 'true'),
array(false, 'false'),
array(1, '1'),
array(1.0, '1.0'),
array(1.2, '1.2'),
array(fopen('php://memory', 'r'), 'resource(%d) of type (stream)'),
array('1', "'1'"),
array(array(array(1,2,3), array(3,4,5)),
'export null' => array(null, 'null'),
'export boolean true' => array(true, 'true'),
'export boolean false' => array(false, 'false'),
'export int 1' => array(1, '1'),
'export float 1.0' => array(1.0, '1.0'),
'export float 1.2' => array(1.2, '1.2'),
'export stream' => array(fopen('php://memory', 'r'), 'resource(%d) of type (stream)'),
'export numeric string' => array('1', "'1'"),
'export multidimentional array' => array(array(array(1,2,3), array(3,4,5)),
<<<EOF
Array &0 (
0 => Array &1 (
@@ -76,23 +78,23 @@ Array &0 (
EOF
),
// \n\r and \r is converted to \n
array("this\nis\na\nvery\nvery\nvery\nvery\nvery\nvery\rlong\n\rtext",
'export multiline text' => array("this\nis\na\nvery\nvery\nvery\nvery\nvery\nvery\rlong\n\rtext",
<<<EOF
'this
is
a
very
very
very
very
very
very
long
'this\\n
is\\n
a\\n
very\\n
very\\n
very\\n
very\\n
very\\n
very\\r
long\\n\\r
text'
EOF
),
array(new \stdClass, 'stdClass Object &%x ()'),
array($obj,
'export empty stdclass' => array(new \stdClass, 'stdClass Object &%x ()'),
'export non empty stdclass' => array($obj,
<<<EOF
stdClass Object &%x (
'null' => null
@@ -100,16 +102,16 @@ stdClass Object &%x (
'integer' => 1
'double' => 1.2
'string' => '1'
'text' => 'this
is
a
very
very
very
very
very
very
long
'text' => 'this\\n
is\\n
a\\n
very\\n
very\\n
very\\n
very\\n
very\\n
very\\r
long\\n\\r
text'
'object' => stdClass Object &%x (
'foo' => 'bar'
@@ -122,8 +124,8 @@ text'
)
EOF
),
array(array(), 'Array &%d ()'),
array($storage,
'export empty array' => array(array(), 'Array &%d ()'),
'export splObjectStorage' => array($storage,
<<<EOF
SplObjectStorage Object &%x (
'foo' => stdClass Object &%x (
@@ -136,12 +138,13 @@ SplObjectStorage Object &%x (
)
EOF
),
array($obj3,
'export stdClass with numeric properties' => array($obj3,
<<<EOF
stdClass Object &%x (
0 => 1
1 => 2
2 => 'Test\n'
2 => 'Test\\r\\n
'
3 => 4
4 => 5
5 => 6
@@ -212,16 +215,16 @@ Array &%d (
'integer' => 1
'double' => 1.2
'string' => '1'
'text' => 'this
is
a
very
very
very
very
very
very
long
'text' => 'this\\n
is\\n
a\\n
very\\n
very\\n
very\\n
very\\n
very\\n
very\\r
long\\n\\r
text'
'object' => stdClass Object &%x (
'foo' => 'bar'
@@ -237,16 +240,16 @@ text'
'integer' => 1
'double' => 1.2
'string' => '1'
'text' => 'this
is
a
very
very
very
very
very
very
long
'text' => 'this\\n
is\\n
a\\n
very\\n
very\\n
very\\n
very\\n
very\\n
very\\r
long\\n\\r
text'
'object' => stdClass Object &%x
'objectagain' => stdClass Object &%x
@@ -274,18 +277,18 @@ EOF;
);
return array(
array(null, 'null'),
array(true, 'true'),
array(1, '1'),
array(1.0, '1.0'),
array(1.2, '1.2'),
array('1', "'1'"),
'shortened export null' => array(null, 'null'),
'shortened export boolean true' => array(true, 'true'),
'shortened export integer 1' => array(1, '1'),
'shortened export float 1.0' => array(1.0, '1.0'),
'shortened export float 1.2' => array(1.2, '1.2'),
'shortened export numeric string' => array('1', "'1'"),
// \n\r and \r is converted to \n
array("this\nis\na\nvery\nvery\nvery\nvery\nvery\nvery\rlong\n\rtext", "'this\\nis\\na\\nvery\\nvery\\nvery\\nvery...g\\ntext'"),
array(new \stdClass, 'stdClass Object ()'),
array($obj, 'stdClass Object (...)'),
array(array(), 'Array ()'),
array($array, 'Array (...)'),
'shortened export multilinestring' => array("this\nis\na\nvery\nvery\nvery\nvery\nvery\nvery\rlong\n\rtext", "'this\\nis\\na\\nvery\\nvery\\nvery...\\rtext'"),
'shortened export empty stdClass' => array(new \stdClass, 'stdClass Object ()'),
'shortened export not empty stdClass' => array($obj, 'stdClass Object (...)'),
'shortened export empty array' => array(array(), 'Array ()'),
'shortened export not empty array' => array($array, 'Array (...)'),
);
}
@@ -328,7 +331,7 @@ EOF;
public function provideNonBinaryMultibyteStrings()
{
return array(
array(implode('', array_map('chr', range(0x09, 0x0d))), 5),
array(implode('', array_map('chr', range(0x09, 0x0d))), 9),
array(implode('', array_map('chr', range(0x20, 0x7f))), 96),
array(implode('', array_map('chr', range(0x80, 0xff))), 128),
);