updated-packages

This commit is contained in:
RafficMohammed
2023-01-08 00:13:22 +05:30
parent 3ff7df7487
commit da241bacb6
12659 changed files with 563377 additions and 510538 deletions

View File

@@ -2,4 +2,5 @@
/composer.lock
/vendor
/.php_cs.cache
/.phpunit.result.cache
/from.txt.orig

View File

@@ -3,6 +3,7 @@ language: php
php:
- 7.1
- 7.2
- 7.3
- master
sudo: false

View File

@@ -2,6 +2,18 @@
All notable changes are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles.
## [3.0.3] - 2020-11-30
### Changed
* Changed PHP version constraint in `composer.json` from `^7.1` to `>=7.1`
## [3.0.2] - 2019-02-04
### Changed
* `Chunk::setLines()` now ensures that the `$lines` array only contains `Line` objects
## [3.0.1] - 2018-06-10
### Fixed
@@ -40,6 +52,8 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](htt
* This component is no longer supported on PHP 5.6
[3.0.3]: https://github.com/sebastianbergmann/diff/compare/3.0.2...3.0.3
[3.0.2]: https://github.com/sebastianbergmann/diff/compare/3.0.1...3.0.2
[3.0.1]: https://github.com/sebastianbergmann/diff/compare/3.0.0...3.0.1
[3.0.0]: https://github.com/sebastianbergmann/diff/compare/2.0...3.0.0
[2.0.1]: https://github.com/sebastianbergmann/diff/compare/c341c98ce083db77f896a0aa64f5ee7652915970...2.0.1

View File

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

View File

@@ -15,10 +15,10 @@
}
],
"require": {
"php": "^7.1"
"php": ">=7.1"
},
"require-dev": {
"phpunit/phpunit": "^7.0",
"phpunit/phpunit": "^7.5 || ^8.0",
"symfony/process": "^2 || ^3.3 || ^4"
},
"autoload": {

View File

@@ -33,7 +33,7 @@ final class Chunk
private $endRange;
/**
* @var array
* @var Line[]
*/
private $lines;
@@ -66,13 +66,25 @@ final class Chunk
return $this->endRange;
}
/**
* @return Line[]
*/
public function getLines(): array
{
return $this->lines;
}
/**
* @param Line[] $lines
*/
public function setLines(array $lines): void
{
foreach ($lines as $line) {
if (!$line instanceof Line) {
throw new InvalidArgumentException;
}
}
$this->lines = $lines;
}
}

View File

@@ -27,6 +27,11 @@ final class ChunkTest extends TestCase
$this->chunk = new Chunk;
}
public function testHasInitiallyNoLines(): void
{
$this->assertSame([], $this->chunk->getLines());
}
public function testCanBeCreatedWithoutArguments(): void
{
$this->assertInstanceOf(Chunk::class, $this->chunk);
@@ -59,10 +64,10 @@ final class ChunkTest extends TestCase
public function testLinesCanBeSet(): void
{
$this->assertSame([], $this->chunk->getLines());
$lines = [new Line(Line::ADDED, 'added'), new Line(Line::REMOVED, 'removed')];
$testValue = ['line0', 'line1'];
$this->chunk->setLines($testValue);
$this->assertSame($testValue, $this->chunk->getLines());
$this->chunk->setLines($lines);
$this->assertSame($lines, $this->chunk->getLines());
}
}

View File

@@ -426,24 +426,6 @@ EOF
];
}
public function testConstructorNull(): void
{
$this->assertAttributeInstanceOf(
UnifiedDiffOutputBuilder::class,
'outputBuilder',
new Differ(null)
);
}
public function testConstructorString(): void
{
$this->assertAttributeInstanceOf(
UnifiedDiffOutputBuilder::class,
'outputBuilder',
new Differ("--- Original\n+++ New\n")
);
}
public function testConstructorInvalidArgInt(): void
{
$this->expectException(InvalidArgumentException::class);

View File

@@ -190,7 +190,7 @@ abstract class LongestCommonSubsequenceTest extends TestCase
{
$diff = $this->implementation->calculate(['5'], ['05']);
$this->assertInternalType('array', $diff);
$this->assertIsArray($diff);
$this->assertCount(0, $diff);
}

View File

@@ -38,12 +38,10 @@ final class ParserTest extends TestCase
$diffs = $this->parser->parse($content);
$this->assertInternalType('array', $diffs);
$this->assertContainsOnlyInstancesOf(Diff::class, $diffs);
$this->assertCount(1, $diffs);
$chunks = $diffs[0]->getChunks();
$this->assertInternalType('array', $chunks);
$this->assertContainsOnlyInstancesOf(Chunk::class, $chunks);
$this->assertCount(1, $chunks);
@@ -85,13 +83,11 @@ index abcdefg..abcdefh 100644
-B
END;
$diffs = $this->parser->parse($content);
$this->assertInternalType('array', $diffs);
$this->assertContainsOnlyInstancesOf(Diff::class, $diffs);
$this->assertCount(1, $diffs);
$chunks = $diffs[0]->getChunks();
$this->assertInternalType('array', $chunks);
$this->assertContainsOnlyInstancesOf(Chunk::class, $chunks);
$this->assertCount(1, $chunks);
@@ -102,7 +98,6 @@ END;
$this->assertSame(8, $chunk->getEndRange());
$lines = $chunk->getLines();
$this->assertInternalType('array', $lines);
$this->assertContainsOnlyInstancesOf(Line::class, $lines);
$this->assertCount(2, $lines);