Skip to content

Commit

Permalink
Backport GeckoPackages/DiffOutputBuilder
Browse files Browse the repository at this point in the history
  • Loading branch information
SpacePossum committed Oct 19, 2017
1 parent b135a0e commit f0ef613
Show file tree
Hide file tree
Showing 24 changed files with 2,305 additions and 38 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/composer.lock
/phpunit.xml
/vendor/
tests/GeckoPackages/DiffOutputBuilder/Tests/Integration/out
36 changes: 4 additions & 32 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,33 +1,5 @@
sebastian/diff
Code from `sebastian/diff` has been forked and republished by permission of Sebastian Bergmann.
Licenced with BSD-3-Clause @ see LICENSE_DIFF, copyright (c) 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
modification, are permitted provided that the following conditions
are met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.

* Neither the name of Sebastian Bergmann nor the names of his
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
Code from `GeckoPackages/GeckoDiffOutputBuilder` has been copied and republished by permission of GeckoPackages.
Licenced with MIT @ see LICENSE_GECKO, copyright (c) GeckoPackages https://github.com/GeckoPackages
33 changes: 33 additions & 0 deletions LICENSE_DIFF
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
sebastian/diff

Copyright (c) 2002-2017, Sebastian Bergmann <sebastian@phpunit.de>.
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.

* Neither the name of Sebastian Bergmann nor the names of his
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
19 changes: 19 additions & 0 deletions LICENSE_GECKO
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Copyright (c) https://github.com/GeckoPackages

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
# PHP-CS-Fixer/diff

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

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

Do not use it!
Code from `GeckoPackages/GeckoDiffOutputBuilder` has been copied and republished by permission of GeckoPackages.
Licenced with MIT @ see LICENSE_GECKO, copyright (c) GeckoPackages https://github.com/GeckoPackages
https://github.com/GeckoPackages/GeckoDiffOutputBuilder/

For questions visit us @ https://gitter.im/PHP-CS-Fixer/Lobby
12 changes: 9 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "sebastian/diff v2 backport support for PHP5.6",
"keywords": ["diff"],
"homepage": "https://github.com/PHP-CS-Fixer",
"license": "BSD-3-Clause",
"license": "BSD-3-Clause|MIT",
"authors": [
{
"name": "Sebastian Bergmann",
Expand All @@ -12,13 +12,17 @@
{
"name": "Kore Nordmann",
"email": "mail@kore-nordmann.de"
},
{
"name": "SpacePossum"
}
],
"require": {
"php": "^5.6 || ^7.0"
},
"require-dev": {
"phpunit/phpunit": "^4.8.35 || ^5.4.3"
"phpunit/phpunit": "^4.8.35 || ^5.4.3",
"symfony/process": "^3.3"
},
"autoload": {
"classmap": [
Expand All @@ -28,7 +32,9 @@
"autoload-dev": {
"psr-4": {
"PhpCsFixer\\Diff\\v1_4\\Tests\\": "tests/v1_4",
"PhpCsFixer\\Diff\\v2_0\\Tests\\": "tests/v2_0"
"PhpCsFixer\\Diff\\v2_0\\Tests\\": "tests/v2_0",
"PhpCsFixer\\Diff\\GeckoPackages\\DiffOutputBuilder\\Tests\\": "tests/GeckoPackages/DiffOutputBuilder/Tests",
"PhpCsFixer\\Diff\\GeckoPackages\\DiffOutputBuilder\\Utils\\": "tests/GeckoPackages/DiffOutputBuilder/Utils"
}
}
}
36 changes: 36 additions & 0 deletions src/GeckoPackages/DiffOutputBuilder/ConfigurationException.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?php

/*
* This file is part of the GeckoPackages.
*
* (c) GeckoPackages https://github.com/GeckoPackages
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/

namespace PhpCsFixer\Diff\GeckoPackages\DiffOutputBuilder;

use Exception;

final class ConfigurationException extends \InvalidArgumentException
{
public function __construct(
$option,
$expected,
$value,
$code = 0,
Exception $previous = null
) {
parent::__construct(
\sprintf(
'Option "%s" must be %s, got "%s".',
$option,
$expected,
\is_object($value) ? \get_class($value) : (null === $value ? '<null>' : \gettype($value).'#'.$value)
),
$code,
$previous
);
}
}
Loading

0 comments on commit f0ef613

Please sign in to comment.