Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default input for module "What should the root namespace for ... be?" doesn't work #2

Closed
khalwat opened this issue Dec 14, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@khalwat
Copy link

khalwat commented Dec 14, 2022

Description

Hitting <return> to accept the default root namespace for a module results in Invalid input.

/var/www/project/cms_v4 $ php craft make module
Module ID: (kebab-case) woof
Module location: [modules/woof] 
What should the root namespace for modules/woof/ be? 
Invalid input.
What should the root namespace for modules/woof/ be? 
Invalid input.
What should the root namespace for modules/woof/ be? 
Invalid input.
What should the root namespace for modules/woof/ be? 

I'd expect that it would just use what it was offering as a default.

Steps to reproduce

  1. php craft make module
  2. hit <return> when it asks "What should the root namespace for ... be?"

Additional info

n/a

@khalwat khalwat added the bug Something isn't working label Dec 14, 2022
@brandonkelly
Copy link
Member

It’s asking for a root namespace, not a root location.

It will only ask for a root namespace if the default provided location isn’t autoloadable to begin with. In your case that means that you don’t have a preexisting autoload root for modules/ or modules/woof/ yet in composer.json. So a new autoload root will need to be created that points to modules/woof/.

@khalwat
Copy link
Author

khalwat commented Dec 15, 2022

Shouldn't it be suggesting a sane default here tho?

brandonkelly added a commit that referenced this issue Dec 15, 2022
@brandonkelly
Copy link
Member

Fair. A default namespace is now suggested based on the module location, as of 1.0.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants