Skip to content

Errors in the patch file #1

@peterjaap

Description

@peterjaap

AI summary:

● Fixed Syntax Error in lazyObjectsPatch.patch

I found and fixed two syntax errors in the patches/lazyObjectsPatch.patch file:

Errors Fixed:

  1. Line 21 - Changed \SessionHandler::create to \SessionHandler::class
    - The original patch had ::create which is not valid PHP syntax
    - Should be ::class to get the fully qualified class name
  2. Line 29 - Changed }; to );
    - The closing of the return statement was incorrect
    - A semicolon after a closing brace is a syntax error in this context

Changes Applied:

Before:
!\is_subclass_of($finalClass, \SessionHandler::create) &&
...
return (new \ReflectionClass($finalClass))->newLazyProxy(
function ($object) use ($requestedType, $arguments) {
return $this->doCreate($requestedType, $arguments);
}
}; // ❌ Wrong syntax

After:
!\is_subclass_of($finalClass, \SessionHandler::class) &&
...
return (new \ReflectionClass($finalClass))->newLazyProxy(
function ($object) use ($requestedType, $arguments) {
return $this->doCreate($requestedType, $arguments);
}
); // ✅ Correct syntax

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions