symfony-2.5

'FOS\UserBundle\FOSUserBundle' not found

為{幸葍}努か 提交于 2019-12-08 04:30:42
问题 in symfony 2.5 I want use FOSUserBundle, I do any steps in github and when try to update schema see this error Fatal error: Class 'FOS\UserBundle\FOSUserBundle' not found in /opt/lampp/htdocs/symfonyTest/app/AppKernel.php on line 23 FOSUserBundle is in vendor/friendsofsymfony/user-bundle/FOS this is my AppKernel $bundles = array( //... other bundles new FOS\UserBundle\FOSUserBundle(), ); and my app/config/config.yml fos_user: db_driver: orm # other valid values are 'mongodb', 'couchdb' and

'FOS\\UserBundle\\FOSUserBundle' not found

只愿长相守 提交于 2019-12-07 23:40:29
in symfony 2.5 I want use FOSUserBundle, I do any steps in github and when try to update schema see this error Fatal error: Class 'FOS\UserBundle\FOSUserBundle' not found in /opt/lampp/htdocs/symfonyTest/app/AppKernel.php on line 23 FOSUserBundle is in vendor/friendsofsymfony/user-bundle/FOS this is my AppKernel $bundles = array( //... other bundles new FOS\UserBundle\FOSUserBundle(), ); and my app/config/config.yml fos_user: db_driver: orm # other valid values are 'mongodb', 'couchdb' and 'propel' firewall_name: main user_class: Acme\StoreBundle\Entity\User my app/config/security.yml security

Symfony2 array of forms?

心不动则不痛 提交于 2019-12-04 13:31:08
问题 Is it possible to create and render and array of forms I know about collections but they don't really fit in my idea? What I want is something like this Controller $data=$em->findAll(); $Forms=$this->createForm(new SomeType,$data); return $this->render(someView,array("Forms"=>$Forms->createView())); Twig {% for Form in Forms %} {{ form(Form)}} {% endfor %} 回答1: Just create your forms in array: $data = $em->findAll(); for ($i = 0; $i < $n; $i++) { $forms[] = $this->container ->get('form

Symfony 2.5.3 and PHP 5.6.0: incompatibility issues?

ⅰ亾dé卋堺 提交于 2019-12-04 12:01:58
问题 I don't know if this is a Symfony issue or a FOSUserBundle issue so I'll report here and hope get some help. I have two development instances: CentOS 6.5, PHP 5.5.16, MySQL 5.5.37 CentOS 7, PHP 5.6.0, MariaDB 5.5.37 I tried the same project in both instances and by same project I mean the same: copied without any vendor and in both instances run "composer update" at first. After composer updates the vendor I tried to access admin area, which is handled by, FOSUserBundle and surprise in the

Prevent simultaneous user sessions in Symfony2

元气小坏坏 提交于 2019-12-03 12:53:13
问题 The goal We are providing a client with a solution for a multiple-choice practice system where students pay for a monthly membership in order to test their knowledge and prepare for medical-related examinations. A major issue with providing this solution in Symfony2 is that students can buy one subscription, share their credentials with classmates and colleagues, and split the cost of the subscription over multiple concurrent logins. In order to minimize this problem, we wish to prevent more

Symfony2 array of forms?

末鹿安然 提交于 2019-12-03 08:41:15
Is it possible to create and render and array of forms I know about collections but they don't really fit in my idea? What I want is something like this Controller $data=$em->findAll(); $Forms=$this->createForm(new SomeType,$data); return $this->render(someView,array("Forms"=>$Forms->createView())); Twig {% for Form in Forms %} {{ form(Form)}} {% endfor %} Just create your forms in array: $data = $em->findAll(); for ($i = 0; $i < $n; $i++) { $forms[] = $this->container ->get('form.factory') ->createNamedBuilder('form_'.$i, new SomeType, $data) ->getForm() ->createView(); } return $this->render

Prevent simultaneous user sessions in Symfony2

若如初见. 提交于 2019-12-03 03:54:37
The goal We are providing a client with a solution for a multiple-choice practice system where students pay for a monthly membership in order to test their knowledge and prepare for medical-related examinations. A major issue with providing this solution in Symfony2 is that students can buy one subscription, share their credentials with classmates and colleagues, and split the cost of the subscription over multiple concurrent logins. In order to minimize this problem, we wish to prevent more than one simultaneous session from being maintained in our Symfony2 project. Research Massive amounts

[PDOException]: SQLSTATE[28000] [1045] Access denied for user 'root'@'localhost' (using password: NO) Symfony2

折月煮酒 提交于 2019-12-02 06:09:46
问题 I tried to create my DB with Symfony2. I used the command: php app/console doctrine:create:database The result is: [PDOException] : SQLSTATE[28000] [1045] Access denied for user 'root'@'localhost' (using password: NO) This is my parameters.yml parameters: database_driver: pdo_mysql database_host: 127.0.0.1 database_port: null database_name: symfony database_user: root database_password: null mailer_transport: smtp mailer_host: 127.0.0.1 mailer_user: null mailer_password: null locale: en

Symfony calls the PHP garbage collector on Ubuntu 14.04 even when session.gc_probability is set to 0

放肆的年华 提交于 2019-11-29 20:45:52
As the title state for some reason my Symfony 2.5 Application is calling the php garbage collector even when all of my php.ini files have: session.gc_probability = 0 Does anyone know how to prevent this from happening? Error message im getting: Notice: SessionHandler::gc(): ps_files_cleanup_dir: opendir(/var/lib/php5) failed: Permission denied (13) in /<path-to-my-site>/var/cache/dev/classes.php line 432 FROM PHPINFO(): Directive Local Value Master Value session.gc_divisor 1000 1000 session.gc_maxlifetime 86400 86400 session.gc_probability 0 0 I know that i can just give the www-data user

How to split validation yaml files in Symfony 2.5?

心已入冬 提交于 2019-11-28 10:17:59
This code worked for Symfony 2.4.5 but it is not working for Symfony 2.5: This is my HRAPI Extension class that was working in Symfony 2.4.5 but not in Symfony 2.5 <?php namespace HardCoreMore\HRAPIBundle\DependencyInjection; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\Config\FileLocator; use Symfony\Component\HttpKernel\DependencyInjection\Extension; use Symfony\Component\DependencyInjection\Loader; /** * This is the class that loads and manages your bundle configuration * * To learn more see {@link http://symfony.com/doc/current/cookbook/bundles