symfony-2.3

Serialization of UploadedFile is not allowed

我的未来我决定 提交于 2021-02-04 16:42:05
问题 I'm trying to upload a file via vichuploader bundle on my Users entity. Using hwioauthbundle that implements UserInterface, and i think the errors comes from that bundle... So every time i try to uplod a file i got this exception : Serialization of 'Symfony\Component\HttpFoundation\File\UploadedFile' is not allowed I already tried this solution but also same exception. namespace AppBundle\Entity; use Doctrine\ORM\Mapping as ORM; use HWI\Bundle\OAuthBundle\OAuth\Response\UserResponseInterface;

Interface 'Symfony\Component\HttpKernel\HttpKernelInterface' not found

你说的曾经没有我的故事 提交于 2021-01-28 12:40:01
问题 After upgrading from Symfony 2.3 to 2.8 I get the following error: Fatal error: Interface 'Symfony\Component\HttpKernel\HttpKernelInterface' not found in app/bootstrap.php.cache on line 2629 Already tried removing the vendor folder and doing a composer install. Any ideas? 回答1: Have you tried removing cached code? It seems like you've procompiled your application into one file bootstrap.php.cache . Have you tried removing it. Otherwise it is always a good idea to do two of the following

Symfony passing array of arguments to DI services via yml file

三世轮回 提交于 2020-06-25 10:39:32
问题 I'm using symfony 2.x and I have a class which accept and array of configurations from yml file config.yml services: my_di: class: \MyClass arguments: - param1: 'myvalue' MyClass.php class { public function __construc(array $configs = []) { var_dump($config); } Output (this is working correctly) array (size=1) param1 => 'myvalue' ) But I want to pass one more value to the same array via yml - param2: 'myvalue2' and the exprected output will be array (size=1) param1 => 'myvalue', param2 =>

Doctrine/Symfony entity generator and generating entity from one table

纵饮孤独 提交于 2020-02-24 12:08:31
问题 I have already a few entities, but now a new table appeared in a database, and I'd like to generate an entity on only this one table. I already saw this, but I have further questions. I already have a User entity (and a db table). Now, the new table is called "Report" (no entity for it right now, I want to create it) and it has a foreign key to User. There are also a few more foreign keys. If I do what is suggested in the above answer, that is: $ php app/console doctrine:mapping:import -

Doctrine/Symfony entity generator and generating entity from one table

江枫思渺然 提交于 2020-02-24 12:07:47
问题 I have already a few entities, but now a new table appeared in a database, and I'd like to generate an entity on only this one table. I already saw this, but I have further questions. I already have a User entity (and a db table). Now, the new table is called "Report" (no entity for it right now, I want to create it) and it has a foreign key to User. There are also a few more foreign keys. If I do what is suggested in the above answer, that is: $ php app/console doctrine:mapping:import -

Symfony2.0 - InvalidArgumentException

房东的猫 提交于 2020-01-17 01:39:06
问题 I'm having a little bit of trouble with symfony 2.3 and am hoping you can help me out. I don't really know what i did wrong but out of the sudden I got these errors and now i can't get rid of them. Error 1: InvalidArgumentException: [WARNING 1549] failed to load external entity "file:///C:/wamp/www/Symfony/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/schema/dic/services/services-1.0.xsd" (in n/a - line 0, column 0) [WARNING 3084] Element '{http://www.w3.org/2001

moving bundle from vendor to src directory

陌路散爱 提交于 2020-01-16 12:19:28
问题 I installed SonataMedia in the vendor/ directory of my project using composer and everything was working fine. I wanted to move the bundle to the src folder to keep everything tidy.. is there any way to move bundle from vender to src directory? 回答1: Yes, copy past the namespace directories to the src directory... But really, why do you want this? The directory structure is not important and even if it was, it is better to put the 3th party bundles in the vendor directory to seperate your

Undefined variable $output in Symfony Component Console DialogHelper

亡梦爱人 提交于 2020-01-06 07:49:26
问题 I tried to run symfony console command, but I've got an error: Notice: Undefined variable: output in /var/www/.../vendor/symfony/symfony/src/Symfony/Component/Console/Helper/DialogHelper.php line 411 I have no idea, why it went wrong. Can anyone help? 回答1: I've solved the problem: this error appears because exec() and shell_exec functions was disabled in php.ini file. To enable this functions you have to edit this string: disable_functions =exec,passthru,shell_exec,system,proc_open and delete

symfony2.3 configure assetic with less

陌路散爱 提交于 2020-01-04 07:04:54
问题 I am using Symfony "2.3.*" and I attempt to make assetic less filter working. I do all of this in the "dev" environment. When I issue the config:dump-reference assetic I get the following output: assetic: debug: %kernel.debug% use_controller: enabled: %kernel.debug% profiler: false read_from: %kernel.root_dir%/../web write_to: %assetic.read_from% java: /usr/bin/java node: /usr/bin/node node_paths: [] ruby: /usr/bin/ruby sass: /usr/bin/sass variables: # Prototype name: [] bundles: # Defaults:

Payum Bundle : How to change the view of capture action in symfony2

社会主义新天地 提交于 2020-01-04 04:30:14
问题 I am using PAYUM Bundle for the payment gateway integration, and its basic example is working fine, But now I want integrate the payum bundle in application by changing the payum capture action layout and adding extra field payment detail entity. PAYUM BUNDLE with AUTHORIZE.NET GATEWAY. Please can anyone help me out. Thanks all in advance. 回答1: The payum templates is not kept in the bundle but in the payum lib itself. Standard templates inheritance does not work here. There is no simple way