Category : symfony

I need to check an old Symfony application on Laravel Homestead that uses SQL Server as DB engine. When I run the app I get the following error: DoctrineDBALException: An exception occurred while executing ‘ SELECT THE QUERY ON MSSQLSERVER ‘: Call to undefined function sqlsrv_configure() at vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php:185 at DoctrineDBALDBALException::wrapException() (vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php:159) at DoctrineDBALDBALException::driverExceptionDuringQuery() (vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:2121) at ..

Read more

Hi I am new to Symfony and am trying to get my Symfony PHP app to connect to my redis cluster. I keep getting the following error once the images are stood up: request.CRITICAL: Uncaught PHP Exception RedisException: "Cannot assign requested address" at /var/www/STATIC/finders/docker/cache/Container4jv3TMx/getSessionService.php line 10 {"exception":"[object] (RedisException(code: 0): Cannot assign requested address at /var/www/STATIC/finders/docker/cache/Container4jv3TMx/getSessionService.php:10)"} ..

Read more

am trying to translate a project to English, i’ve changed all routes annotation to multiple language style: I am using symfony 4.2 /** * @Route({ * “nl”: “/”, * “en”: “/en” * }) */ public function indexAction(Request $request) This is the link en my example: <a class=”customerservice” href=”{{ path(‘web_page’) }}”> <i class=”fal fa-headset” aria-hidden=”true”></i> Klantenservice ..

Read more

I would like to search by roles and get only ROLE_USER so I’m looking for decorate the SearchFilter and get when the query is looking for roles=user so I can add in my filterProperty But I don’t enter in my SearchFilter, I don’t understand why src/ApiPlaftorm/SearchFilter.php <?php namespace AppApiPlatform; use ApiPlatformCoreBridgeDoctrineOrmFilterAbstractFilter; use ApiPlatformCoreBridgeDoctrineOrmUtilQueryNameGeneratorInterface; use DoctrineORMQueryBuilder; ..

Read more

Class "AssertApplicationController" does not exist in /Users/user/Projects/artyz-docker/artyz-api/config/routes/../../src/Controller/ (which is being imported from "/Users/user/Projects/artyz-docker/artyz-api/config/routes/annotations.yaml"). Make sure annotations are installed and enabled. In AnnotationDirectoryLoader.php line 62: Class "AssertApplicationController" does not exist ApplicationController: class ApplicationController extends CoreController { /** * @Route("/applications", name="get.applications", methods={"GET"}) * @return Response */ public function getApplications() { $request = $this->getRequest(); /** @var ApplicationRepository $appRepository ..

Read more

Hello i canĀ“t install with Symfony 5.1.7. C:xampphtdocsengodi>composer require knplabs/knp-snappy-bundle Using version ^1.8 for knplabs/knp-snappy-bundle ./composer.json has been updated Running composer update knplabs/knp-snappy-bundle Loading composer repositories with package information Updating dependencies Your requirements could not be resolved to an installable set of packages. Problem 1 Root composer.json requires knplabs/knp-snappy-bundle ^1.8 -> satisfiable by knplabs/knp-snappy-bundle[v1.8.0]. knplabs/knp-snappy-bundle ..

Read more

I have a simple subscriber like the following: namespace App; use DoctrineCommonEventSubscriber; use DoctrineORMEventOnFlushEventArgs; use DoctrineORMEvents; class TestSubscriber implements EventSubscriber { public function getSubscribedEvents(): array { return [ Events::onFlush, ]; } public function onFlush(OnFlushEventArgs $eventArgs): void { // Some stuff } } When I add the Doctrine subscriber tag in a compilation pass, the onFlush ..

Read more

I tried a lot of things to change the input type of "prix" from text to number but nothing work. I set the type in my form type: public function buildForm(FormBuilderInterface $builder, array $options) { $builder ->add(‘Nom’, TextType::class) ->add(‘description’, TextType::class) ->add(‘prix’, NumberType::class) ->add(‘photo’, TextType::class) ; } Same in my entity: /** * @AssertType("float") * @AssertNotBlank ..

Read more