magento / magento/magento2-phpstorm-plugin

Generate a CLI command doesn't escape single quotes in description

Open
#1,280 1 comment 0 reactions 1 assignee Claimed by @VitaliyBoyko View on GitHub
bug
Dominant language
Java
Stars
463
Forks
98
Avg merge
1h 6m
Merged PRs (30d)
3

Description

**Describe the bug** (*)

When generating a CLI command if you type a description that contains single quotes, they don't get escaped and the code generated is invalid

**To Reproduce** (*)

Steps to reproduce the behavior:
1. Generate a new CLI command
2. Type in the description field like `Test command's bug`
3. Generate the class
4. See it's invalid

**Expected behavior** (*)

The quote is escaped

**Screenshots**

![image](https://user-images.githubusercontent.com/20220341/210233252-1a2326ce-67b8-4994-a9cb-ff8b4961016c.png)

**Please complete the following information:** (*)

- OS: Windows 11
- PhpStorm/Intellij version:
```
IntelliJ IDEA 2022.3.1 (Ultimate Edition)
Build #IU-223.8214.52, built on December 20, 2022
Runtime version: 17.0.5+1-b653.23 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Windows 11 10.0
GC: G1 Young Generation, G1 Old Generation
Memory: 4096M
Cores: 24
```
- Plugin Version: [e.g. 1.0.0]
`5.0.0`

**Additional context**

Add any other context about the problem here.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.