Skip to content

Regression: Creating new classes from the CLI fails #792

Closed

Description

@sandermarechal

It seems that #496 and #489 broke generating new classes from the CLI. For example:

$ phpactor cl:new --variant=controller src/My/NewClass.php
src:src/My/NewClass.php
path:<?php

namespace My;

class NewClass
{
}
exists:false

Two problems:

  1. The variant isn't used. Although the --list option does show my variant correctly.
  2. The source code is output in the path field

Activity

  1. sandermarechal commented on Jul 3, 2019

    @sandermarechal
    Author

    Reverting to 0.11.1 fixes the variant issue, but still prints the class source code instead of the file path. I need to revert all the way back to 0.4.0 to fix the path display issue.

  2. dantleech commented on Jul 7, 2019

    @dantleech
    Collaborator

    can confirm the path/src issue. On both develop and master the variant works as expected on my machine.

  3. dantleech commented on Jul 7, 2019

    @dantleech
    Collaborator

    I've added more tests to cover variants (they seem to work) and fixed the path/src confusion here: #793

  4. sandermarechal commented on Jul 8, 2019

    @sandermarechal
    Author

    I can confirm that everything now works as expected on develop. The variant issue only happens on 0.12.0/master, not on develop.

  5. dantleech commented on Jul 8, 2019

    @dantleech
    Collaborator

    ok, it should be fixed in develop as of #766 (which is merged in develop but not yet master), closing for now.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions