#[ORM\OneToOne(targetEntity: Element::class)]
#[JoinColumn(name: 'element', referencedColumnName: 'id')]
private Element $element;
referencedColumnName: 'id'
у Product
должен совпадать с name: 'id'
у Element
. У вас будто бы не так use Brick\Math\BigDecimal;
echo BigDecimal::of('1.23456e27'); // 1234560000000000000000000000
echo BigDecimal::of('1.23456789e-31'); // 0.000000000000000000000000000000123456789
from
принимает на вход имя класса (e.g. 'App/Entity/Result'
или Result::class
), а не таблицыchecking_index
добжно быть r.checking_index
$request
, а там из аттрибутов достать роут/контроллер require-dev
секции + можно дать ссылку на пакет в suggest
секции.doctrine.fixture.orm
This command looks for all services tagged withdoctrine.fixture.orm
. If you're using the default service configuration, any class that implementsORMFixtureInterface
(for example, those extending from Fixture) will automatically be registered with this tag.
@var GroupDto[]
чтоб сериалайзер понимал, что там типизированный массив.Cannot refresh token because user has changed.
$user->getRoles()
)$token = new UsernamePasswordToken($user, 'main', $user->getRoles());
class UserDTO
{
/**
* @var AutoDTO
* @Assert\Valid
*/
private $auto;
public function setAuto(AutoDTO $auto)
{
$this->auto = $auto;
return $this;
}
}
class AutoDTO
{
/**
* @var PriceDTO
* @Assert\Valid
*/
private $price;
public function setPrice(PriceDTO $price)
{
$this->price = $price;
return $this;
}
}
symfony/serializer
+ symfony/validator
+ symfony/security-csrf
$student = $this->serializer->deserialize(
$response->getContent(),
Student::class.'[]',
'json'
);
App\handler\action\Handler:
arguments: !service_locator
type1: '@App\handler\create\Handler'
type2: '@App\handler\upload\Handler'
Services should not use autowiring or autoconfiguration. Instead, all services should be defined explicitly.
The reason is that bundles shouldn't rely on features such as service autowiring or autoconfiguration to not impose an overhead when compiling application services.
Y-m-d
(1), внутри формы используется объект DateTime
(2), а для вывода пользователю используется локализованная строка либо набор селектов (3). ModelTransformer
чтобы преобразовать строку (1) в объект (2) и использовать ViewTransformer
чтобы в зависимости от опций, переданных в форму, преобразовать объект (2) в строку или селекты (3) $response = $client->request(
'POST',
'http://'.$_SERVER['SERVER_NAME'].$this->generateUrl('like_product_controller'), [
GuzzleHttp\RequestOptions::FORM_PARAMS => [
'hash' => $request->request->get('hash'),
],
]
);