magento / magento/magento2-phpstorm-plugin

[Generation] Create configuration model generator

Open
#1,162 1 comment 0 reactions 1 assignee View on GitHub

@bohdan-harniuk is already working on this.

Since Sep 7, 2022.

Configuration Model Generation
Dominant language
Java
Stars
463
Forks
98
Avg merge
1h 6m
Merged PRs (30d)
3

Description

Create a configuration model generator.

**Input:**

1. path to class (from the root of a module)
2. configuration model name (class name/file name)

**Output:**

Generated class in the specified directory (directories should be generated if not exist).
Generated scopeConfig parameter and constructor with its initialisation:

```php
/**
* @var ScopeConfigInterface
*/
private $scopeConfig;

/**
* @param ScopeConfigInterface $scopeConfig
*/
public function __construct(
ScopeConfigInterface $scopeConfig
) {
$this->scopeConfig = $scopeConfig;
}
```

**Acceptance Criteria:**

- this generation should be covered by test case.
- no actions should be created (will be done separately)
- consider implementing new architecture ways to create generators (try to not follow current one, maybe we can improve it)

**Additional context**

**Mainline branch:** mainline/generate-configuration-model

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.