symfony-3.4

Symfony/Doctrine: Select multiple tables

眉间皱痕 提交于 2020-01-25 08:52:05
问题 Im pretty new to Symfony and Doctrine and I can't find a solution to my problem. I have a database table called transactional and one called customer . In the transactional table is a foreign key to the customer table. Now I want to get all the data from both tables. But the Customer fields are all set to null. Here is the foreign key in the transactional php object: transactional : /** * @var \AppBundle\Entity\Customer * * @ORM\ManyToOne(targetEntity="AppBundle\Entity\Customer") * @ORM

Upgrade symfony 2.8 or php 5.4 first?

可紊 提交于 2020-01-24 15:05:07
问题 I'll be working soon on a project and I just wanted to ask this before. The project is on symfony 2.8 with php 5.4. The goal is to upgrade symfony to 3.4 (maybe 4.x later) and php to 7.x (probably 7.2). So here is my question : is there a better order to do this? Php 5.4 to 7.2 first or symfony 2.8 to 3.4 (or it doesn't matter)? Thanks for your advices. 回答1: First of all – you won't be able to run Symfony 3.4 project on PHP5.4. As of 2018-11-26 The latest Symfony ^3.4 version is v3.4.19 which

Edit file name in entity with Symfony

[亡魂溺海] 提交于 2020-01-16 12:06:11
问题 Hello (excuse my English, not too confident with it) I'm actually working on a Symfony website that display some spectacles' information. For now, I need to add an image when I create one of them. I managed to do so with the help of this tutorial. It basically works like this: I upload an image into site's directory and then send file's name to the entity (Store in a MySQL database) . I can then display the image in spectacle's details. The issue appeared when I want to edit a spectacle. I

Return value of ProxyManager\Configuration::setGeneratorStrategy() must be an instance of ProxyManager\void, none returned

我只是一个虾纸丫 提交于 2020-01-15 09:40:48
问题 I am using Symfony framework 3.4 at the moment. My vagrant box is running PHP 7.2.2. I everything was working properly before i installed 3 bundles below: almasaeed2010/adminlte doctrine/data-fixtures doctrine/doctrine-migrations-bundle I am getting below error when i am trying to access any page: (1/1) FatalThrowableError Type error: Return value of ProxyManager\Configuration::setGeneratorStrategy() must be an instance of ProxyManager\void, none returned in Configuration.php (line 108) at

“Missing value for primary key”

被刻印的时光 ゝ 提交于 2020-01-06 04:34:06
问题 I'd just migrated to Symfony 3.4 and had this kind of message : request.CRITICAL: Uncaught PHP Exception Doctrine\Common\Proxy\Exception\OutOfBoundsException: "Missing value for primary key idBen on Lea\PrestaBundle\Entity\EgwContact" at /htdocs/vendor/doctrine/common/lib/Doctrine/Common/Proxy/Exception/OutOfBoundsException.php line 40 Thanks in advance for your help Here is my entity code for egw_contact : <?php namespace Lea\PrestaBundle\Entity; use Doctrine\ORM\Mapping as ORM; use Doctrine

Routing not working in Symfony 3.4

只谈情不闲聊 提交于 2019-12-31 03:06:08
问题 I have created a new Symfony 3.4 project using: composer create-project symfony/skeleton my-project After that I added the following components: composer require twig composer require annotations composer require maker And created a Controller: php bin/console make:controller I added an action with a route "legal". Here is the DefaultController: <?php namespace App\Controller; use Symfony\Component\Routing\Annotation\Route; use Symfony\Bundle\FrameworkBundle\Controller\Controller; class

Twig error - varibale does not exist for Sonata Admin

一笑奈何 提交于 2019-12-25 02:53:53
问题 I am passing query results to my twig view but it can't find that varibale. It' Sonata Admin details view with multiple tabs. Tamplate is renderig and when I pass a string it renders but when I try to call query builder with "getTransactions" it throws: Variable "card" does not exist. Code: $card = $this->getCardTransactions(); $showMapper->tab('Card transactions') ->add('Data', 'date', array( 'template' => "@AdminTemplates/details.html.twig", 'card' => $card )) ->end() ->end() And simple as

EmailConfirmation with FosUserBundle Does not work

我与影子孤独终老i 提交于 2019-12-24 21:19:11
问题 hello i have been trying to send an email Confirmation since 2 days without success with FOSUSERBUNDLE on symfony 3.4. I know this is a process FosUser makes automatically But i can't make it's work. this is in my framework.yaml fos_user: db_driver: orm firewall_name: main user_class: App\Entity\User registration: confirmation: enabled: true from_email: address: correo@algo.com sender_name: toFront service: mailer: fos_user.mailer.twig_swift and this is in my .env file MAILER_URL=smtp://s6

Composer & Symfony - Fatal error: Out of memory

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-24 20:17:18
问题 I'm running Symfony 3.4 LTS with composer. My website works fine, but when I try to update any bundle with : php composer.phar update # or php composer.phar update symfony/symfony # or php composer.phar update swiftmailer/swiftmailer I get this error : PHP Fatal error: Out of memory [...] in phar:/// [...] Below is what I have already tested : increase my memory_limit from 196M to 1024M run the composer.phar with php -d memory_limit = -1 .. with no success. What else could I try ? By the way,

Overriding Default FOSUserBundle Controller in Symfony 3.4

大城市里の小女人 提交于 2019-12-24 00:59:59
问题 I'm using the Fosuserbundle to manager members in my project { SF::3.4.8 }, when trying to override the controller of the registrationController by following the Symfony documentation <?php namespace TestUserBundle; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\RedirectResponse; use FOSUserBundle\Controller\RegistrationController as BaseController; class RegistrationController extends BaseController { public function registerAction(Request $request) { die(