Questions tagged [symfony]

Symfony refers to both a PHP framework for building web applications as well as a set of components on which the framework is built. This tag refers to the currently supported major versions 3.x, 4.x, 5.x and 6.x. Alternatively, you can specify an exact version using the respective tag. This tag should not be used for questions about Symfony 1.x. Please use the Symfony1 tag instead.

Symfony is a framework for web and CLI-applications built on top of a catalogue of Symfony components. It is free software released under the MIT license. The project's homepage is symfony.com.

Symfony aims to speed up the creation and maintenance of web applications and replace repetitive coding tasks by providing a rich set of components and integrations for other libraries through bundles. It has a low-performance overhead used with a bytecode cache and is aimed at building robust applications in an enterprise context, and aims to give developers complete control over the configuration: from the directory structure to the foreign libraries. Almost everything can be customized. To match enterprise development guidelines, Symfony is bundled with additional tools to help developers test, debug and document projects. Most of the components making up the framework can be used outside of the framework in other projects and libraries.

Components

Besides being a full-stack framework, Symfony is also a set of decoupled and Components.

Some of the Components have their own tag:

Information

This tag should be used for generic Symfony questions. You can also use other tags when the question is related to a specific version: , , , , , , , , , , , , , , , , , , , and .

If your question is about Symfony 1.x, please use instead.

The latest stable version can be found on the releases page.

Symfony also maintains Long Term Support (LTS) releases, which are held for several years (while “normal” releases are only maintained for about eight to ten months). The Symfony team is committed to providing a direct upgrade path between Long Term Support releases.

Related projects

Symfony is used as a basis for many other projects, such as , or

Useful links

Note: Before using any documentation, verify that the version of the documentation matches the Symfony version of your installation.

Upgrade between each version:

Interesting questions:


Symfony is released under the MIT license. The full license text is available on the website.

73565 questions
13
votes
1 answer

Regenerate autoload.php in symfony2

I have autoload.php with this code
benoffi7
  • 3,068
  • 3
  • 29
  • 44
13
votes
1 answer

Put business logic in entity

I've read the Fowler's article about "Anemic Domain Model" (link: http://www.martinfowler.com/bliki/AnemicDomainModel.html), and I agree with his point of view. I've tried to create an application where Entities are simple POPO, but in this way, I…
marka.thore
  • 2,795
  • 2
  • 20
  • 35
13
votes
3 answers

Symfony2 / Doctrine2: Don't drop fulltext index on schema:update

To support fulltext indexing in Symfony2 I use a MyISAM mirror table. We're regularly copying our production dataset to that table and created a SearchEntity that maps the table's structure and is associated with the real entities. So we can execute…
Stefan
  • 3,382
  • 4
  • 23
  • 27
13
votes
4 answers

Doctrine2 Ignore table of database

I'm using Doctrine 2 and I want to generate an ORM of my database but I don't want select all tables of the db. For example, in this db : Table 1 has no primary key Table 2 is normal I want to choose ONLY Table 2 with this…
user2839159
  • 443
  • 3
  • 6
  • 17
13
votes
3 answers

Pre-populate form value of unmapped field

I have a form that is bound to an entity, but it also has an extra unmapped field: (from the FormType class) $builder ->add('name') ->add('qoh') ->add('serialNumber', 'text', array('mapped' => false, 'required' => false)) I want to…
Nelluk
  • 1,171
  • 2
  • 12
  • 23
13
votes
2 answers

A variable inside an asset declaration in Twig

My inline style looks like: style="background-image: url({{ asset('bundles/testblog/images/id.jpg') }});" the part id of the url must change depending on a varibale. How can I make this happen inside the asset. I tried : style="background-image:…
Adib Aroui
  • 4,981
  • 5
  • 42
  • 94
13
votes
3 answers

Silex - Twig_Error_Syntax: The function "path" does not exist

According to the Silex documentation: Symfony provides a Twig bridge that provides additional integration between some Symfony2 components and Twig. Add it as a dependency to your composer.json file. I include the following in my composer.json…
Jimbo
  • 25,790
  • 15
  • 86
  • 131
13
votes
1 answer

Symfony2 Translate Assertion message from entity annotation

I have an entity with some validation and assertion messages. I need to translate that messages into arabic i have a messages.ar.xlf file The validation message from the Entity is not translated!
Essam Khaled
  • 163
  • 1
  • 6
13
votes
3 answers

Custom choices list of sonata_type_model field with Sonata Admin

I am using Sonata Admin and I have a field of categories and I need to show them in order like a tree in select: