Sylius Inventory Bundle:"sylius_inventory.classes" 下无法识别的选项 "unit"
Sylius Inventory Bundle: Unrecognized option "unit" under "sylius_inventory.classes"
我正在尝试安装 Sylius Inventory Bundle,但在更新架构时,出现此错误:[Symfony\Component\Config\Definition\Exception\InvalidConfigurationException]
"sylius_inventory.classes"
下无法识别的选项 "unit"
InventoryUnit 实体:
<?php
// src/App/AppBundle/Entity/InventoryUnit.php
namespace App\AppBundle\Entity;
use Sylius\Bundle\InventoryBundle\Entity\InventoryUnit as BaseInventoryUnit;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity
* @ORM\Table(name="app_inventory_unit")
*/
class InventoryUnit extends BaseInventoryUnit
{
/**
* @ORM\Id
* @ORM\Column(type="integer")
* @ORM\GeneratedValue(strategy="AUTO")
*/
protected $id;
}
感谢帮助!
配置应为:
sylius_inventory:
driver: doctrine/orm
backorders: true
classes:
inventory_unit:
model: App\AppBundle\Entity\InventoryUnit
stockable:
model: App\AppBundle\Entity\Book
Documentation needs an update.
我正在尝试安装 Sylius Inventory Bundle,但在更新架构时,出现此错误:[Symfony\Component\Config\Definition\Exception\InvalidConfigurationException] "sylius_inventory.classes"
下无法识别的选项 "unit"InventoryUnit 实体:
<?php
// src/App/AppBundle/Entity/InventoryUnit.php
namespace App\AppBundle\Entity;
use Sylius\Bundle\InventoryBundle\Entity\InventoryUnit as BaseInventoryUnit;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity
* @ORM\Table(name="app_inventory_unit")
*/
class InventoryUnit extends BaseInventoryUnit
{
/**
* @ORM\Id
* @ORM\Column(type="integer")
* @ORM\GeneratedValue(strategy="AUTO")
*/
protected $id;
}
感谢帮助!
配置应为:
sylius_inventory:
driver: doctrine/orm
backorders: true
classes:
inventory_unit:
model: App\AppBundle\Entity\InventoryUnit
stockable:
model: App\AppBundle\Entity\Book
Documentation needs an update.