Symfony on AWS EB - Unable to write in the cache directory after cache clear
I am deploying a Symfony 4.4 app to AWS ElasticBeanstalk and noticed that the cache wasn't cleared after each deploy. The app was running fine though, exception made to the stale cache. To resolve the...
View ArticleSymfony collection forms
I have two entities with a ManyToOne relationship patient and tourismeRegion I want to add a form to add the two Enitity's at the same time but i doesn't work i followed the symfony...
View ArticleHow write a Symfony Flex recipe for a new bundle?
I tried to find any documentation about using Symfony Flex but so far no luck.Almost all docs point to installing a bundle that uses symfony Flex, not how to create a bundle that is using it.I even...
View ArticleSymfony Collection Form [closed]
I have two entities with a ManyToOne relationship patient and tourismeRegion I want to add a form to add the two Enitity's at the same time but i doesn't work i followed the symfony...
View ArticleWhat is the right way to override Twig extension in SF4.4+
In SF4.3 I could override a twig extension with a decorate like approach... App\Twig\Extension\TranslationExtension: arguments: ['@twig.extension.trans'] tags: - { name: twig.extension, priority: 100 }...
View ArticleInvalid mapping file BaseMedia.mongodb.xml
I have installed Sonata Media Bundle ^3.23, when installing doctrine-mongodb-bundle ^4.1, i receive the below error:In MappingException.php line 236 The mapping file...
View ArticleSymfony 4 Collection form
I'm stuck in this for hours :( first the reuslt that i wanna reach is this form The form ExempleSo first I started making the entity's Patient and TourismeRegion With ManyToOne relation it means : a...
View ArticleEnlight_Controller_Action_PreDispatch_Frontend is not working in Plugin.php...
I am creating a shopware 5 plugin. I want to display something after the categories on every page. I am using this code to do my task as suggested in this video, but the event is not getting...
View ArticleHow to create your own customized DQL just like Symfony's DQL
This is my customized DQL.DQL.phpclass DQL { protected $select; protected $from; public function select($string) { $this->stmt .= $string; } public function from($table, $alias) { $this->stmt .=...
View ArticleisGranted returns false for logged in user JWT - Symfony API-Platform AWS-EB
I have deployed an API-Platform app using JWT token to ElasticBeanstalk which, as usual, works fine in my local server.On EB though it is denying access to logged in users despite the correct...
View Articlehow fix script cache:clear returned error code 255 in symfony 4
I get a project by command-line git clone on bitbucket. I run php ../composer.phar install and I had after installing all these dependencies the following error:Executing script cache:clear [KO] [KO]...
View Article__construct() must implement interface...
I want to use KernelInterface in an AbstractAdmin class of sonata admin, using symfony 4.use Symfony\Component\HttpKernel\KernelInterface; class LocationsAdmin extends AbstractAdmin { private $kernel;...
View ArticleHow to set user in security token_storage symfony 4 jwt token
How to set user in security token_storage symfony 4 jwt tokenI can't find the current userdump($this->get('security.token_storage')); die; result:enter image description here
View ArticleSymfony 4 : How to edit entity and related entity with relation one-to-one
I have two entities (page and slug) with relation one to one UnidirectionalThe problem appears when I leave the field slug empty because i want to update the Slug object by title if it is emptyError :...
View Articlewebpack encore and jquery ui (dateRangeSlider)
I'm having trouble integrating a jquery-ui plugin with my Symfony app using Webpack Encore. You can see the error (TypeError: t(...).dateRangeSlider is not a function[Learn More]) in the...
View ArticleSymfony 4 post requests are too slow [closed]
I'm making a website in Symfony 4. My problem is that forms take a long time to be submit.When I submit one of them, I wait between 5 and 20 seconds before the form ends.I have this problem in local...
View ArticleUnittesting a Symfony 4.2 process runs infinite loop (than times out), wihout...
Lets say I have the following Symfony 4 command:class Command1 extends Command { protected static $defaultName = 'app:command1'; protected function execute(InputInterface $input, OutputInterface...
View ArticleForm Handler don't work well createVew() based on Null
i never work with symfony before, and i have an error in my code. a friend explain me i could create an handler for use my forms, the error is : when i call route 'create' i have error 500 ==> Call...
View ArticleSymfony handle Api request by form
I'm using Symfony 4.4 as a restful API with no views at all. I want to avoid annoying code like this: $email = $request->get('email'); $password = $request->get('password'); $newUser = new...
View ArticleUpdating field inside a repository [closed]
I'm creating a CRON in my Symfony 4 App (command) to archive news that is older than 60 days. How should this be done?My first instinct was to add a method to my NewsRepository to retrieve all news...
View Article