Skip to content

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Dec 5, 2025

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
carthage-software/mago ^1.0.0-rc.9 -> ^1.0.0-rc.13 age adoption passing confidence

Release Notes

carthage-software/mago (carthage-software/mago)

v1.0.0-rc.13

Compare Source

This release introduces an internal plugin system for the analyzer, adds new linter rules, and continues the focus on minimizing false positives.

New Features

Analyzer
  • Internal plugin system: Adds an extensible architecture for type providers, enabling custom return type inference for functions and methods
  • UnitEnum::cases() return type provider: Properly infers the return type of cases() on unit enums
Linter
  • New instanceof-stringable rule: Suggests using $x instanceof Stringable instead of the verbose is_object($x) && method_exists($x, '__toString') pattern

Bug Fixes

Analyzer
  • parent:: now works in traits with @require-extends annotation (#​732)
  • Objects with __toString method can be cast to string without errors
  • Concrete-to-template type assertions no longer flagged as redundant
  • Explicit type assertions in ternary expressions are preserved correctly
  • Null access warnings suppressed on RHS of nullsafe operations (?->)
  • Redundant type comparisons are now properly reported
  • Template parameters with compatible constraints are allowed
  • Static enum types resolve correctly
  • String callables accepted; declared list parameter types in closures respected
  • Memoized values cleared after any invocation to prevent stale type information
Codex
  • $this handling corrected in type expansion
  • Static type resolves to concrete class when class name is known
  • Strings combiner fixed for accurate type unions
  • Array/list identical check corrected
Formatter
  • Arrow function ternary bodies wrapped in parentheses; outer calls break correctly
  • Argument lists break when an argument has a trailing line comment
Linter
  • Annotation spans narrowed to highlight minimal code regions
Type Syntax
  • Trailing comma allowed after open array additional fields

Full Changelog: carthage-software/mago@1.0.0-rc.12...1.0.0-rc.13

v1.0.0-rc.12: Mago 1.0.0-rc.12

Compare Source

Mago 1.0.0-rc.12

This release continues our focus on reducing false positives, improving generic type handling, and enhancing PHP 8.4+ property hooks support.

New Features
Analyzer
  • Uninitialized Property Detection: Added detection for uninitialized properties and missing constructors, helping catch potential runtime errors before they occur.
Formatter
  • Staged Formatting Support: Added fmt --staged command for formatting only staged files, along with a pre-commit hooks guide for seamless CI integration.
Bug Fixes
Analyzer
  • Generic Parameter Literal Equality: Fixed false "impossible condition" warnings when comparing generic parameters to literal values (=== '', === 0, === 1.5, === true, === false) after type narrowing in OR conditions.
  • Property Hook Inheritance: Fixed false positive for unimplemented-abstract-property-hook when a concrete class inherits the hook implementation from a parent class.
  • is_callable() Narrowing: Added support for is_callable() type narrowing on array callables with class-string elements (e.g., array{class-string<Foo>, 'method'}).
  • isset() on Open Array Shapes: Fixed false positives when using isset() checks on open array shapes with mixed values.
  • Dynamic Property Access on stdClass: Allowed dynamic property access on stdClass without triggering errors.
  • Method Override Compatibility: Added verification of method compatibility when overriding non-abstract methods from parent classes.
  • Generic Parameter Constraint Binding: Fixed issue where generic parameters were incorrectly bound when constraints were not satisfied.
Codex
  • Property Hook Types: Fixed population of property hook parameter and return types for proper type checking.
  • Deterministic Output: Ensured consistent ordering of parent classes and interfaces for deterministic analysis results.
Docblock
  • @method Tag Parsing: Fixed parsing of @method tags with leading whitespace.
Formatter
  • Heredoc/Nowdoc Comment Preservation: Fixed critical bug where comments before heredoc/nowdoc (e.g., /** @&#8203;lang SQL */) were incorrectly moved after the opening identifier, resulting in invalid code.
  • Consistent Defaults: Made empty_line_after_opening_tag default behavior consistent across configurations.

New Contributors


Full Changelog: carthage-software/mago@1.0.0-rc.11...1.0.0-rc.12

v1.0.0-rc.11: Mago 1.0.0-rc.11

Compare Source

This release focuses on reducing false positives, improving type system accuracy, performance optimizations, and introducing new linter rules.

New Features
Linter
  • New property-name rule (#​703)
    Added a new linter rule to enforce consistent property naming conventions across your codebase.

  • New use-specific-assertions rule
    Introduced a new rule that encourages using specific assertion methods (e.g., assertTrue, assertNull) instead of generic assertEquals/assertSame with literal values for better clarity and intent.

Analyzer
  • Type narrowing for symbol existence checks
    The analyzer now properly narrows types based on symbol and member existence checks like function_exists(), method_exists(), property_exists(), and defined(). This eliminates false positives when conditionally using symbols after checking their existence.
Bug Fixes
Analyzer
  • Fixed false positives for class-string comparisons and static variable initialization
    Resolved issues where the analyzer incorrectly flagged valid code involving class-string type comparisons and static variable initialization patterns.

  • Fixed false positive for count() comparison on non-empty-list
    The analyzer no longer incorrectly reports issues when comparing the count of a non-empty-list with integer values.

  • Fixed list type preservation when narrowing with is_array()
    Using is_array() on a union type containing a list no longer incorrectly loses the list type information.

  • Fixed interface method resolution for __callStatic
    The analyzer now only reports interface implementation issues when resolving actual methods, not when resolving magic __callStatic calls.

  • Fixed invalid array access assignment value checking
    Improved detection of invalid values being assigned through array access expressions.

Reconciler
  • Fixed list type narrowing preserving assertion element types
    Type narrowing on list types now correctly preserves the element type assertions, preventing false positives in generic list operations.
Docblock
  • Fixed @method tag with static return type
    The docblock parser now correctly handles @method tags that specify static as their return type.
Linter
  • Made strict-assertions rule less strict
    The strict-assertions rule has been adjusted to reduce noise while still catching problematic assertion patterns.
WASM
  • Matched analyzer default settings
    The WASM build now uses the same default analyzer settings as the native build for consistent behavior.
Reporting
  • Fixed duplicate issue collection
    Removed unnecessary duplicate checking when collecting issues, improving performance and correctness.
Performance Improvements
  • Optimized type combiner
    Significant performance improvements to the type combination logic, reducing analysis time for codebases with complex type operations.

  • Lowered analysis thresholds
    Adjusted internal thresholds for formula complexity and algebra operations to improve analysis speed on large codebases without sacrificing accuracy.

  • Early return optimization for pragma collection
    Added early return when no pragmas are present, avoiding unnecessary processing.

Build Improvements
  • Profile-Guided Optimization (PGO) for Tier 1 targets
    Release binaries for macOS and Windows are now built with PGO, resulting in 5-15% performance improvements.

Full Changelog: carthage-software/mago@1.0.0-rc.10...1.0.0-rc.11

v1.0.0-rc.10: Mago 1.0.0-rc.10

Compare Source

Mago 1.0.0-rc.10

This release focuses on reducing false positives across multiple analysis scenarios, improving type system accuracy, and enhancing PHP compatibility.

Bug Fixes

Analyzer
  • Fixed impossible type assertion false positive when comparing interfaces - a class can implement multiple interfaces, so Foo can be Bar at runtime (#​707)
  • Corrected template resolution regression affecting PSL and other libraries using generic parameters from class-strings
  • Fixed false positive when checking $value === [] on non-null or mixed types (#​701)
  • Resolved false positive unimplemented-abstract-property-hook incorrectly reported on interfaces
  • Infer Iterator key/value types from key() and current() method return types
  • Support float and array-key in string concatenation with improved __toString trait detection
  • Fixed callable-to-array reconciliation and interface throwable checks in catch blocks
  • Added missing $_COOKIE superglobal
Codex
  • Resolved false positive redundant condition for integer range identity comparisons (#​706)
  • Fixed trait self type resolution to use intersection with @require-implements/@require-extends constraints
Prelude
  • Fixed call_user_func and sprintf stubs with Stringable support

Improvements

Composer
  • Added PHP 8.5 and 8.6 as compatible versions (#​699)

Full Changelog: carthage-software/mago@1.0.0-rc.9...1.0.0-rc.10


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

Renovate Bot

@renovate
Copy link
Contributor Author

renovate bot commented Dec 5, 2025

automergeComment

@renovate renovate bot force-pushed the renovate/all-minor-patch branch from 0a78241 to 3c18630 Compare December 5, 2025 08:59
@renovate renovate bot changed the title Update dependency carthage-software/mago to ^1.0.0-rc.10 Update all non-major dependencies Dec 5, 2025
@renovate renovate bot force-pushed the renovate/all-minor-patch branch 6 times, most recently from c21b68f to a720735 Compare December 12, 2025 06:46
@renovate renovate bot force-pushed the renovate/all-minor-patch branch from a720735 to bfae64a Compare December 14, 2025 09:37
dragosprotung and others added 2 commits December 14, 2025 23:20
| datasource | package                | from       | to          |
| ---------- | ---------------------- | ---------- | ----------- |
| packagist  | carthage-software/mago | 1.0.0-rc.9 | 1.0.0-rc.13 |
@renovate renovate bot changed the title Update all non-major dependencies Update dependency carthage-software/mago to ^1.0.0-rc.13 Dec 14, 2025
@renovate renovate bot force-pushed the renovate/all-minor-patch branch from bfae64a to 3a7e8cf Compare December 14, 2025 22:21
@renovate
Copy link
Contributor Author

renovate bot commented Dec 14, 2025

Autoclosing Skipped

This PR has been flagged for autoclosing. However, it is being skipped due to the branch being already modified. Please close/delete it manually or report a bug if you think this is in error.

@renovate renovate bot changed the title Update dependency carthage-software/mago to ^1.0.0-rc.13 Update dependency carthage-software/mago to ^1.0.0-rc.13 - abandoned Dec 14, 2025
@dragosprotung dragosprotung deleted the renovate/all-minor-patch branch December 14, 2025 22:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants