All Questions

95
votes
8answers
27960 views

Automatic post-registration user authentication

We're building a business app from the ground up in Symfony 2, and I've run into a bit of a snag with the user registration flow: after the user creates an account, they should be automatically logged...
192
votes
6answers
30223 views

Should everything really be a bundle in Symfony 2.x?

I'm aware of questions like this, where people tend to discuss the general Symfony 2 concept of bundle. The thing is, in a specific application, like, for instance, a twitter-like application, should...
18
votes
2answers
6226 views

Symfony3 ClassNotFoundException after bundle creation

I wanted to start a new 3.3 project in Symfony and started as usual: 1.) Creating the new project: symfony new ArtProject 2.) Creating a new Bundle: php app/console generate:bundle (Paul/ArtBundle, ...
43
votes
5answers
66397 views

symfony2 rewrite rules .htaccess app.php

I uploaded my symfony2 project to server grove. The main page loads, but all the links are broken. I tried adding app.php to the web address. It did work, but: I have routes like this one: www.some...
184
votes
2answers
109307 views

On delete cascade with doctrine2

I'm trying to make a simple example in order to learn how to delete a row from a parent table and automatically delete the matching rows in the child table using Doctrine2. Here are the two entities ...
92
votes
6answers
100284 views

Path of assets in CSS files in Symfony 2

Problem I have a CSS file with some paths in it (for images, fonts, etc.. url(..)). My path structure is like this: ... +-src/ | +-MyCompany/ | +-MyBundle/ | +-Resources/ | +-assets/ | ...
33
votes
2answers
8488 views

Symfony2 conceptual issue: general bundles vs. specific ones

Edit: the Symfony best practices answer most of my questions. I have several questions concerning my Symfony2 app. It will have a frontend and a backend, and they will use some common code (such as ...
183
votes
12answers
152021 views

How to get current route in Symfony 2?

How do I get the current route in Symfony 2? For example, routing.yml: somePage: pattern: /page/ defaults: { _controller: "AcmeBundle:Test:index" } How can I get this somePage value?
95
votes
18answers
158952 views

Symfony2 : How to get form validation errors after binding the request to the form

Here's my saveAction code (where the form passes the data to) public function saveAction() { $user = OBUser(); $form = $this->createForm(new OBUserType(), $user); if ($this->reque...
61
votes
6answers
39887 views

Is there a built-in way to get all of the changed/updated fields in a Doctrine 2 entity

Let's suppose I retrieve an entity $e and modify its state with setters: $e->setFoo('a'); $e->setBar('b'); Is there any possibility to retrieve an array of fields that have been changed? In ...

Previous Next