Hello!
I just started Shopware6 with dockware and I follow the video guides.
I am at the video where I created the entity’s files and now in the container I have to create the migration.
When I issue the command „bin/console make-migration -p SwagShopFinder“ I get the following error
www-data@5914cb6f68b7:~/html$ bin/console database:create-migration -p SwagShopFinder
Symfony\Component\ErrorHandler\Error\ClassNotFoundError^ {#9687
#message: """
Attempted to load class "ShopFinderDefinition" from namespace "SwagShopFinder\Core\Content\ShopFinder".\n
Did you forget a "use" statement for another namespace?
"""
#code: 0
#file: "./vendor/shopware/core/Framework/DependencyInjection/CompilerPass/EntityCompilerPass.php"
#line: 50
trace: {
./vendor/shopware/core/Framework/DependencyInjection/CompilerPass/EntityCompilerPass.php:50 { …}
./vendor/shopware/core/Framework/DependencyInjection/CompilerPass/EntityCompilerPass.php:25 { …}
./vendor/symfony/dependency-injection/Compiler/Compiler.php:82 { …}
./vendor/symfony/dependency-injection/ContainerBuilder.php:757 { …}
./vendor/symfony/http-kernel/Kernel.php:546 { …}
./vendor/shopware/core/Kernel.php:189 { …}
./bin/console:74 {
› $application = new Application($kernel->getKernel());
› $kernel->getKernel()->boot();
› $application->setName('Shopware');
}
}
}
One thing I have in mind is that the newly created files comes with the following uses:
use Shopware\Core\Framework\DataAbstractionLayer\EntityCollection;
for ShopFinderCollection.php
use Shopware\Core\Framework\DataAbstractionLayer\EntityDefinition;
use Shopware\Core\Framework\DataAbstractionLayer\Field\FkField;
use Shopware\Core\Framework\DataAbstractionLayer\Field\LongTextField;
use Shopware\Core\Framework\DataAbstractionLayer\Field\ManyToOneAssociationField;
use Shopware\Core\Framework\DataAbstractionLayer\FieldCollection;
use Shopware\Core\Framework\DataAbstractionLayer\Field\BoolField;
use Shopware\Core\Framework\DataAbstractionLayer\Field\Flag\PrimaryKey;
use Shopware\Core\Framework\DataAbstractionLayer\Field\Flag\Required;
use Shopware\Core\Framework\DataAbstractionLayer\Field\IdField;
use Shopware\Core\Framework\DataAbstractionLayer\Field\StringField;
use Shopware\Core\System\Country\CountryDefinition;
for ShopFinderDefinition.php
and
use Shopware\Core\Framework\DataAbstractionLayer\Entity;
use Shopware\Core\Framework\DataAbstractionLayer\EntityIdTrait;
use Shopware\Core\System\Country\CountryEntity;
for ShopFinderEntity.php
while the folders Shopware\Core\Framework\DataAbstractionLayer\EntityCollection are in the vendor folder not in the project folder.
I do not know if I have a correct guess but I just need a helping hand with this.
Thanks in advance!
S