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

Handle bug when making a private plugin #18

Closed
marcusgaius opened this issue May 1, 2023 · 3 comments
Closed

Handle bug when making a private plugin #18

marcusgaius opened this issue May 1, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@marcusgaius
Copy link

Description

While making a private plugin, I opted for a handle without an underscore. The generator ignored it, and added an underscore to the beginning of the handle anyway at the end. Whether this is an intended behavior or not, I couldn't say, however, it seems to be counterintuitive, and should specify how private plugins will always get a leading underscore at the end or something like that.

Related key in composer.json:
image

Steps to reproduce

  1. In terminal, run command php craft make plugin --with-docblocks
  2. At the step Plugin Handle, type a handle without an underscore, ie test-plugin

Additional info

  • Craft version: 4.4.8
  • PHP version: 8.0.28
  • Database driver & version: MySQL 8.0.32
  • Plugins & versions:
    • Amazon S3 2.0.3
    • Craft Commerce 4.2.7
    • Formie 2.0.27.1
    • Navigation 2.0.17
    • Neo 3.7.7
    • Read-only Field 2.0.1
    • Redactor 3.0.4
    • SEOmatic 4.0.24
@marcusgaius marcusgaius added the bug Something isn't working label May 1, 2023
@brandonkelly
Copy link
Member

brandonkelly commented May 2, 2023

Yeah private plugins are identified by the fact that their handle begins with an underscore. Just updated the validation error to clarify that, for the next release:

> Plugin handle: [_foo] foo
Private plugin handles must begin with an underscore.

@marcusgaius
Copy link
Author

After I have reported the issue, I realized that the underscore might be the defining characteristic of a private plugin.
An error response for the prompt is the perfect fit.

@brandonkelly
Copy link
Member

Generator 1.5.0 is out with that change!

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