Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
3328 commits
Select commit Hold shift + click to select a range
74c02de
Throw points in CallableParametersAcceptor
ondrejmirtes Mar 18, 2024
2c11df5
Fix build
ondrejmirtes Mar 18, 2024
4e2778b
Refactoring to reuse getServiceClassNames in more places
ondrejmirtes Mar 19, 2024
9338fdf
Warn about possibly stale result cache with custom extensions
ondrejmirtes Mar 19, 2024
aedc049
Merge remote-tracking branch 'origin/1.10.x' into 1.11.x
ondrejmirtes Mar 19, 2024
b3622a1
Fix deprecated parameter order
sayuprc Mar 16, 2024
9bb4ef9
Track invalidated `$this` and used variables after invoking closure
ondrejmirtes Mar 19, 2024
200641e
Fix DomDocument load return type
VincentLanglet Mar 17, 2024
255fbff
Test invalidated object in static closure
staabm Mar 20, 2024
0f8a352
Introduce ForbiddenClassNameExtension for append additional forbidden…
kamil-zacek Mar 19, 2024
8b8e451
Merge remote-tracking branch 'origin/1.10.x' into 1.11.x
ondrejmirtes Mar 20, 2024
9aa4ad8
Called callable has an implicit throw point
ondrejmirtes Mar 20, 2024
2563f8d
Throw point when a callable is passed somewhere it's immediately exec…
ondrejmirtes Mar 20, 2024
a6e08d5
Revert to a little bit older way of doing things with by-refs from cl…
ondrejmirtes Mar 20, 2024
e8e466d
fix SplObjectStorage::removeAll/Except
schlndh Jan 28, 2024
55ea22d
Merge branch refs/heads/1.10.x into 1.11.x
phpstan-bot Mar 20, 2024
6769891
Test how `#[Override]` behaves with constructors
ondrejmirtes Mar 20, 2024
f1cf3bb
Merge branch refs/heads/1.10.x into 1.11.x
phpstan-bot Mar 20, 2024
b62c5ef
Get (not)analysed projectExtensionFiles from result cache
ondrejmirtes Mar 20, 2024
e0d63b0
Fix build
ondrejmirtes Mar 20, 2024
030bd55
Add always used method extension
axlon Feb 20, 2024
7043759
Project extension files - skip PHAR
ondrejmirtes Mar 21, 2024
925c0b7
Fix test
ondrejmirtes Mar 21, 2024
8a8b712
Merge remote-tracking branch 'origin/1.10.x' into 1.11.x
ondrejmirtes Mar 21, 2024
4ab7264
Try fixing error with duplicate class declarations
ondrejmirtes Mar 21, 2024
1863d22
Merge branch refs/heads/1.10.x into 1.11.x
phpstan-bot Mar 21, 2024
525983b
One more fix
ondrejmirtes Mar 21, 2024
af24a40
Merge branch refs/heads/1.10.x into 1.11.x
phpstan-bot Mar 21, 2024
0d2f4b6
Fix CS
ondrejmirtes Mar 21, 2024
007d476
Merge branch refs/heads/1.10.x into 1.11.x
phpstan-bot Mar 21, 2024
bfa530a
Update phpdoc-parser
phpstan-bot Mar 21, 2024
957f1ad
Merge remote-tracking branch 'origin/1.10.x' into 1.11.x
ondrejmirtes Mar 21, 2024
cefa296
Support for `@param-immediately-invoked-callable` and `@param-later-i…
ondrejmirtes Mar 21, 2024
0f2366b
Add more tests for issue #10622
mvorisek Mar 22, 2024
ec1209d
Merge branch refs/heads/1.10.x into 1.11.x
phpstan-bot Mar 22, 2024
944673f
Fix slow enum cases union with lots of cases
staabm Mar 22, 2024
625298a
Merge branch refs/heads/1.10.x into 1.11.x
phpstan-bot Mar 22, 2024
4c167d7
Remove unnecessary method calls in ClassReflection
staabm Mar 22, 2024
f51d90c
Merge branch refs/heads/1.10.x into 1.11.x
phpstan-bot Mar 22, 2024
15dce0c
Modify functionMap and add __benevolent<> (#2986)
zonuexe Mar 22, 2024
3d43198
Merge branch refs/heads/1.10.x into 1.11.x
phpstan-bot Mar 22, 2024
222a66c
Use TrinaryLogic::describe() in test
ondrejmirtes Mar 23, 2024
6804a57
Merge branch refs/heads/1.10.x into 1.11.x
phpstan-bot Mar 23, 2024
5f1729e
Update BetterReflection
ondrejmirtes Mar 23, 2024
800ec04
Merge remote-tracking branch 'origin/1.10.x' into 1.11.x
ondrejmirtes Mar 23, 2024
b16dbaf
Update BetterReflection
ondrejmirtes Mar 23, 2024
3e2eed9
Merge remote-tracking branch 'origin/1.10.x' into 1.11.x
ondrejmirtes Mar 23, 2024
f0b84e0
Make last PhpMethodReflectionFactory argument optional
ondrejmirtes Mar 25, 2024
f9d118f
Update PhpStorm stubs
ondrejmirtes Mar 26, 2024
6643b33
Merge remote-tracking branch 'origin/1.10.x' into 1.11.x
ondrejmirtes Mar 26, 2024
795a560
Fix redis::get signature
VincentLanglet Mar 25, 2024
deda1e1
Merge branch refs/heads/1.10.x into 1.11.x
phpstan-bot Mar 26, 2024
c8e1c8c
Support for `@param-closure-this`
ondrejmirtes Mar 25, 2024
8ec4036
Fix build
ondrejmirtes Mar 26, 2024
4f4e72d
Test generics in `@param-closure-this`
ondrejmirtes Mar 26, 2024
f46c11c
Report unresolvable type in `@param-closure-this`
ondrejmirtes Mar 26, 2024
56b2002
Bleeding edge - run missing type check on `@param-out`
ondrejmirtes Mar 26, 2024
986cbdf
Detect mismatch between readonly/non-readonly class parent
ondrejmirtes Mar 26, 2024
8656877
Merge branch refs/heads/1.10.x into 1.11.x
phpstan-bot Mar 26, 2024
f681463
Error identifiers
ondrejmirtes Mar 26, 2024
04f1ada
Fix build
ondrejmirtes Mar 26, 2024
9caf61d
Merge branch refs/heads/1.10.x into 1.11.x
phpstan-bot Mar 26, 2024
10fc2c2
Missing type check on `@param-closure-this`
ondrejmirtes Mar 26, 2024
40a20d2
Update BetterReflection
ondrejmirtes Mar 26, 2024
b409975
Merge remote-tracking branch 'origin/1.10.x' into 1.11.x
ondrejmirtes Mar 26, 2024
996f194
Update BetterReflection
ondrejmirtes Mar 26, 2024
f0c2f3a
Merge remote-tracking branch 'origin/1.10.x' into 1.11.x
ondrejmirtes Mar 26, 2024
2b8bbde
Report static closure passed into `@param-closure-this` parameter
ondrejmirtes Mar 27, 2024
fd2e0a6
Prevent unnecessary calls into reflection from JSON extensions
staabm Mar 27, 2024
0aafb32
Merge branch refs/heads/1.10.x into 1.11.x
phpstan-bot Mar 27, 2024
4498a77
Check `Closure::bind()` and `bindTo()` argument
ondrejmirtes Mar 27, 2024
5e45326
Implicit inheritance for `@param-closure-this`
ondrejmirtes Mar 27, 2024
b5c63c2
Process ConstFetch
ondrejmirtes Mar 27, 2024
27f5186
Do impure points for all expression types
ondrejmirtes Mar 27, 2024
05fadd7
Implicit inheritance for `@phpstan-pure` and `@phpstan-impure`
ondrejmirtes Mar 28, 2024
247dcd8
Report void functions and private methods that do not do anything impure
ondrejmirtes Mar 28, 2024
da87a65
TypeInferenceTestCase - potential fix for performance problem with PH…
ondrejmirtes Mar 28, 2024
927d71f
Fix build
ondrejmirtes Mar 28, 2024
45a5255
Merge remote-tracking branch 'origin/1.10.x' into 1.11.x
ondrejmirtes Mar 28, 2024
5473b67
`array_push` preserves list
ondrejmirtes Mar 28, 2024
8b3a589
Merge branch refs/heads/1.10.x into 1.11.x
phpstan-bot Mar 28, 2024
e48c7ef
Fix test
ondrejmirtes Mar 28, 2024
cc45445
TMP - issue bot - increase comment limit
ondrejmirtes Mar 29, 2024
abb87dd
Extract superglobal variables into a public Scope constant
ondrejmirtes Mar 29, 2024
cf99350
Revert "TMP - issue bot - increase comment limit"
ondrejmirtes Mar 29, 2024
b0bf6c4
Accessing superglobal variable is impure
ondrejmirtes Mar 29, 2024
207bc15
Do not report void.pure if function has by-ref parameter
ondrejmirtes Mar 29, 2024
6934153
Fix tests
ondrejmirtes Mar 29, 2024
491a724
Test `@param-out` with conditional type denending on default paramete…
ondrejmirtes Mar 29, 2024
a856ec7
Fix preg_match_all behaviour with no flags
ondrejmirtes Mar 29, 2024
a767c51
Improve `date()` return types
zonuexe Mar 29, 2024
8b7adac
Merge branch refs/heads/1.10.x into 1.11.x
phpstan-bot Mar 29, 2024
cf12109
Superglobal variable assign is impure
ondrejmirtes Mar 29, 2024
87be2f9
Update PhpStorm stubs
ondrejmirtes Apr 2, 2024
02aea19
Merge remote-tracking branch 'origin/1.10.x' into 1.11.x
ondrejmirtes Apr 2, 2024
b89742c
Update BetterReflection
ondrejmirtes Apr 2, 2024
3948fb5
Merge remote-tracking branch 'origin/1.10.x' into 1.11.x
ondrejmirtes Apr 2, 2024
b2177e3
Default value null does not make promoted property type nullable
ondrejmirtes Apr 2, 2024
a373c88
Merge branch refs/heads/1.10.x into 1.11.x
phpstan-bot Apr 2, 2024
24c5249
Fix socket_select array types after call
ondrejmirtes Apr 3, 2024
552952a
Merge branch refs/heads/1.10.x into 1.11.x
phpstan-bot Apr 3, 2024
518d3a3
Fix build
ondrejmirtes Apr 3, 2024
8ae0b28
Fix conditional types in PHPDocs from stubs for native functions
ondrejmirtes Apr 3, 2024
90ce507
Merge branch refs/heads/1.10.x into 1.11.x
phpstan-bot Apr 3, 2024
3ef4883
Fix transforming `@param-closure-this` when inherited from stubs for …
ondrejmirtes Apr 3, 2024
d7579c4
Pure cont'd
ondrejmirtes Apr 3, 2024
a647052
Bleeding edge - NoopRule - take advantage of impure points
ondrejmirtes Apr 3, 2024
c16e491
Fix `exit()` impure points
ondrejmirtes Apr 3, 2024
2b5b317
`file_get_contents` is definitely an impure function
ondrejmirtes Apr 3, 2024
d303c60
BetterNoopRule - detect nested assignment
ondrejmirtes Apr 3, 2024
f659df5
`static` and `global` cannot be used in pure context
ondrejmirtes Apr 3, 2024
bdde2ed
Update phpdoc-parser
phpstan-bot Apr 3, 2024
73a8fd9
Merge remote-tracking branch 'origin/1.10.x' into 1.11.x
ondrejmirtes Apr 3, 2024
a72400b
pr-base-on-previous-branch.yml - do not comment on 1.11.x anymore
ondrejmirtes Apr 3, 2024
24d990b
Reproduce env int key problem
ondrejmirtes Apr 4, 2024
b8fb161
Merge branch refs/heads/1.10.x into 1.11.x
phpstan-bot Apr 4, 2024
e606fbe
Fix env int key problem
ondrejmirtes Apr 4, 2024
d908859
Merge branch refs/heads/1.10.x into 1.11.x
phpstan-bot Apr 4, 2024
e45dd3a
Fix tests
ondrejmirtes Apr 4, 2024
57a7d5d
Fix test
ondrejmirtes Apr 4, 2024
29c35b5
Fix `ClosureType::equals()`
ondrejmirtes Apr 4, 2024
c1e34d3
Update phpstorm-stubs on 1.11.x
ondrejmirtes Apr 4, 2024
f21d7d8
Fix test
ondrejmirtes Apr 4, 2024
677afdd
Fix false positives about uninitialized properties
staabm Apr 4, 2024
3e353b6
Merge branch refs/heads/1.10.x into 1.11.x
phpstan-bot Apr 4, 2024
d04b2f9
Remove obsolete todo
ondrejmirtes Apr 4, 2024
9561f8b
Remove obsolete todo
ondrejmirtes Apr 4, 2024
08b4507
`CallableParametersAcceptor::getImpurePoints()`
ondrejmirtes Apr 4, 2024
df00074
Fix build
ondrejmirtes Apr 4, 2024
74bc369
PHPDoc: address multiple variables defined in one @param
Muqsit Apr 5, 2024
2856081
Forbid PHPUnitPHAR prefixed classes
staabm Apr 5, 2024
b018a07
Merge branch refs/heads/1.10.x into 1.11.x
phpstan-bot Apr 5, 2024
dda4675
Support `@phan-` prefixes on recognized PHPDoc tags
anomiex Apr 5, 2024
23fa0f8
More precise `gc_status()` signature for PHP8.3+
staabm Mar 29, 2024
3ee15aa
Merge branch refs/heads/1.10.x into 1.11.x
phpstan-bot Apr 5, 2024
5b9eabc
Closures are impure by default
ondrejmirtes Apr 5, 2024
59c3eaa
Incremented numeric-string should change to int/float
staabm Apr 5, 2024
d05b694
Merge branch refs/heads/1.10.x into 1.11.x
phpstan-bot Apr 5, 2024
e74cd7c
Bump result cache version in CI
ondrejmirtes Apr 5, 2024
d217859
Merge branch refs/heads/1.10.x into 1.11.x
phpstan-bot Apr 5, 2024
c1aeb64
Do not generalize big array when combined with empty array
RobertMe Apr 5, 2024
242979a
Merge branch refs/heads/1.10.x into 1.11.x
phpstan-bot Apr 6, 2024
cdaff5f
pure-callable and pure-Closure
ondrejmirtes Apr 7, 2024
9cbc619
Update Wandalen/wretry.action action to v1.4.10
renovate[bot] Mar 13, 2024
28c5729
add object shape for mysqli_result::fetch_fields
schlndh Apr 6, 2024
65763e9
Merge branch refs/heads/1.10.x into 1.11.x
phpstan-bot Apr 7, 2024
520d057
Update issue-bot
renovate[bot] Apr 8, 2024
b019256
CallableTypeHelper - fixed purity check
ondrejmirtes Apr 8, 2024
f96c91c
Fix tests
ondrejmirtes Apr 8, 2024
1b18601
Update PhpStorm stubs
ondrejmirtes Apr 9, 2024
f2258ad
PHPStan Pro - allow pausing and resuming continuous analysis
ondrejmirtes Apr 9, 2024
b04a3cd
PHPStan Pro - pass editorUrl
ondrejmirtes Apr 10, 2024
d1834e6
Do not assume every contributor uses PhpStorm
ondrejmirtes Apr 10, 2024
4a4c739
Fix string concatenation with benevolent union type
ondrejmirtes Apr 11, 2024
4eeb352
Merge branch refs/heads/1.10.x into 1.11.x
phpstan-bot Apr 11, 2024
a649981
Deprecate checkMissingIterableValueType and checkGenericClassInNonGen…
ondrejmirtes Apr 11, 2024
1453c3f
composer-dependency-analyser: update to 1.5.0 (support functions)
janedbal Apr 11, 2024
93beecf
Merge remote-tracking branch 'origin/1.10.x' into 1.11.x
ondrejmirtes Apr 11, 2024
074de75
Treat get_defined_vars() as using function arguments
rvanvelzen Apr 11, 2024
70fb8fc
Merge branch refs/heads/1.10.x into 1.11.x
phpstan-bot Apr 12, 2024
f71da02
Improve error messages on unnamed parameters
takaram Apr 9, 2024
5c3a711
Merge remote-tracking branch 'origin/1.10.x' into 1.11.x
ondrejmirtes Apr 12, 2024
7f8f9cc
Allow undefined variables passed into by-ref parameters only if the t…
ondrejmirtes Apr 14, 2024
b356af1
Merge remote-tracking branch 'origin/1.10.x' into 1.11.x
ondrejmirtes Apr 14, 2024
7961f7a
Allow passing undefined variable into by-ref parameter with PHPDoc-on…
ondrejmirtes Apr 14, 2024
f936186
Merge branch refs/heads/1.10.x into 1.11.x
phpstan-bot Apr 14, 2024
aa801e4
Update Wandalen/wretry.action action to v3
renovate[bot] Apr 15, 2024
f280c25
TypeInferenceTestCase: ability to disable implicit throws
janedbal Apr 16, 2024
b116d25
CallToConstructorStatementWithoutSideEffectsRule - report class with …
ondrejmirtes Apr 16, 2024
12270c0
Fix `new NoConstructor` purity
ondrejmirtes Apr 16, 2024
4293f99
Fix test
ondrejmirtes Apr 16, 2024
6026869
Only in bleeding edge
ondrejmirtes Apr 16, 2024
281a87d
Detect unused `new` on a separate line with possibly pure constructor
ondrejmirtes Apr 17, 2024
044dfcf
Make AccessoryNonFalsyStringType::toInteger() return IntegerType inst…
zonuexe Apr 17, 2024
51c018d
Merge branch refs/heads/1.10.x into 1.11.x
phpstan-bot Apr 17, 2024
18b6c63
Fix CS
ondrejmirtes Apr 17, 2024
d9bdbc2
Merge branch refs/heads/1.10.x into 1.11.x
phpstan-bot Apr 17, 2024
c792050
Slightly reduce comparing and calling methods for trivial optimizations
zonuexe Apr 17, 2024
a976987
Detect unused function call on a separate line with possibly pure fun…
staabm Apr 17, 2024
1d61059
highlight_string() flips side-effects depending on $return
staabm Apr 17, 2024
57b0ae0
Fix PossiblyPureFuncCallCollector
ondrejmirtes Apr 17, 2024
b9d990b
BetterNoopRule - detect FuncCall with Expr
ondrejmirtes Apr 18, 2024
9ef8099
Calling closure with by-ref use is an impure point
ondrejmirtes Apr 18, 2024
c5265e3
Introduce ResolvedFunctionVariant interface
ondrejmirtes Apr 18, 2024
94a0b86
GenericParametersAcceptorResolver - when given CallableParametersAcce…
ondrejmirtes Apr 18, 2024
7045457
Assignment to property in closure is an impure point
ondrejmirtes Apr 18, 2024
47f837b
Detect unused method call on a separate line with possibly pure method
staabm Apr 18, 2024
fe4cee4
Fix test
ondrejmirtes Apr 18, 2024
0f51690
BetterNoopRule - do not report non-callables
ondrejmirtes Apr 18, 2024
92993c5
Function purity - fix for maybe-callable union
ondrejmirtes Apr 18, 2024
b25e013
DRY of creating ImpurePoint from Function/MethodReflection
ondrejmirtes Apr 18, 2024
d1c1c56
Test
ondrejmirtes Apr 18, 2024
29c440e
Make the url key of metadata returned by stream_get_meta_data() opti…
hirokinoue Apr 18, 2024
fbd7273
Merge branch refs/heads/1.10.x into 1.11.x
phpstan-bot Apr 18, 2024
df8e1f3
Detect unused static method call on a separate line with possibly pur…
staabm Apr 18, 2024
1f3c80a
Make sure `parent::__construct()` is not reported by CallToStaticMeth…
ondrejmirtes Apr 18, 2024
1ab6c28
Remove dead untested code
ondrejmirtes Apr 18, 2024
c9f5b1c
Assigning something other than `$this` in constructor is impure
ondrejmirtes Apr 19, 2024
9d8c16e
Little anonymous class handler refactoring
ondrejmirtes Apr 19, 2024
00bad36
BetterNoopRule - shorter message
ondrejmirtes Apr 19, 2024
70a75f6
Use statement result of analysed anonymous class to inform about thro…
ondrejmirtes Apr 19, 2024
e956fad
Filter out implicit throw points from callables when `exceptions.impl…
janedbal Apr 19, 2024
dea0c49
PossiblyPureMethodCallCollector - collect private method call
ondrejmirtes Apr 19, 2024
77ddf60
Do not report `void.pure` in empty methods
ondrejmirtes Apr 19, 2024
cbae205
Fix build
ondrejmirtes Apr 19, 2024
c4d2beb
Fix build
ondrejmirtes Apr 19, 2024
dc7bd2c
Pass lines to ignore and unmatched line ignores into FileAnalyserResult
ondrejmirtes Apr 19, 2024
f696c96
Issue bot - update dependencies
ondrejmirtes Apr 19, 2024
ab8a114
Result cache - save lines to ignore + unmatched line ignores
ondrejmirtes Apr 20, 2024
d13d64c
FileAnalyser - do not pass empty lines to ignore + unmatched line ign…
ondrejmirtes Apr 20, 2024
4c0e939
Type alias LinesToIgnore on FileAnalyserResult
ondrejmirtes Apr 20, 2024
38e2c96
AnalyserResultFinalizer - DRY of running CollectedDataNode rules
ondrejmirtes Apr 20, 2024
d026655
Introduce LocalIgnoresProcessor
ondrejmirtes Apr 20, 2024
52036a5
Do not reference Scope in `if` branch that will be moved out of FileA…
ondrejmirtes Apr 20, 2024
38a2734
Move handling of unmatched ignored errors from FileAnalyser to Analys…
ondrejmirtes Apr 20, 2024
dc3b75a
Allow ignoring errors from CollectedDataNode with local comments
ondrejmirtes Apr 20, 2024
c983705
Fix Collector errors in PHPStan Pro
ondrejmirtes Apr 20, 2024
542cb0a
Narrow Closure::bind $newScope param
mvorisek Apr 22, 2024
cbecaf9
Merge remote-tracking branch 'origin/1.10.x' into 1.11.x
ondrejmirtes Apr 22, 2024
83ccb7f
Remove line from "nikic/php-parser" error message
mvorisek Apr 22, 2024
560a277
Merge remote-tracking branch 'origin/1.10.x' into 1.11.x
ondrejmirtes Apr 22, 2024
2636ba7
Update Wandalen/wretry.action action to v3.4.0
renovate[bot] Apr 22, 2024
1d2575d
Update BetterReflection
ondrejmirtes Apr 22, 2024
dfbf8d0
RuleTestCase - call getRule() only once
ondrejmirtes Apr 22, 2024
26d72e8
Update PhpStorm stubs
ondrejmirtes Apr 23, 2024
27e2b53
Filter scope by non-empty array after foreach regardless of `polluteS…
VincentLanglet Apr 23, 2024
1faeba3
Merge branch refs/heads/1.10.x into 1.11.x
phpstan-bot Apr 23, 2024
2450222
Two new options around stricter offset checks in arrays
ttomdewit Apr 23, 2024
326b985
Fix build
ondrejmirtes Apr 23, 2024
d4bf4f5
Fix `reportPossiblyNonexistentConstantArrayOffset`
ondrejmirtes Apr 23, 2024
26e949b
Fix ConstantArrayType::hasOffsetValueType() for offset union type whe…
ondrejmirtes Apr 23, 2024
f4d1d48
non-empty-list always has offset 0
ondrejmirtes Apr 24, 2024
6277fb4
Separate classes for new `@param-` tags
ondrejmirtes Apr 21, 2024
204ab27
RuleTestCase - fail on PHP warnings, notices etc.
janedbal Apr 24, 2024
86f1690
fix: fix `Imagick::identifyImage()` return type
SVillette Apr 17, 2024
c88f00c
chore(deps): update dependency shipmonk/composer-dependency-analyser …
renovate[bot] Apr 29, 2024
d345582
Merge branch refs/heads/1.10.x into 1.11.x
phpstan-bot Apr 29, 2024
0ded85c
Update renovate.json
ondrejmirtes Apr 29, 2024
02071ab
Infer object type mysqli_fetch_object (#2675)
staabm Apr 29, 2024
515382a
Merge branch refs/heads/1.10.x into 1.11.x
phpstan-bot Apr 29, 2024
c544797
Update PhpStorm stubs
ondrejmirtes Apr 30, 2024
6705ac1
Preserve large arrays with same keys through union
schlndh May 1, 2024
b323fc3
Merge branch refs/heads/1.10.x into 1.11.x
phpstan-bot May 1, 2024
a16184e
Introduce `RuleErrorBuilder::treatPhpDocTypesAsCertainTip()` for a bi…
axlon May 1, 2024
0b6d92d
Fix `count($x) > $n === true` negation
rvanvelzen May 3, 2024
e1a61a6
Merge branch refs/heads/1.10.x into 1.11.x
phpstan-bot May 3, 2024
c7e6244
Fix NAN not accepting NAN
rvanvelzen Apr 11, 2024
4d162fa
Merge remote-tracking branch 'origin/1.10.x' into 1.11.x
ondrejmirtes May 3, 2024
3361c84
Narrow to non-empty-string/non-falsey-string after mb_strlen()
staabm May 3, 2024
c84a072
Parsing `@phpstan-ignore` - allow comma in description
ondrejmirtes May 3, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .devcontainer/library-scripts/node-debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ if [ "$(id -u)" -ne 0 ]; then
exit 1
fi

# Treat a user name of "none" or non-existant user as root
# Treat a user name of "none" or non-existent user as root
if [ "${USERNAME}" = "none" ] || ! id -u ${USERNAME} > /dev/null 2>&1; then
USERNAME=root
fi
Expand Down
14 changes: 13 additions & 1 deletion .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
"config:base",
"schedule:weekly"
],
"dependencyDashboard": true,
"rangeStrategy": "update-lockfile",
"rebaseWhen": "conflicted",
"baseBranches": ["1.11.x"],
"packageRules": [
{
"matchPackagePatterns": ["*"],
Expand All @@ -13,7 +15,7 @@
{
"matchPaths": ["+(composer.json)"],
"enabled": true,
"groupName": "root-composer"
"matchBaseBranches": ["1.11.x"]
},
{
"matchPaths": ["build-cs/**"],
Expand All @@ -25,6 +27,16 @@
"enabled": true,
"groupName": "apigen"
},
{
"matchPaths": ["issue-bot/**"],
"enabled": true,
"groupName": "issue-bot"
},
{
"matchPaths": ["changelog-generator/**"],
"enabled": true,
"groupName": "changelog-generator"
},
{
"matchPaths": ["compiler/**"],
"enabled": true,
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/apiref.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
name: "API Reference"

on:
workflow_dispatch:
push:
branches:
- "1.9.x"
- "1.11.x"
paths:
- 'src/**'
- 'composer.lock'
Expand All @@ -25,7 +26,7 @@ jobs:

steps:
- name: "Checkout"
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
Expand All @@ -44,7 +45,7 @@ jobs:
run: "apigen/vendor/bin/apigen -c apigen/apigen.neon --output docs -- src vendor/nikic/php-parser vendor/ondrejmirtes/better-reflection vendor/phpstan/phpdoc-parser"

- name: "Upload docs"
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: docs
path: docs
Expand All @@ -57,12 +58,12 @@ jobs:
runs-on: "ubuntu-latest"
steps:
- name: "Install Node"
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: "16"

- name: "Download docs"
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: docs
path: docs
Expand All @@ -88,7 +89,7 @@ jobs:
AWS_ACCESS_KEY_ID: ${{ secrets.APIREF_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.APIREF_AWS_SECRET_ACCESS_KEY }}

- uses: peter-evans/repository-dispatch@v2
- uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.PHPSTAN_BOT_TOKEN }}
repository: "phpstan/phpstan"
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/backward-compatibility.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ on:
pull_request:
push:
branches:
- "1.8.x"
- "1.11.x"
paths:
- 'src/**'
- '.github/workflows/backward-compatibility.yml'

env:
COMPOSER_ROOT_VERSION: "1.8.x-dev"
COMPOSER_ROOT_VERSION: "1.11.x-dev"

concurrency:
group: bc-${{ github.head_ref || github.run_id }} # will be canceled on subsequent pushes in pull requests but not branches
Expand All @@ -27,7 +27,7 @@ jobs:

steps:
- name: "Checkout"
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand All @@ -44,7 +44,7 @@ jobs:
run: |
composer global config minimum-stability dev
composer global config prefer-stable true
composer global require --dev ondrejmirtes/backward-compatibility-check:^7.3.0
composer global require --dev ondrejmirtes/backward-compatibility-check:^7.3.0.1

- name: "Check"
run: "$(composer global config bin-dir --absolute)/roave-backward-compatibility-check"
57 changes: 57 additions & 0 deletions .github/workflows/build-issue-bot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions

name: "Build Issue Bot"

on:
pull_request:
paths:
- 'issue-bot/**'
- '.github/workflows/build-issue-bot.yml'
push:
branches:
- "1.11.x"
paths:
- 'issue-bot/**'
- '.github/workflows/build-issue-bot.yml'

env:
COMPOSER_ROOT_VERSION: "1.11.x-dev"

concurrency:
group: build-issue-bot-${{ github.head_ref || github.run_id }} # will be canceled on subsequent pushes in pull requests but not branches
cancel-in-progress: true

jobs:
build-issue-bot:
name: "Build Issue Bot"

runs-on: "ubuntu-latest"
timeout-minutes: 60

strategy:
fail-fast: false
matrix:
script:
- "../bin/phpstan"
- "vendor/bin/phpunit"

steps:
- name: "Checkout"
uses: actions/checkout@v4

- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "8.3"

- name: "Install dependencies"
run: "composer install --no-interaction --no-progress"

- name: "Install Issue Bot dependencies"
working-directory: "issue-bot"
run: "composer install --no-interaction --no-progress"

- name: "Tests"
working-directory: "issue-bot"
run: ${{ matrix.script }}
7 changes: 5 additions & 2 deletions .github/workflows/changelog-generator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,14 @@ on:
- '.github/workflows/changelog-generator.yml'
push:
branches:
- "1.8.x"
- "1.11.x"
paths:
- 'changelog-generator/**'
- '.github/workflows/changelog-generator.yml'

env:
COMPOSER_ROOT_VERSION: "1.11.x-dev"

concurrency:
group: changelog-${{ github.head_ref || github.run_id }} # will be canceled on subsequent pushes in pull requests but not branches
cancel-in-progress: true
Expand All @@ -27,7 +30,7 @@ jobs:

steps:
- name: "Checkout"
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
Expand Down
127 changes: 127 additions & 0 deletions .github/workflows/checksum-phar.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions

# This workflow checks that PHAR checksum changes only when it's supposed to
# It should stay the same when the PHAR contents do not change

name: "Check PHAR checksum"

on:
pull_request:
paths:
- 'compiler/**'
- '.github/workflows/checksum-phar.yml'
push:
branches:
- "1.11.x"
paths:
- 'compiler/**'
- '.github/workflows/checksum-phar.yml'

env:
COMPOSER_ROOT_VERSION: "1.11.x-dev"

concurrency:
group: checksum-phar-${{ github.head_ref || github.run_id }} # will be canceled on subsequent pushes in pull requests but not branches
cancel-in-progress: true

jobs:
check-phar-checksum:
name: "Check PHAR checksum"

runs-on: "ubuntu-latest"
timeout-minutes: 60

steps:
- name: "Checkout phpstan-dist"
uses: actions/checkout@v4
with:
repository: phpstan/phpstan
path: phpstan-dist
ref: 1.11.x

- name: "Get info"
id: info
working-directory: phpstan-dist
run: |
echo "checksum=$(head -n 1 .phar-checksum)" >> $GITHUB_OUTPUT
echo "commit=$(tail -n 1 .phar-checksum)" >> $GITHUB_OUTPUT

- name: "Delete phpstan-dist"
run: "rm -r phpstan-dist"

- name: "Checkout"
uses: actions/checkout@v4
with:
ref: ${{ steps.info.outputs.commit }}

- name: "Checkout latest PHAR compiler"
uses: actions/checkout@v4
with:
path: phpstan-src
ref: ${{ github.sha }}

- name: "Delete old compiler"
run: "rm -r compiler"

- name: "Move new compiler"
run: "mv phpstan-src/compiler/ ."

- name: "Delete phpstan-src"
run: "rm -r phpstan-src"

- name: "Change and commit README.md"
run: |
echo Testing > README.md
git config --global user.name "phpstan-bot"
git config --global user.email "[email protected]"
git commit -a -m 'Changed README'

- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "8.1"
extensions: mbstring, intl

- name: "Install dependencies"
run: "composer install --no-interaction --no-progress"

- name: "Install compiler dependencies"
run: "composer install --no-interaction --no-progress --working-dir=compiler"

# same steps as in phar.yml

- name: "Prepare for PHAR compilation"
working-directory: "compiler"
run: "php bin/prepare"

- name: "Set autoloader suffix"
run: "composer config autoloader-suffix PHPStanChecksum"

- name: "Composer dump"
run: "composer install --no-interaction --no-progress"
env:
COMPOSER_ROOT_VERSION: "1.11.x-dev"

- name: "Compile PHAR for checksum"
working-directory: "compiler/build"
run: "php box.phar compile --no-parallel"
env:
PHAR_CHECKSUM: "1"
COMPOSER_ROOT_VERSION: "1.11.x-dev"

- name: "Re-sign PHAR"
run: "php compiler/build/resign.php tmp/phpstan.phar"

- name: "Unset autoloader suffix"
run: "composer config autoloader-suffix --unset"

- name: "Save checksum"
id: "new_checksum"
run: echo "md5=$(md5sum tmp/phpstan.phar | cut -d' ' -f1)" >> $GITHUB_OUTPUT

- name: "Assert checksum"
run: |
checksum=${{ steps.info.outputs.checksum }}
new_checksum=${{ steps.new_checksum.outputs.md5 }}
[[ "$checksum" == "$new_checksum" ]];
4 changes: 2 additions & 2 deletions .github/workflows/create-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ jobs:
runs-on: "ubuntu-latest"
steps:
- name: "Checkout"
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.PAT }}
token: ${{ secrets.PHPSTAN_BOT_TOKEN }}

- name: 'Get Previous tag'
id: previoustag
Expand Down
Loading