Category : symfony

I try to add field to customer / Shop User registration for sylius api to the path /shop/customers. I extends Customer Model : <?php declare(strict_types=1); namespace AppEntityCustomer; use DoctrineORMMapping as ORM; use SyliusComponentCoreModelCustomer as BaseCustomer; use SymfonyComponentSerializerAnnotationGroups; /** * @ORMEntity * @ORMTable(name="sylius_customer") */ class Customer extends BaseCustomer { /** * @ORMColumn(type="string", length=14) * @Groups({"shop:customer:create"}) */ ..

Read more

I am just starting with Symfony and following the official documentation so after creating a project using the command -> symfony new super-blog –full Ten i configured the .env file to DATABASE_URL="mysql://[email protected]:3306/Sym21" After Running Any of the New commands : php bin/console doctrine:database:create symfony console doctrine:database:create I got the following errors , Any help would ..

Read more

I am just starting with Symfony and following the official documentation so after creating a project using the command -> symfony new super-blog –full Ten i configured the .env file to DATABASE_URL="mysql://[email protected]:3306/Sym21" After Running Any of the New commands : php bin/console doctrine:database:create symfony console doctrine:database:create I got the following errors: In AbstractMySQLDriver.php line 128:An ..

Read more

I have an error while i try to post or put a Race, here are my classes an the header send to api platform, tell me if you need anything else I’m lost, please help :'( Race <?php namespace AppEntity; use ApiPlatformCoreAnnotationApiFilter; use ApiPlatformCoreBridgeDoctrineOrmFilterDateFilter; use ApiPlatformCoreApiFilterInterface; use ApiPlatformCoreAnnotationApiResource; use AppRepositoryRaceRepository; use DateTimeInterface; use DoctrineCommonCollectionsArrayCollection; use ..

Read more

How can I define a Doctrine property in a parent class and override the association in a class which extends the parent class? When using annotation, this was implemented by using AssociationOverride, however, I don’t think they are available when using PHP 8 attributes Why I want to: I have a class AbstractTenantEntity whose purpose ..

Read more

I’m a new symfony developer and I’m facing a new problem. I’ve created an authentication system using the guard system. However, when I try to log in entering my email and password, the user is still anonymous. Here is my code : User.php <?php namespace AppEntity; use DoctrineORMMapping as ORM; use Exception; use SymfonyBridgeDoctrineValidatorConstraintsUniqueEntity; use ..

Read more