Repository navigation
chore(deps): bump vimeo/psalm from 6.21.4 to v7 (master) - #1265
Conversation
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Edited/Blocked NotificationRenovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR. You can manually request rebase by checking the rebase/retry box above. |
ChristophWurst
left a comment
There was a problem hiding this comment.
Approving the psalm 7 bump. Verified locally with psalm 7.22.1 (--threads=1, latest nextcloud/ocp:dev-master stubs): 0 issues, baseline still fully used, config attributes all valid. The added commit only drops the redundant --threads=$(nproc) from the psalm composer script, because psalm 7 rejects the repeated --threads flag that the psalm-matrix workflow passes (composer run psalm -- --threads=1 ...). With that fix, static-psalm-analysis dev-master is green in CI. PHP constraint is satisfied (psalm 7 allows ~8.3.16; the app pins platform php 8.3.16). Psalm is dev-only (vendor-bin), so runtime impact is nil.
Assisted by OpenCode:mistral-large-4 and github-copilot/claude-sonnet-5.5 (second review)
ChristophWurst
left a comment
There was a problem hiding this comment.
Approving the psalm 7 bump. Verified locally with psalm 7.22.1 (--threads=1, latest nextcloud/ocp:dev-master stubs): 0 issues, baseline still fully used, config attributes all valid. The added commit only drops the redundant --threads=$(nproc) from the psalm composer script, because psalm 7 rejects the repeated --threads flag that the psalm-matrix workflow passes (composer run psalm -- --threads=1 ...). With that fix, static-psalm-analysis dev-master is green in CI. PHP constraint is satisfied (psalm 7 allows ~8.3.16; the app pins platform php 8.3.16). Psalm is dev-only (vendor-bin), so runtime impact is nil.
Assisted by OpenCode:mistral-large-4 and github-copilot/claude-sonnet-5.5 (second review)
ChristophWurst
left a comment
There was a problem hiding this comment.
Approving the psalm 7 bump. Verified locally with psalm 7.22.1 (--threads=1, latest nextcloud/ocp:dev-master stubs): 0 issues, baseline still fully used, config attributes all valid. The added commit only drops the redundant --threads=$(nproc) from the psalm composer script, because psalm 7 rejects the repeated --threads flag that the psalm-matrix workflow passes (composer run psalm -- --threads=1 ...). With that fix, static-psalm-analysis dev-master is green in CI. PHP constraint is satisfied (psalm 7 allows ~8.3.16; the app pins platform php 8.3.16). Psalm is dev-only (vendor-bin), so runtime impact is nil.
Assisted by OpenCode:mistral-large-4 and github-copilot/claude-sonnet-5.5 (second review)
ChristophWurst
left a comment
There was a problem hiding this comment.
Approving the psalm 7 bump. Verified locally with psalm 7.22.1 (--threads=1, latest nextcloud/ocp:dev-master stubs): 0 issues, baseline still fully used, config attributes all valid. The added commit only drops the redundant --threads=$(nproc) from the psalm composer script, because psalm 7 rejects the repeated --threads flag that the psalm-matrix workflow passes (composer run psalm -- --threads=1 ...). With that fix, static-psalm-analysis dev-master is green in CI. PHP constraint is satisfied (psalm 7 allows ~8.3.16; the app pins platform php 8.3.16). Psalm is dev-only (vendor-bin), so runtime impact is nil.
Assisted by OpenCode:mistral-large-4 and github-copilot/claude-sonnet-5.5 (second review)
ChristophWurst
left a comment
There was a problem hiding this comment.
Approving the psalm 7 bump. Verified locally with psalm 7.22.1 (--threads=1, latest nextcloud/ocp:dev-master stubs): 0 issues, baseline still fully used, config attributes all valid. The added commit only drops the redundant --threads=$(nproc) from the psalm composer script, because psalm 7 rejects the repeated --threads flag that the psalm-matrix workflow passes (composer run psalm -- --threads=1 ...). With that fix, static-psalm-analysis dev-master is green in CI. PHP constraint is satisfied (psalm 7 allows ~8.3.16; the app pins platform php 8.3.16). Psalm is dev-only (vendor-bin), so runtime impact is nil.
Assisted by OpenCode:mistral-large-4 and github-copilot/claude-sonnet-5.5 (second review)
|
Heads-up on why CI failed initially and what changed: psalm 7 rejects a repeated Note: the DCO check fails on the fix commit because it is not signed off — per the AI contribution policy only the human can add Assisted by OpenCode:mistral-large-4 and github-copilot/claude-sonnet-5.5 (second review) |
51e6c07 to
b1fe9cf
Compare
Psalm 7 rejects a repeated --threads flag, so `composer run psalm -- --threads=1 ...` (as used by the psalm-matrix workflow) failed with "--threads expects a positive integer or auto". Psalm already defaults to auto thread detection, so the explicit flag is redundant. Assisted-by: OpenCode:mistral-large-4 Signed-off-by: Christoph Wurst <1374172+ChristophWurst@users.noreply.github.com>
b1fe9cf to
6a19e1d
Compare
Note
This PR body was truncated due to platform limits.
This PR contains the following updates:
^6.21.4→^7.22.1Release Notes
vimeo/psalm
v7.22.1Compare Source
What's Changed
Fixes
Internal changes
TNamedObject::setValueIsStatic()ignoring$is_static_resolvedby @orklah in #15127Full Changelog: vimeo/psalm@7.22.0...7.22.1
v7.22.0: Call-site varianceCompare Source
New AI, UX and
@templatesyntax features.Features
covariantorcontravariantbefore a type argument makes one param accept a generic of any subtype (or supertype) of it, without changing the class's template. As withBox<*>, values then go one way only: from aBox<covariant Node>you readNode, but can't put anything in. (#15096, @alies-dev)psalm --explain=<issue>prints an issue's documentation (what it means, an example, how to fix it) from the installed version, offline and without a config. It takes the issue type, its shortcode or its psalm.dev link. (#15066, @alies-dev, @roxblnfk)CLAUDECODE,CURSOR_AGENT,CODEX_THREAD_ID,AI_AGENT, …), it prints thecompactformat (one line per issue), no progress output even ifCIis set, a one-line result (also0 issues), and[*]after each issue--altercan fix. An explicit--output-formatwins, and nothing changes outside an agent. See AI agents. (#15068, #15069, #15067, @alies-dev)--no-taint-analysisskips taint analysis for one run (runTaintAnalysisis on by default), e.g. for a quick local check (#15078, @orklah).InternalFunctionfor a call of an@internalor@psalm-internalfunction from outside its namespace. (#15084, @orklah)ParseErrorfor constructor property promotion when analysing PHP 7.x. (#15086, @orklah)--alteron PHP 8.2 writestrue,falseandnullas native types (: true|nullinstead of: bool|nullplus a docblock), and no longer adds docblocks that repeat a native type. (#15083, @orklah)Performance
Fixes
Taint analysis
TaintedCallablefor a tainted method name:$object->$name(),A::$name(). (#15072, @alies-dev)strip_tags()with allowed tags is not an html escape:strip_tags($_GET["x"], "<a>")isTaintedHtml. (#14753, @arpitjain099)Stubs and plugins
@return(or its own@psalm-overload) replaces the original's@return $thisand overloads, so a stubbed call returns the stub's type again (a 7.19.0 regression). (#15090, @alies-dev)MethodSignatureMismatchfor an override that widens a param of a stubbed userland class, andfloat/intswaps PHP rejects are reported. (#15114, @orklah)[]onDs\Map,Ds\Vectorand other Ds collections is typed and checked, and a stub class that leaves out a method of its interfaces still has it. (#15039, @orklah)nullkeeps the function's params checked. (#15040, @orklah)[$this, 'method']:CallAnalyzer::getFunctionIdsFromCallableArg()takes the call'sContext. (#15082, @orklah)@mixinfor a method behind__call()/__callStatic(). (#15020, @shu-chen-dot-ca)Arrays and narrowing
isset()and!isset()on array offsets: a negated check drops the shapes that always have the offset and keeps the optional offsets it leaves; an empty array stays empty; a nestedisset($a["x"][3])narrows$a["x"]. (#15103, #15104, #15105, #15076, @orklah)switchcase is analysed knowing the cases before it didn't match. (#14528, @jirkace)mixedfallback keeps that key's type. (#14815, #14611, @jirkace)is_int(),is_bool()andis_string()keep the emptiness ofempty-scalarandnon-empty-scalar. (#14431, @jirkace)is_callable()on a list can be true. (#14319, @jirkace)MixedAssignment/MixedArgumentin aforeachover an always-empty list, such aslist<T>of anewcovariant generic. (#15095, @alies-dev)Types and templates
value-of<T>of a backed enum template is an array key, and$case->valueof aTis avalue-of<T>. (#14618, @jirkace)Card&object{last4: string}&object{brand: string}). (#14457, @jirkace)staticin the params of a@methodtag resolves to the called class. (#14480, @jirkace)void|neverisvoid, notnull:AssignmentToVoidis reported, and an always-exiting function is noInvalidReturnType. (#15087, @orklah)pow()with a zero and a float operand is a float. (#14845, @ARAYN7011)PHP_INT_MINis negative,PHP_DEBUG/PHP_ZTSare0|1(boolsince PHP 8.4), and$_SERVER["DOCUMENT_ROOT"],["SCRIPT_FILENAME"]and["PATH_TRANSLATED"]can be empty. (#15079, #15092, @orklah)get_object_vars()doesn't include static properties. (#15011, @jirkace)Functions, classes and properties
PropertyNotSetInConstructorfor a redeclared promoted property or one assigned through$this->$name. (#15038, @orklah)NonInvariantPropertyType. (#14623, @jirkace)$thisit writes, and a by-reference capture gets what the closure leaves in it. (#15048, #15052, @danog)ReferenceConstraintViolationfor a reference rebound before abreakor in aswitchcase. (#13710, @jirkace)MismatchingDocblockReturnType. (#13213, @jirkace)InvalidReturnTypeon PHP 8.1+. (#15081, @orklah)global $xin a function has the type declared in<globals>. (#15116, @orklah)Scanning and includes
requireof a ternary between two paths is resolved, and the files a dependency requires through one are scanned (Carbon 3'sCarbonPeriod). (#15094, @bardrop; #15080, @orklah)ssh2_*functions belong to ext-ssh2, not ext-swoole. (#15106, @orklah)CLI and config
src/C3.php changed while Psalm was running. Run Psalm again.instead of a crash, and a worker crash is printed once. (#15061, @alies-dev)-cwith a directory or an empty path reportsCannot read the config fileinstead of crashing. (#14947, @tlq5l)config.xsdacceptsallowMissingFileson<projectFiles>,<extraFiles>and<errorLevel>. (#15037, @orklah)Docs
allowMissingFilesand the*/**path patterns. (#15037, @orklah)SecurityIssuein<unsuppressibleIssues>keeps every security issue reported. (#15074, @danog)Internal changes
New Contributors
Full Changelog: vimeo/psalm@7.21.1...7.22.0
v7.21.1Compare Source
Fixes
Taint analysis
foreachwrote back under their keys reaches a cast. (#14965, @orklah)f(...[safe(), $_GET['x']]),$firstis no longer tainted. (#14979, @shu-chen-dot-ca)array_walk()andarray_walk_recursive()callbacks write to their by-reference param flows into the array. (#14963, @danog)Templates and type variables
class-string<T>,key-of<T>,value-of<T>,T[K]andproperties-of<T>resolve whennewbinds the template:(new ReflectionClass(new stdClass()))->getName()isclass-string<stdClass>. An inheritedself<T&C>assertion narrows a subclass again. (#14981, @orklah)properties-of<T>over several classes includes the properties of each. (#14982, @orklah)class-string<T>|Tparam given a class string bindsTto the class only, without a falseIncompatibleTypeParameters. (#14994, @orklah)@template T of staticcalls a method returningTon$thisorstatic::. (#14978, @shu-chen-dot-ca)Narrowing, loops and arrays
$x != ""and$x != 0removenulland the loosely equal bool from$x. (#14995, @orklah)foreachover a non-empty list assigns before everybreakis defined after it. (#12439, @jarstelfox)extract()a variable assigned on one path is no longer read as possibly undefined. (#12442, @jarstelfox)PossiblyUndefinedVariableon$r?->m() ?? [], orTypeDoesNotContainNullon$r?->p ?? [], when$rmay be undefined. (#14998, @orklah)foreachkey,array_key_last()) keeps its shape. (#15009, @orklah)$a + [...]combined with a shape: no falsePossiblyUndefinedArrayOffseton keys both declare, and noInvalidArgumentwhen it is passed to a sealed shape param. (#15002, @orklah)DOMNamedNodeMap,Dom\NamedNodeMap,Dom\NodeListandDom\HTMLCollectionare read by position or name instead of reportingInvalidArrayAccess. (#14535, @jirkace)Properties and constructors
$object::$propis checked as a static fetch on the object's class, so undeclared and instance-only properties reportUndefinedPropertyFetch. (#12046, @HenkPoley)MissingConstructorfor a subclass inheriting the real constructor of a class a stub declares without one, and noPropertyNotSetInConstructorafterAncestor::__construct(). (#15001, @orklah)@psalm-suppress UndefinedConstantapplies to constants in docblock types (@var int-mask<NO_SUCH_CONSTANT>). (#13540, @alies-dev)Purity
DateTimeandDateTimeImmutableconstructors require only thetimecapability, and theDateIntervalconstructor is pure. (#14962, @jirkace)Stubs
CURLFOLLOW_ALL,ETH_P_ALL,PHP_BUILD_DATE, …) are declared. (#13019, @alies-dev)DateInterval::createFromDateString()no longer returnsfalseon PHP 8.3+. (#11849, @xelaris)SQLite3Result::columnName()can returnfalse. (#11819, @stof)ReflectionObjectis generic, likeReflectionClass. (#11774, @Kenny1911)Language server and
--alter--alterwrites only native types the analysed PHP version supports (noobjectbelow 7.2) and writesint|stringforarray-keyfrom PHP 8.0. (#14933, @orklah)Internal changes
New Contributors
Full Changelog: vimeo/psalm@7.21.0...7.21.1
v7.21.0Compare Source
Features
HttpClientInterface::request()is an SSRF sink. (#14950, @danog)strtolower()andstrtoupper()of literal strings return literals:strtoupper(rand(0, 1) ? "get" : "Post")is'GET'|'POST'. (#14628, @jirkace)Performance
Generator::send()calls only through nodes a generator flows into: 17 s to 10 s for that step on a ~5,600-file codebase. (#13504, @jarstelfox)Fixes
Taint analysis
ENT_QUOTES,JSON_HEX_TAG) stay known when a library callsdefine()with a dynamic name, so the escaping they ask for is kept. (#14949, @danog)Assertions and narrowing
@psalm-assert-if-trueand@psalm-assert-if-falseof a remembered call apply when the call is compared withtrueorfalse. (#14605, @jirkace)($s .= "a") === "1a") narrows the variable it assigns. (#14532, @jirkace)TypeDoesNotContainType. (#14609, @jirkace)isset()on a sealed array with a template offset bounded by the array's keys is no longer anInvalidArrayOffset. (#14603, @jirkace)Types and templates
callable-objectno longer fits an object shape or acallable-objectof another signature. (#14929, @MikeFTV)newleft unbound is checked against constraints naming other templates of the class (IncompatibleTypeParameters). (#12443, @jarstelfox)Internal changes
Full Changelog: vimeo/psalm@7.20.0...7.21.0
v7.20.0Compare Source
Features
@psalm-overload: gives a function or method several signatures, and a call returns the result of the first one its arguments fit.@psalm-overload. Constructors are not supported yet. (#13353, #13354, @jirkace)@psalm-database-query ... readonlymarks a method that can only run reading queries, so its queries Psalm can't parse store nothing. See the annotation. (#14860, @danog){name}and{name:Type}query parameters are stored, clauses after the tables of aSELECTare parsed,INSERT ... FORMATstores its data in the listed columns, andALTER TABLE ... UPDATEstores likeUPDATE. (#14854, #14859, #14857, @danog)sprintf()with a literal format is parsed, and a query in a variable ($sql . " LIMIT 1") starts with what the analysis knows of$sql. (#14858, #14856, @danog)realpath()result checked to start with a directory is not a path traversal, and a path that starts with a directory is not an SSRF target. (#14171, @danog)Codebase::addTaintedCall()adds calls that PHP code doesn't make (a Twig template calling a filter) to the taint graph, andAddCallTaintsInterfaceandRemoveCallTaintsInterfacehandlers run for these calls, which have noExpr. (#13658, @danog)Fixes
Taint analysis
json_decode(),html_entity_decode()) give back the taints that the escapes before them removed. Escape flags with a variable operand, or flags a call may have changed, no longer count as escaping. (#13642, @danog)Types
non-falsy-stringpassed as acallable-stringreportsArgumentTypeCoercion. (#14925, @orklah)UnsafeGenericInstantiationfornew staticwhenstaticis only an array shape key in the return type. (#14920, @orklah)@psalm-assert iterable&CountablekeepsCountable, and intersections are compared by every part. (#14944, @orklah)$int & <non-negative int>is bounded by the non-negative operand:$i & 0x0Fisint<0, 15>. (#14507, @jirkace)callable-array. (#13424, @jirkace)T&Stringablecasts to string whenTis bounded byobjector unbounded, and the cast charges__toString()in pure code. (#14471, @jirkace)class-string-mapcombined into another array has its template replaced by its bound, andclass-string-map<T of Foo, T>keeps its bound in a namespace. (#14934, @orklah)list<int>, notarray). (#14923, @orklah)Templates
@implementsargument, without a falseMoreSpecificImplementedParamType. (#14459, @jirkace)non-empty-string, notarray|non-empty-string). (#14582, @jirkace)Narrowing, loops and arrays
$xafter$t = gettype($x)unlinks$t, soswitch ($t)no longer narrows the new$xtonever. (#14937, @orklah)$x === $ywith$yone of several class-strings keeps all of them. (#14938, @orklah)!array_is_list()of a value that is always a list reportsTypeDoesNotContainType. (#14529, @jirkace)isset($array[$id])with astring$idon an array with int keys is not anInvalidArrayOffset. (#14652, @jirkace)fororwhileloop whose counter starts beyond every value of an int bound (for ($i = 1; $i <= $size; $i++)with$size: int<1, max>) is always entered. (#14543, @jirkace)do/whilecondition on an offset of amixedvariable no longer holds after the loop. (#14584, @jirkace)??accepts any left side (null ?? 1, a constant, an operation) withoutInvalidArgument, and drops itsnull. (#14591, @jirkace)rememberPropertyAssignmentsAfterCall="false", refinements of readonly properties survive calls. (#14571, @jirkace)Classes, properties and constants
static::or an object of a non-final class, has that type instead ofmixed. (#14596, @jirkace)selfin the type of a trait property resolves against the class using it,staticin an inherited property type against the class read, andget_object_vars()resolves template-bound literals. (#14512, @jirkace)PropertyNotSetInConstructor. (#14566, @jirkace)if (!class_exists(...)), a function body) in a namespaced file are analysed. (#13654, @danog)autoloadalso loads is no longer treated as unshipped becauseautoload-devmaps it too. (#14936, @danog)--alterproperties-of<T>is written as a nativearray. (#14930, @lyn1dev)non-empty-string) gets a docblock, and enums and anonymous class parents get the right namespace. (#14917, @orklah)[]or inside an intersection is parenthesised. (#14921, #14935, @orklah)Internal changes
Atomic::getId()no longer falls back togetKey(), so a plugin type that extendsAtomicmust write its id or it throws aLogicException. (#14922, @orklah)New Contributors
Full Changelog: vimeo/psalm@7.19.0...7.20.0
v7.19.0Compare Source
Features
@phpstan-sealedis read like@psalm-inheritors. (#11818, @stof)composer.jsonrequires any Symfony package, not onlysymfony/framework-bundle. (#14682, @danog)ensureOverrideAttributealso reportsMissingOverrideAttributefor a property (PHP 8.5), class constant or enum case (PHP 8.6) that overrides a parent member. (#14407, @jirkace)UndefinedPropertyFetchorUndefinedPropertyAssignmenton a property declared by@propertyin a class without__get()/__set()says to add the magic method or setusePhpDocPropertiesWithoutMagicCall="true". (#14644, @jirkace)@psalm-traceworks on static properties (self::$name). (#14629, @jirkace)Fixes
Narrowing and conditions
==keeps the values PHP juggles:"1" == 1,1 == 1.0,false == [],$stringable == "a". (#14906, @orklah)== 0keeps thefalseandnullloosely equal to it, so($h = fopen(...)) == 0is no longer aParadoxicalCondition. (#14823, @orklah)isset()on an offset of a possibly-nullmixednarrows in anelseifas in anif. (#14393, @orklah)match (false)narrows the variables of its conditions. (#14354, @jirkace)$item?->flag !== true,$itemis not null. (#14460, @jirkace)instanceofkeeps what is known of its properties. (#14537, @jirkace)!array_key_exists($key, $array)on a generic array says nothing about$key. (#14613, @jirkace)stringorintcan be identical tokey-of<T>orvalue-of<T>of a templateT of array. (#14437, @jirkace)instanceof UnitEnumorBackedEnumexcludes classes that aren't enums. (#14526, @jirkace)($a['k'] ?? false) && ...establishes that the key is set. (#14377, @jirkace)isset()and??on a magic property are not decided by the type of__get()(SimpleXMLElementchildren). (#14363, @jirkace)ParadoxicalConditionon a clause about a variable that a nested loop writes. (#14899, @orklah)ifwhose condition on an array offset always holds no longer makes the key optional. (#14896, @orklah)isset()in anifkeeps the same type as without it. (#14893, @orklah)RedundantConditionorTypeDoesNotContainType. (#14822, @orklah)empty()of a possibly undefined bool is not anInvalidArgument. (#14819, @orklah)MixedArrayAccessis reported when a!empty($p['a'])check is stored in a variable first. (#14824, @orklah)switch (true)overinstanceofchecks of final classes is not anInvalidReturnType. (#13362, @jirkace)Loops
whileorforloop whose condition holds on entry is always entered. (#14419, @jirkace)&&in aforcondition is defined in the body and the step. (#14827, @orklah)switchon a call doesn't stay in scope after it. (#14569, @jirkace)Arrays
$array + ['key' => $default]has the keys of the shape, and so does a shape plus an array. (#14621, @jirkace)$a[$k][$i] = $v) is non-empty. (#14404, @jirkace)$a[$k]++,$a[$k] += 1and by-reference arguments. (#14540, @jirkace)ArrayAccessobject no longer checks a wrong value againstoffsetSet(). (#14371, [@&Find the most recently commented file in the user's folder #8Configuration
📅 Schedule: (in timezone Europe/Vienna)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.