Skip to content

Conversation

@drpayyne
Copy link
Contributor

@drpayyne drpayyne commented Oct 23, 2020

Description

Changed validator for com.magento.idea.magento2plugin.actions.generation.dialog.NewCLICommandDialog

Fixed Issues

  1. Change validation for the new CLI command dialog window #296: Change validation for the injection of new CLI command dialog window

Additional changes

  • Created a new CliCommandRule to validate command CLI command formats
  • Fixed bug wherein notEmpty validation doesn't work for a JTextArea field
  • Moved isPHPClassValid() method from validator to main class to validate if the PHP class already exists.

Questions

  • Would it be better to implement the logic of isPHPClassValid() inside the existing PhpClassRule class? We'll need to reuse this in various places
  • Currently there's no validation to check if the CLI command already exists, just like a PHP class. I'm thinking this is needed since there can't be two identical commands doing different things. What do you think?

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with integration/functional tests (if applicable)
  • All automated tests passed successfully (all builds are green)

@coderimus coderimus self-assigned this Oct 23, 2020
@coderimus coderimus self-requested a review October 23, 2020 08:12
@coderimus coderimus merged commit 2e9f42f into magento:2.1.0-develop Oct 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants