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
3 answers

Global component in Symfony

I am currently implementing the navigation of the website (multilevel menu, having current page highlighted). As navigation part will be included for virtually all modules, I first made it a global partial. But logic for selection of "current page"…
Levon Mirzoyan
  • 461
  • 1
  • 2
  • 6
6
votes
2 answers

How to get and use associative array from YAML to action in Symfony?

Ive got in app.yml some configration data, and I want to foreach them in action. I try do this by get them by sfConfig::get('app_datas') but it fails. Lets show them in details: YAML: all: datas: foo: bar foo2: bar2 and in the…
quardas
  • 651
  • 3
  • 10
  • 23
6
votes
4 answers

How to format dates based on locale?

In a template I display the day and month of a specific date :
getCreatedAt())) ?>
getCreatedAt())) ?>
This works fine,…
Manu
  • 4,410
  • 6
  • 43
  • 77
6
votes
1 answer

Symfony : error while accessing an array

i want to output an array containing numbers. I'm creating the array like this (it recieved the statistics for the last 7 days) :
sf_tristanb
  • 8,725
  • 17
  • 74
  • 118
6
votes
5 answers

How do I set a MysQL variable (time_zone) from within doctrine / symfony?

I would like to know how I can set the MySQL time zone to UTC (SET time_zone = 'UTC') from within Symfony/Doctrine, so when I call a UNIX_TIMESTAMP() function on a DATETIME field in my query, it returns the UTC unix time and not unix time in the…
scotts
  • 4,027
  • 3
  • 29
  • 26
6
votes
2 answers

symfony 1.4 how to get POST parameters?

I can get a parameter('id' for example) by $request->getParameter('id'); but if I use a form to POST the id, how could I get its value? $request->getParameter('id'); doesn't work.
Peter Long
  • 3,964
  • 2
  • 22
  • 18
6
votes
4 answers

Configure symfony project for Multiple Domains

We have a product developed in PHP Symfony framework. We have couple of clients right now for whom we are maintaining different code base and databases (MySql). They access their respective code base using subdomain like client1.myproduct.com and…
abhi
  • 253
  • 7
  • 15
6
votes
1 answer

deep copy of doctrine record

I want to make a deep copy/clone of a doctrine record in a symfony project. The existing copy($deep)-method doesn't work properly with $deep=true. For an example let's have a look at a classroom lesson. This lesson has a start and end date and…
hering
  • 1,956
  • 4
  • 28
  • 43
6
votes
1 answer

How put a Task (sfBaseTask) in unitest?

How i can write an unit test, for my Task (sfBaseTask) ?
bux
  • 86
  • 4
6
votes
2 answers

How to use Stored Procedures with Symfony and Doctrine

I having problems at trying to call a MySQL Stored Procedure with Symfony 1.4 and Doctrine 1.2. What I want to do is the following: In a module/new after typing all the data in the form, I want to insert one of the values in another table. I don't…
ricardojguzman
  • 63
  • 1
  • 1
  • 4
6
votes
3 answers

Perform some cleanup when deleting a record in Symfony/Doctrine

Using Symfony 1.4.5 with Doctrine I have a model which includes an uploaded image as one of the columns - creating and updating the record is fine (using the doSave() method to deal with the upload and any changes to the file). The problem I'm…
HorusKol
  • 8,375
  • 10
  • 51
  • 92
6
votes
3 answers

Memory usage increasing after every loop

I have a foreach loop, reading a file containing about 200000 lines, this is my PHP : foreach ($this->file as $row) { if ($this->file->valid()) { //init client array $this->initInvoicesArray($row); …
SmootQ
  • 2,096
  • 7
  • 33
  • 58
6
votes
2 answers

Doctrine date in save override / before save

I have Doctrine model with a date field "date_of_birth" (symfony form date) which is filled in by the user all works 100% it saves to the db as expected, however in the model save() method I need to retrieve the value of this field before save…
6
votes
2 answers

How can escaping be used to prevent XSS attacks?

To prevent XSS attacks, output escaping has been enabled; The above is from symfony,but I don't understand.
user261527
  • 123
  • 1
  • 3
  • 5
6
votes
4 answers

How to configure Apache to have two symfony projects in the same domain (without using subdomains)?

I'm trying to configure Apache to have to different symfony projects (each with his own installation of the framework) under the same domain, but I can't get it to work using folders. This is what I would like to…
eillarra
  • 5,027
  • 1
  • 26
  • 32