Skip to content

Commit

Permalink
[PWA-2721] upward-php latest develop not compatible with php 7.4 on c…
Browse files Browse the repository at this point in the history
…loud pro. (#8)

* Remove types that don't support 7.4

* Code style fixes

* Add attribute until we drop support for 7.4
  • Loading branch information
tjwiebell authored Apr 4, 2022
1 parent 2f1066a commit fa43ce4
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -151,5 +151,6 @@ fabric.properties
# End of https://www.gitignore.io/api/macos,linux,composer,phpstorm,visualstudiocode

.php_cs.cache
.php-cs-fixer.cache
phpunit.xml
node_modules
10 changes: 5 additions & 5 deletions src/AbstractKeyValueStore.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ public function count(): int
return \count($this->data);
}

public function current(): mixed
#[\ReturnTypeWillChange]
public function current()
{
return $this->get($this->key());
}
Expand Down Expand Up @@ -123,15 +124,14 @@ public function isList(): bool

/**
* Data to include when serializing to JSON.
*
* @return array
*/
public function jsonSerialize(): mixed
public function jsonSerialize(): array
{
return $this->toArray();
}

public function key(): mixed
#[\ReturnTypeWillChange]
public function key()
{
return key($this->data);
}
Expand Down
2 changes: 2 additions & 0 deletions src/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ class Controller
private $request;

/**
* @param ?array $additionalResolvers
*
* @throws \RuntimeException if a required key is missing from $upwardCofig file
*/
public function __construct(
Expand Down
2 changes: 1 addition & 1 deletion src/ResolverFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class ResolverFactory
self::RESOLVER_TYPE_PROXY => Resolver\Proxy::class,
self::RESOLVER_TYPE_SERVICE => Resolver\Service::class,
self::RESOLVER_TYPE_TEMPLATE => Resolver\Template::class,
self::RESOLVER_TYPE_URL => Resolver\Url::class
self::RESOLVER_TYPE_URL => Resolver\Url::class,
];

/**
Expand Down

0 comments on commit fa43ce4

Please sign in to comment.