Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Special cases with ParamTypeDeclarationRector on Symfony #6467

Copy link
Copy link
Closed
@nicolas-grekas

Description

@nicolas-grekas
Issue body actions

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

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.