0
votes
0answers
4 views

Symfony - How to connect to remote mysql database without install mysql-server

I am trying to connect to a remote mysql database with my Symfony application. I don't want to install the mysql-server package on my server if I don't need to but when I try to connect, I get the ...
0
votes
0answers
12 views

DQL Subquery Questions

I'm trying to SLECT * FROM a table o where the vendor is what I pass.(this is in the context of a Doctrine Repository). I then want to run a subquery and SELECT * FROM AppBundle:PriceOption where p....
0
votes
1answer
12 views

FosuserBundle ( The path “fos_user.from_email.address” cannot contain an empty value, but got null. )

I have a problem when i Install FOsuserbundle , this is my problem in result : description of problem in picture this is my config.yml : fos_user: db_driver: orm # other valid values are '...
0
votes
0answers
8 views

Symfony Wait Process to finish when closing Console Command

I have a Symfony Console Command that creates a Process in a loop. Now when closing this command (ctrl+c or other) I would like it to wait for the last process to finish before closing. Now in ...
0
votes
0answers
24 views

Symfony3: How to change roles when I login

I want to change roles when I login, so I have a form inside my controller to log me in and a provider for my user class, but I am really lost. I've been looking several tutoriel on symfony website ...
-1
votes
0answers
50 views

Symfony 2/3 - Relation database in display it's contents to SonataAdminBundle

I would like to display contents my datebase in SonataAdmin. I showed contents in my first database, but I don't show contents with my database, which is relation ManyToMany. My relation database: ...
1
vote
1answer
13 views

Installation failed, reverting ./composer.json to its original content symfony 3

I have a problem when i install sonata bundle or fosuserbundle in terminal with command : php ../composer.phar require sonata-project/admin-bundle i have this error pros-MBP:BigManage pro$ php ../...
0
votes
0answers
30 views

Trying to fill input with object on create page

I'm new to symfony and I'm trying to learn but I'm stuck at the moment : I'm trying to create a form with input already filled, let me explain : I've got a Session table, linked with an antibiotic (...
-1
votes
0answers
24 views

Is there any way to join multiple tables by entity?

I'm building a poll bundle and I have various question types such as checkbox question, text question etc. Also, I keep these answers on different tables according to their types. When I want to pull ...
0
votes
2answers
36 views

PHP syntax in Symfony tutorial

Trying to get up to speed with Symfony, going thru the tutorial, and on this page (symfony.com/doc/current/forms.html) is the following sample: $form = $this->createFormBuilder($task) ->add(...
-1
votes
1answer
43 views

Symfony 3 : Check if I am logged in

I would like to check if I am logged in when I login with a form, but I can't find my anwser and I don't understand the tutorial on symfony website... I try to follow this : http://symfony.com/doc/...
1
vote
0answers
17 views

Symfony3 Catchable Fatal Error: Argument 1 passed to Symfony\Component\Security\Core\Authentication\Provider\DaoAuthenticationProvider

I have problem with SonataBundle. I have error "Catchable Fatal Error: Argument 1 passed to Symfony\Component\Security\Core\Authentication\Provider\DaoAuthenticationProvider::__construct() must ...
0
votes
0answers
32 views

Unable to generate route for logout

I had just syntax problem(I belive), which stop me for doing my next steps. So I want to make a login system, and when one of session attr is set, the button on template will change for 'logout' with ...
0
votes
0answers
8 views

Can't install sonata page 3.0.0 on symfony 3

I have been trying to install SonataPageBundle on different versions of symfony 3 , but I keep getting this error while running composer install: Problem 1 - Conclusion: don't install symfony/...
0
votes
1answer
17 views

How to make Symfony Form to use addSomething() / removeSomething() methods of the underlying object?

Suppose I have User object, which has $emails field. User object also has addEmail() and removeEmail() methods. In my form type (UserType) I use CollectionType for $emails field. After submitting a ...
0
votes
0answers
28 views

new entity ignored by schema update symfony

Just I generate a new entity "GroupRole" inside UserBundle, but when I used php bin/console doctrine:schema:update I get "Nothing to update" so entity "GroupRole" is ignored. I have 2 bundles "...
0
votes
0answers
9 views

jsGrid dynamic loading with paging

I would like to make a dynamically loading grid, with jsGrid. I'd like to add paging,sorting and filtering to it, however the documentation is not really clear for me, how do i give back from the ...
0
votes
2answers
28 views

Symfony form error with “render rest: false”

I'm working on a project about a school. I have the entity "Teacher" and the corresponding form with several fields: Entity class Teachers implements UserInterface { ... /** * @var integer * * @...
0
votes
2answers
23 views

Doctrine adds an entity but the pk doesn't increase

I'm using symfony3 and doctirne now. I have an entity named "post" with attributes id, messages, and date. Id is the primary key. I want to add one entity in controller. Here is the code: $post = ...
0
votes
0answers
15 views

Save Post variable in Drupal 8 Session an make available globally

I´m trying now for days saving data in a session to use for view contextual filter etc. The user should select something (1,2,3,4) from a dropdown, saved in a post variable and write into session. ...
0
votes
1answer
32 views

How to move Bundle/Resources folder to a subfolder in Symfony?

I'd like to structure a Symfony3 Bundle into submodules. For this I would like to move the Bundle/Resources folder (with views, config and public) along with the controller classes into a subfolder. ...
1
vote
3answers
35 views

Symfony3 Impossible to access an attribute (“small_pizza”) on a string variable (“Margherita”)

I trying to display price, but occurs error Impossible to access an attribute ("small_pizza") on a string variable ("Margherita"). This is my Controller: /** * @Route( * "/menu", ...
1
vote
1answer
25 views

Symfony3 foreach causes local server to crash

I have two tables in one database that are emptied and replaced very frequently. Each table has well over 65,000 rows. I want to select two fields from the first table (LnsPriceUpdates), then take ...
1
vote
0answers
30 views

Symfony3 Update Users data and Invalidate current sessions

As I understand, When the user logs in successfully Symfony will keep a copy of the User document/entity either in the session.handler.native_file or a db provider, whichever is configured. On future ...
0
votes
1answer
10 views

Doctrine two fields for the same entity, get related for both fields

I have 2 entities, Reservation which is a reservation for a ride like Uber. The reservation have a field pickUpAdress and a field dropOffAdress: Reservation: /** * @Assert\Valid() * @ORM\ManyToOne(...
0
votes
0answers
17 views

Queries with three entities in the FormType

I´m new in Symfony and I am having a problem with a query that I have to show Cuentas (Accounts) belonging to the logged in user, I have three entities - Cuentas-Receptores-User - The problem is to do ...
-1
votes
0answers
21 views

Using mysql and ajax to update database with Symfony

I am working on a code to test update database using my mysql with ajax on symfony So I created this javascript function: function playerone() { $.ajax({ url: '/x/1/sym/thesym/web/...
0
votes
1answer
21 views

How to receive a message, instead of throwing exception in Symfony?

I have a function for displaying the user bag in e-commenrce website. When the user bag is empty, it throws the following exception: if (!$bag) { throw new NotFoundHttpException(); } How can i ...
0
votes
0answers
14 views

Start PHP Symfony process with terminating session

I am trying to launch a Symfony process to run in the background and give the user ability no navigate away from the page once process initiated. My current setup is below: $rootDir = getcwd(); $...
0
votes
1answer
17 views

performance of Entity manager on Symfony

I have to make a command for data migration but the time execution is too long and crash after a long time, i need to make it faster, can you help me ? Here an example : Situation I have a Matter ...
0
votes
2answers
35 views

Symfony : is it bad practice to add custom functions in an Entity?

I understand that an Entity is a basic class that holds data. But is it bad practice if the Entity has custom functions that manipulates the data ? I personally think that this kind of functions ...
0
votes
1answer
19 views

arrayCollection doctrine give a string in place of object

I have 2 entities, document and field, inside entities I have some relation OneToMany and ManyToOne.. I'm troubled cause when I try to get values of fields from document in the controller. I get error ...
0
votes
0answers
18 views

Doctrine onDelete=SET NULL still persist relation

I have a relation oneToMany Category / Article class Category { /** * @ORM\OneToMany(targetEntity="Article", mappedBy="category") */ protected $articles; } class Article { /** ...
1
vote
0answers
44 views

Symfony / PHP - Best way to store single value

Assuming that I have an application running on Symfony 3.2 / Doctrine. Question : What is the best way to store a single value that gonna change over some actions. First thoughts : Im thinking that ...
1
vote
2answers
30 views

Symfony2 - file_get_contents() fails on same project api url

I try to execute file_get_contents() on my own route used for AJAX mostly: file_get_contents($this->router->generate('ajax_get_provinces', array('country' => $country->getName()), true)); ...
0
votes
0answers
22 views

Symfony 3 - Collection of uploads - Unidirectional Cascade persist

I'm setting up an AJAX upload in Symfony 3. The AJAX part generates hidden fields for each file with the file name as value. There is an entity called Article which has a collection of Documents. As ...
0
votes
1answer
33 views

Symfony form Constraints CallBack 2 parameters

I am trying to add a constraint with 2 parameters in my Symfony but i don't succeed. My code : The form field I am trying to check if definied like that : ->add( self::...
0
votes
1answer
34 views

Error Service Symfony

I started learning Symfony recently but I can not use the services, I get this error and I do not understand why. can you help me ?
0
votes
1answer
14 views

Edit customer creation sylius

I want to edit the creation of a customer, I want to add a field during the creation. During the creation the service "sylius.controller.customer:createAction" is called in security.yml ...
0
votes
1answer
20 views

Symfony Login with LDAP

I want to use LDAP in my Symfony (v3.0) Project to login my users. But it seems to me, that a search_password can be either "hardcoded" in security.yml or null. I have a simple login form with ...
0
votes
1answer
22 views

Using a Custom Query for the Entities in Doctrine - Symfony Form

I have two tables one is users like this id _ username _ firstname _ lastname and the other one is users_test id _ user_id _ name I'm trying in Symfony Form (UserTestType) to make a Custom Query ...
0
votes
0answers
22 views

Sonata menu custom form

I have a Symfony 3 Form Type which I'm registering with a Sonata Admin like this: protected function configureFormFields(FormMapper $formMapper) { $form = new CountryType(); $form->...
0
votes
0answers
30 views

Symfony - Save datetime when manytomany relationship is formed

I have two entities user and event and they are linked together manyTomany the relationship is working fine and i can save the relatinship. What i want to know is, if it possible to save the datatime ...
0
votes
0answers
30 views

I want to add href link in form error message, and this link is not static

I want to add href link in form error message, and this link is not static.I`m try more way, but not has pertect way.I need help index.html.twig: {% extends ... %} {% form_theme form 'Form/...
2
votes
1answer
13 views

SoapClient __soapCall calls older version of a service even after clearing the cache dir

I'm using BeSimpleSoap to send requests to WSDL based web services. One of those services updated recently. And I can access it via SoapUI, but when I call __soapCall with the updated function (with ...
0
votes
1answer
17 views

Wordpress - Migrate 404s to different domain

Backstory, I've got a "php/symfony web app" that is currently hosted on www.example.com but I'm wanting to have that whole functionality be moved to app.example.com so I can spin up a wordpress site ...
0
votes
1answer
14 views

Why does adding a groups option to the symfony serializer remove all properties?

User Object: /** * User */ class User implements \JsonSerializable { /** * @var int */ private $id; /** * @var string */ private $firstName; /** * @...
1
vote
1answer
24 views

Symfony - Categories count with EntityType

I have a search form that gets Categories from database and shows each category name as a checkbox, it's retrieved via EntityType, i want to show count categories in front of the category name, i ...
0
votes
1answer
20 views

Symfony Assetic function using with variable

<img src="{{ asset("assets/img/sample.jpg") }}"/> i want to using sample.jpg with filter {% image "assets/img/sample.jpg" filter="jpegoptim" %} <img src"{{ asset_url }}"/> {% ...
0
votes
0answers
21 views

Filling a form though headless browser

Due to integration restrictions, I'm forced to register people through a headless browser because the platform doesn't have an API. I'm able to get this done on my symfony through selenium and PHP ...