Skip to content

Commit f0ef613

Browse files
committed
Backport GeckoPackages/DiffOutputBuilder
1 parent b135a0e commit f0ef613

24 files changed

+2305
-38
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
/composer.lock
22
/phpunit.xml
33
/vendor/
4+
tests/GeckoPackages/DiffOutputBuilder/Tests/Integration/out

LICENSE

+4-32
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,5 @@
1-
sebastian/diff
1+
Code from `sebastian/diff` has been forked and republished by permission of Sebastian Bergmann.
2+
Licenced with BSD-3-Clause @ see LICENSE_DIFF, copyright (c) Sebastian Bergmann <[email protected]>
23

3-
Copyright (c) 2002-2017, Sebastian Bergmann <[email protected]>.
4-
All rights reserved.
5-
6-
Redistribution and use in source and binary forms, with or without
7-
modification, are permitted provided that the following conditions
8-
are met:
9-
10-
* Redistributions of source code must retain the above copyright
11-
notice, this list of conditions and the following disclaimer.
12-
13-
* Redistributions in binary form must reproduce the above copyright
14-
notice, this list of conditions and the following disclaimer in
15-
the documentation and/or other materials provided with the
16-
distribution.
17-
18-
* Neither the name of Sebastian Bergmann nor the names of his
19-
contributors may be used to endorse or promote products derived
20-
from this software without specific prior written permission.
21-
22-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23-
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24-
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
25-
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
26-
COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
27-
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
28-
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29-
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
30-
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31-
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
32-
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33-
POSSIBILITY OF SUCH DAMAGE.
4+
Code from `GeckoPackages/GeckoDiffOutputBuilder` has been copied and republished by permission of GeckoPackages.
5+
Licenced with MIT @ see LICENSE_GECKO, copyright (c) GeckoPackages https://github.com/GeckoPackages

LICENSE_DIFF

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
sebastian/diff
2+
3+
Copyright (c) 2002-2017, Sebastian Bergmann <[email protected]>.
4+
All rights reserved.
5+
6+
Redistribution and use in source and binary forms, with or without
7+
modification, are permitted provided that the following conditions
8+
are met:
9+
10+
* Redistributions of source code must retain the above copyright
11+
notice, this list of conditions and the following disclaimer.
12+
13+
* Redistributions in binary form must reproduce the above copyright
14+
notice, this list of conditions and the following disclaimer in
15+
the documentation and/or other materials provided with the
16+
distribution.
17+
18+
* Neither the name of Sebastian Bergmann nor the names of his
19+
contributors may be used to endorse or promote products derived
20+
from this software without specific prior written permission.
21+
22+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
25+
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
26+
COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
27+
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
28+
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
30+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31+
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
32+
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33+
POSSIBILITY OF SUCH DAMAGE.

LICENSE_GECKO

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Copyright (c) https://github.com/GeckoPackages
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy
4+
of this software and associated documentation files (the "Software"), to deal
5+
in the Software without restriction, including without limitation the rights
6+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
copies of the Software, and to permit persons to whom the Software is furnished
8+
to do so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in all
11+
copies or substantial portions of the Software.
12+
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19+
THE SOFTWARE.

README.md

+9-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
# PHP-CS-Fixer/diff
22

3-
Fork of sebastian/diff
3+
This is version is for PHP CS Fixer only! Do not use it!
44

5-
This is version is for PHP CS Fixer only!
5+
Code from `sebastian/diff` has been forked a republished by permission of Sebastian Bergmann.
6+
Licenced with BSD-3-Clause @ see LICENSE_DIFF, copyright (c) Sebastian Bergmann <[email protected]>
7+
https://github.com/sebastianbergmann/diff
68

7-
Do not use it!
9+
Code from `GeckoPackages/GeckoDiffOutputBuilder` has been copied and republished by permission of GeckoPackages.
10+
Licenced with MIT @ see LICENSE_GECKO, copyright (c) GeckoPackages https://github.com/GeckoPackages
11+
https://github.com/GeckoPackages/GeckoDiffOutputBuilder/
12+
13+
For questions visit us @ https://gitter.im/PHP-CS-Fixer/Lobby

composer.json

+9-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "sebastian/diff v2 backport support for PHP5.6",
44
"keywords": ["diff"],
55
"homepage": "https://github.com/PHP-CS-Fixer",
6-
"license": "BSD-3-Clause",
6+
"license": "BSD-3-Clause|MIT",
77
"authors": [
88
{
99
"name": "Sebastian Bergmann",
@@ -12,13 +12,17 @@
1212
{
1313
"name": "Kore Nordmann",
1414
"email": "[email protected]"
15+
},
16+
{
17+
"name": "SpacePossum"
1518
}
1619
],
1720
"require": {
1821
"php": "^5.6 || ^7.0"
1922
},
2023
"require-dev": {
21-
"phpunit/phpunit": "^4.8.35 || ^5.4.3"
24+
"phpunit/phpunit": "^4.8.35 || ^5.4.3",
25+
"symfony/process": "^3.3"
2226
},
2327
"autoload": {
2428
"classmap": [
@@ -28,7 +32,9 @@
2832
"autoload-dev": {
2933
"psr-4": {
3034
"PhpCsFixer\\Diff\\v1_4\\Tests\\": "tests/v1_4",
31-
"PhpCsFixer\\Diff\\v2_0\\Tests\\": "tests/v2_0"
35+
"PhpCsFixer\\Diff\\v2_0\\Tests\\": "tests/v2_0",
36+
"PhpCsFixer\\Diff\\GeckoPackages\\DiffOutputBuilder\\Tests\\": "tests/GeckoPackages/DiffOutputBuilder/Tests",
37+
"PhpCsFixer\\Diff\\GeckoPackages\\DiffOutputBuilder\\Utils\\": "tests/GeckoPackages/DiffOutputBuilder/Utils"
3238
}
3339
}
3440
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the GeckoPackages.
5+
*
6+
* (c) GeckoPackages https://github.com/GeckoPackages
7+
*
8+
* This source file is subject to the MIT license that is bundled
9+
* with this source code in the file LICENSE.
10+
*/
11+
12+
namespace PhpCsFixer\Diff\GeckoPackages\DiffOutputBuilder;
13+
14+
use Exception;
15+
16+
final class ConfigurationException extends \InvalidArgumentException
17+
{
18+
public function __construct(
19+
$option,
20+
$expected,
21+
$value,
22+
$code = 0,
23+
Exception $previous = null
24+
) {
25+
parent::__construct(
26+
\sprintf(
27+
'Option "%s" must be %s, got "%s".',
28+
$option,
29+
$expected,
30+
\is_object($value) ? \get_class($value) : (null === $value ? '<null>' : \gettype($value).'#'.$value)
31+
),
32+
$code,
33+
$previous
34+
);
35+
}
36+
}

0 commit comments

Comments
 (0)