Questions tagged [symfony-3.1]

This is the Symfony 3.1.x specific tag. Use it in addition to the symfony3 tag if your question is specific to Symfony 3.1.x — not just 3.x.

Filter by
Sorted by
Tagged with
1 vote
1 answer
189 views

symfony 3.1 testing Bundle fails with Undefined index: kernel

Symfony3 Unitests fails with the following error Undefined index: kernel <?xml version="1.0" encoding="UTF-8"?> <!-- http://phpunit.de/manual/4.1/en/appendixes....
fefe's user avatar
  • 8,765
-1 votes
1 answer
295 views

Symfony 3.1 composer conflicts

I'm resuscitating the old Symfony project. Cannot "composer install". I have tried to make changes in packages removing composer.lock , changing versions of packages. Bugs are multiplying. ...
Matt's user avatar
  • 307
0 votes
1 answer
447 views

Symfony3 pass form data to collection inside collection

I have some nested forms with CollectionType and seems that the data from the constructor is not passed to the 2nd nesting level. I simplified my form classes, just with I think's important (if you ...
Sergi's user avatar
  • 1,224
0 votes
1 answer
362 views

User login not working after password update

I'm trying to make a forgot password feature in my Symfony 3.1 application. I have a form sending an email with an url to reset the password, with a security token. You then land on a simple form ...
Ocelot's user avatar
  • 1
1 vote
1 answer
1k views

Symfony - Doctrine Single Table Inheritance ManyToOne association with parent entity

I'm working on a project made in Symfony 3.1.10. I have three entities: MyEntity 1->n MyPivotEntity MyPivotEntity n->1 MySuperInheritanceEntity and I have another entity MyInheritanceEntity ...
ggirodda's user avatar
  • 770
2 votes
2 answers
7k views

Checking which form field value has changed Symfony 3

I need to check inside the FormType which field has changed. Is there any method to do it? I've searched for a while, then tried to get edited entities field in few ways (with form events too) to ...
Rallyholic's user avatar
3 votes
1 answer
205 views

Symfony OneToMany updates instead of insert

I am a beginner in Symfony. I have a strange problem in my form. I have 2 entities : Proposal_Lsi and Lsi_Beams. One proposal can have multiple beams, but a beam can only have one proposal. I ...
S. Gregoire's user avatar
0 votes
0 answers
175 views

Invalid credentials error on Symfony 3.1 login form

I have implemented standard login fom in Symfony 3.1 and after login I have message : "Invalid credentials". This is standard Symfony login form implementation. security.yml: security: # http://...
Witold Ciżmowski's user avatar
5 votes
3 answers
10k views

Symfony 3 forms: how to set default value for a textarea widget

I want to set the value on a textarea widget. How i can set default value for textarea in Symfony 3 for TextType(input type="text") i can use value parameter but for textarea i can not!!!how i can set ...
pedram shabani's user avatar
1 vote
0 answers
802 views

Symfony3 404 exception response return with status code 200 instead of 500

I am new in symfony,I have facing one problem in Production Environment after I add kernel.event_subscriber in service.yml. problem is before adding event subscriber in service.yml file It return 500 ...
Sandeep Gajera's user avatar
-1 votes
3 answers
1k views

How to display global variable in twig?

Controller $count_em = $this->getDoctrine()->getRepository('AppBundle:St_Jude_Email'); $count_dql = $count_em->createQueryBuilder('c') ->select('count(c.flag)') ...
Pranan Subba's user avatar
0 votes
1 answer
118 views

Upgrade to symfony 3 causes issues with whiteoctoberTCPDF

error from composer update hi I am trying to upgrade to symfony 3.0.* and when I ran " composer update " command I have this error concerning whiteoctober/tcpdf-bundle bundle : Sensio\Bundle\...
paule mandengue's user avatar
0 votes
2 answers
45 views

How to chek if the gallery name exist in DB?

public function createGalleryAction(Request $request) { $gallery = new Gallery; $gallery_form = $this->createFormBuilder($gallery) ->add('galleryName', TextType::class, ...
Pranan Subba's user avatar
1 vote
1 answer
406 views

I can´t concatenate a label with string in symfony3

I can´t concatenate a label with string. ->add('originador', EntityType::class, array( 'label' => "app.label.x_originador".'*', 'class' => 'AppBundle:Usuario', 'em' => $...
Batichico's user avatar
  • 676
0 votes
1 answer
331 views

Many To Many friendlist with symfony 3

I want to make a friendlist using ManyToMany self-referencing. I followed this link and it seemms to be good. But Now, what Action should I have in my controller to : 1- get All myFriends / or all ...
Patron's user avatar
  • 1
1 vote
1 answer
1k views

Symfony form Event Listener for collection fields

I use event listener for change data dynamically based on user inputs. Each time I use PRE_SET_DATA and PRE_SUBMIT events for set data and fields choices. Here is the simple example of actions from ...
vellmur's user avatar
  • 256
0 votes
0 answers
670 views

An exception has been thrown during the rendering of a template ("No block "form_start" found while rendering the form.")

I'm upgrading the symfony version from 2.1 to symfony3. I have made changes according to the new version but while rendering "form" in twig template I'm getting this error. An exception has been ...
mobizen's user avatar
  • 483
1 vote
0 answers
768 views

Symfony 3: How can i get a list of online users

I am using Symfony 3.0.3 and doctrine. I am trying to build a small chat app. So I have created a field in the database called lastActivity which will contain the last login time. Based on that I want ...
Rathna's user avatar
  • 117
0 votes
1 answer
686 views

symfony test - authenticated doesnt work on new request

Good morning. Tldr: I think that, I need for Symfony Test Client something similiar to js xhr settings: withcredentals:true. Symfony 3.1. I have action in rest api controller: /** * @Rest\...
szpakucjusz's user avatar
0 votes
1 answer
900 views

Symfony 3/FOSJsRoutingBundle: not allowed to access router.js

I'm trying to install a Symfony 3.1.4 project on a managed server. It works perfectly on my local machine, but not on the external. For JS routing I use FOSJsRoutingBundle, version ^1.6. Problem: ...
Mr. B.'s user avatar
  • 8,081
2 votes
1 answer
6k views

Validate file extension on Symfony3

I want to validate the file extension on Symfony3 before the file is uploaded. Until now, I am using this code (this is a simplified version just used as a snippet): if ($form->isSubmitted() &&...
user avatar
2 votes
1 answer
697 views

How to change priority in Symfony3 routing.yml

I have the following generic routing on my symfony project as in (routing.yml): appsite2: path: /{req}/{var} defaults: {_controller: AppBundle:Default:index} However, it overwrites the ...
Kareem Essawy's user avatar
0 votes
1 answer
958 views

Setup Facebook login with HWIOAuthBundle, symfony 3

I'm using HWIOAuthBundle to setup a facebook login but while I'm running the path : http://localhost:8000/connect orhttp://localhost:8000/connect/check-facebook he failed to load the page with no ...
Achraf's user avatar
  • 347
1 vote
1 answer
442 views

Getting Parameters from parameters.yml on Symfony3

I am new to Symfony3 and trying to learn api connections. Just using endroid_twitter bundle. I copied twitter api keys to parameters.yml but when i try to use this keys on DefaultController.php its ...
onurkaya's user avatar
  • 157
2 votes
0 answers
211 views

How to set <target> empty for not translated source in symfony?

I am using JMS Translation bundle and localise.biz to translate. The problem I am facing is, when I extracting new translation keys from my code base and database, I am expecting one of the below: 1. ...
William Francis Gomes's user avatar
0 votes
1 answer
824 views

app.php shown as plain text on Symfony 3

Setting up my app to EC2 instance, I have the following virtual host: <VirtualHost *:80> ServerName melomaniacs.com ## Vhost docroot DocumentRoot "/var/www/html/myProject/web" ...
Albeis's user avatar
  • 1,544
4 votes
0 answers
3k views

Symfony - field unique and null

it is a way to have a field in an entity whith option nullable=true, unique=true ? I try to do it, and I have an error when I update the database schema : /** * @var string * * @ORM\Column(name="...
user7867717's user avatar
0 votes
1 answer
940 views

Allow more than 24 hours in Time Type field in symfony

I'm developing a Web App in symfony for an older desktop aplication, I have an entity Flight that has a field called delay. A delay could be for example: 35 hours and 35 minutes. Because is a newer ...
Lachi Falcon's user avatar
1 vote
1 answer
267 views

I can't install JMSSerializerBundle in symfony3.1 project

I'm trying to install JMSSerializerBundle in symfony3.1 project but I get this error command: php ../composer.phar require jms/serializer-bundle -vvv Using version ^2.0 for jms/serializer-bundle ...
hous's user avatar
  • 2,577
0 votes
1 answer
200 views

Symfony 3 subform submitted as array instead of entity

I am in the middle of converting a project from Symfony 2 to Symfony 3 and have run into a problem. I have an Event entity that has a TwitterSearch entity which is defined by the following in Event....
dk80's user avatar
  • 556
0 votes
1 answer
113 views

Knp Pagination Bundle do not show pagination on the same renedered view

I have {{ knp_pagination_render(pagination1) }} on view InfCustumersBundle:Faktura:indexoryginal.html.twig This code show me paginarion: public function indexoryginalAction(Request $request) { ...
Daniel's user avatar
  • 197
0 votes
0 answers
1k views

User password is not updated : easyadminbundle

I'm using easyadmin and fosuserbundle. The problém that everytime i try to update(change) the user password , nothing is happen , the same old password still the same. I think maybe i miss some config ...
famas23's user avatar
  • 2,083
1 vote
1 answer
1k views

Symfony form event: ChoiceType field return null unexpectedly

I'm working on symfony form which i use select2 in field for an ajax request, i listen to the PRE_SUBMIT event to get the list of choices and give to the choices options $opts = $config->...
Last Khode's user avatar
1 vote
1 answer
1k views

symfony3 form, can't get options in buildForm method

I don't really know which title to give this thread but, i'm working on a Symfony project in v3.1.6 and using the select2 plugin in field of my form with ajax. I want to use the event (submit and ...
Last Khode's user avatar
1 vote
1 answer
444 views

Symfony/ Doctrine: ManyToMany Relation and SQL exception

I've defined in my Symfony application a ManyToMany Relation between the Entities 'Slideshow' and 'Slide'. Entity Slide (excerpt): use Doctrine\ORM\Mapping as ORM; /** * @ORM\Entity * @ORM\Table(...
Pixelrocker's user avatar
1 vote
1 answer
2k views

How to remotely debug console commands in Symfony

Problem I want to debug Symfony console commands on a remote VM server. I can get it to work to debug the bin/console script and all related method calls in the \Symfony\Bundle\FrameworkBundle\...
lordrhodos's user avatar
  • 2,697
1 vote
0 answers
43 views

sylius/metadata install in sylis beta 2

I installed the sylius v1.0.0-beta2 and symfony 3 but I have a bit problems when I install Sylius metadata. When I launch the command composer.phar require sylius/metadata-bundle it return an error ...
Gino De Maria's user avatar
0 votes
1 answer
304 views

Symfony Payum paypal_rest storage definition

For a paypal express integration with payum in Symfony 3.1.4 I defined the storage in config.yml like this AppBundle\Entity\Payment: { doctrine: orm } Now I want to use the storage defined by the ...
user3440145's user avatar
2 votes
3 answers
3k views

Can't get POST data with AJAX

I would like to show 4 objects in a page, with a "load more" button which show 4 more object each time we click. I try to adapt a PHP script which works(tested) to Symfony. The problem is that I can'...
L01C's user avatar
  • 578
2 votes
1 answer
2k views

Random order for ArrayCollection in Symfony 3

Here's part of my Question Entity: /** * @ORM\OneToMany(targetEntity="Answer", mappedBy="question", cascade={"all"}) */ private $options; and here's part of the Answer Entity: /*...
shaNnex's user avatar
  • 1,043
1 vote
0 answers
367 views

Symfony3 authentication with Ldap and Oauth2 server

I need to create an application that fetches User from Ldap and then, generates a token for him to access Restful interface. First, I am using LdapToolsBundle and I could login using Ldap and login ...
fabionvs's user avatar
  • 197
-1 votes
1 answer
740 views

Building symfony 3 ecommerce site

I've started learning symfony framework and I thought that it would be a great practice to build eCommerce site, but I found it difficult finding information about building it. My questions are: ...
Giedidius's user avatar
2 votes
2 answers
936 views

Payum Paypal Rest config_path

I am trying to implement paypal-rest payment with the payum bundle in symfony (3.1.4). I need to get PayPal Plus running in my Symfony App. Therefore I read this article https://github.com/Payum/Payum/...
user3440145's user avatar
-2 votes
2 answers
803 views

Replace Javascript source file from server with local javascript source

I'm trying to install Symfony project on a server, which has no connection to the internet. How can i replace a Javascript source file from server with a local javascript source file using javascript ...
User's user avatar
  • 51
3 votes
4 answers
6k views

Symfony offline installation with composer [duplicate]

I'm trying to install Symfony on a server, which has no connection to the internet. I copied composer on the server but when i try to install it i get this error Connection Error [ERR_CONNECTION]: ...
User's user avatar
  • 51
0 votes
1 answer
344 views

Cache invalidation in Symfony 3.1 cache component

I use the cache component of Symfony 3.1 to store some custom metadata for my entities. I would like to invalidate it as soon as a change is made in any file associated with these metadata. I didn't ...
Stnaire's user avatar
  • 1,100
1 vote
1 answer
995 views

Symfony 3 dynamically add attributes to form fields based on translation messages

I want to implement custom helper messages (html data attribute) for every form element. Helper messages are defined in YAML lang file (messages.en.yml) and not all form elements have helper messages. ...
user2496520's user avatar
3 votes
1 answer
871 views

Unrecognized option "assets" under "framework", symfony 3

can you help me to resolve this problem ? . I am trying to upload logo and when i type any command i get this exception in Symfony v 3.2.8 Unrecognized option "assets" under "framework" in config....
Onur Özkır's user avatar
2 votes
3 answers
310 views

Embedded forms relations doctrine

in my symfony app, i'm using embedded forms. In my case, an object "CompetenceGroupe" can have multiple objects "CompetenceItem", but an object "CompetenceItem" belongs to only one object "...
Thomas's user avatar
  • 143
0 votes
1 answer
45 views

Symfony FosUserBundle profilePicture

The problem is that is only uploaded when I change other field. If I just choose to upload file it will not work. here my class User.php /** * @ORM\Entity * @ORM\HasLifecycleCallbacks() * @ORM\...
Reda Azizi's user avatar