8000 Special cases with ParamTypeDeclarationRector on Symfony · Issue #6467 · rectorphp/rector · GitHub
[go: up one dir, main page]

Skip to content
Special cases with ParamTypeDeclarationRector on Symfony #6467
@nicolas-grekas

Description

@nicolas-grekas

Bug Report

Subject Details
Rector version dev-main

I'm trying to use the ParamTypeDeclarationRector on Symfony, branch 6.0.

I'm noting a few things that should be improved:

This generated patch should replace the self return type by `static:

     /**
      * Creates a cookie copy with SameSite attribute.
-     *
-     * @return static
      */
     public function withSameSite(?string $sameSite): self
     {

This generated patch breaks the code:

      */
-    protected function dispatchMessage($message, array $stamps = []): Envelope
+    protected function dispatchMessage(object|\Symfony\Component\Messenger\Envelope $message, array $stamps = []): Envelope
     {

This one should dedup:

      */
-    public function depth($levels)
+    public function depth(string|int|array|array $levels)
     {

The tool looks nice btw :)

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

      0