There is a database of Regions and Cities. The relationship between the regions and cities tables is one-to-many. Below is my code for adding a new city to the database. It gives an error: https://i….
Tag: symfony
Symfony 4 – JWT not found with LexikJWTAuthenticationBundle
Good afternoon, I try to use LexikJWTAuthenticationBundle in my project and I have a problem with the token which is not generated. I have set the private & public keys in var/jwt directory. The API returns this response when I try use the login route : Apache Virtualhost : .htaccess file in public directory: security.yaml security: I expect to successfully
Symfony Exception Subscriber not triggered
I need to format error messages and output it in JSON format. I have the following event subscriber: And following configuration in ./config/services.yaml This event subscriber is working when e.g. controller throws error. But if I have some other error e.g. wrong DI injection then output is still in Html format and as Symfony error page. How to make that
Symfony knp_paginator query with $_GET
I am a beginner and I try to write a query for a search input using kpn_paginator but I get an error: One of listeners must count and slice given target I can not find the solution, I checked some other topic but cannot understand how to do it in my code. My else work well but my if not.
PHP / Docusign – Verify HMAC signature on completed event
I’m trying to secure my callback url when completed event is triggered. My Controller: public function callbackSubscriptionCompleted( int $subscriptionId, DocusignService $…
How can I prevent Symfony trying to load a service while using Swift Mailer Attachment?
I try to attach a file via Swiftmail to my Email in Symfony: $message = (new Swift_Message($message)) ->setFrom([$smtpMail => $smtpName]) ->setTo($smtpMail) ->setBody($…
How to use Symfony Messenger component in standalone code to send AMQP messages
We’re using Symfony Messenger in a Symfony 5 project to integrate with RabbitMQ. It works fine when sending messages within Symfony, but I need the ability to use the Messenger component to send messages from some legacy PHP applications that are not built with the Symfony framework. Under Symfony, it handles all the magic by injecting the MessageBusInterface and all
composer require phpoffice/phpspreadsheet don’t work
initially, I needed a library that will help me upload data to Excel, found this library and then there was a problem i try to install composer require phpoffice/phpspreadsheet but i have problem I don’t understand where the error comes from, because there is a dependency “ext-spltype”: “*” in my composer.json this is my composer.json i also try to install
Is it possible to check if cronjob is running in Symfony application?
I am currently working on the project that has over 20 crons. Some of them are pretty long processes. It was built on Symfony 2.8, so we decided to upgrade it to 3.4 LTS. After the upgrade we noticed …
PHP Exception with symfony mailer
I’m a beginner with Symfony, and I have to put a Mailer in my web service. But I have a php exception that I don’t understand. There is my mailer function : private function sendMail(MailerInterface $…