Skip to content

Commit

Permalink
Merge pull request #71 from neighborhoods/HOTFIX-php81-for-v1
Browse files Browse the repository at this point in the history
HOTFIX | Support PHP 8.1 [1.x]
  • Loading branch information
jpmarcotte authored Oct 18, 2021
2 parents 19414a3 + f3acb27 commit 37811d8
Show file tree
Hide file tree
Showing 29 changed files with 75 additions and 61 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"symfony/dependency-injection": "^4.2",
"symfony/expression-language": "^4.2",
"symfony/filesystem": "^4.2",
"symfony/finder": "^4.2",
"symfony/finder": "^4.4.30",
"symfony/yaml": "^4.2"
},
"autoload": {
Expand Down
15 changes: 8 additions & 7 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions src/V1/AnnotationProcessor/Map.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ public function offsetGet($index): AnnotationProcessorInterface
}

/** @param AnnotationProcessorInterface $AnnotationProcessor */
public function offsetSet($index, $AnnotationProcessor)
public function offsetSet($index, $AnnotationProcessor): void
{
parent::offsetSet($index, $this->assertValidArrayItemType($AnnotationProcessor));
}

/** @param AnnotationProcessorInterface $AnnotationProcessor */
public function append($AnnotationProcessor)
public function append($AnnotationProcessor): void
{
$this->assertValidArrayItemType($AnnotationProcessor);
parent::append($AnnotationProcessor);
Expand All @@ -58,6 +58,7 @@ protected function assertValidArrayType(
return $this;
}

#[\ReturnTypeWillChange]
public function getArrayCopy(): MapInterface
{
return new self(parent::getArrayCopy(), (int)$this->getFlags());
Expand Down
4 changes: 2 additions & 2 deletions src/V1/AnnotationProcessor/MapInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ public function __construct(array $AnnotationProcessors = [], int $flags = 0);
public function offsetGet($index): AnnotationProcessorInterface;

/** @param AnnotationProcessorInterface $AnnotationProcessor */
public function offsetSet($index, $AnnotationProcessor);
public function offsetSet($index, $AnnotationProcessor): void;

/** @param AnnotationProcessorInterface $AnnotationProcessor */
public function append($AnnotationProcessor);
public function append($AnnotationProcessor): void;

public function current(): AnnotationProcessorInterface;

Expand Down
5 changes: 3 additions & 2 deletions src/V1/BooleanMap.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ public function offsetGet($index): bool
return $this->assertValidArrayItemType(parent::offsetGet($index));
}

public function offsetSet($index, $boolean)
public function offsetSet($index, $boolean): void
{
parent::offsetSet($index, $this->assertValidArrayItemType($boolean));
}

/** @param bool $boolean */
public function append($boolean)
public function append($boolean): void
{
$this->assertValidArrayItemType($boolean);
parent::append($boolean);
Expand All @@ -56,6 +56,7 @@ protected function assertValidArrayType(
return $this;
}

#[\ReturnTypeWillChange]
public function getArrayCopy(): BooleanMapInterface
{
return new self(parent::getArrayCopy(), (int)$this->getFlags());
Expand Down
4 changes: 2 additions & 2 deletions src/V1/BooleanMapInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ public function __construct(array $booleans = [], int $flags = 0);
public function offsetGet($index): bool;

/** @param bool $integer */
public function offsetSet($index, $integer);
public function offsetSet($index, $integer): void;

/** @param bool $boolean */
public function append($boolean);
public function append($boolean): void;

public function current(): bool;

Expand Down
2 changes: 1 addition & 1 deletion src/V1/ErrorHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public function __invoke(
string $errorString,
string $errorFile,
int $errorLine,
array $errorContext
array $errorContext = [] // deprecated in PHP 7.2, Removed in 8.0
): ErrorHandlerInterface {
throw new ErrorException($errorString, $errorNumber, $errorNumber, $errorFile, $errorLine);
}
Expand Down
5 changes: 3 additions & 2 deletions src/V1/FabricationFile/Actor/Map.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ public function offsetGet($index): ActorInterface
}

/** @param ActorInterface $Actor */
public function offsetSet($index, $Actor)
public function offsetSet($index, $Actor): void
{
parent::offsetSet($index, $this->assertValidArrayItemType($Actor));
}

/** @param ActorInterface $Actor */
public function append($Actor)
public function append($Actor): void
{
$this->assertValidArrayItemType($Actor);
parent::append($Actor);
Expand All @@ -58,6 +58,7 @@ protected function assertValidArrayType(
return $this;
}

#[\ReturnTypeWillChange]
public function getArrayCopy(): MapInterface
{
return new self(parent::getArrayCopy(), (int)$this->getFlags());
Expand Down
4 changes: 2 additions & 2 deletions src/V1/FabricationFile/Actor/MapInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ public function __construct(array $Actors = [], int $flags = 0);
public function offsetGet($index): ActorInterface;

/** @param ActorInterface $Actor */
public function offsetSet($index, $Actor);
public function offsetSet($index, $Actor): void;

/** @param ActorInterface $Actor */
public function append($Actor);
public function append($Actor): void;

public function current(): ActorInterface;

Expand Down
5 changes: 3 additions & 2 deletions src/V1/FabricationFile/Map.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ public function offsetGet($index): FabricationFileInterface
}

/** @param FabricationFileInterface $FabricationFile */
public function offsetSet($index, $FabricationFile)
public function offsetSet($index, $FabricationFile): void
{
parent::offsetSet($index, $this->assertValidArrayItemType($FabricationFile));
}

/** @param FabricationFileInterface $FabricationFile */
public function append($FabricationFile)
public function append($FabricationFile): void
{
$this->assertValidArrayItemType($FabricationFile);
parent::append($FabricationFile);
Expand All @@ -58,6 +58,7 @@ protected function assertValidArrayType(
return $this;
}

#[\ReturnTypeWillChange]
public function getArrayCopy(): MapInterface
{
return new self(parent::getArrayCopy(), (int)$this->getFlags());
Expand Down
4 changes: 2 additions & 2 deletions src/V1/FabricationFile/MapInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ public function __construct(array $FabricationFiles = [], int $flags = 0);
public function offsetGet($index): FabricationFileInterface;

/** @param FabricationFileInterface $FabricationFile */
public function offsetSet($index, $FabricationFile);
public function offsetSet($index, $FabricationFile): void;

/** @param FabricationFileInterface $FabricationFile */
public function append($FabricationFile);
public function append($FabricationFile): void;

public function current(): FabricationFileInterface;

Expand Down
5 changes: 3 additions & 2 deletions src/V1/FloatingPointMap.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ public function offsetGet($index): float
}

/** @param float $floatingPoint */
public function offsetSet($index, $floatingPoint)
public function offsetSet($index, $floatingPoint): void
{
parent::offsetSet($index, $this->assertValidArrayItemType($floatingPoint));
}

/** @param float $floatingPoint */
public function append($floatingPoint)
public function append($floatingPoint): void
{
$this->assertValidArrayItemType($floatingPoint);
parent::append($floatingPoint);
Expand All @@ -57,6 +57,7 @@ protected function assertValidArrayType(
return $this;
}

#[\ReturnTypeWillChange]
public function getArrayCopy(): FloatingPointMapInterface
{
return new self(parent::getArrayCopy(), (int)$this->getFlags());
Expand Down
4 changes: 2 additions & 2 deletions src/V1/FloatingPointMapInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ public function __construct(array $floatingPoints = [], int $flags = 0);
public function offsetGet($index): float;

/** @param float $floatingPoint */
public function offsetSet($index, $floatingPoint);
public function offsetSet($index, $floatingPoint): void;

/** @param float $floatingPoint */
public function append($floatingPoint);
public function append($floatingPoint): void;

public function current(): float;

Expand Down
5 changes: 3 additions & 2 deletions src/V1/IntegerMap.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ public function offsetGet($index): int
}

/** @param int $integer */
public function offsetSet($index, $integer)
public function offsetSet($index, $integer): void
{
parent::offsetSet($index, $this->assertValidArrayItemType($integer));
}

/** @param int $boolean */
public function append($boolean)
public function append($boolean): void
{
$this->assertValidArrayItemType($boolean);
parent::append($boolean);
Expand All @@ -57,6 +57,7 @@ protected function assertValidArrayType(
return $this;
}

#[\ReturnTypeWillChange]
public function getArrayCopy(): IntegerMapInterface
{
return new self(parent::getArrayCopy(), (int)$this->getFlags());
Expand Down
4 changes: 2 additions & 2 deletions src/V1/IntegerMapInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ public function __construct(array $integers = [], int $flags = 0);
public function offsetGet($index): int;

/** @param int $integer */
public function offsetSet($index, $integer);
public function offsetSet($index, $integer): void;

/** @param int $integer */
public function append($integer);
public function append($integer): void;

public function current(): int;

Expand Down
5 changes: 3 additions & 2 deletions src/V1/StringMap.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ public function offsetGet($index): string
}

/** @param string $string */
public function offsetSet($index, $string)
public function offsetSet($index, $string): void
{
parent::offsetSet($index, $this->assertValidArrayItemType($string));
}

/** @param string $string */
public function append($string)
public function append($string): void
{
$this->assertValidArrayItemType($string);
parent::append($string);
Expand All @@ -57,6 +57,7 @@ protected function assertValidArrayType(
return $this;
}

#[\ReturnTypeWillChange]
public function getArrayCopy(): StringMapInterface
{
return new self(parent::getArrayCopy(), (int)$this->getFlags());
Expand Down
4 changes: 2 additions & 2 deletions src/V1/StringMapInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ public function __construct(array $string = [], int $flags = 0);
public function offsetGet($index): string;

/** @param string $string */
public function offsetSet($index, $string);
public function offsetSet($index, $string): void;

/** @param string $string */
public function append($string);
public function append($string): void;

public function current(): string;

Expand Down
5 changes: 3 additions & 2 deletions src/V1/Symfony/Component/Finder/Map.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ public function offsetGet($index): Finder
}

/** @param Finder $finder */
public function offsetSet($index, $finder)
public function offsetSet($index, $finder): void
{
parent::offsetSet($index, $this->assertValidArrayItemType($finder));
}

/** @param Finder $finder */
public function append($finder)
public function append($finder): void
{
$this->assertValidArrayItemType($finder);
parent::append($finder);
Expand All @@ -59,6 +59,7 @@ protected function assertValidArrayType(
return $this;
}

#[\ReturnTypeWillChange]
public function getArrayCopy(): MapInterface
{
return new self(parent::getArrayCopy(), (int)$this->getFlags());
Expand Down
4 changes: 2 additions & 2 deletions src/V1/Symfony/Component/Finder/MapInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ public function __construct(array $finders = [], int $flags = 0);
public function offsetGet($index): Finder;

/** @param Finder $finder */
public function offsetSet($index, $finder);
public function offsetSet($index, $finder): void;

/** @param Finder $finder */
public function append($finder);
public function append($finder): void;

public function current(): Finder;

Expand Down
5 changes: 3 additions & 2 deletions src/V1/TemplateTree/Map.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ public function offsetGet($index): TemplateTreeInterface
}

/** @param TemplateTreeInterface $templateTree */
public function offsetSet($index, $templateTree)
public function offsetSet($index, $templateTree): void
{
parent::offsetSet($index, $this->assertValidArrayItemType($templateTree));
}

/** @param TemplateTreeInterface $templateTree */
public function append($templateTree)
public function append($templateTree): void
{
$this->assertValidArrayItemType($templateTree);
parent::append($templateTree);
Expand All @@ -58,6 +58,7 @@ protected function assertValidArrayType(
return $this;
}

#[\ReturnTypeWillChange]
public function getArrayCopy(): MapInterface
{
return new self(parent::getArrayCopy(), (int)$this->getFlags());
Expand Down
4 changes: 2 additions & 2 deletions src/V1/TemplateTree/MapInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ public function __construct(array $templateTrees = [], int $flags = 0);
public function offsetGet($index): TemplateTreeInterface;

/** @param TemplateTreeInterface $templateTree */
public function offsetSet($index, $templateTree);
public function offsetSet($index, $templateTree): void;

/** @param TemplateTreeInterface $templateTree */
public function append($templateTree);
public function append($templateTree): void;

public function current(): TemplateTreeInterface;

Expand Down
Loading

0 comments on commit 37811d8

Please sign in to comment.