Repository navigation
Update dependency carthage-software/mago to v1.65.0 - #44
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #44 +/- ##
===========================================
Coverage 100.00% 100.00%
Complexity 5 5
===========================================
Files 1 1
Lines 15 15
===========================================
Hits 15 15 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
1.64.0→1.65.0Release Notes
carthage-software/mago (carthage-software/mago)
v1.65.0: Mago 1.65.0Compare Source
Mago 1.65.0 reads a
@vardocblock on a parameter as its type, adds the PHP 8.6 stream errors, polling and URI APIs, and fixes 74 bugs, most of them in the analyzer. It also analyzes longelseifchains andmatchexpressions faster, and speeds upmago guard.✨ Features
Codex
@varon parameters: reads a@vardocblock right before a parameter as the parameter's type. (#2779, #2963,e3c3cf3)A
@paramtag on the function still wins.Prelude
StreamErrorMode,StreamException,stream_last_errors()and more. (#2966, #2967,1fd0ed3)Io\Poll\ContextandStreamPollHandle. (#2968, #2969,dc48b98)UriBuilder,UrlBuilder,getHostType(),url_percent_encode()and more. (#2970, #2971,b024f30)🐛 Bug Fixes
Analyzer
Control Flow
switchfall-through: a case reached both directly and from the case above keeps what each path knows. (cf11e62)caselabels: reports one at any place in a group of labels that share a body. (981520c)matcharms: reports an arm as unreachable when an earlier arm already matches its string. (a8e2a1a)tryandcatch: after acatchthat falls through, forgets what thetrybody proved before athrow. (425be40)&&and||chains: use less stack, so very long chains no longer overflow it. (78abdaa)yield from: accepts a generator whose send type isvoidin any generator. (e6595d0)Loops
while (true)ordo-whilebody defines stay defined after an outertry. (b4eae4b)++after an assignment:$i = 0; $i++;in a loop body makes$iexactly1, notint. (bbf0c74)Narrowing
===on typed values: narrows both sides, so after$a === $bwithA $aandB $b,$bis anAtoo. (1103042)$x === $yon arrays of unrelated types, both may still be empty. (54d7544)boolcomparisons:is_null($s) == false, or a comparison with afalseconstant such asFlag::OFF, narrows. (a075c8a)&&chains: forget a property narrowed before a call in the chain that may change it. (d220ab1)$o->is($v)onA|Bnarrows$vonly by what holds whichever method runs, not byA::is()alone. (5cd2217)is_a(),is_subclass_of(),array_key_exists()and similar functions narrow with named arguments. (38f71fb)!=and numeric strings: after$a != '1',$ais no longer'01'or'1.0', which PHP treats as equal to'1'. (4714226)is_scalar()on callables: narrows acallableto acallable-string. (ea3564b)!is_scalar()on callables: removes thecallable-stringpart, so a lateris_string()is reported. (6cc2c47)is_object()on callables: narrows acallableto a callable object that keeps its signature and__invoke(). (fc1bfc9)is_resource()on templates: narrows a template with no bound toresource, notnull. (76d94ae)isset()with a computed key:isset($a[strtolower($s)])proves that$ais set. (02a2730)staticassertions:@assert-if-true static<never> $thisnarrowsUser<null>toUser<never>. (#2960,421a916)Nullsafe
?->calls:$h?->foo($h = 1)leaves$has1ornull, not the original object. (966f816)?->with?? null:($box?->n ?? null) !== nullnarrows both$boxand$box->n. (ff1d9f3)Variables and References
unset()on a reference: breaks the link, so later writes to the variable no longer reach the other one. (22c68d4)$xby reference no longer turnsfalseintoboolin$x. (15c87d6)f($a, $b, $c)withint &...$itemsmay change every argument. (8e6a2ae)$valueinfunction (&$value)passed toarray_walk(). (4dd50af)isset()and??: still report a possibly undefined variable used in them as a method receiver or a member name. (9b6df16)@varbeforeforeach: also types variables the loop does not bind, such as an outer$s. (ed981bc)@varon destructuring: types the variables of['a' => $a] = $rowand[$x, $y] = $pair. (aeb5c05)Arrays
$a[] = 3may land at any optional index, such as0when$amay be empty. (5c81d0b)iterable:$items[0]on aniterable<int, int>readsintfrom its array part. (f9e39be)$array[$key] = 3with$keyofT of 'a'sets keyaand keeps the array's shape. (324865d)array_map(null, ...): zips any mix of lists, shapes and unions of them into a list of tuples. (b5c2e89)array_multisort(): treats every array argument as reordered, with its integer keys renumbered. (cfe3941)Strings and Numbers
abs(): returnsint|floatwhen the argument may bePHP_INT_MIN. (dfe9693)Generics
@extendsbinding, sonew IntBox('x')is reported whenIntBoxextendsBox<int>. (5a4d8a8)Tfrom any member of an intersection, such asBox<T>inMarker&Box<T>. (a425785)identity(...[1]). (e14d687)array_map(fn($v) => $v, ...$lists)knows$v. (e408f96)$obj::make()on aTreturnsTwhenmake()returnsstatic. (625f509)@template T of static: checks@extendsand@implementsarguments against the extending class. (4e4cbc7)static:($x is static ? A : B)givesA|Bunless the receiver's class is final. (ded4de6)instanceofa generic subclass: allows$item instanceof Kidon aPar<'b'>whenKid<U>extendsPar<U>. (1d1213c)Classes and Members
const D = 5that overridesconst int D, as PHP does. (aadd72a)@return selfoverstatic: reports it on a final method of a class that is not final. (b12018b)@deprecatedproperty that its own hooks use. (3420805)(object)casts: a property of an object made by an(object)array cast takes any value. (d1aa550)stdClasspassed to calls: forgets its known properties after a call that may change them. (a091f4a)$o->qonobject{q?: bool}, which may create it. (7398b16)Callables
[$obj, $name]()with$nameof'a'|'b'returns what either method returns. (441cf88)'f'passed ascallable(int=)whenf()requires its argument. (954f2ec)array_map()callbacks: reports a callback that needs more arguments than there are arrays. (8e0267d)f(...['x', 1])checks each item against the parameter at its position, variadics included. (ae08c45)count(...[$list])is not misread. (0aeaca0)Diagnostics
undefined-int-array-indexshows a negative index, such as-1, with its sign. (9d17b6d)Codex
int<…>bounds: no longer wrap at or past the 64-bit limits;-$imay be afloatwhen$ican bePHP_INT_MIN. (8cfcca6)get_class()on enums: returns the enum'sclass-string, such asclass-string<Suit>. (37d1ff6)@param-outinheritance: a method without a docblock inherits@param-outfrom the method it overrides. (03fdb2c)...<T>in an array shape as the type of the extra values, not of their keys. (7b895b3)@returnwhen the parent has no native return type. (d426068)voidandnull: no longer reportsf() === nullwhenf()returnsvoid. (4f6d2d1)@template Tapplies to the types it inherits, such asclass-string<T>. (a66ccf2)Box<D>&MarkerwhereBox<C>&Markeris expected. (718d885)Checker<*>andChecker<contravariant LeafNode>readTas its bound, such asNode. (85d01f7)static::in docblocks:static::REF_*resolves against the class of the call, such as a child's constants. (969b146)define(): defines the constant when called with named arguments in any order. (3524376)use constin docblocks: resolves imported and aliased constants, such asint-mask-of<FLAG_A|OTHER>. (db17bbb)Prelude
RecursiveRegexIterator::MATCH: accepts it as the mode ofRecursiveRegexIterator, fixing a typo in the stub. (#2964, #2965,4cc02a4)Semantics
readonlyproperty, and virtual property defaults as PHP does. (#2956, #2957,b6e9421)private(set)andprotected(set)against the property's hooks, as PHP does. (#2954, #2955,57bef3f)#[\Deprecated]on classes: accepts it next to#[\DelayedTargetValidation]on PHP 8.5 and later. (#2958, #2959,154340c)Syntax
yieldin conditions: ayieldin anif,elseif, loop header,switchcase orechomakes the function a generator. (08eb9b4)"$user['name']", as parse errors. (#2972, #2973,47816d7)🏗️ Internal
Analyzer
elseifchains: indexes negated clauses, applies each negation once and shares clauses. (bb7e58b,52181cc,4779991,ab8c2d2)matchexpressions: indexes their negated clauses; arms share clauses and skip ones already applied. (4ad28c4,884e6ff)Algebra
61341db,5c1d08f,fb90ebd)Codex
3a36074)Guard
a301350)98426f0)CI
524b93e)🧩 Extension Protocol
No protocol changes in this release.
🙏 Thank You
Contributors
Thank you to everyone who contributed to this release:
Issue Reporters
Thank you to everyone who reported issues that shaped this release:
Full Changelog: carthage-software/mago@1.64.0...1.65.0
Configuration
📅 Schedule: (UTC)
🚦 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 has been generated by Mend Renovate CLI.