Repository navigation
Update dependency carthage-software/mago to v1.62.0 - #39
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #39 +/- ##
===========================================
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.61.0→1.62.0Release Notes
carthage-software/mago (carthage-software/mago)
v1.62.0: Mago 1.62.0Compare Source
Mago 1.62.0 lets extensions declare class initializers, applies
@this-out, and reports constants that refer back to themselves or are inherited ambiguously. It fixes the@mixintrait hang and slow nested loops in generic code, and brings about 160 more fixes. Analyzer extensions move to MANA 2.3.✨ Features
Analyzer
@this-out: applies@this-outwhen it narrows the receiver of a method call. (#2395,4c5ec28)e0b4c9a)ambiguous-constant-inheritance. (c838ba1)pow()like**, andstrtolower(),strtoupper(), and theirmb_forms on literals. (5b8f8bb)Extensions
#[Before]. (#2837,2d4aed9)🐛 Bug Fixes
Analyzer
Performance
@mixintraits: visits each mixin once for static calls, so traits that@mixintheir class no longer hang. (#2831, #2812,da4f83b)a26ebd5)find-unused-definitionsis on. (#2836,09bfea8)Control Flow
catchblocks: see variables assigned before athrowin theirtry. (abf92e8)finallyblocks: one that assigns on some paths keeps the state after thetry. (8df085e)catchkeeps its declared type after thetry. (#2719,642a6db)??: writes on a right side of??that throws no longer leak. (2e273ee)||and&&assignments: a variable assigned on the right of||or&&is possibly defined. (66a6878)matchover a very large enum is no longer called non-exhaustive. (f0da453)Loops
break. (873ae7c)breakbefore an assignment leaves the variable possibly undefined. (43d7f3f)continuereach the end of a loop that may not run. (e2518b6)foreachpasses: skips the body forneveritems, and reassigns targets before every pass. (cb16b58,b74cfda)foreach: a by-referenceforeachover a property writes its items back. (f786c73)forconditions: a short-circuited assignment in a leadingforcondition is possibly undefined. (62bc778)forupdates: aforloop's last update pass reports nothing. (937e378)do-while: a condition on an unchanged variable no longer narrows it tonever. (3333473)39f1b93)Narrowing
count(): gives the known size of an array, and narrows sealed lists and shapes by size. (#2838,99ba3de,e44687b,92a98f7)count()of objects: no longer narrows, since aCountableobject's size can change. (#2799,94cee05)count($a ?? []): comparing it with a number narrows$a. (339d9da)array_search()afterin_array(): finds the needle when both calls take the same arguments. (#2808,c99fec3)isset()offsets: narrows strings to non-empty, can fail on ints and bools, and reads only literal keys. (d2d49bc,0ec7fa3,0113543)isset()on strings andmixed: is false for non-numeric string offsets, and keepsArrayAccessand strings. (2ef0749,591a260)isset()of their offsets keepsnull. (8bb6b86)c61b707,1e60edb)$thisassertions:parent::,self::andstatic::calls apply them, andstaticstays late for open receivers. (08fc5b1,c8580ed)instanceof parent: a failed check keeps the variable's type. (84d4c3b)never. (8ccebc5)b61fc42)array_is_list()may hold for[]. (6248c72,30d029d)dcf9833)?? false: the falsy branch of$a['k'] ?? falsekeeps the key optional. (348a3c3)mixed: type checks keep its falsy values. (4f265ca)is_countable(): keeps countable callables and iterable arrays. (8a77dff)method_exists()onmixed: keeps class names. (54749d5)nullsource. (0a2d7c1)Nullsafe
null. (c8bb00a,49c3752)!empty()on a nullsafe access narrows its root. (995cde8,478170b)??: reads a possibly undefined receiver without a report. (74245e9)Variables and References
$_SERVERpaths: may be empty in the CLI. (64c6473)aa4c528)Arrays
79ed4d9)end(),reset(),next(), andprev()keep the array's type. (7c1a1d6)mixed: spreadingmixedinto an array keeps unknown keys. (982c052)array_push(): pushing possibly empty unpacked values may add nothing. (0553acd)f6114fc,dd25d80)548a6ae)Strings and Numbers
-PHP_INT_MINis a float. (ee6b874,8ac0e38)pow()of floats, and ints above the int range give float literals. (980c552,9180d45,863c872)PHP_INT_MIN / -1: no longer crashes the analyzer. (0f4b50e)(float)cast of a string reads its exponent and leading spaces. (6d133c8)6928939)Generics
neverinputs: bind the templates they would fill tonever. (#2767,dc3be50)@propertycan narrow a templated one. (6b60abd,d2d62b6)077c1f5,139b2a2)new:(int)keeps an int template, andnewof an unbounded class-string template gives it. (8b842a7,1cb809a)mixedis disjoint fromnull. (d105d3a)Classes and Members
private(set)overrides: reports overrides ofprivate(set)properties. (#2822, #2823,eb647ac)275fdf8)intno longer stands in forfloatin an override's native types. (a76870b)UnitEnumandBackedEnum. (f663223)clone: always gives an object, andclone $thisisstatic, not$this. (fddfe35,8358246)c3b06ef)get_object_vars(): reads the properties it can see. (146404a)9d781b9)Callables
yield from: sendsnullwhen the inner generator has no send type. (2234d13)floatconverts anint. (9608566)2835c82)Diagnostics
false. (68164e2)Codex
@implements. (#2803,da181c3,8ea3a75)ee90224)c638ae2)593496b)mixedtemplate counts asmixed. (7b7cab8,0d4b6df)class-string<Closure>is valid. (d46a63b,5a4a84c)staticin intersections: resolves to the receiver. (f0d8886)staticarguments: keeps the receiver's arguments for fewer templates, and method templates resolved to bounds. (5a6708a,d0b4ff6)40f362c,838c3f2)__invoke()are callable. (6cd1239,8729012)43a88a1)255b749,6e4c380)??and ternaries they can decide, and keep every branch of the value. (59690b1,f3fe7e0)int. (adf8fa9)PHP_DEBUGandPHP_ZTS: areboolsince PHP 8.4. (e388b77)f063ec0,5c4f187)f6e0bac,ed3ce3a)falseandnull: array entries keep them when compared. (6bc8b0a)mixed: no longer contains a value that may be falsy. (5350183)@methoddefaults: a@methodparameter defaulting tonullis nullable. (95c8409)429a903)90ca4f7)425e091)496b4f9)4ed74fe)Prelude
isReadable(),isWritable(), andclamp(). (#2800, #2801,d7eccc0)f7047a5)Domnamespace: marks its symbols as available since PHP 8.4 and 8.5. (#2839, #2840,cd12b3f)81318be)895b1af)Pdo\Sqlite: adds the PHP 8.5 constants andsetAuthorizer(). (#2827, #2828,94f73ca)SQLite3Stmt: marks the members PHP 8.5 added as available since 8.5. (#2829, #2830,33a484e)ReflectionConstant: corrects its stub for PHP 8.4 to 8.6. (#2834, #2835,7e3111b)Generator: marks it final. (#2818, #2819,52035fa)getimagesize(): makesbitsandchannelsoptional, also ingetimagesizefromstring(). (#2844, #2845,676beeb)xml_parse_into_struct(): corrects its return type and by-reference parameters. (#2848, #2849,1ebfbc3)array_product(): returnsintfor ints and0|1for bools. (f078163)78ee81e)2f3d79c)get_debug_type()returns a non-falsy string, andPGSQL_LIBPQ_VERSIONis non-empty. (693f733,966b856)ArrayObjectandArrayIterator:offsetSet()takes anullkey. (2e99e2f)Ds\Hashable: adds the interface. (4d2f2e6)WeakMap: offset methods accept named arguments. (1778432)MemcachedException: extendsRuntimeException. (817148a)102e1cd)ini_get(): never returnsfalsefor a core setting. (f1cedf2)str_replace(): keeps the subject's keys and takes scalar items. (058c11f)newLazyGhost()returns the reflected class, and attributes are objects. (654ad70)Formatter
preserve-breaking-member-access-chain. (#2783, #2811,0c0b9f5)d51b676)6fdf84b)7c74f33)Linter
ambiguous-function-call: no longer reports a function the same file declares. (#2362,c64c3b5)Semantics
057ef25)__debugInfo(): allows it on PHP 8.6. (#2789, #2790,7cdedf3)3fdb7af)5d4afa2)e5b6d40)cases(),from(), ortryFrom(). (#2816, #2817,684855c)#[\NoDiscard]: reports it onvoidandneverfunctions. (#2820, #2821,47cba87)Syntax
switch: accepts a newline after?>before the firstcase. (#2806, #2826,5575387)CLI
--substitute: a substituted file uses the baseline of the file it replaces. (#2841,3ad88fa)🏗️ Internal
Codex
0625df0)Database
265954c)🧩 Extension Protocol
Analyzer
2d4aed9)Update the PHP SDK to 1.62.0 when upgrading Mago. Custom analyzer workers must use MANA 2.3; MANA 2.2 workers are not compatible. The linter protocol is unchanged.
🙏 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.61.0...1.62.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.