Skip to content

Excessive memory usage during analysis #9733

@l-x

Description

@l-x

Bug Report

Subject Details
Rector version v2.4.0
PHP 8.4.19 and 8.5.4

When Rector analyzes the code example below, it quickly uses up all available memory. The memory_limit setting in php.ini does not seem to take effect in this case.

Minimal PHP Code Causing Issue

<?php

function willExhaustMemory()
{
    $result = \Carbon\CarbonPeriod::create();

    return $result->first();
}

Expected Behaviour

Normal analysis

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions