Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@
"nette/tester": "^2.3.1",
"ninjify/nunjuck": "^0.4.0",
"ninjify/qa": "^0.13",
"phpstan/phpstan": "^1.8",
"phpstan/phpstan-deprecation-rules": "^1.0",
"phpstan/phpstan-nette": "^1.0",
"phpstan/phpstan-strict-rules": "^1.1",
"phpstan/phpstan": "^2.1",
"phpstan/phpstan-deprecation-rules": "^2.0",
"phpstan/phpstan-nette": "^2.0",
"phpstan/phpstan-strict-rules": "^2.0",
"psr/log": "^1.1|^2.0|^3.0",
"tracy/tracy": "^2.8"
},
Expand Down
7 changes: 3 additions & 4 deletions phpstan.lowest.neon
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ parameters:
excludePaths:
- src/Latte/TranslatorExtension.php
- src/Latte/Nodes/*
reportUnmatchedIgnoredErrors: false
ignoreErrors:
-
count: 2
Expand All @@ -24,10 +25,9 @@ parameters:

-
message: """
#^Fetching class constant class of deprecated class Nette\\\\Localization\\\\ITranslator\\:
#^Fetching class constant class of deprecated (class|interface) Nette\\\\Localization\\\\ITranslator\\:
use Nette\\\\Localization\\\\Translator$#
"""
count: 2
path: src/DI/TranslationExtension.php

-
Expand Down Expand Up @@ -64,8 +64,7 @@ parameters:

-
message: """
#^Fetching class constant class of deprecated class Nette\\\\Bridges\\\\ApplicationLatte\\\\ILatteFactory\\:
#^Fetching class constant class of deprecated (class|interface) Nette\\\\Bridges\\\\ApplicationLatte\\\\ILatteFactory\\:
use Nette\\\\Bridges\\\\ApplicationLatte\\\\LatteFactory$#
"""
count: 1
path: src/DI/TranslationExtension.php
11 changes: 9 additions & 2 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ parameters:
message: '#^Variable property access on object\.$#'
path: 'src/Loaders/Doctrine.php'

# upstream Finder iteration types vary between phpstan-nette versions;
# the instanceof guard is needed for phpstan-lowest but redundant here.
-
message: '#^Instanceof between Nette\\Utils\\FileInfo and SplFileInfo will always evaluate to true\.$#'
count: 1
path: src/DI/TranslationExtension.php

-
count: 2
message: '#^Comparison operation "\<" between \d+ and \d+ is always false\.$#'
Expand All @@ -38,15 +45,15 @@ parameters:
# -------------------------------------------------------------------
-
message: """
#^Fetching class constant class of deprecated interface Nette\\\\Bridges\\\\ApplicationLatte\\\\ILatteFactory\\:
#^Access to constant on deprecated interface Nette\\\\Bridges\\\\ApplicationLatte\\\\ILatteFactory\\:
use Nette\\\\Bridges\\\\ApplicationLatte\\\\LatteFactory$#
"""
count: 1
path: src/DI/TranslationExtension.php

-
message: """
#^Fetching class constant class of deprecated interface Nette\\\\Localization\\\\ITranslator\\:
#^Access to constant on deprecated interface Nette\\\\Localization\\\\ITranslator\\:
use Nette\\\\Localization\\\\Translator$#
"""
count: 2
Expand Down
4 changes: 1 addition & 3 deletions src/DI/Helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
namespace Contributte\Translation\DI;

use Contributte\Translation\Exceptions\InvalidState;
use Nette\DI\Definitions\Definition;
use Nette\DI\Definitions\Reference;
use Nette\DI\Definitions\Statement;

class Helpers
Expand All @@ -17,7 +15,7 @@ class Helpers
public static function unwrapEntity(Statement|string $input): string
{
if ($input instanceof Statement) {
/** @var class-string|Reference|Definition|mixed[] $entity */
/** @var class-string|null $entity */
$entity = $input->getEntity();
if (is_string($entity)) {
return $entity;
Expand Down
Loading
Loading