0
votes
1answer
17 views

Symfony2 Authentication fails silently with custom UserProvider

I tested the in_memory authentication, and database authentication with the their default UserProvider, it works fine, but when i specify a costum userProvider, it fails silently, i am using a form to ...
0
votes
1answer
17 views

how to implement onchange ajax request in sonata admin bundle Symfony2

I want to implement onchange ajax request in sonata admin bundle in Symfony2.I want to create a cascading dropdown.if i select option from a drop down then according to the value of the dropdown, the ...
0
votes
0answers
26 views

How to update add/replace an entire database using Doctrine or Mysql

I'm working on a web-app project, for a trading company, which would like to have an offline access to the web App and possibility to update when connected to the net again. The interface is easy to ...
0
votes
1answer
19 views

Symfony2 profiler on Behat/Mink to test mails

I'm trying to use Behat to test my mails on my Symfony2 app, following this doc http://docs.behat.org/cookbook/using_the_profiler_with_minkbundle.html I think the doc isn't up to date and I'm stuck. ...
0
votes
1answer
23 views

Display list of images in symfony2 twig

I have already uploaded several images in the following directory BundleVoteBundle/web/uploads/images/nominee/ Image name is unique. now i want display all of the data with corresponding image using ...
1
vote
2answers
26 views

How to linkify a hash-tagged word in a text (e.g. This is a #RandomWord) using TWIG?

Here is what my HTML code looks like: <div class="post-content"> <p> {{post.content}} </p> </div> I there any filter I can use to linkify any hash-tagged word ...
0
votes
1answer
15 views

Symfony2 Exception Thrown During Rendering

everyone! I've been following this tutorial: tutorial.symblog.co.uk on Symfony2 for a while now... The only problem is that the tutorial is very old and includes many deprecated, and even removed ...
0
votes
1answer
22 views

Alternative to the internationalization of Symfony

I'm creating a PHP web application and I'm undecided whether to choose Zend or Symfony. I have studied both and I must say that the best result Zend, both in back end internationalization. But, the ...
1
vote
1answer
28 views

Using EntityManager in costum UserProvider

i am attempting to use Doctrines Entity Manager in a costum user provider in Symfony2. As you can see, i pass it as an argument: SnapsavedUserProvider: class: ...
0
votes
1answer
29 views

How to architect / structure / organize large symfony 2 application [on hold]

I am building a large application with Symfony 2. Actual this is more like a couple applications. I will have: Two Web Apps - These web applications will be very similar. They will have some ...
0
votes
1answer
45 views

Fatal error: Cannot redeclare class

I am trying to generate getter and setter for entity class by using php app/console doctrine:generate:entities Acme/WebsiteBundle/Entity/W_user But getting following error: Fatal error: Cannot ...
0
votes
1answer
18 views

PHP trying to implement interface without success in symfony2

I'm just started learning Symfony2. I have problem with using interface in controller. I've created very simple interface, then implemented it in controller and now Symfony debugger shout that my ...
0
votes
0answers
47 views

Why is Symfony documetnation featuring interaction with Doctrine in controller's methods?

A while ago I created my own MVC to learn about this pattern and to do some practice. Now, I want to start using an orm in my MVC. However, I'm not quite sure how to accomplish this. As for now, the ...
0
votes
0answers
25 views

PHP, How to customize the serialization of an array of dates using JSM Serializer (or Symfony Serializer)

I need to serialize an array of dates (just that, not an object containing the array of dates!) and I want to be able to control how it is done: $serializer = SerializerBuilder::create()->build(); ...
0
votes
1answer
11 views

BadMethodCallException: Undefined method 'getLatestBlogs'. The method name must start with either findBy or findOneBy

I'm getting the following error when surfing to http://symblog.dev (prod env) When surfing to http://symblog.dev/app_dev.php everything works fine. error: (BadMethodCallException: Undefined method ...
1
vote
1answer
34 views

Symfony 2 Primary key is one to one relation with parent table

I have two entities: User and UserProfile. At user entity primary key is autoincrement and named intUserID. UserProfile entity have the same primary key (but not autoincrement) and associated with ...
2
votes
2answers
24 views

What is a difference between service.yml and config.yml in Symfony

In config.yml, I see root element such monolog, web_profiler. Are those services that can be configure in service.yml instead? In the other way, my service that defined in service.yml, are there ...
0
votes
0answers
8 views

Display current image in edit page in SonataAdminBundle

I'm using SonataAdminBundl for my admin area. I have an Entity that has a image field (String) - Article ; I have an admin page for create/edit and list this entity - ArticleAdmin. I want disaplay ...
1
vote
3answers
48 views

Understanding many to many relationships

im trying map an One to Many relationship, but i have many problems. I have the below entity-relationship model: So, im write the next annotations in the Usuario doctrine model: class Usuario ...
0
votes
1answer
32 views

Symfony 2 Doctrine:Fixtures:Load Undefined Index

I have been using Symfony2 lately, and I've been following this tutorial: tutorial.co.symblog.co.uk Unfortunately, since the tutorial was written a long time ago, many things are wrong. I've been ...
1
vote
0answers
26 views

Symfony2 Custom Authenticator, core cannot find file? [duplicate]

I'm trying to create a custom authenticator and I followed the tutorial here: http://symfony.com/doc/current/cookbook/security/custom_password_authenticator.html But I'm getting this error: ...
0
votes
3answers
64 views

Single table relationship with two different tables

My database schema: LIKE PAGE ARTICLE id id id userid name text My Question - How do I make a relationship between PAGE table and ARTICLE table with LIKE table? ...
0
votes
1answer
20 views

Symfony2 Intl Exception

i deployed a symfony application on centos server but i am getting a error [Symfony\Component\Intl\Exception\RuntimeException] ...
0
votes
0answers
16 views

Model Entends entity - controll, configure and return other elements

I want have object (car) this object must have galleries (photos, videos)- can i setup car as CarModel extends Entity (pushed as service) and add method - getGallery() in thic class ? or this is not ...
1
vote
1answer
29 views

SQLSTATE[HY000] [2002] Not a directory when doctrine:schema:create

I'm currently programming in Symfony2 (following this tutorial: tutorial.symblog.co.uk, and when I execute a: php app/console doctrine:schema:create I get: [PDOException] SQLSTATE[HY000] [2002] ...
0
votes
1answer
15 views

Undefined Variable “name” in Enquiry.php (Symfony2)

I have been following this tutorial: tutorial.symblog.co.uk, and just finished up Part 2. I also followed what one of the users said in the comments about the deprecated functions that were part of ...
1
vote
0answers
31 views

Symfony2 “FatalErrorException: Compile Error: Cannot redeclare class” from time to time

today I got an very odd situation. I am implementing a simple 1:m relation between two entites in Doctrine Symfony2. There are Users and Groups. Each User should be added to exactly one Group. But ...
0
votes
1answer
30 views

Symfony2 Custom Exception and Authentication token

[NOTE] too see final workaround, scroll down after 12 hours of headbanging and reading tons of materials I gave up and asking someone to help me how to solve the "The security context contains no ...
0
votes
1answer
20 views

Doctrine error when deploying symfony2 app on pagoda box

I'm getting a doctrine error after deploying my app on PagodaBox. It works fine in both dev and prod environments on my local machine but the live site returns this error: Fatal error: Uncaught ...
1
vote
2answers
26 views

Symfony2 Doctrine2 Many To Many get all entities with they relation entities

How to get in controller using one SELECT all entities from one table with his entities from another ? for example if i have a tables: applications and categories (many to many realation) and i want ...
0
votes
1answer
19 views

Symfony/Doctrine users in multiple databases

For a project we would like to use multiple databases containing different kinds of users. The website is divided over multiple subdomains. That means: 1 subdomain has 1 database. We have 1 central ...
0
votes
3answers
39 views

Symfony2 Extending Controller getParameter()

I Want to extend Symfony2 Controller to my project that is using API but I am having error of a non object use getParameter() function look at my code: namespace Moda\CategoryBundle\Controller; use ...
1
vote
1answer
24 views

Symfony2 and date_default_timezone_get() - It is not safe to rely on the system's timezone settings

I have a Symfony2 project. I updated my php to 5.5.7 today and since then, I am getting the Warning: date_default_timezone_get(): It is not safe to rely on the system's timezone settings. You are ...
1
vote
1answer
30 views

FosMessageBundle sendId cannot be null

I implemented fosMessageBundle with my message bundle, but if I want send a new message use fos_message.composer ,I got this error: An exception occurred while executing 'INSERT INTO Message ...
1
vote
1answer
50 views

NodeJS with PHP application and user session

I have a PHP application (with Symfony2) and I need to let my users talk, and other tings, in real time (with socket.IO). Let's focus on the chat mechanism : A logged user can talk with an other ...
0
votes
1answer
25 views

Executing Symfony2 specific commands on Ubuntu

Earlier I used XAMPP with Symfony2 on Windows 7. There was shell for running specific Symfony2 commands for generating bundles etc. Now I have switched to Ubuntu 13.10. Problem is when I go to Symfony ...
0
votes
0answers
13 views

Symfony 2.4 form field not rendering with value selected with a user/role one to many relationship

I've got a User entity with a role relationship described by the annotation below: /** * @ORM\ManyToMany(targetEntity="Role", inversedBy="roles", cascade={"persist","remove"}) * ...
1
vote
1answer
25 views

How to call variable (Object)'s method in expression syntax? [Twig Templating]

How to call a variable's method in expression syntax in twig tempting system. see the example below {{ myObj.someMethod() }} {# this print the output of this method #} i don't want above code ...
0
votes
1answer
15 views

How to set a session variable from the UserProvider object in Symfony2?

In order to set the current UI language, I need to set the user default language to a session variable when the User information is being retrieved from the UserProvider object (loadUserByUsername ...
0
votes
2answers
30 views

Doctrine Query Builder: match all values

i have following query: $filters is an array like this array('black', 'green', '50mm') $query = $repository->createQueryBuilder('d') ->select('product', 'attribute') ...
0
votes
1answer
17 views

Symfony CMF Database Schema

I have started to look into Symfony CMF, and I must say it looks good! However, I can't get my head around the database Schema! I have read up on the basics of PHPCR, and understand it to an extent. ...
0
votes
0answers
28 views

Doctrine One To Many Bidirectional Association Not Working with Custom Type

I have been working on a REST api using Symfony2 and FosRestBundle. Everything was working fine and then came the requirement that i had to obfuscate all the resource ids. I did it by adding a custom ...
0
votes
0answers
18 views

Doctrine error when using SUM(a.id=1) as `ìdentifier`: Expected Doctrine\ORM\Query\Lexer::T_CLOSE_PARENTHESIS, got '='

I am trying to execute a query in doctrine that contains something like this SUM(a.id = 1) as `1` for some reasons it always gives me the following error: [Syntax Error] line 0, col 15: Error: ...
0
votes
2answers
41 views

Symfony2: Problems passing parameters between pages

I am quite new about using Symfony 2 for developing in PHP, so i used the "Symfony Blog" example as the base of a new simple app in order to try out what i learnt. I have got this rule defined: ...
0
votes
0answers
9 views

Load SonataMediaBundle gallery without asking if it's media is enabled

I'm using SonataMediaBundle to create a media gallery, now I'm using this code to ask if its media is enabled, I'd like to know if there is a way to override this and directly load everything that's ...
0
votes
2answers
23 views

Symfony2 app/console on a project copy

I have a Symfony2 project setup in /var/www. Because I want different users working on the same project, I copied this project to their directory and changed the name of the database for example. I ...
0
votes
1answer
6 views

Symfony2 > Use Security Context in Public Route (possible alternative)

I have a function UserController:saveUserAction(). This function is being used throughout my system WHENEVER a User Entity needs to be created or modified. This can happen from three places: 1) Admin ...
0
votes
1answer
18 views

Symfony2, Doctrine2, relation between different databases

a few days ago I found that sf2 can manage several connection. http://symfony.com/doc/current/cookbook/doctrine/multiple_entity_managers.html And it's great but... I have a question about selection. ...
0
votes
0answers
27 views

Loading 3rd party namespace class

Currently trying to load a 3rd party class namespace my composer autoloader has an entry for the class: 'Cart' => array($vendorDir . '/xxx/cart'), my namespace is Cart and the class is cart. I need ...
0
votes
2answers
45 views

Symfony2/Doctrine2 - Issue when getting datetime from database

As I was working on my Symfony2 project a strange bug savagely appeared (again). I created an entity Check containing a dateCreated attribute and some others attributes so I can link Check to ...

15 30 50 per page