Questions tagged [symfony-2.2]

This is the Symfony 2.2.x specific tag. Use it in addition to the symfony2 tag if your question is specific to Symfony 2.2.x — not just 2.x.

Symfony is a PHP full-stack web framework developed and maintained by Sensio Labs.

Information

This tag is specific for the 2.2 version of Symfony, which has been released on the 1 March 2013. See the tag for general Symfony 2.x questions.

As of 19 June 2013, the latest stable release of Symfony 2.2 is version 2.2.3.

Living on the edge

There are a set of interesting links on the symfony blog about what's new in this version:

Useful links

190 questions
2
votes
3 answers

Symfony 2.2 Doctrine ResolveTargetEntities Listener

I'm creating a bundle with relationship associations. In order to keep things abstract, I'd like to use Doctrine's brand new ResolveTargetEntities listener. The thing is that I would like the setup of the listener to be automated, so future…
bob dope
  • 479
  • 1
  • 6
  • 16
1
vote
1 answer

Fatal error: require_once(): Failed opening required 'C:\xampp\htdocs\sample\web/../app/bootstrap.php.cache' (include_path='.;C:\xampp\php\pear\PEAR')

I am new to Symfony for a project. I am getting the following error when everything is okay. My Symfony My php.ini file [PHP] ;;;;;;;;;;;;;;;;;;; ; About php.ini ; ;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;; ; Paths and Directories…
1
vote
1 answer

The requested package symfony/assetic-bundle could not be found in any version

I'm trying to update Symfony2 from 2.0 to 2.2 (2.2 version is mandatory) but composer install command results in the following error: Problem 1 - The requested package symfony/assetic-bundle could not be found in any version, there may be a…
FJM
  • 13
  • 1
  • 4
1
vote
2 answers

How can I force authenticated user to HTTPS in Symfony2 after fully authentication only?

I need to use https in Symfony 2.2 but only if user is fully authenticated.
Rajesh Meniya
  • 753
  • 1
  • 7
  • 17
1
vote
1 answer

Symfony 2.3 does not work well with "less" embedded in project

I'm embedding all my node.js dependencies inside the project and all work, except "less". Any idea on how to fix that? Here is my config: assetic: debug: %kernel.debug% use_controller: false node: "%assetic_node%" node_paths: -…
hgf
  • 575
  • 3
  • 14
1
vote
0 answers

How to render checkbox form in symfony 2

There are 2 entity many-to-many relations with join table in symfony 2. First one is certificate, second one is mayag and join table is certificate_mayag. Certificate has many mayag with isAvailable, startDate, endDate fields. A mayag has many…
1
vote
2 answers

Error "Class 'Twig_SimpleFunction' not found" after upgrade to Symfony 2.2

I recently updated Symfony from 2.1 to 2.2 and now I'm getting error: Error: Class 'Twig_SimpleFunction' not found in vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Twig/Extension/LogoutUrlExtension.php line 41 My…
JohnSmith
  • 436
  • 5
  • 17
1
vote
2 answers

How to log messages to different files with Monolog in Symfony2.2?

I would like to use Monolog in symfony2 application for logging, but my question is how can I split the file every day instead of appending to the same file? I would like my log file to be somthing like…
1
vote
1 answer

Token not found when redirect user based on Roles

I have this security.yml file: ... security: encoders: Trainme\RestBundle\Document\User: id: security.encoder.blowfish role_hierarchy: ROLE_TRAINER: ROLE_USER ROLE_ADMIN: ROLE_TRAINER …
Permana
  • 1,972
  • 2
  • 33
  • 51
1
vote
1 answer

Extra authentication criteria

I'm trying to implement an extra authentication layer with the purpose of authenticating the user only if he has a certain status. If the status is different, I want to show a custom login error (Your account has been suspended) and not authenticate…
duxdeorum
  • 11
  • 2
1
vote
1 answer

Error updating Symfony on Composer

I cloned a git project, then run composer update command, I got this error message on composer: - Installing symfony/symfony (v2.2.4) Downloading: 100% [UnexpectedValueException] …
Permana
  • 1,972
  • 2
  • 33
  • 51
1
vote
1 answer

Eventlistener preUpdate embedded Form

I have an preUpdate Eventlistener on an Entitychild in my embedded Form. I can change the attribute related to my entity: public function preUpdate(LifecycleEventArgs $eventArgs) { $entity = $eventArgs->getEntity(); $em =…
ChrisS
  • 736
  • 2
  • 8
  • 21
1
vote
2 answers

How to set default locale in web root route (/)?

I have a symfony2 web that I am trying to internationalize. I have routes with /en and /es prefix, but I want sf2 to get a default language if there is no language specified in url. I defined a root route with this parameters: home: [...] …
1
vote
1 answer

Cannot load doctrine:config , services.xml

I am trying to build an eventlistener for my project and followed the instruction of this guide: How to register eventlisteners I edited my services.xml like in the tutorial , but i get this error message, when i want to test…
ChrisS
  • 736
  • 2
  • 8
  • 21
1
vote
1 answer

Compare data after form request , embedded forms

I have a multiple embedded Form. My first form holds a collection of Articles: $builder->add('purchaseOrders', 'collection', array('type' => new AmountOrderArticleType())); And this form holds a collection of…
ChrisS
  • 736
  • 2
  • 8
  • 21