I followed the guideline on Sylius site for customizing models: http://docs.sylius.com/en/1.0/customization/model.html
When I run:
php bin/console doctrine:schema:update --force
or php bin/console doctrine:migrations:diff
Error: The class 'AppBundle\Entity\Country' was not found in the chain configured namespaces
Files added at: \src\AppBundle\Entity\Country.php \src\AppBundle\Resources\config\doctrine\Country.orm.yml
Added:
sylius_addressing:
resources:
country:
classes:
model: AppBundle\Entity\Country
at: \app\config\config.yml
And doctrine related settings on config.yml as below:
doctrine:
dbal:
driver: "%database_driver%"
host: "%database_host%"
port: "%database_port%"
dbname: "%database_name%"
user: "%database_user%"
password: "%database_password%"
server_version: "5.5"
charset: UTF8
doctrine_migrations:
dir_name: "%kernel.root_dir%/migrations"
namespace: Sylius\Migrations
table_name: sylius_migrations
name: Sylius Migrations
Country.php
<?php
namespace AppBundle\Entity;
use Sylius\Component\Addressing\Model\Country as BaseCountry;
class Country extends BaseCountry
{
private $flag;
public function getFlag(): ?bool
{
return $this->flag;
}
public function setFlag(bool $flag): void
{
$this->flag = $flag;
}
}
(Sylius 1.0 installed on Windows 7) Tried clear cache and many other methods but no clues.