Month: December 2019

Warning: stream_socket_enable_crypto(): SSL context creation failure [Mailjet][Symfony5]

This is bothering me for hours now. I’m trying to send mails with Symfony 5 and SwiftMailerBundle 3.4 using Mailjet. So I have the following value in my .env file: MAILER_URL=smtp://{USERNAME}&password={PASSWORD} In production I used my username and password ofcourse….

Cancel removal object into prePersit

I don’t want hard delete entity, but I just want to set a deleted date. Then how to cancel removal the object into prePersist event (or stop propagation) : <?php namespace AppEventListener; use DoctrineCommonEventSubscriber; use DoctrinePersistenceEventLifecycleEventArgs; use DoctrineORMEvents; class PreRemoveListener…

Dependency injection doesn’t work with static factories in Symfony 5?

As far as I know I’ve made everything exactly like it’s in official Symfony documentation: I have class: class NodeBuilder { public static function build(): NodeBuilder { return new NodeBuilder([ new ImgNodeBuilder(), new LinkNodeBuilder(), ]); } public function __construct(array…