rvanvelzen
Repos
36
Followers
23
Following
24

Small PHP extension exposing zend_string's internal hash value

C
0
0

Detect the character encoding using Google’s compact_enc_det library

0
1

Events

delete branch
rvanvelzen delete branch assert-class-type
Created at 7 hours ago
issue comment
Fix asserting a class template type when a method also has template t…

I couldn't get it to work in PhpClassReflectionExtension, but I've found a simpler change that also works

Created at 8 hours ago

Make array access on possible false tolerant with isset

Updated BetterReflection

Merge branch '1.8.x' into 1.9.x

Fix asserting a class template type when a method also has template types

Simpler fix

Created at 8 hours ago
pull request opened
Fix asserting a class template type when a method also has template t…

…ypes

Created at 9 hours ago
create branch
rvanvelzen create branch assert-class-type
Created at 9 hours ago
issue comment
PHPDoc-based type narrowing

I don't think so, because $this on its own isn't assertable right now.

Created at 1 day ago
delete branch
rvanvelzen delete branch asserts
Created at 1 day ago

Regression test

Do not call CollectedDataNode rules if internal errors are present

Merge branch '1.8.x' into 1.9.x

Update compiler to v6.1.5

Remove IssetCheck/MutatingScope::issetCheck deviations and remove too early exits

Fixed universal object crate classes not respecting @property annotations.

Merge branch '1.8.x' into 1.9.x

There's no valid use-case to implement Scope or FunctionReflection

PoC assertions

Verify templated asserts

Remove useless implementations

Fix always true/false checks

Test stubs and inheritance

Use only a single array of tags and fix inheritance

Add rules and tests

Remove unused 'this' arg

Prevent errors from class template types

Add empty pseudo-type (used by PHPUnit)

Improve unresolved template check

Simplify used expressions

Created at 1 day ago

Prevent always true/false errors for unresolvable template types

Created at 1 day ago
issue comment
Implement array list type

non-empty-array<0|1|2|3, literal-string&non-falsy-string>&list should be non-empty-list<0|1|2|3, literal-string&non-falsy-string>.

This was on purpose, to always have list<...> equal array<int<0, max>, ...>. To change this the input syntax should also be extended, and I'm not really convinced that that is useful.

An idea - is this how we want to collapse list<mixed>|array<string, mixed>? https://phpstan.org/r/b7ffe028-2aca-472b-a61f-8d7c00b825c1

I think that is the best we can do in general. Trying to keep list separate introduces a lot of complexity in the code that handles unions of constant arrays, because array{} can be seen as both a list and a regular array. I don't think it's worth the complexity.

Created at 1 day ago
delete branch
rvanvelzen delete branch array-list
Created at 1 day ago
issue comment
Implement array list type

I can't get these tests to fail locally. No idea what is going on :/

Nice :) Did you observe the failures in the integration projects when the list type was enabled for everyone? Were they legit bugs, or false positives caused by PHPStan changes?

I looked at them when they failed and as far as I recall they were all legit failures.

Created at 3 days ago
Created at 3 days ago

Hopefully make tests work reliably

Created at 3 days ago

Preserve non-empty-array type when generalizing arrays

Implement array list type

Fix array_chunk extension

ConstantArrayType::getAllArrays() should only return lists for list

Fix issues in PHPStan itself

Fix ConstantArrayType::getKeysArray() and ::getValuesArray()

Fix PHP<8 tests

Always parse list in signature maps as list

Completely disable list type when feature toggle is disabled

Fix new tests

Created at 3 days ago
create branch
rvanvelzen create branch 1.9.x
Created at 3 days ago
issue comment
Implement array list type

Unfortunately some global state is needed, but this should make it completely disabled for non-bleeding-edge.

Created at 4 days ago

Implement array list type

Fix array_chunk extension

ConstantArrayType::getAllArrays() should only return lists for list

Fix issues in PHPStan itself

Fix ConstantArrayType::getKeysArray() and ::getValuesArray()

Fix PHP<8 tests

Always parse list in signature maps as list

Completely disable list type when feature toggle is disabled

Created at 4 days ago
issue comment
PHPDoc-based type narrowing

This is rebased and functionally ready.

I've tried to refactor to your suggestion, but I can't figure out how to do it properly - you don't have easy access to resolved template types with just the reflection :/

Created at 4 days ago

Test methods and properties

Created at 4 days ago

Update PhpStorm stubs

Update PHP 8 stubs

Fix tests

MutatingScope - more micro-optimization

Extract ConstructorsHelper

Use ConstructorsHelper in ReadOnlyByPhpDocPropertyAssignRule and ReadOnlyPropertyAssignRule

Fix incorrect argument for RedisCluster::getOption and RedisCluster::setOption

Support @immutable phpdoc

testBug7229 - reflect real state

infer non-empty-string on substr() comparison with constant string

Merge branch '1.6.x' into 1.7.x

Discover PHPStan\Testing\ using an OptimizedPsrAutoloaderLocator

Testing namespace is excluded in preload.php script because of dependency on PHPUnit We don't want to discover it using AutoloadSourceLocator because it corrupts OPCache

Fix invalidating conditional expressions after ArrayDimFetch unset

Merge branch '1.6.x' into 1.7.x

Allow setting error format in configuration

ClearResultCacheCommand - allow --debug flag

Data provider-based tests for ArgumentsNormalizer

Rename

Typos

Class attributes should also be included in class statements

Fixes #7116

Created at 4 days ago

Fix array_chunk extension

ConstantArrayType::getAllArrays() should only return lists for list

Fix issues in PHPStan itself

Fix ConstantArrayType::getKeysArray() and ::getValuesArray()

Fix PHP<8 tests

Always parse list in signature maps as list

Created at 4 days ago