Releases: vimeo/psalm
Releases · vimeo/psalm
5.7.4
5.7.3
What's Changed
Fixes
- Replace use of DOMParentNode::append() with appendChild() by @othercorey in #9354
Full Changelog: 5.7.2...5.7.3
5.7.2
What's Changed
Fixes
- fix (DateTime|DateTimeImmutable)::modify() return types by @DaDeather in #9172
- Workaround arm64 opcache bug (fixes #9350) by @danog in #9351
New Contributors
- @DaDeather made their first contribution in #9172
Full Changelog: 5.7.1...5.7.2
5.7.1
5.7.0
What's Changed
Deprecations
Features
- #7387 Add asserting non-empty-string by strlen by @LeoVie in #8761
- Forbid implementing some interfaces by @weirdan in #9272
- Added issue type and psalm.dev link to Emacs report by @weirdan in #9299
- Allow
@var
annotations on global vars by @weirdan in #9301 - Allow suppressing
MissingThrowsDocblock
for individual exceptions by @weirdan in #9303 - Flag direct constructor calls by @weirdan in #9311
- Flag docblock parameters that have no counterparts in function signature by @weirdan in #9314
- Forbid non-null defaults for callable parameters by @weirdan in #9316
Fixes
- cdata in baseline by @jack-worman in #9184
- Resolve class constants within PhpStorm metadata by @shvlv in #9173
- Detect duplicate keys in array shapes by @danog in #9177
- Fix xmlrpc callmap functions that were dropped in PHP 8.0 by @othercorey in #9212
- fix
didChange
event in LSP by @ging-dev in #9207 - Added @psalm-pure to filter_var() by @mmcev106 in #9170
- Add DatePeriod::INCLUDE_END_DATE option by @othercorey in #9220
- Add more specific return for class-implements by @othercorey in #9228
- Convert callmaps resource types by @othercorey in #9227
- Use "numeric-string" type for some MySQLi properties by @phansys in #9226
- find_unused_code CLI arg should not be overwritten by config file by @kkmuffme in #9235
- Fix divide by a floating point zero by @aboyton in #9247
- Don't crash on unknown exceptions in
@throws
docblock by @weirdan in #9250 - Fix Spoofchecker callmaps by @othercorey in #9256
- Fix crashes with invalid
@psalm-check-type
syntax by @weirdan in #9257 - Fix crash when int range boundary is overflown by @weirdan in #9260
- Drop abandoned mcve m_ functions by @othercorey in #9266
- Fix several callmap fuction signatures by @othercorey in #9264
- fix lstat bug cache directory race condition by @kkmuffme in #9253
- Drop removed xsl callmap functions by @othercorey in #9269
- Drop abandoned maxdb callmap functions by @othercorey in #9270
- Drop abandoned newt callmap functions by @othercorey in #9271
- Update callmap types for php 8.2 by @othercorey in #9273
- Fix opcache being loaded twice by @weirdan in #9265
- Forbid overriding built-in enum methods by @weirdan in #9280
- Fix remaining callmap functions by @othercorey in #9278
- Add curl stubs to prevent crashes by @kamil-tekiela in #9283
- Compare enum cases thoroughly by @weirdan in #9286
- Drop abandoned ncurses extension by @othercorey in #9293
- Drop abandoned cairo extension by @othercorey in #9292
- Emit issues for calls to
is_a(string, class-string, false)
by @weirdan in #9287 - Made
WeakReference
mutable by @weirdan in #9297 - Flag class constant references where LHS is ordinary string by @weirdan in #9302
- Fixed issue message for missing
@psalm-external-mutation-free
by @weirdan in #9304 - Fix memcached extension callmap by @othercorey in #9309
- Fix strpos stub return type by @othercorey in #9322
- Propagate phantom classes to closure context by @weirdan in #9329
- Fix language server first-class callable crashes by @edsrzf in #9336
- Forbid first-class callables in
new
by @weirdan in #9338 - Negated is_numeric narrows scalar type by @edsrzf in #9339
Docs
- Documentation: Add BackedEnum compatibility to value-of docs by @bitwise-operators in #9252
- Added note on properties used in constructor only by @weirdan in #9298
- Added a page explaining how to add a new issue type by @weirdan in #9315
Internal changes
- Unify warning messages for deprecated config variables by @lptn in #9135
- Fix newly discovered CS issues by @weirdan in #9210
- Fixed more CS issues by @weirdan in #9236
- Always enable JIT by @danog in #9237
- Allow fidry/cpu-core-counter:v0.5 by @Slamdunk in #9234
- Update workflows to use non-deprecated method of setting step output by @weirdan in #9251
- Emit warning if opcache cannot be enabled by @danog in #9240
- Add option to skip callmap test by @weirdan in #9300
- Suggest Psalm to be installed in require-dev section by @weirdan in #9308
- Skip verifying callmaps based on name pattern by @othercorey in #9313
- Skip verifying memcache extension callmap by @othercorey in #9325
- Run assertions on CI by @lptn in #9318
- Allow spatie/array-to-xml v3 by @gharlan in #9331
- Disable JIT-incompatible extensions to prevent warnings by @weirdan in #9326
- Added the test to validate test environment itself by @weirdan in #9337
Other changes
New Contributors
- @shvlv made their first contribution in #9173
- @LeoVie made their first contribution in #8761
- @phansys made their first contribution in #9226
- @Slamdunk made their first contribution in #9234
- @aboyton made their first contribution in #9247
- @edsrzf made their first contribution in #9336
Full Changelog: 5.6.0...5.7.0
5.6.0
What's Changed
Features
Fixes
Typos
- HEAD in all caps by @buismaarten in #9163
New Contributors
- @buismaarten made their first contribution in #9163
Full Changelog: 5.5.0...5.6.0
5.5.0
What's Changed
Features
- Add Codebase to remaining events by @jack-worman in #8961
- Add @psalm-api annotation by @jack-worman in #8987
- Refined
explode()
types by @Ocramius in #9016 - Support constants in traits by @jack-worman in #9126
- Report unused baseline entries by @jack-worman in #9130
- Allow to specify custom shepherd endpoint by @lptn in #9133
- Narrow ->value of enum case(s) to only the possible values by @annervisser in #9157
Fixes
- Fix bug by @danog in #8955
- getopt() return type fix by @jack-worman in #8945
- Allow omitting argument offsets for map-type overrides in phpstorm.meta by @weirdan in #8781
- Extend XML enum of supported PHP ext by @lptn in #8971
- Revert #8955 by @danog in #8972
- (mb_)chr returns a non-empty-string by @fluffycondor in #8974
- Remove occurrences from error baseline by @jack-worman in #8967
- Add DateTimeInterface::__serialize and __unserialize by @michnovka in #8976
- Fix get_object_vars on enums by @jack-worman in #8973
- Fixes #8112 by @emmanuelGuiton in #8792
- Verify nullable callmap parameters by @othercorey in #8990
- Improve
invalid references
message in@psalm-type
by @weirdan in #8996 - Fix missing version in PHARs build on GA by @weirdan in #8997
- forbidden function bug and better get_defined_functions() signature by @jack-worman in #9002
- Add imap_is_open() to PHP 8.2 dictionary by @lptn in #9007
- Do not require return type on destructors in interfaces by @weirdan in #9009
- feat: add xdebug_info (fixes #8977) by @mathe42 in #9011
- Make
$http_response_header
a non-empty-list by @fluffycondor in #9001 - Preserve from_docblock in TypeCombiner by @VincentLanglet in #8999
- Add getAtomicType to IsNotAClass for proper negation Reconciliation by @orklah in #9017
- create proper TClosure instead of TNamedObject with a Closure value by @orklah in #9018
- Prevent DB escaping functions from affecting non-sql taints by @mmcev106 in #9019
- Is containedbug by @orklah in #9020
- Better type inference and type checking for large union types used in array keys/values by @Ocramius in #9022
- fix never return for MethodCalls by @kkmuffme in #9024
- Fix never return union type wrong condition by @kkmuffme in #9023
- fixes return type issues of methods reported for the wrong file by @kkmuffme in #9025
- Non empty reconciliation by @orklah in #9021
- fix @psalm-scope-this not working with FQCN with leading backslash by @kkmuffme in #9030
- Fix iterator and exception callmaps by @othercorey in #9035
- fix DateTime::modify() and DateTimeImmutable::modify() return types by @pilif in #9043
- Fix
ReflectionClass::getModifiers()
stub by @kukulich in #9047 - Fix
ReflectionClass::getReflectionConstants()
stub by @kukulich in #9048 - Fix
ReflectionClass::getTraitAliases()
stub by @kukulich in #9046 - Fix
ReflectionFunctionAbstract::getExtensionName()
stub by @kukulich in #9053 - Fix
ReflectionMethod::getModifiers()
stub by @kukulich in #9052 - Fix
ReflectionClass::getTraitNames()
stub by @kukulich in #9051 - Fix
ReflectionClass
stub by @kukulich in #9055 - fix autoloader not working with absolute path by @kkmuffme in #9044
- Narrow down the return type of DOMXPath::query() by @MidnightDesign in #9072
- fix
I::cases()
whereinterface I extends BackedEnum
by @weirdan in #9067 - fix implicit return type by @kkmuffme in #9026
- Update Call Maps and Signature for get_headers by @therealryanbonham in #9073
- dont report MissingFile error when file_exists is validated beforehand by @kkmuffme in #9012
- Handle template type on promoted property by @vincent4vx in #9092
- Additional test and fix when comparing nested templates by @emmanuelGuiton in #9095
- Automatically load stubs for random ext on PHP 8.2 by @lptn in #9099
- Add missing
int-range
aliases into the list of psalm reserved words by @eopnetto in #9107 - Clean up more callmap return types by @othercorey in #9113
- Infer getDefaultValueConstantName() type when isDefaultValueConstant() is true by @BenMorel in #9115
- Fix libxml_get_errors() return type by @jack-worman in #9118
- Fix remaining ignored CallMap return types that can be updated by @othercorey in #9122
- Fix dom_import_simplexml() by @jack-worman in #9139
- Fix ReflectionClass::newInstanceArgs() with named parameters by @BenMorel in #9085
- Fix shepherd for default domain by @lptn in #9136
- Suppress warnings when
--no-output
is specified by @weirdan in #9162
Docs
- restrictReturnTypes configuration documentation by @jack-worman in #9000
- Update ForbiddenCode.md by @maniaba in #9105
- Add information on pure-callables to documentation by @bitwise-operators in #9141
Internal changes
- Update BCC by @weirdan in #8966
- Drop symfony/polyfill-php80 dependency by @weirdan in #8988
- Fix PHPCS trailing comma by @theodorejb in #9014
- Misc fixes by @danog in #9031
- Fix remaining markdown issues by @danog in #9033
- Bump mheap/github-action-required-labels from 2 to 3 by @dependabot in #9039
- Internal: use more specific types by @lptn in #9063
- Make it more clear what do we test from Psalm output by @lptn in #9061
- Internal cleanup: Unify syntax for redis.phpstub by @lptn in #9088
- Cleanup unsupported extensions message by @lptn in #9089
- Allow sebastian/diff 5 by @Jean85 in #9117
- Enhance error output for shepherd by @lptn in #9134
- Indent docblocks in DocComment test by @weirdan in #9156
New Contributors
- @michnovka made their first contribution in #8976
- @emmanuelGuiton made their first contribution in #8792
- @mathe42 made their first contribution in #9011
- @kukulich made their first contribution in #9047
- @therealryanbonham made their first contribution in #9073
- @maniaba made their first contribution in #9105
- @eopnetto made their first contribution in #9107
Full Changelog: 5.4.0...5.5.0
5.4.0
What's Changed
Features
- ReflectionClass stub updates by @jack-worman in #8933
Fixes
- Fix getParentClass stub by @VincentLanglet in #8931
- Allow conditions inside loops to preserve or narrow int range by @theodorejb in #8934
- More array fixes by @danog in #8943
Internal changes
- Trailing commas by @jack-worman in #8927
Full Changelog: 5.3.0...5.4.0
5.3.0
What's Changed
Features
- Declaring more precise types and purity boundaries on
ext-reflection
symbols in.phpstub
files by @Ocramius in #8722 - Literal inferring for array_column, array_combine, array_fill_keys, array_fill by @danog in #8850
- Recognize casts from object-with-properties to array by @weirdan in #8913
Fixes
- List refactoring v5 by @danog in #8820
- Improve parsing of list shapes by @danog in #8841
- Fix DOM and Reflection unreflectable methods by @othercorey in #8899
- Fix remaining invalid unreflectable methods by @othercorey in #8900
- Fix array_merge edge case by @danog in #8907
- fix return type never for static function calls by @kkmuffme in #8902
- Fix DOMDocument's propertery name preserveWhiteSpace by @sasezaki in #8918
- Make
sprintf
returnnon-empty-string
when possible by @fluffycondor in #8922 - More array_merge improvements by @danog in #8924
- Make md5 return type more precise by @fluffycondor in #8928
- Fix #8923 by @danog in #8929
- Skip intersection of template types during inheritance check by @danog in #8926
- Fix ReflectionClass stub by @VincentLanglet in #8930
Docs
Internal changes
- Replace unmaintained
openlss/lib-array2xml
withspatie/array-to-xml
by @weirdan in #8895 - Add validation for Class::Method names in CallMap by @othercorey in #8826
- Use rector to add property typehints by @jack-worman in #8887
- Add property typehints in Internal directory by @jack-worman in #8897
- Deprecation message on loading php-ext stubs without explicitly declaring them as dependency or in a config by @lptn in #8885
- Last property typehints by @jack-worman in #8910
- Remove useless ifs by @jack-worman in #8916
New Contributors
Full Changelog: 5.2.0...5.3.0
5.2.0
What's Changed
Features
- Add missing ZipArchive methods to CallMap (PHP 8.2) by @lptn in #8869
- Add libxml_get_external_entity_loader to CallMap (PHP 8.2) by @lptn in #8871
- Allow
true
in native types by @weirdan in #8875 - Add some missing sodium functions to CallMap by @lptn in #8870
- Forbid most magic methods on enums by @weirdan in #8890
Fixes
- Fix crash when using phantom methods as first-class callable by @weirdan in #8814
- Don't crash when accessing immutable static property by @weirdan in #8816
- Prevent crashes on conditional traits by @weirdan in #8817
- Update dictionaries: use more specific boolean types by @lptn in #8823
- Fix return types for date functions in callmap by @othercorey in #8825
- Improve source autodiscovery failure message by @weirdan in #8827
- fix missing break handling in loop by @orklah in #8828
- capitalize properties by @orklah in #8831
- mysqli_execute_query accepts any type of param by @kamil-tekiela in #8832
- Fix parsing of class string of unions by @danog in #8834
- Extend impure_functions list by socket functions by @lptn in #8835
- Allowed taints to pass through urlencode() by @mmcev106 in #8848
- Precise count range by @VincentLanglet in #8861
- Fixed dynamic property on LanguageServer by @weirdan in #8876
- remove file_get_contents that was incorrectly put in v5 by @kkmuffme in #8854
- Prevent duplicate (Possibly)UnusedMethod/(Possibly)UnusedProperty by @weirdan in #8883
Internal changes
- Bump fkirc/skip-duplicate-actions from 4.0.0 to 5.3.0 by @dependabot in #8837
- Integrate FidryCpuCoreCounter by @theofidry in #8833
- Upgrade CpuCoreCounter by @theofidry in #8882
Typos
New Contributors
Full Changelog: 5.1.0...5.2.0