-
Notifications
You must be signed in to change notification settings - Fork 0
Feature init #1
base: master
Are you sure you want to change the base?
Feature init #1
Conversation
To save the WordPress theme absolute folder path.
Hey! Any update on the rest of the TODO list ? |
- rename field to relationship to match builder function name - add values to required answer
|
||
## Installation | ||
> **Requires PHP7.3** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: Add a specific section for requirements
- help | ||
- list | ||
- acf:create |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: Only specify merlin list
command to prevent to maintain this section up to date each time a command is added to the project
*/ | ||
protected function interact(InputInterface $input, OutputInterface $output): void | ||
{ | ||
// @todo add a verification of the content of config file, else ask user to run acf:setup |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
praise: If think it's a must have before merging this PR
|
||
// Field group location location. | ||
$this->io->section('2. Field Group location'); | ||
$this->io->note('Exemple: post_type == product'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
chore: Exemple -> Example
$this->io->section('1. Field Group informations'); | ||
|
||
// @todo add a validator to only allow lowercase, trim space, etc | ||
$this->data['slug'] = $this->io->ask('Enter the name of the field group to create'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: Force input style thanks to Symfony\Component\String\u
function?
|
||
if ($confirm) { | ||
$this->prepareFile(); | ||
// @todo Add creation of the templates here, use $this->data |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick: Todo seems to already be done. to remove
@@ -0,0 +1,46 @@ | |||
#$ composer update --optimize-autoloader |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick: Remove commented lines
@@ -0,0 +1,15 @@ | |||
<?php |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this file as it does not have real tests
General feedback :
|
My opinion about PR todolist
This package should not load groups, only create it. Maybe we should force a specific path for groups to be able to autoload theme in studiometa/create-wordpress-project
+1, you can specify specific rules by folder thanks to phpcs.xml
This package should not load groups, only create it |
This PR contain a working integration to create ACFGroup
It is still a WIP considering architecture should be improve
How to test
php merlin acf:setup
to setup the absolute path in which files will be createdphp merlin acf:create
to create a new field group by following the promptTodo
PHP tooling
Command
acf:setup
command to store the filepath that will be use to create the files with other commandsIssues / todo
Added
php merlin acf:create
commandphp merlin acf:setup
command