* Improve @no-named-arguments support and variadics.
Handling of argument unpacking and variadics still needs a pretty big makeover, but this is a good start.
Fixes#5420
Improves #5453 (iterable works, array still causes issues)
* Remove unneeded imports.
* Added event to prevent tainting.
* Remove optional codebase parameter.
* Removed falsy check for codebase.
* Use two separate hooks for adding and removing taints
* Add slashes
* Update add/remove taint test name.
* Cleaned up SafeArrayKeyChecker example plugin.
* Added more AddRemoveTaintsEvent calls to codebase.
* Fix type check error with $added_taints param.
* Added AddRemoveTaintsEvent to remaining classes.
* Fix post-merge error.
* Add comma
* Remove $int_offset that never existed
Co-authored-by: Matt Brown <github@muglug.com>
Fixesvimeo/psalm#5405
Requires new patch release.
This PR reverts changes to the signature of `IssueBuffer::finish()` and
introduces separate method to be used to capture `$_SERVER`
* Disable property invariance checks for templates
Property invariance checks were already disabled for template
properties, this also disabled the checks for arrays, lists,
class-string-maps, and iterables that contain templates.
Partially fixes#5371
* CS fixes
* Fix and simplify hasTemplate.
Add hasTemplate to TypeNode and simplify implementation with getChildNodes.
* Revert hasTemplate change and add containsTemplate.
* Check class-string too.
* Wrap entrypoints into IIFE to protect their variables
Fixesvimeo/psalm#5359
* Add tests for Psalm variable isolation
* Capture environment before registering autoloader
* Emit ImplicitToStringCast in more places
Fixesvimeo/psalm#5320
`to_string_cast` is set on successful comparison, thus it needs to
always bubble up (it will be ignored in UnionTypeComparator if some part
does not match).
* Fix implicit casts
* Fix handling of string method references in self-out context
Previously Psalm would assume that any variable it sees in the arrow
function body is defined (and mixed, if it's not available in the outer
scope). This prevented undefined variable detection. Dropping that
assumption allows it to work.
Fixesvimeo/psalm#5331