Questions tagged [symfony1]

The first version of symfony, a full stack MVC framework for PHP 5.

Symfony is a full-stack PHP MVC framework

Symfony provides an architecture, components and tools for developers to build complex web applications faster. Choosing Symfony allows you to release your applications earlier, host and scale them without problem, and maintain them over time with no surprise.

Symfony is based on experience. It does not reinvent the wheel: it uses most of the best practices of web development and integrates some great third-party libraries.

Thousands of developers already trust Symfony for their applications!

Information

This tag is specific for the first version: symfony 1.x. There is also and for minor version.

Notice that, even if this version of Symfony is very stable and has been used in thousands of applications around the world, it is now outdated and surpassed by the superior version. As of November 2012, Symfony1 has reached his end of maintenance. If you are starting a new project, it is recommended that you use instead.

As of November 25, 2012 the latest stable release of symfony 1 is version 1.4.20.

Community

New users join the community every day, and that makes Symfony the most popular PHP framework around. A large community means easy-to-find support, user-contributed documentation, plugins, and free applications.

Speed

It aims to speed up the creation and maintenance of web applications, and to replace the repetitive coding tasks by power, control and pleasure.

The very small number of prerequisites makes Symfony easy to install on any configuration; you just need Unix or Windows with a web server and PHP installed. It is compatible with almost every database system. In addition, it has a very small overhead, so the benefits of the framework don't come at the cost of an increase of hosting costs.

Using Symfony is so natural and easy for people used to PHP and the design patterns of Internet applications that the learning curve is reduced to less than a day. The clean design and code readability will keep your delays short. Developers can apply agile development principles (such as DRY, KISS or the XP philosophy) and focus on applicative logic without losing time to write endless XML configuration files.

Robust

Symfony is aimed at building robust applications in an enterprise context. This means that you have full control over the configuration: from the directory structure to the foreign libraries, almost everything can be customized. To match your enterprise's development guidelines, Symfony is bundled with additional tools helping you to test, debug and document your project.

Last, but not least, by choosing Symfony you get the benefits of an active open-source community. It is entirely free and published under the MIT license.

Symfony is sponsored by Sensio Labs, a French Web agency.

Useful links:

In general:

For a migration/cohabitation with :

3991 questions
6
votes
4 answers

How to format a getUpdatedAt() kind of date in Symfony?

I'd like to change the formatting of a date in Symfony 1.4 The default one being: getUpdatedAt(); // Returns 2010-01-26 16:23:53 ?> I'd like my date to be formatted like so: 26/01/2010 - 16h23 I tried using the format_date…
Guillaume Flandre
  • 8,936
  • 8
  • 46
  • 54
6
votes
3 answers

How to know if an object from a relation exists in the database

I'm using Symfony with Doctrine. I have two classes defined, Person and Student, a relation one to one. Each Student is related to a Person, but not every Person has a relation with a Student. When I call ... $person->getStudent(); ... I always…
kiewic
  • 15,852
  • 13
  • 78
  • 101
6
votes
5 answers

Is there a Symfony helper for getting the current action URL and changing one or more of the query parameters?

What I'd like to do is take the route for the current action along with any and all of the route and query string parameters, and change a single query string parameter to something else. If the parameter is set in the current request, I'd like it…
Rytmis
  • 31,467
  • 8
  • 60
  • 69
6
votes
6 answers

How do i detach a behavior in Symfony/Doctrine?

I have doctrine's softdelete behavior attached to all of my models. Is there a way I can hard delete a particular record? In cakephp I remember detaching the behavior... deleting the record and then re attaching the behavior. Is there something…
Yashvit
  • 2,337
  • 3
  • 25
  • 32
5
votes
2 answers

Symfony Doctrine Query to calculate rank after a group by subquery

I'm building an app in Symfony 1.4 and Doctrine 1.2 ORM. I'm pretty new to the doctrine ORM and am getting the hang of it but I can't quite solve this problem. I have a table of user scores (mbScoreByGenre) where one user id can have multiple…
frankp221
  • 175
  • 3
  • 11
5
votes
1 answer

Symfony - image in response - speed, optimization

I generate dynamically graphic in my controller: if not file exists (unique filename) then generate graphic and save it return RedirectResponse($url) (3. I've tried also: $fp = fopen($url, "rb"); $str = stream_get_contents($fp); …
Wojciech Kulik
  • 7,823
  • 6
  • 41
  • 67
5
votes
2 answers

How to add users to sfguard

I'm using symfony 1.2 with sfguard 1.4.1. What's the best practice for registering a new user on the system?
akiva
  • 2,677
  • 3
  • 31
  • 40
5
votes
2 answers

Symfony 404 errors

On my local machine, the symfony project I have created works perfectly. I have installed symfony on my testing server and it is working fine. When I go to the URL in the browser I get the "Symfony Project Created" page. I ran the…
Carey Estes
  • 1,534
  • 2
  • 31
  • 59
5
votes
1 answer

Custom route class

In symfony 1.4 you could define a custom route class, where you override the generation of url with custom logic, for example: custom: class: sfDoctrineRouteCollection options: model: Custom prefix_path: …
Dziamid
  • 11,225
  • 12
  • 69
  • 104
5
votes
3 answers

Execute code after every action in Symfony 1.4

I know that we can use filters to create code before every action in Symfony, but what about after every action has been made? a PostExecute method?
vinnylinux
  • 7,050
  • 13
  • 61
  • 127
5
votes
1 answer

Symfony 1.4 dev logging not working

I'm having trouble getting dev environment logs to work in Symfony 1.4.8. Meanwhile, logs in prod environment works perfectly with the same settings. I'm not sure what is wrong with my dev environment. The ideas is to log messages in Action and…
TSCOconan
  • 85
  • 2
  • 9
5
votes
3 answers

Session deletion in Symfony 1.4

How do I delete all session variables at once if they are not in Array? PS I set them this way: $this->getUser()->setAttribute('PayPalTransaction.hash', $request->getParameter('hash')); Regards, Roman
Roman Newaza
  • 11,405
  • 11
  • 58
  • 89
5
votes
2 answers

Symfony, jQuery.ajax() call, session variables lost

I am writing a web app using Symfony 1.3. I have a problem with my session variables getting lost after I call an action via jQuery's $.ajax() call. Things happen in this order: An action sets the session variable like…
pkout
  • 6,430
  • 2
  • 45
  • 55
5
votes
3 answers

symfony 1.4: How to pass exception message to error.html.php?

I tried using special variable $message described here http://www.symfony-project.org/cookbook/1_2/en/error_templates but it seems this variable isn't defined in symfony 1.4, at least it doesn't contain message passed to exception this way throw new…
HongKilDong
  • 1,276
  • 3
  • 16
  • 23
5
votes
1 answer

Doctrine: Query only where relationship doesn't exist?

I have two tables: Articles and Categories. Articles can have a single Category assigned to them. But they don't have to have a Category. Schema: Article: columns: title: type: string(255) content: type: string(255) …
Jake Wilson
  • 88,616
  • 93
  • 252
  • 370