When using the wp acorn acf:upgrade command, all instances of the number 1 in the file are being replaced with public function enqueue($block). This seems to have started with 7e594a7 - I tried with the commit before and it worked fine.
Example file before running wp acorn acf:upgrade on version 3.0.0:
<?php
namespace App\Fields;
use Log1x\AcfComposer\Field;
use StoutLogic\AcfBuilder\FieldsBuilder;
/**
* Fields for the homepage hero.
*/
class HomepageHero extends Field
{
/**
* The field group.
*/
public function fields(): array
{
$homepageHero = new FieldsBuilder('homepage_hero');
$homepageHero->setLocation('page_type', '==', 'front_page');
$homepageHero
->addText('hero_title', [
'required' => 1,
])
->addTextarea('hero_content')
->addLink('hero_button');
return $homepageHero->build();
}
}
and after running wp acorn acf:upgrade:
<?php
namespace App\Fields;
use Logpublic function enqueue($block)x\AcfComposer\Field;
use Logpublic function enqueue($block)x\AcfComposer\Builder;
/**
* Fields for the homepage hero.
*/
class HomepageHero extends Field
{
/**
* The field group.
*/
public function fields(): array
{
$homepageHero = Builder::make('homepage_hero');
$homepageHero->setLocation('page_type', '==', 'front_page');
$homepageHero
->addText('hero_title', [
'required' => public function enqueue($block),
])
->addTextarea('hero_content')
->addLink('hero_button');
return $homepageHero->build();
}
}
When using the
wp acorn acf:upgrade
command, all instances of the number1
in the file are being replaced withpublic function enqueue($block)
. This seems to have started with 7e594a7 - I tried with the commit before and it worked fine.Example file before running
wp acorn acf:upgrade
on version 3.0.0:and after running
wp acorn acf:upgrade
: