Skip to content

[CT] Render aliases correctly in the code builder #574

Closed

Description

@kermorgant

Update: Currently type aliases provided to the code builder are rendered by their short name only. We should change this logic so that we render them according to the class imports of the context class.


Given

use SM\Factory\Factory as StateMachineFactory;

class Something
{
    public function __construct(StateMachineFactory $smFactory)
    {
    }

complete constructor generates a @var Factory instead of @var StateMachineFactory

class Something
{
    /**
     * @var Factory
     */
    private $smFactory;

    public function __construct(StateMachineFactory $smFactory)
    {
        $this->smFactory            = $smFactory;
    }

Activity

  1. dantleech commented on Sep 11, 2018

    @dantleech
    Collaborator

    We should ensure that aliases are taken to account when rendering any type.

  2. changed the title [-]"complete constructor" : take alias into account[/-] [+]Render aliases correctly in the code builder[/+] on Sep 11, 2018
  3. changed the title [-]Render aliases correctly in the code builder[/-] [+][CT] Render aliases correctly in the code builder[/+] on Sep 11, 2018
  4. dantleech commented on Feb 22, 2020

    @dantleech
    Collaborator

    Fixed in #887

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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