Tools

Repository Author Commit message Committed SHA  
 
phpstan-rules by dg added Tester\Assert type narrowing for assertion methods (null, notNull, true, false, same, type, …)
phpstan-rules by dg updated github actions
phpstan-rules by dg RemoveFailingReturnTypeExtension: preserved |false for UTF-8 validation patterns like //u
phpstan-rules by dg readonly properties
phpstan-rules by dg cs: grouped use statements
phpstan-rules by dg warn when catch swallows Nette\Application\AbortException

New RethrowAbortExceptionRule flags the common presenter bug where a broad
catch (\Throwable)/catch (\Exception) swallows an AbortException thrown by
redirect()/forward()/terminate(), silently breaking the redirect. It fires
only when the try block can actually throw AbortException (detected via
method getThrowType()) and the first matching catch does not rethrow.
Carving out a catch (AbortException) { throw; } before the broad catch
silences it. Enabled by default.

phpstan-rules by dg added boilerplate
phpstan-rules by dg cs
phpstan-rules by dg enabled strict PHPStan analysis parameters

Added 9 strict analysis parameters to extension.neon to enforce stricter
type checking in Nette libraries: callable signatures, function/class name
casing, nullable types in signatures and PHPDocs, redundant conditions,
and @var tag validation.

phpstan-rules by dg treat #[Inject] attribute properties as initialized

New InjectPropertyExtension (ReadWritePropertiesExtension) marks properties
annotated with #[Nette\DI\Attributes\Inject] as always-written and
initialized, since Nette DI assigns them after instantiation. Only the
attribute form is recognized, not the legacy @inject phpDoc.

Also teaches TypeAssert::assertNoErrors() to pass the analysed file into
analysedPaths (like assertTypes already does), so classes defined in the
test file are in reflection scope.

phpstan-rules by dg added TypeAssert helper for type inference testing with Nette Tester
phpstan-rules by dg added Forms\Container::getComponent() and $form['…'] return type narrowing based on addXxx() calls
phpstan-rules by dg added universalObjectCratesClasses for Nette
phpstan-rules by dg added Helpers::falseToNull() return type narrowing (string|false → string|null)
phpstan-rules by dg added readme.md
phpstan-rules by dg added Strings::match/matchAll/split() return type narrowing based on boolean arguments
phpstan-rules by dg added ExpectTypeReturnTypeExtension for Expect::type()

Expect::type() declares Type (Type|AnyOf since schema 2.0), while the element
it returns depends on the expression: 'int' is a NumberType with min() and
max(), 'int|string' an AnyOf. The extension resolves a constant expression by
asking Expect::type() itself, so it needs no knowledge of the expression
language and its answer follows whatever the installed nette/schema builds; a
non-constant expression, or one the installed version refuses, keeps the
declared type.

phpstan-rules by dg RemoveFailingReturnTypeExtension: preg_replace/filter null return type removal
phpstan-rules by dg added ClosureTypeCheckIgnoreExtension for runtime type validation pattern (function(Type ...$p) {})(...$args)
phpstan-rules by dg infer $matches type in Strings::replace() callback from regex

New StringsReplaceClosureTypeExtension derives the exact capture-group
shape of the $matches argument of a Strings::replace() callback from the
constant pattern, via RegexArrayShapeMatcher. Falls back to no inference
for non-constant patterns/flags. NativeParameterReflection is internal
phpstan API, so phpstanApi.constructor is ignored for this file.

phpstan-rules by dg composer.json: updated description, keywords and homepage
latte-tools by dg added copy of Twig 3.2
latte-tools by dg cs
latte-tools by dg readme: updated links
latte-tools by dg changed namespace to Twiggy
latte-tools by dg twiggy: removed Compiler::addDebugInfo, indent(), outdent()
latte-tools by dg updated .gitattributes
latte-tools by dg twiggy: uses class consts
latte-tools by dg Lexer: removed whitespace trimming
latte-tools by dg twiggy: |default compiles as ??
latte-tools by dg twiggy: fixed In operator
latte-tools by dg twiggy Compiler: generates Latte strings

Last synchronization: 2026-11-10 08:03:12