Re: [symfony-users] [Symfony2 - Beta2] @extra annotations - what is the new format?

2011-05-23 Thread keymaster
Matt,

it may work without the "as", didn't try it, but figured the syntax would be 
consistent with the ORM and Assert syntax.
Thanks again for your help.

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] [sf2][form] - embed a form within an embedded form

2011-05-23 Thread jdewit
For instance, a quiz has many questions, a question has many options. 

I want to be able to add a many questions dynamically to the quiz form and 
then add a question options to those questions. 

Right now, symfony2 doesn't like it when I put a collection within a 
collection. Is this possible?

Thanks for any help!




-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Doctrine doesn't free up memory after transaction commit

2011-05-23 Thread mohdshakir
I fixed my problem, by freeing up the objects;

http://www.doctrine-project.org/projects/orm/1.2/docs/manual/improving-performance/en#free-objects

On May 22, 11:41 pm, Galou  wrote:
> Few years ago, I remember I meet the same problem in a database
> migration script.
> The problem was coming from the xdebug module. I don't know how this
> module work but it was making the script growing up in the memory.
> The problem was resolved by disabling the xdebug module.
>
> On 21 mai, 16:55, mohdshakir  wrote:
>
>
>
>
>
>
>
> > Can you elaborate?
>

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: null data in form - using the Event System

2011-05-23 Thread Roger Webb
For the benefit of the list.

>From Chris Wallsmith (thanks):

---
Every form starts with a call to setData(null)
https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Form/Form.php#L227

Adding a if (null === $data) return; condition to your listener would
probably fix it.

---

That fixes it.

Roger


On May 23, 3:28 pm, Roger Webb  wrote:
> This worked in beta1 but not in beta2 [seems to be a theme today :
> (  ]   This was Berhard's nifty solution to my AJAX city/state
> problem.
>
> I print_r()'d the array ($realtor_search_params) and it is indeed
> populated with data (an associative array), but I get the following
> exception when I run it:
>
> "Warning: array_key_exists() expects parameter 2 to be array, null
> given ..."
>
> Did something change in the event (or form) system?
>
> From Controller:
>
>         $realtor_search_form = $this->get('form.factory')->create(new
> RealtorSearchType(), $realtor_search_params);
>
> From RealtorSearchType:
>
>         $builder->addEventListener(Events::preSetData, function
> (DataEvent $event) use ($refreshCity) {
>             $data = $event->getData();
>
>             if(array_key_exists('state', $data))  // ERROR IS HERE,
> $data is null
>                 $refreshCity($event->getForm(), $data['state']);
>         });

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] [Symfony2] Reduce coupling in entities

2011-05-23 Thread Problematic
I'm looking for an appropriate way to reduce coupling in a messaging bundle 
I'm writing, so that I can easily use it between applications.

Each instance of the Message entity should have a sender and a recipient, 
instanceof Symfony\Component\Security\Core\User\UserInterface, which I can 
require just fine in the setters for the properties. However, in setting up 
the ORM relationships, it seems that I have to specifically set a 
targetEntity (Foo\BarBundle\Entity\User, for example), which means that all 
further uses of the Message entity in different applications will either 
require a code change, or shoehorn them into using a User entity, which 
doesn't seem to me to be in a messaging bundle's scope to require.

Any suggestions/best practices on how I can reduce coupling in this 
instance?

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: SF2 Forms - form_rest() renders fields already rendered with form_widget

2011-05-23 Thread Roger Webb
done

On May 23, 3:27 pm, Donald Tyler  wrote:
> I would suggest creating this as an issue on github.
>
>
>
>
>
>
>
> On Mon, May 23, 2011 at 3:25 PM, pzwosta  wrote:
> > Hi,
>
> > I have the same problem since BETA 2:
>
> >     public function buildForm(FormBuilder $builder, array $options)
> >     {
> >         $builder->add('firstname', 'text');
> >         $builder->add('lastname', 'text');
> >         $builder->add('email', 'text');
> >         $builder->add('password', 'repeated', array('type' => 'password'));
> >     }
>
> > ...
> >   label($form['password']['first'], 'Pw:')
> > ?>
> >   widget($form['password']['first']) ?>
> >  
> >    label($form['password']['second'], 'Repeat
> > Pw:') ?>
> >   widget($form['password']['second']) ?>
> > ...
> >   rest($form) ?>  -->> Both of the password Input
> > fields are rendered again. I'd expect only the token to be rendered.
>
> > regards Peter
>
> >  --
> > If you want to report a vulnerability issue on symfony, please send it to
> > security at symfony-project.com
>
> > You received this message because you are subscribed to the Google
> > Groups "symfony users" group.
> > To post to this group, send email to symfony-users@googlegroups.com
> > To unsubscribe from this group, send email to
> > symfony-users+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/symfony-users?hl=en

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] null data in form - using the Event System

2011-05-23 Thread Roger Webb
This worked in beta1 but not in beta2 [seems to be a theme today :
(  ]   This was Berhard's nifty solution to my AJAX city/state
problem.

I print_r()'d the array ($realtor_search_params) and it is indeed
populated with data (an associative array), but I get the following
exception when I run it:

"Warning: array_key_exists() expects parameter 2 to be array, null
given ..."

Did something change in the event (or form) system?

>From Controller:

$realtor_search_form = $this->get('form.factory')->create(new
RealtorSearchType(), $realtor_search_params);

>From RealtorSearchType:

$builder->addEventListener(Events::preSetData, function
(DataEvent $event) use ($refreshCity) {
$data = $event->getData();

if(array_key_exists('state', $data))  // ERROR IS HERE,
$data is null
$refreshCity($event->getForm(), $data['state']);
});

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] Aw: SF2 Forms - form_rest() renders fields already rendered with form_widget

2011-05-23 Thread Donald Tyler
I would suggest creating this as an issue on github.

On Mon, May 23, 2011 at 3:25 PM, pzwosta  wrote:

> Hi,
>
> I have the same problem since BETA 2:
>
> public function buildForm(FormBuilder $builder, array $options)
> {
> $builder->add('firstname', 'text');
> $builder->add('lastname', 'text');
> $builder->add('email', 'text');
> $builder->add('password', 'repeated', array('type' => 'password'));
> }
>
> ...
>   label($form['password']['first'], 'Pw:')
> ?>
>   widget($form['password']['first']) ?>
>  
>label($form['password']['second'], 'Repeat
> Pw:') ?>
>   widget($form['password']['second']) ?>
> ...
>   rest($form) ?>  -->> Both of the password Input
> fields are rendered again. I'd expect only the token to be rendered.
>
> regards Peter
>
>  --
> If you want to report a vulnerability issue on symfony, please send it to
> security at symfony-project.com
>
> You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> To post to this group, send email to symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en
>

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] Re: Need Help to Install Symfony

2011-05-23 Thread Donald Tyler
You need to setup aliases in the apache configuration file for your site.
The images used by Symfony are not stored in the public web folder, so you
need aliases to instruct apache where to find them.

See this  page for
more info.

The section to pay particular attention to is:

  Alias /sf /home/sfprojects/jobeet/lib/vendor/symfony/data/web/sf
  
AllowOverride All
Allow from All
  


On Mon, May 23, 2011 at 12:44 PM, Chinthaka Rukshan Weerakkody <
chinthakaruks...@gmail.com> wrote:

>
> Anyone out there to help me...
>
>
> --
> Chinthaka Rukshan
> Department of Computer Science and Engineering,
> University of Moratuwa,
> Sri Lanka.
>
> --
> If you want to report a vulnerability issue on symfony, please send it to
> security at symfony-project.com
>
> You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> To post to this group, send email to symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en
>

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Aw: SF2 Forms - form_rest() renders fields already rendered with form_widget

2011-05-23 Thread pzwosta
Hi,

I have the same problem since BETA 2:

public function buildForm(FormBuilder $builder, array $options)
{
$builder->add('firstname', 'text');
$builder->add('lastname', 'text');
$builder->add('email', 'text');
$builder->add('password', 'repeated', array('type' => 'password'));
}

...
  label($form['password']['first'], 'Pw:') 
?>
  widget($form['password']['first']) ?>
   
   label($form['password']['second'], 'Repeat 
Pw:') ?>
  widget($form['password']['second']) ?>
...
  rest($form) ?>  -->> Both of the password Input 
fields are rendered again. I'd expect only the token to be rendered.

regards Peter

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] Migrating Propel schema to Doctrine

2011-05-23 Thread Donald Tyler
You *can* use the yaml files in Symfony 2, but they'll need to be updated
for Doctrine 2, which is now used.

This page has information on using ORM in Symfony 2:

http://symfony.com/doc/current/book/doctrine/orm.html

One key thing that's different is that in Symfony 1, you would generate PHP
classes from the yaml files, but in Symfony 2, you typically don't (although
you *can*). In Symfony 2, you would normally write PHP POJO's yourself, and
either annotate them, or define the ORM metadata via XML or Yaml files.

On Mon, May 23, 2011 at 2:41 PM, Esdras Beleza wrote:

> Hi folks,
>
> I'm studying Symfony 2 and porting a very old Symfony 1.0 project. My first
> step is trying to recognize the code can I reuse and the code I can't.
>
> I have an YAML file in Propel format that defines the entities and the
> database schema. Is there any way I could use it on Symfony 2, any tool to
> convert the schema to Doctrine, something that could help me? :) Any tip is
> very welcome.
>
> Thanks in advance,
>
> Esdras
>
> --
> http://www.esdrasbeleza.com
>
> --
> If you want to report a vulnerability issue on symfony, please send it to
> security at symfony-project.com
>
> You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> To post to this group, send email to symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en
>

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Re : Symfony2 Object Route like in Symfony 1

2011-05-23 Thread dustin10
It is provided in the FrameworkExtraBundle. Look at the ParamConverter 
annotation.

Dustin

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Migrating Propel schema to Doctrine

2011-05-23 Thread Esdras Beleza
Hi folks,

I'm studying Symfony 2 and porting a very old Symfony 1.0 project. My first
step is trying to recognize the code can I reuse and the code I can't.

I have an YAML file in Propel format that defines the entities and the
database schema. Is there any way I could use it on Symfony 2, any tool to
convert the schema to Doctrine, something that could help me? :) Any tip is
very welcome.

Thanks in advance,

Esdras

--
http://www.esdrasbeleza.com

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] Re: @extra annotations - what is the new format?

2011-05-23 Thread Matt Robinson
Really? Odd, works for me without the "as". 

Oh well, if it breaks, I'll know what to do. Ta. :)

On 23 May 2011, at 18:39, keymaster wrote:

> Actually the correct form of the uses is (so you can use the shorted @Route 
> instead of the long pathname):
> 
> use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route as Route;
> use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template as Template;
> use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter as 
> ParamConverter; 
> 
> 
> -- 
> If you want to report a vulnerability issue on symfony, please send it to 
> security at symfony-project.com
>  
> You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> To post to this group, send email to symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Need Help to Install Symfony

2011-05-23 Thread Chinthaka Rukshan Weerakkody
Anyone out there to help me...

-- 
Chinthaka Rukshan
Department of Computer Science and Engineering,
University of Moratuwa,
Sri Lanka.

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] [Symfony2 - Beta2] @extra annotations - what is the new format?

2011-05-23 Thread Rigoberto Reyes sv
* The annotation parsing process has been changed (it now uses Doctrine Common
  3.0). All annotations which are used in a class must now be imported (just
  like you import PHP namespaces with the "use" statement):

  Before:

/**
 * @orm:Entity
 */
class MyUser
{
/**
 * @orm:Id
 * @orm:GeneratedValue(strategy = "AUTO")
 * @orm:Column(type="integer")
 * @var integer
 */
private $id;

/**
 * @orm:Column(type="string", nullable=false)
 * @assert:NotBlank
 * @var string
 */
private $name;
}
  After:

use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;

/**
 * @ORM\Entity
 */
class MyUser
{
/**
 * @ORM\Id
 * @ORM\GeneratedValue(strategy="AUTO")
 * @ORM\Column(type="integer")
 *
 * @var integer
 */
private $id;

/**
 * @ORM\Column(type="string", nullable=false)
 * @Assert\NotBlank
 *
 * @var string
 */
private $name;
}



2011/5/23 keymaster 

> I've switched everything over to @ORM\ and @Assert\
>
> But not sure what the proper replacement is for @extra.
>
> Does it need to be changed also?
>
> If so, what class should we"use" ?
> What should the new annotation form look like?
>
> Getting this error (worked fine in beta1):
>
> [1/2] AnnotationException: [Semantical Error] The annotation
> "@extra:Route" in method
> WCCore\StaticPagesBundle\Controller\StaticPagesController::displayAction()
> was never imported.
>
> --
> If you want to report a vulnerability issue on symfony, please send it to
> security at symfony-project.com
>
> You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> To post to this group, send email to symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en
>

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re : Doctrine generate entities base path error

2011-05-23 Thread arnobeck.sdv
I've found.
A bundle cannot be a symbolic link.
Too bad.

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Doctrine generate entities base path error

2011-05-23 Thread arnobeck.sdv
Hello,

When I do doctrine:generate:entities, I get : 

Can't find base path for "SdvMonitoringBundle" (path: 
".../src/Sdv/MonitoringBundle", destination: 
".../src/Sdv/MonitoringBundle").

Please help me.
I'm migrating from Beta1 to Beta2.

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] [Symfony2] Custom Authentication Provider

2011-05-23 Thread robertoNR
Hi to all,
 I am new about Symfony2, I started using it about a month ago, and I
have never used Symfony(1).
I must authenticate users from ActiveDirectory so I must write my own
AuthenticationProvider, I guess.
I have already seen opensky/LdapBundle but only UserProvider is
provided by this bundle but, not AuthenticationProvider.
Has anyone somewhat basic documentation? Some examples? Some links?

Thanks,
Roberto.

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Problem with URL rewriting in htaccess

2011-05-23 Thread stephdemars
Hello everybody!

I have a problem in my prod server. All my post requests don't work
because of the URL rewriting.
Indeed, when I submit a form, I have an error page whereas if I add "/
index.php/" in the route of the action called when I submit, it works.
I don't know why I have this problem because I tried a lot of things
in my htaccess in vain.
Normally it should work with RewriteRule ^(.*)$ /index.php [QSA,L]
shouldn't it?

Someone knows what could be the problem?

Thank you so much :)

Stéphane

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Need Help to Install Symfony

2011-05-23 Thread Chinthaka Rukshan Weerakkody
Hi all,

I installed symfony in ubuntu in the /var/www/SymfonyProjects directory.I
created a /lib/vendor directory in the SymfonyProjects directory and kept
the symfony zip folder and extract it inside it and installed it as
described in the
http://www.symfony-project.org/getting-started/1_4/en/05-Web-Server-Configuration
tutorial.
after installing when I try
http://localhost/SymphonyProjects/web/frontend_dev.php i browser it shows me
the "Symfony project created" page in a white page without any images
loading. I installed symfony in Ubuntu and can anyone please tell me what
code lines should I place in the /etc/apache2/httpd.conf. What else do I
need to do to work symfony fine in the system.


Thank You.




-- 
Chinthaka Rukshan
Department of Computer Science and Engineering,
University of Moratuwa,
Sri Lanka.

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Jobeet Day 1, problem with http://www.jobeet.com.localhost/frontend_dev.php/

2011-05-23 Thread Piotr Szczepański
I try access http://www.jobeet.com.localhost/frontend_dev.php/
 and get:

Notice: require_once(): 1. h->opened_path=[/home/sfprojects/jobeet/lib/
vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/debug/
sfWebDebugPanelDoctrine.class.php] h->filename=[/home/sfprojects/
jobeet/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/debug/
sfWebDebugPanelDoctrine.class.php] in /home/sfprojects/jobeet/lib/
vendor/symfony/lib/plugins/sfDoctrinePlugin/config/
sfDoctrinePluginConfiguration.class.php on line 35 Notice:
require_once(): apc_cache_find [15935513] in /home/sfprojects/jobeet/
lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/config/
sfDoctrinePluginConfiguration.class.php on line 35 Notice:
require_once(): 1. h->opened_path=[/home/sfprojects/jobeet/lib/vendor/
symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/
Core.php] h->filename=[/home/sfprojects/jobeet/lib/vendor/symfony/lib/
plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Core.php] in /
home/sfprojects/jobeet/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/
config/sfDoctrinePluginConfiguration.class.php on line 42 Notice:
require_once(): apc_cache_find [16042109] in /home/sfprojects/jobeet/
lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/config/
sfDoctrinePluginConfiguration.class.php on line 42 Notice: require():
1. h->opened_path=[null] h->filename=[/home/sfprojects/jobeet/lib/
vendor/symfony/lib/util/sfContext.class.php] in /home/sfprojects/
jobeet/lib/vendor/symfony/lib/autoload/sfCoreAutoload.class.php on
line 100 Notice: require(): apc_cache_find [14772479] in /home/
sfprojects/jobeet/lib/vendor/symfony/lib/autoload/
sfCoreAutoload.class.php on line 100 Notice: require(): 1. h-
>opened_path=[null] h->filename=[/home/sfprojects/jobeet/lib/vendor/
symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/
Manager.php] in /home/sfprojects/jobeet/lib/vendor/symfony/lib/plugins/
sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Core.php on line 1130
Notice: require(): apc_cache_find [16042073] in /home/sfprojects/
jobeet/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/
doctrine/Doctrine/Core.php on line 1130 Notice: require(): 1. h-
>opened_path=[null] h->filename=[/home/sfprojects/jobeet/lib/vendor/
symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/
Configurable.php] in /home/sfprojects/jobeet/lib/vendor/symfony/lib/
plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Core.php on line
1130 Notice: require(): apc_cache_find [16042096] in /home/sfprojects/
jobeet/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/
doctrine/Doctrine/Core.php on line 1130 Notice: require(): 1. h-
>opened_path=[null] h->filename=[/home/sfprojects/jobeet/lib/vendor/
symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/
Locator/Injectable.php] in /home/sfprojects/jobeet/lib/vendor/symfony/
lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Core.php on
line 1130 Notice: require(): apc_cache_find [7049643] in /home/
sfprojects/jobeet/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/
vendor/doctrine/Doctrine/Core.php on line 1130 Fatal error: Class
'Doctrine_Manager' not found in /home/sfprojects/jobeet/lib/vendor/
symfony/lib/plugins/sfDoctrinePlugin/config/
sfDoctrinePluginConfiguration.class.php on line 0

 http://www.jobeet.com.localhost/ works fine. If I change in web/
frontend_dev.php
$configuration =
ProjectConfiguration::getApplicationConfiguration('frontend', 'dev',
true);
sfContext::createInstance($configuration)->dispatch();

to

$configuration =
ProjectConfiguration::getApplicationConfiguration('frontend', 'dev',
FALSE);
sfContext::createInstance($configuration)->dispatch();

i works, but I can not debug my application.

Anyone help?

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] app.php in prod generates blank page

2011-05-23 Thread abunet
HI,
I've installed symfony beta1 on a windows environment (apache 2.2.17
and php 5.3.6)
The demo app works fine in app_dev mode, and also in app prod mode
with debug = true ($kernel = new AppKernel('prod', true);)

if I keep default prod mode:
$kernel = new AppKernel('prod', true);
the result is a blank page.
to debug the problem, I've added ini_set('display_errors', 1); and I
retrieve the following error:

Fatal error: Uncaught exception 'UnexpectedValueException' with
message 'The stream could not be opened, "C:\www\Symfony\app/logs/
prod.log" may be an invalid url.' in C:\www\symfony.local\vendor
\monolog\src\Monolog\Handler\StreamHandler.php on line 67
UnexpectedValueException: The stream could not be opened, "C:\www
\Symfony\app/logs/prod.log" may be an invalid url. in C:\www
\symfony.local\vendor\monolog\src\Monolog\Handler\StreamHandler.php on
line 67 Call Stack: 0.0275 330672 1. {main}() C:\www\symfony.local\web
\app.php:0 8.8634 650432 2. Symfony\Component\HttpKernel\Kernel-
>handle(???, ???, ???) C:\www\symfony.local\web\app.php:16 8.8689
757232 3. Symfony\Bundle\FrameworkBundle\HttpKernel-
>handle(???, ???, ???) C:\www\symfony.local\app\bootstrap.php.cache:
613

I think that the problem is the following path:
C:\www\Symfony\app/logs/prod.log
the correct path should be:
C:\www\symfony.local\app\logs\prod.log

Any Ideas?
Thanks
Marco Roello

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Re : Symfony2 Object Route like in Symfony 1

2011-05-23 Thread Richtermeister
We can't have a custom route class that is smart enough to convert
objects to params and vice versa?

Daniel


On May 23, 6:41 am, Christophe Willemsen
 wrote:
> Hi Ben,
>
> I know it is pitty that the previous feature is away !
>
> You could however, add a getRoutingArray() to your object, which returns the
> array of parameters needed. You could then create a route like this:
>
> {{ path('blog_show', blog.routingArray) }}
>
> Christophe

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Access DI contaier in twig layout

2011-05-23 Thread umpirsky
Fixed with:

twig:
globals:
globalMeta: "@myMetaService"

On May 23, 3:40 pm, umpirsky  wrote:
> I want to have html meta data configurable in my project. I have my
> custom service which holds this information (page title, keywords,
> description...). So I want to access them in my layout.
>
> How can I achieve this?

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: SF2 Beta2 - Date Field (3 Text Boxes instead of 1)

2011-05-23 Thread umpirsky
I overrided block date_widget like this:

{% block date_widget %}
{% spaceless %}
{% if widget == 'text' %}
{{ block('text_widget') }}
{% else %}

{{ date_pattern|replace({
'{{ year }}': form_widget(form.year),
'{{ month }}': form_widget(form.month),
'{{ day }}': '',
})|raw }}

{% endif %}
{% endspaceless %}
{% endblock date_widget %}

and it works, but not very sophisticated way.
i thought I can do it with pattern option, but no luck..

On May 23, 8:56 pm, Roger Webb  wrote:
> Not that I'm aware of.  One possible solution would be to use Jquery
> to render it invisible (or render the three fields individually and
> set us the 'attr' parameter to mark it as invisible.  Either way you
> would set a default value for the day.
>
> Not sure if that's the best solution, but either one should work.
>
> On May 23, 1:35 pm, umpirsky  wrote:
>
>
>
>
>
>
>
> > Can I render only year and month? Useful for credit cards for example.
>
> > On May 23, 8:11 pm, Roger Webb  wrote:
>
> > > It's in the update doc and I'm having a severe case of the mondays.
>
> > > "Form: Renamed option value "text" of "widget" option of the "date"
> > > type was renamed to "single-text". "text" indicates to use separate
> > > text boxes now (like for the "time" type)."
>
> > > On May 23, 1:01 pm, Roger Webb  wrote:
>
> > > > From the "date" field documentation:
> > > > "The field can be rendered as a single text box or three select boxes
> > > > (month, day, and year)."
>
> > > > I'm not seeing an option for "3 Text Boxes", it rendered as a single
> > > > text field before which made it work nice with JQuery UI Datepicker.
>
> > > > Perhaps the documentation is out of date.  Is there a way to make it
> > > > render as one field?
>
> > > > Roger

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] SF2 Beta2: Problem after updating: Interface 'Doctrine\Common\Annotations\Reader' not found

2011-05-23 Thread Skaldrom Y. Sarg
I would be very glad if someone could help me with the following
problem. Thanks a lot on advance.

After updating to Beta2, updating the files, cache clearing and
restarting I have the following error:

skaldrom@skathe:/var/www/starcs/trunk/code$ app/console
doctrine:schema:drop --force
PHP Fatal error:  Interface 'Doctrine\Common\Annotations\Reader' not
found in /var/www/starcs/trunk/code/vendor/symfony/src/Symfony/Bundle/
DoctrineBundle/Annotations/IndexedReader.php on line 15
PHP Stack trace:
PHP   1. {main}() /var/www/starcs/trunk/code/app/console:0
PHP   2. Symfony\Component\Console\Application->run() /var/www/starcs/
trunk/code/app/console:16
PHP   3. Symfony\Bundle\FrameworkBundle\Console\Application->doRun() /
var/www/starcs/trunk/code/vendor/symfony/src/Symfony/Component/Console/
Application.php:119
PHP   4. Symfony\Component\Console\Application->doRun() /var/www/
starcs/trunk/code/vendor/symfony/src/Symfony/Bundle/FrameworkBundle/
Console/Application.php:75
PHP   5. Symfony\Component\Console\Command\Command->run() /var/www/
starcs/trunk/code/vendor/symfony/src/Symfony/Component/Console/
Application.php:193
PHP   6. Symfony\Bundle\DoctrineBundle\Command\Proxy
\DropSchemaDoctrineCommand->execute() /var/www/starcs/trunk/code/
vendor/symfony/src/Symfony/Component/Console/Command/Command.php:188
PHP   7. Symfony\Bundle\DoctrineBundle\Command\Proxy
\DoctrineCommandHelper::setApplicationEntityManager() /var/www/starcs/
trunk/code/vendor/symfony/src/Symfony/Bundle/DoctrineBundle/Command/
Proxy/DropSchemaDoctrineCommand.php:57
PHP   8. Symfony\Bundle\DoctrineBundle\Registry->getEntityManager() /
var/www/starcs/trunk/code/vendor/symfony/src/Symfony/Bundle/
DoctrineBundle/Command/Proxy/DoctrineCommandHelper.php:33
PHP   9. Symfony\Component\DependencyInjection\Container->get() /var/
www/starcs/trunk/code/vendor/symfony/src/Symfony/Bundle/DoctrineBundle/
Registry.php:106
PHP  10. appDevProjectContainer-
>getDoctrine_Orm_DefaultEntityManagerService() /var/www/starcs/trunk/
code/app/bootstrap.php.cache:110
PHP  11. Symfony\Component\ClassLoader\UniversalClassLoader-
>loadClass() /var/www/starcs/trunk/code/app/bootstrap.php.cache:0
PHP  12. require() /var/www/starcs/trunk/code/app/bootstrap.php.cache:
2073

This Interface is called from the cachefiles:
app/cache/dev/appDevDebugProjectContainer.xml
app/cache/dev/appDevDebugProjectContainer.php

Did I miss a change?

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: SF2 Beta2 - Date Field (3 Text Boxes instead of 1)

2011-05-23 Thread Roger Webb
Not that I'm aware of.  One possible solution would be to use Jquery
to render it invisible (or render the three fields individually and
set us the 'attr' parameter to mark it as invisible.  Either way you
would set a default value for the day.

Not sure if that's the best solution, but either one should work.

On May 23, 1:35 pm, umpirsky  wrote:
> Can I render only year and month? Useful for credit cards for example.
>
> On May 23, 8:11 pm, Roger Webb  wrote:
>
>
>
>
>
>
>
> > It's in the update doc and I'm having a severe case of the mondays.
>
> > "Form: Renamed option value "text" of "widget" option of the "date"
> > type was renamed to "single-text". "text" indicates to use separate
> > text boxes now (like for the "time" type)."
>
> > On May 23, 1:01 pm, Roger Webb  wrote:
>
> > > From the "date" field documentation:
> > > "The field can be rendered as a single text box or three select boxes
> > > (month, day, and year)."
>
> > > I'm not seeing an option for "3 Text Boxes", it rendered as a single
> > > text field before which made it work nice with JQuery UI Datepicker.
>
> > > Perhaps the documentation is out of date.  Is there a way to make it
> > > render as one field?
>
> > > Roger

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] SF2 Forms - form_rest() renders fields already rendered with form_widget

2011-05-23 Thread Roger Webb
I have several cases where, due to some picky spacing issues, I have
rendered fields manually with form_widget.

For instance:

  First Name: {{ form_widget(borrower_search_form.first_name, { 'required':
false }) }}

In beta1, I could call form_rest() and it would behave as ( I )
expected.  In beta2, if I rendered the field in this manner,
form_rest() will re-render all of these fields at the bottom of my
form.

Is there a better way to go about this?  (or a way to "mark" it as
already rendered)

Roger

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Twig Debug extension

2011-05-23 Thread Rytis Daugirdas
Hello,

If I enable the Debug extension and add {% debug %} in a template, it
either makes the page not load at all (blank) or run out of memory.
What could be the problem?

I'm on Windows 7, PHP 5.3.6.

Thanks,
Rytis

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: SF2 Beta2 - Date Field (3 Text Boxes instead of 1)

2011-05-23 Thread umpirsky
Can I render only year and month? Useful for credit cards for example.

On May 23, 8:11 pm, Roger Webb  wrote:
> It's in the update doc and I'm having a severe case of the mondays.
>
> "Form: Renamed option value "text" of "widget" option of the "date"
> type was renamed to "single-text". "text" indicates to use separate
> text boxes now (like for the "time" type)."
>
> On May 23, 1:01 pm, Roger Webb  wrote:
>
>
>
>
>
>
>
> > From the "date" field documentation:
> > "The field can be rendered as a single text box or three select boxes
> > (month, day, and year)."
>
> > I'm not seeing an option for "3 Text Boxes", it rendered as a single
> > text field before which made it work nice with JQuery UI Datepicker.
>
> > Perhaps the documentation is out of date.  Is there a way to make it
> > render as one field?
>
> > Roger

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: SF2 Beta2 - Date Field (3 Text Boxes instead of 1)

2011-05-23 Thread Roger Webb
It's in the update doc and I'm having a severe case of the mondays.

"Form: Renamed option value "text" of "widget" option of the "date"
type was renamed to "single-text". "text" indicates to use separate
text boxes now (like for the "time" type)."

On May 23, 1:01 pm, Roger Webb  wrote:
> From the "date" field documentation:
> "The field can be rendered as a single text box or three select boxes
> (month, day, and year)."
>
> I'm not seeing an option for "3 Text Boxes", it rendered as a single
> text field before which made it work nice with JQuery UI Datepicker.
>
> Perhaps the documentation is out of date.  Is there a way to make it
> render as one field?
>
> Roger

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] SF2 Beta2 - Date Field (3 Text Boxes instead of 1)

2011-05-23 Thread Roger Webb
>From the "date" field documentation:
"The field can be rendered as a single text box or three select boxes
(month, day, and year)."

I'm not seeing an option for "3 Text Boxes", it rendered as a single
text field before which made it work nice with JQuery UI Datepicker.

Perhaps the documentation is out of date.  Is there a way to make it
render as one field?

Roger

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Cache for multiple environments generated

2011-05-23 Thread Rytis Daugirdas
I figured that out. Requests to non-existant files are routed to the
prod controller, so that triggered prod cache initialization.

On May 23, 8:43 pm, Rytis Daugirdas  wrote:
> Hello,
>
> I'm playing with symfony2 beta2 right now and I've noticed that if I
> load the dev environment on empty cache, symfony generates caches for
> both dev and prod environments. Why? Is this expected behaviour?
>
> Rytis

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Cache for multiple environments generated

2011-05-23 Thread Rytis Daugirdas
Hello,

I'm playing with symfony2 beta2 right now and I've noticed that if I
load the dev environment on empty cache, symfony generates caches for
both dev and prod environments. Why? Is this expected behaviour?

Rytis

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: notice: serialize() __sleep

2011-05-23 Thread Roger Webb
Issue has been resolved.  I had a DateTime in there that I hadn't
converted to a string.  For anyone else's benefit that may stumble
upon this, here's some relevant code snippets that worked out for me:

Class Declaration

class Users implements UserInterface, \Serializable {

Serialize/Unserialize Methods (Not sure if it's the right way or the
wrong way, but it's the Webb way and it works for now):

public function serialize() {
return implode(',', array(
'user_id' => $this->getUserId(),
'username'=> $this->getUsername(),
'password'=> $this->getPassword(),
'user_active' => $this->getUserActive(),
'user_date'   => $this->getUserDate()->format('m/d/Y')
));
}


public function unserialize($strSerialized) {
$serialized = explode(',', $strSerialized);

$this->setUserId($serialized[0]);
$this->setUsername($serialized[1]);
$this->password = $serialized[2];
$this->setUserActive($serialized[3]);
$this->setUserDate(new \DateTime($serialized[4]));
}


On May 23, 12:30 pm, Roger Webb  wrote:
> Until the BETA2 update I was getting warnings related to serializing
> the User Entity, it is a breaking problem in beta2.  So, I googled
> around and found this:
>
> http://groups.google.com/group/symfony-users/browse_thread/thread/54c...
>
> Following the advice there, I created serialize() and unserialize()
> methods and had my "Users" class implement \Serializable.  I tried
> returning an array, which through the following Exception:
>
> "Symfony\Component\Security\Core\Authentication\Token
> \UsernamePasswordToken::serialize() must return a string or NULL"
>
> I returned null and it worked but it rendered the Entity returned by
> $this->get('security.context') and it's twig counterpart useless
> because it contained no data.
>
> So, I tried imploding the array and returning that and was met with
> the Exception noted above.
>
> I also tried looking through the "Security" chapter in the book and
> could not find any  information about how to or what to serialize.
> Can anyone point me to a resource that explains how to do this in a
> Symfony-appropriate way?
>
> Roger
>
> On May 17, 1:58 am, Marco Pivetta  wrote:
>
>
>
>
>
>
>
> > I usually build stuff like this when making a multi-step form with different
> > http requests:
>
> > request 1:
> > $ns = new \Zend_Session_Namespace('test'); //don't care about it, I usually
> > work with ZF
> > /* We suppose this is my entity fetched by some kind of voodoo query or
> > complex stuff that can be done only in step 1 (picker?) */
> > $modifiedUser = $em->getRepository('My\User')->findOneBy(array('fullname' =>
> > 'Marco Pivetta'));
> > $em->detach($modifiedUser);
> > $ns->user = $modifiedUser;
>
> > request 2:
> > $ns = new \Zend_Session_Namespace('test');
> > //Bringing my user entity back to life!
> > $modifiedUser = $ns->user;
> > $em->merge($modifiedUser);
> > $em->refresh($modifiedUser); //Yeah, this is overhead, but it solved a LOT
> > of troubles in my case...
> > $modifiedUser->doStuff();
> > //Now again, for the next step! And so on and on and on...
> > $em->detach($modifiedUser);
> > $ns->user = $modifiedUser;
>
> > request 3:
> > //repeat stuff like request 2 here!
>
> > Marco Pivetta
> > @Ocramius http://marco-pivetta.com
>
> > On 17 May 2011 04:53, Luis Cordova  wrote:
>
> > > yes and if you find a resource or more styled example or post that can
> > > clarify this further would be great
>
> > > On Mon, May 16, 2011 at 9:48 PM, oscar balladares 
> > > wrote:
> > > > Another issue that I run into is:
> > > > Let's say we have object A, and object A has refernce to Object B, both
> > > are
> > > > entities instances, and reference of B is actually a proxy.
> > > > This is the case when retrieving A with the entity manager. The 
> > > > reference
> > > of
> > > > Object B is a doctrine proxy of Object B actually.
> > > > So when serializing A, reference to B will be set to NULL. And this
> > > > behaviour is explained in Doctrine Docs. They advice to not to
> > > > serialize Entities (that are being managed by an entity manager).
> > > > Now I'm facing this problem. Even using \Serializable interface. I read
> > > > about a guy that hacked the source code of doctrine (proxies) to
> > > > allow serialization but never explained how.
> > > > So my big question is: If serializing entities is not adviced, how can I
> > > > solve my use case?
> > > > I'm implementing a shopping cart, and serializing products entities
> > > > instances and saving them in a Session variable.
> > > > I hate using arrays when I could achive the same with POO.
> > > > But, I must remark that this is a Doctrine/PHP issue not a Symfony
> > > Framework
> > > > related one.
> > > > I'll keep searching. Any usefull information will be posted here to help
> > > > someone ;)
> > > > 2011/5/16 Luis Cordova 
>
> > > >> someone h

[symfony-users] Re: @extra annotations - what is the new format?

2011-05-23 Thread keymaster
Actually the correct form of the uses is (so you can use the shorted @Route 
instead of the long pathname):

use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route as Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template as Template;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter as 
ParamConverter; 

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: @extra annotations - what is the new format?

2011-05-23 Thread keymaster
worked like a charm.

thanks.

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: SF2 Security (beta2) - Serializing User Entities - Blocking Issue

2011-05-23 Thread Roger Webb
done

On May 23, 12:26 pm, Luis Cordova  wrote:
> please can you use the same thread to reply to that serialize problem?
> it will help others to have it all into one place
>
>
>
>
>
>
>
> On Mon, May 23, 2011 at 12:23 PM, Roger Webb  wrote:
> > Until the BETA2 update I was getting warnings related to serializing
> > the User Entity, it is a breaking problem in beta2.  So, I googled
> > around and found this:
>
> >http://groups.google.com/group/symfony-users/browse_thread/thread/54c...
>
> > Following the advice there, I created serialize() and unserialize()
> > methods and had my "Users" class implement \Serializable.  I tried
> > returning an array, which through the following Exception:
>
> > "Symfony\Component\Security\Core\Authentication\Token
> > \UsernamePasswordToken::serialize() must return a string or NULL"
>
> > I returned null and it worked but it rendered the Entity returned by
> > $this->get('security.context') and it's twig counterpart useless
> > because it contained no data.
>
> > So, I tried imploding the array and returning that and was met with
> > the Exception noted above.
>
> > I also tried looking through the "Security" chapter in the book and
> > could not find any  information about how to or what to serialize.
> > Can anyone point me to a resource that explains how to do this in a
> > Symfony-appropriate way?
>
> > Roger
>
> > --
> > If you want to report a vulnerability issue on symfony, please send it to 
> > security at symfony-project.com
>
> > You received this message because you are subscribed to the Google
> > Groups "symfony users" group.
> > To post to this group, send email to symfony-users@googlegroups.com
> > To unsubscribe from this group, send email to
> > symfony-users+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/symfony-users?hl=en

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: notice: serialize() __sleep

2011-05-23 Thread Roger Webb
Until the BETA2 update I was getting warnings related to serializing
the User Entity, it is a breaking problem in beta2.  So, I googled
around and found this:

http://groups.google.com/group/symfony-users/browse_thread/thread/54c...

Following the advice there, I created serialize() and unserialize()
methods and had my "Users" class implement \Serializable.  I tried
returning an array, which through the following Exception:

"Symfony\Component\Security\Core\Authentication\Token
\UsernamePasswordToken::serialize() must return a string or NULL"

I returned null and it worked but it rendered the Entity returned by
$this->get('security.context') and it's twig counterpart useless
because it contained no data.

So, I tried imploding the array and returning that and was met with
the Exception noted above.

I also tried looking through the "Security" chapter in the book and
could not find any  information about how to or what to serialize.
Can anyone point me to a resource that explains how to do this in a
Symfony-appropriate way?

Roger

On May 17, 1:58 am, Marco Pivetta  wrote:
> I usually build stuff like this when making a multi-step form with different
> http requests:
>
> request 1:
> $ns = new \Zend_Session_Namespace('test'); //don't care about it, I usually
> work with ZF
> /* We suppose this is my entity fetched by some kind of voodoo query or
> complex stuff that can be done only in step 1 (picker?) */
> $modifiedUser = $em->getRepository('My\User')->findOneBy(array('fullname' =>
> 'Marco Pivetta'));
> $em->detach($modifiedUser);
> $ns->user = $modifiedUser;
>
> request 2:
> $ns = new \Zend_Session_Namespace('test');
> //Bringing my user entity back to life!
> $modifiedUser = $ns->user;
> $em->merge($modifiedUser);
> $em->refresh($modifiedUser); //Yeah, this is overhead, but it solved a LOT
> of troubles in my case...
> $modifiedUser->doStuff();
> //Now again, for the next step! And so on and on and on...
> $em->detach($modifiedUser);
> $ns->user = $modifiedUser;
>
> request 3:
> //repeat stuff like request 2 here!
>
> Marco Pivetta
> @Ocramius http://marco-pivetta.com
>
> On 17 May 2011 04:53, Luis Cordova  wrote:
>
>
>
>
>
>
>
> > yes and if you find a resource or more styled example or post that can
> > clarify this further would be great
>
> > On Mon, May 16, 2011 at 9:48 PM, oscar balladares 
> > wrote:
> > > Another issue that I run into is:
> > > Let's say we have object A, and object A has refernce to Object B, both
> > are
> > > entities instances, and reference of B is actually a proxy.
> > > This is the case when retrieving A with the entity manager. The reference
> > of
> > > Object B is a doctrine proxy of Object B actually.
> > > So when serializing A, reference to B will be set to NULL. And this
> > > behaviour is explained in Doctrine Docs. They advice to not to
> > > serialize Entities (that are being managed by an entity manager).
> > > Now I'm facing this problem. Even using \Serializable interface. I read
> > > about a guy that hacked the source code of doctrine (proxies) to
> > > allow serialization but never explained how.
> > > So my big question is: If serializing entities is not adviced, how can I
> > > solve my use case?
> > > I'm implementing a shopping cart, and serializing products entities
> > > instances and saving them in a Session variable.
> > > I hate using arrays when I could achive the same with POO.
> > > But, I must remark that this is a Doctrine/PHP issue not a Symfony
> > Framework
> > > related one.
> > > I'll keep searching. Any usefull information will be posted here to help
> > > someone ;)
> > > 2011/5/16 Luis Cordova 
>
> > >> someone has to write about this case more clearly to explain to all
>
> > >> This example is perfect, although one more could be added
>
> > >> Even though is not sf2 related specifically I think that it has to be
> > >> explained since we are going to run into these kind of problems
>
> > >> Thanks
>
> > >> On Mon, May 16, 2011 at 10:43 AM, oscar balladares <
> > liebegr...@gmail.com>
> > >> wrote:
> > >> > Yes, you are right. I hadn't try out the ->detach() method :P Sorry. I
> > >> > saw a
> > >> > tutorial that seemed very convincing :P (it was very late when posted
> > >> > last
> > >> > email and I didn't try it till now).
> > >> > My apologies :F
>
> > >> > 2011/5/16 Marco Pivetta 
>
> > >> >> Careful! The entity manager's detach method does not return anything!
> > >> >> Marco Pivetta
> > >> >> @Ocramius
> > >> >>http://marco-pivetta.com
>
> > >> >> On 16 May 2011 08:55, oscar balladares  wrote:
>
> > >> >>> According what I have read so far, serialize/unserialize $entities
> > >> >>> with
> > >> >>> proxies associations is not advised.
> > >> >>> And of course, if you are saving objects in session() vars, it is an
> > >> >>> innecesary load to save proxies information.
> > >> >>> So, it is adviced to detach proxies from entities (in case where
> > >> >>> entites
> > >> >>> are retrieved with the en

Re: [symfony-users] SF2 Security (beta2) - Serializing User Entities - Blocking Issue

2011-05-23 Thread Luis Cordova
please can you use the same thread to reply to that serialize problem?
it will help others to have it all into one place

On Mon, May 23, 2011 at 12:23 PM, Roger Webb  wrote:
> Until the BETA2 update I was getting warnings related to serializing
> the User Entity, it is a breaking problem in beta2.  So, I googled
> around and found this:
>
> http://groups.google.com/group/symfony-users/browse_thread/thread/54ca0790fa861271/edffbbc8343af2d0?lnk=gst&q=__sleep#edffbbc8343af2d0
>
> Following the advice there, I created serialize() and unserialize()
> methods and had my "Users" class implement \Serializable.  I tried
> returning an array, which through the following Exception:
>
> "Symfony\Component\Security\Core\Authentication\Token
> \UsernamePasswordToken::serialize() must return a string or NULL"
>
> I returned null and it worked but it rendered the Entity returned by
> $this->get('security.context') and it's twig counterpart useless
> because it contained no data.
>
> So, I tried imploding the array and returning that and was met with
> the Exception noted above.
>
> I also tried looking through the "Security" chapter in the book and
> could not find any  information about how to or what to serialize.
> Can anyone point me to a resource that explains how to do this in a
> Symfony-appropriate way?
>
> Roger
>
> --
> If you want to report a vulnerability issue on symfony, please send it to 
> security at symfony-project.com
>
> You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> To post to this group, send email to symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en
>

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] SF2 Security (beta2) - Serializing User Entities - Blocking Issue

2011-05-23 Thread Roger Webb
Until the BETA2 update I was getting warnings related to serializing
the User Entity, it is a breaking problem in beta2.  So, I googled
around and found this:

http://groups.google.com/group/symfony-users/browse_thread/thread/54ca0790fa861271/edffbbc8343af2d0?lnk=gst&q=__sleep#edffbbc8343af2d0

Following the advice there, I created serialize() and unserialize()
methods and had my "Users" class implement \Serializable.  I tried
returning an array, which through the following Exception:

"Symfony\Component\Security\Core\Authentication\Token
\UsernamePasswordToken::serialize() must return a string or NULL"

I returned null and it worked but it rendered the Entity returned by
$this->get('security.context') and it's twig counterpart useless
because it contained no data.

So, I tried imploding the array and returning that and was met with
the Exception noted above.

I also tried looking through the "Security" chapter in the book and
could not find any  information about how to or what to serialize.
Can anyone point me to a resource that explains how to do this in a
Symfony-appropriate way?

Roger

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: @extra annotations - what is the new format?

2011-05-23 Thread Matt Robinson
Try these:

use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;

   /**
* @Route("/", name="home")
* @Template()
*/

and
* @ParamConverter("id", class="VendorThingBundle:MyEntity")


On May 23, 5:23 pm, keymaster  wrote:
> I've switched everything over to @ORM\ and @Assert\
>
> But not sure what the proper replacement is for @extra.
>
> Does it need to be changed also?
>
> If so, what class should we"use" ?
> What should the new annotation form look like?
>
> Getting this error (worked fine in beta1):
>
> [1/2] AnnotationException: [Semantical Error] The annotation "@extra:Route"
> in method
> WCCore\StaticPagesBundle\Controller\StaticPagesController::displayAction()
> was never imported.

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] [Symfony2 - Beta2] @extra annotations - what is the new format?

2011-05-23 Thread keymaster
I've switched everything over to @ORM\ and @Assert\

But not sure what the proper replacement is for @extra.

Does it need to be changed also?

If so, what class should we"use" ?
What should the new annotation form look like?

Getting this error (worked fine in beta1):

[1/2] AnnotationException: [Semantical Error] The annotation "@extra:Route" 
in method 
WCCore\StaticPagesBundle\Controller\StaticPagesController::displayAction() 
was never imported.

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Doxygen Annotations Broken in Beta2

2011-05-23 Thread Roger Webb
I stand corrected.  When placed in the *class* comment block,
@IgnoreAnnotation("fn") works.  Alos, upon reading the doxygen
documentation, \fn works just as well as @fn, so I recommend using
\fn, \param, etc to avoid having to put those @IgnoreAnnotation
annotations in every file.

On May 23, 11:01 am, Johannes Schmitt  wrote:
> As I said, you need to put it in the doc comment of the _class_ even if
> "@fn" is used in a method of that class.
>
> I understand that it might be a bit tedious to update your code at first,
> but being a bit stricter in the parsing process allows us to catch errors
> early on. This will reduce the time that you spend with searching for
> missing imports, typos, or just sitting there wondering why something
> doesn't work.
>
> Johannes
>
>
>
>
>
>
>
> On Mon, May 23, 2011 at 5:26 PM, Roger Webb  wrote:
> > The comment in question is below.  This is still throwing the same
> > error.  Also, it's generating this error based on the method.  Will I
> > have to put this annotation in every comment block that uses the "fn"
> > annotation, or just in the first comment of the file?
>
> > For the developers, it would IMHO be best if the Symfony/Doctrine
> > annotations were namespaced and did not adversely affect annotations
> > from other projects.
>
> >    /**
> >     * @IgnoreAnnotation("fn")
> >     * @fn loginAction
> >     *
> >     */
>
> > Thank you for your help,
>
> > Roger
>
> > On May 23, 10:17 am, Johannes Schmitt  wrote:
> > > Put an @IgnoreAnnotation("fn") in the doc comment of the class where this
> > > annotation is used.
>
> > > Johannes
>
> > > On Mon, May 23, 2011 at 5:05 PM, Roger Webb 
> > wrote:
> > > > Hey Everyone,
>
> > > > I'm using Doxygen for my documentation generation.  I updated to Beta2
> > > > and fixed all of the Doctrine annotations as described in the Update
> > > > Document and found that all of my doxygen annotations are causing an
> > > > exception to be thrown:
>
> > > > [Semantical Error] The annotation "@fn" in method ARN\UserBundle
> > > > \Controller\UserController::loginAction() was never imported.
>
> > > > Any ideas on a workaround?
>
> > > > Roger
>
> > > > --
> > > > If you want to report a vulnerability issue on symfony, please send it
> > to
> > > > security at symfony-project.com
>
> > > > You received this message because you are subscribed to the Google
> > > > Groups "symfony users" group.
> > > > To post to this group, send email to symfony-users@googlegroups.com
> > > > To unsubscribe from this group, send email to
> > > > symfony-users+unsubscr...@googlegroups.com
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/symfony-users?hl=en
>
> > --
> > If you want to report a vulnerability issue on symfony, please send it to
> > security at symfony-project.com
>
> > You received this message because you are subscribed to the Google
> > Groups "symfony users" group.
> > To post to this group, send email to symfony-users@googlegroups.com
> > To unsubscribe from this group, send email to
> > symfony-users+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/symfony-users?hl=en

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] Re: Doxygen Annotations Broken in Beta2

2011-05-23 Thread Johannes Schmitt
As I said, you need to put it in the doc comment of the _class_ even if
"@fn" is used in a method of that class.

I understand that it might be a bit tedious to update your code at first,
but being a bit stricter in the parsing process allows us to catch errors
early on. This will reduce the time that you spend with searching for
missing imports, typos, or just sitting there wondering why something
doesn't work.

Johannes


On Mon, May 23, 2011 at 5:26 PM, Roger Webb  wrote:

> The comment in question is below.  This is still throwing the same
> error.  Also, it's generating this error based on the method.  Will I
> have to put this annotation in every comment block that uses the "fn"
> annotation, or just in the first comment of the file?
>
> For the developers, it would IMHO be best if the Symfony/Doctrine
> annotations were namespaced and did not adversely affect annotations
> from other projects.
>
>/**
> * @IgnoreAnnotation("fn")
> * @fn loginAction
> *
> */
>
> Thank you for your help,
>
> Roger
>
> On May 23, 10:17 am, Johannes Schmitt  wrote:
> > Put an @IgnoreAnnotation("fn") in the doc comment of the class where this
> > annotation is used.
> >
> > Johannes
> >
> >
> >
> >
> >
> >
> >
> > On Mon, May 23, 2011 at 5:05 PM, Roger Webb 
> wrote:
> > > Hey Everyone,
> >
> > > I'm using Doxygen for my documentation generation.  I updated to Beta2
> > > and fixed all of the Doctrine annotations as described in the Update
> > > Document and found that all of my doxygen annotations are causing an
> > > exception to be thrown:
> >
> > > [Semantical Error] The annotation "@fn" in method ARN\UserBundle
> > > \Controller\UserController::loginAction() was never imported.
> >
> > > Any ideas on a workaround?
> >
> > > Roger
> >
> > > --
> > > If you want to report a vulnerability issue on symfony, please send it
> to
> > > security at symfony-project.com
> >
> > > You received this message because you are subscribed to the Google
> > > Groups "symfony users" group.
> > > To post to this group, send email to symfony-users@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > symfony-users+unsubscr...@googlegroups.com
> > > For more options, visit this group at
> > >http://groups.google.com/group/symfony-users?hl=en
>
> --
> If you want to report a vulnerability issue on symfony, please send it to
> security at symfony-project.com
>
> You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> To post to this group, send email to symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en
>

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Doxygen Annotations Broken in Beta2

2011-05-23 Thread Roger Webb
The comment in question is below.  This is still throwing the same
error.  Also, it's generating this error based on the method.  Will I
have to put this annotation in every comment block that uses the "fn"
annotation, or just in the first comment of the file?

For the developers, it would IMHO be best if the Symfony/Doctrine
annotations were namespaced and did not adversely affect annotations
from other projects.

/**
 * @IgnoreAnnotation("fn")
 * @fn loginAction
 *
 */

Thank you for your help,

Roger

On May 23, 10:17 am, Johannes Schmitt  wrote:
> Put an @IgnoreAnnotation("fn") in the doc comment of the class where this
> annotation is used.
>
> Johannes
>
>
>
>
>
>
>
> On Mon, May 23, 2011 at 5:05 PM, Roger Webb  wrote:
> > Hey Everyone,
>
> > I'm using Doxygen for my documentation generation.  I updated to Beta2
> > and fixed all of the Doctrine annotations as described in the Update
> > Document and found that all of my doxygen annotations are causing an
> > exception to be thrown:
>
> > [Semantical Error] The annotation "@fn" in method ARN\UserBundle
> > \Controller\UserController::loginAction() was never imported.
>
> > Any ideas on a workaround?
>
> > Roger
>
> > --
> > If you want to report a vulnerability issue on symfony, please send it to
> > security at symfony-project.com
>
> > You received this message because you are subscribed to the Google
> > Groups "symfony users" group.
> > To post to this group, send email to symfony-users@googlegroups.com
> > To unsubscribe from this group, send email to
> > symfony-users+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/symfony-users?hl=en

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Using Doctrine Entities without Symfony (beta2)

2011-05-23 Thread Roger Webb
Hey Everyone,

Another annotation issue with the SF2 Beta2 update.   I have a
separate doctrine_bootstrap.php to use my entities outside of Symfony
(for some SOAP services) and it seems that the
"setAnnotationNamespaceAlias" method has been removed from the
AnnotationReader, so I removed the call to it.  Now it's giving me the
"[Semantical Error] The annotation "@ORM\Table" in class [redacted]
was never imported."  I am, of course, trying to use the same entity
classes both inside and outside of SF2.

Any ideas?

Roger

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] Doxygen Annotations Broken in Beta2

2011-05-23 Thread Johannes Schmitt
Put an @IgnoreAnnotation("fn") in the doc comment of the class where this
annotation is used.

Johannes


On Mon, May 23, 2011 at 5:05 PM, Roger Webb  wrote:

> Hey Everyone,
>
> I'm using Doxygen for my documentation generation.  I updated to Beta2
> and fixed all of the Doctrine annotations as described in the Update
> Document and found that all of my doxygen annotations are causing an
> exception to be thrown:
>
> [Semantical Error] The annotation "@fn" in method ARN\UserBundle
> \Controller\UserController::loginAction() was never imported.
>
> Any ideas on a workaround?
>
> Roger
>
> --
> If you want to report a vulnerability issue on symfony, please send it to
> security at symfony-project.com
>
> You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> To post to this group, send email to symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en
>

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Doxygen Annotations Broken in Beta2

2011-05-23 Thread Roger Webb
Hey Everyone,

I'm using Doxygen for my documentation generation.  I updated to Beta2
and fixed all of the Doctrine annotations as described in the Update
Document and found that all of my doxygen annotations are causing an
exception to be thrown:

[Semantical Error] The annotation "@fn" in method ARN\UserBundle
\Controller\UserController::loginAction() was never imported.

Any ideas on a workaround?

Roger

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] Assetic and php template

2011-05-23 Thread Kris Wallsmith
Where are your stylesheets located in your project directory — web/public/css/* 
??
On Sunday, May 22, 2011 at 5:23 AM, John Blobsmith wrote:
I try to use assetic with php template like this :
> 
> stylesheets(array('public/css/*'))
> as $url): ?>
> 
> 
> 
> But it doesn't work.
> I have the error :
> Route "_assetic_0e3af84_0" does not exist.
> 
> Do you know where is the problem ?
> 
> -- 
> If you want to report a vulnerability issue on symfony, please send it to 
> security at symfony-project.com
> 
> You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> To post to this group, send email to symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en
> 

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] Assetic and php template

2011-05-23 Thread David Buchmann
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

is this in dev or production mode? if in production, did you generate
the assets with
app/console assetic:dump
?

cheers,david


Am 22.05.2011 14:23, schrieb John Blobsmith:
> I try to use assetic with php template like this :
> 
> stylesheets(array('public/css/*'))
> as $url): ?>
> 
> 
> 
> But it doesn't work.
> I have the error :
> Route "_assetic_0e3af84_0" does not exist.
> 
> Do you know where is the problem ?
> 

- -- 
Liip AG // Agile Web Development // T +41 26 422 25 11
CH-1700 Fribourg // PGP 0xA581808B // www.liip.ch
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk3advUACgkQqBnXnqWBgIvb+wCfVGB+PZ+bQw7J1fQwxtRJt3mH
QD4AnA3PhFi5KI9FCKfirQO3pXGUNyYG
=R1I2
-END PGP SIGNATURE-

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] FOSFacebookBundle

2011-05-23 Thread symfonyMan
Hello,

i would like to integrate FOSFacebookBundle in my SF2 web site, i have 
already my user bundle with user entity and userManager.

my problem is how to configure my security firewall ??

i have this :
providers:
in_db:
entity: { class: MyCoreBundle:User, property: email }
fsc_fos_facebook_provider:
  id: fsc.facebook.user.provider

firewalls:
account:
provider: in_db
pattern : ^/
form_login:
check_path: /login_check
login_path: /login
default_target_path: /home
provider: in_db
#use_referer: true
remember_me: true
logout:
path:   /user/logout
target: /
anonymous: true

how can i enable the login with my custom provider and give the users a 
choice if they wants to login with facebook ??

thanks in advance

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Theming Symfony2 application

2011-05-23 Thread umpirsky
I want to have separate css/img (static) files for each theme
configured for my Symfony project.

How can I do this, probably some url and asset configuration?

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re : Symfony2 Object Route like in Symfony 1

2011-05-23 Thread Christophe Willemsen
Hi Ben,

I know it is pitty that the previous feature is away !

You could however, add a getRoutingArray() to your object, which returns the 
array of parameters needed. You could then create a route like this:

{{ path('blog_show', blog.routingArray) }}

Christophe


-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Access DI contaier in twig layout

2011-05-23 Thread umpirsky
I want to have html meta data configurable in my project. I have my
custom service which holds this information (page title, keywords,
description...). So I want to access them in my layout.

How can I achieve this?

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Symfony2 Object Route like in Symfony 1

2011-05-23 Thread Ben Bieker
Hi dear Community,

I am currently playing around with the new Symfony 2 and so far I think
you did an excellent job!

But: I loved the feature from symfony 1 where your route could be
defined as an object type. So that if you want to generate an url, you
just have to pass an Object and the route with all the parameters
(slugs, names, ids) is generated automatically.

I did not find any reference in the official documentation:
http://symfony.com/doc/current/book/routing.html

How to do this in symfony2?

Thank you very much!
Ben

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: "Fatal error: Cannot redeclare class..."

2011-05-23 Thread Javier Garcia
Well, I just want to add that when I type .../paypal$ grep -R
'Client.php' *, and I'm getting this:

PayPal/CallerServices.php://require_once 'PayPal/SOAP/Client.php';
PayPal/SOAP/Client.php:// $Id: Client.php,v 1.1.1.1 2006/02/19
PayPal/SOAP/WSDL.php: //require_once 'PayPal/SOAP/Client.php

Javi

On May 23, 11:45 am, Javier Garcia  wrote:
> Hi,
>
> I have downloaded this PayPal API:
>
> https://cms.paypal.com/cms_content/US/en_US/files/developer/PP_PHP_SO...
>
> And I'm getting this error:
>
> Fatal error: Cannot redeclare class SOAP_Client in /home/me/app1/
> plugins/mbpPlatformFrontendPlugin/lib/paypal/PayPal/SOAP/Client.php on
> line 83
>
> The "strange" thing is: if I change the name of the class to what ever
> else, for example SOAP_Client_foo, I get
>
> Fatal error: Cannot redeclare class SOAP_Client_foo in /home/me/app1/
> plugins/mbpPlatformFrontendPlugin/lib/paypal/PayPal/SOAP/Client.php on
> line 83
>
> So I removed the content in Client.php and wrote this:
>
> 
>      debug_print_backtrace();
> ?>
> 
> 
>
> And this is the output:
>
> #0  require() called at [/home/me/app1/lib/vendor/symfony/lib/autoload/
> sfAutoload.class.php:188]
> #1  sfAutoload->loadClass(SOAP_Client) called at [/home/me/app1/lib/
> vendor/symfony/lib/autoload/sfAutoload.class.php: 163]
> #2  sfAutoload->autoload(SOAP_Client)
> #4  spl_autoload_call(SOAP_Client) called at [/home/me/app1/plugins/
> mbpPlatformFrontendPlugin/lib/paypal/PayPal/CallerServices.php:36]
> #5  PayPal->getWSDLVersion() called at [/home/me/app1/plugins/
> mbpPlatformFrontendPlugin/lib/paypal/PayPal/Profile.php:126]
> #6  Profile->loadEnvironments() called at [/home/me/app1/plugins/
> mbpPlatformFrontendPlugin/lib/paypal/PayPal/Profile.php:104]
> #7  Profile->_load() called at [/home/me/app1/plugins/
> mbpPlatformFrontendPlugin/lib/paypal/PayPal/API.php:328]
> #8  APIProfile::getInstance(, ProfileHandler_Array...
>
> Any help?
>
> sf 1.4
>
> Javi

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re : Re: Form spread over multiple pages (wizard) ?

2011-05-23 Thread Tristan
Thanks for sharing your feedback ;-)

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] "Fatal error: Cannot redeclare class..."

2011-05-23 Thread Javier Garcia
Hi,

I have downloaded this PayPal API:

https://cms.paypal.com/cms_content/US/en_US/files/developer/PP_PHP_SOAP_SDK.tar.gz

And I'm getting this error:

Fatal error: Cannot redeclare class SOAP_Client in /home/me/app1/
plugins/mbpPlatformFrontendPlugin/lib/paypal/PayPal/SOAP/Client.php on
line 83

The "strange" thing is: if I change the name of the class to what ever
else, for example SOAP_Client_foo, I get

Fatal error: Cannot redeclare class SOAP_Client_foo in /home/me/app1/
plugins/mbpPlatformFrontendPlugin/lib/paypal/PayPal/SOAP/Client.php on
line 83

So I removed the content in Client.php and wrote this:






And this is the output:

#0  require() called at [/home/me/app1/lib/vendor/symfony/lib/autoload/
sfAutoload.class.php:188]
#1  sfAutoload->loadClass(SOAP_Client) called at [/home/me/app1/lib/
vendor/symfony/lib/autoload/sfAutoload.class.php: 163]
#2  sfAutoload->autoload(SOAP_Client)
#4  spl_autoload_call(SOAP_Client) called at [/home/me/app1/plugins/
mbpPlatformFrontendPlugin/lib/paypal/PayPal/CallerServices.php:36]
#5  PayPal->getWSDLVersion() called at [/home/me/app1/plugins/
mbpPlatformFrontendPlugin/lib/paypal/PayPal/Profile.php:126]
#6  Profile->loadEnvironments() called at [/home/me/app1/plugins/
mbpPlatformFrontendPlugin/lib/paypal/PayPal/Profile.php:104]
#7  Profile->_load() called at [/home/me/app1/plugins/
mbpPlatformFrontendPlugin/lib/paypal/PayPal/API.php:328]
#8  APIProfile::getInstance(, ProfileHandler_Array...

Any help?

sf 1.4

Javi

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] properly download excel file

2011-05-23 Thread el-sid
hi all,

does anyone know to properly download an excel file?
in my code i have

public function executeDownload(sfWebRequest $request)
{
$excel_file = Doctrine::getTable('Project')->find($request-
>getParameter('id'));

$this->setLayout(false);
sfConfig::set('sf_web_debug', false);

$excelpath =
sfConfig::get('sf_upload_dir').DIRECTORY_SEPARATOR.'project'.DIRECTORY_SEPARATOR.
$excel_file['file'];

// check if the file exists
$this->forward404Unless(file_exists($excelpath));

$response = $this->getContext()->getResponse();
$response->setHttpHeader('Pragma', '');
$response->setHttpHeader('Cache-Control', '');
$response->setHttpHeader('Content-Type', 'application/
vnd.openxmlformats-officedocument.spreadsheetml.sheet');
$response->setHttpHeader('Content-Disposition', 'attachment;
filename="invoice.xlsx"');
$response->setContent($excel_file);


return sfView::NONE;

}

this downloads a file with the name invoice.xlsx but its corrupted.

any help please? Thanks

 the post is here as well

http://forum.symfony-project.org/viewtopic.php?f=22&t=35430

to clear any duplication

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] how to check if email address existed in db

2011-05-23 Thread Gábor Fási
Two points:

- you're trying to overwrite the existing validator of the email field

- as the error message says: sfValidatorPropelUnique may only be used
as a post validator. Here's an example:

$this->validatorSchema->setPostValidator(
  new sfValidatorPropelUnique(array(
"throw_global_error"  =>  false,
"model"   =>  "sfGuardUser",
"column"  =>  "username",
"field"   =>  array("email"),
  ), array(
"invalid" =>  "Már használt e-mail cím!",
  ))
);

-- mrl

2011/5/22 Ethan :
> hello,everyone,
> i created a register form:
> class RegForm extends sfForm{
> public function configure(){
>                $this->setWidgets(array(
>                       ...
>                        'email'=> new
> sfWidgetFormInputText(array('label'=>'email address:','default'=>'@')),
>                      
>                 ));
>                 $this->setValidators(array(
>                        ...
>                        'email'=>new
> sfValidatorEmail(array(),array('required'=>'Email cannot
> empty','invalid'=>'Email invalid')),
>                        ...
>                ));
>               $this->setValidator('email',new
> sfValidatorPropelUnique(array('model'=>'Userinfo','column'=>array('Uemail')),array('invalid'=>'email
> EXISTS.')));
>         }
> }
> and i want to check whether email address existed in db before user
> register. according to document, it seems need to
> use sfValidatorPropelUnique ,but when i try to add the red code, i received
> an error
>
> You must pass an array parameter to the clean() method (this validator can
> only be used as a post validator).
>
> can someone told me the right way to do this process?
>
>
>
> --
>          少许诺多兑现
> --
>
>
> --
> If you want to report a vulnerability issue on symfony, please send it to
> security at symfony-project.com
>
> You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> To post to this group, send email to symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en
>

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Symfony2 [Form] date usage with datepicker

2011-05-23 Thread s.rohweder
great, thx, works like a charme

On 20 Mai, 17:03, Christophe COEVOET  wrote:
> Le 20/05/2011 17:00, s.rohweder a crit :> Thanx a lot, but at the moment 
> there seem something broken, as I get
> > an error.
>
> >   Uncaught exception 'InvalidArgumentException' with message 'There is
> > no extension able to load the configuration for "form"
>
> > So it seems to me that there is a not working master at the moment, I
> > will try later again.
>
> It should be placed in the framework section
>
> --
> Christophe | Stof

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Symfony2 (Beta 1 ?!) and FOSUserBundle

2011-05-23 Thread riker09
@Christophe: Thanks for the explanation. This was basically my
understanding of things. I tried this approach (extending from the
superclass) but ran into some errors. It turns out that the current
beta 1 of Symfony 2 is incompatible to the UserBundle. I checked out
the master versions of both from GitHub and voilá!
This basically is what Tim suggested and what the ReadMe says:

Caution: This bundles is developed in sync with symfony's repository

The PR6 tag marks the commit in sync with the PR6 release of Symfony
but it is not a maintained release of the bundle. All bug fixes will
be made in the master branch.

Source: 
https://github.com/FriendsOfSymfony/UserBundle/blob/master/README.markdown



On May 21, 10:58 am, Tim Nagel  wrote:
> I'm pretty sure that the mapping information location changed between
> beta1 and beta2, and UserBundle is developed alongside master symfony.
>
> You will need to upgrade UserBundle or check out a commit that
> happened before the change to the metadata move.
>
> t
>
>
>
>
>
>
>
> On Sat, May 21, 2011 at 00:24, Christophe COEVOET  wrote:
> > Le 20/05/2011 08:40, riker09 a écrit :
>
> >> On May 19, 12:49 pm, Christophe COEVOET  wrote:
>
> >>> No tables are created for the FOSUserBundle as it provides only some
> >>> mapped superclass. You need to implement the entity. Read the doc of the
>
> >>> bundle:https://github.com/FriendsOfSymfony/UserBundle/blob/master/Resources/...
>
> >> I'm trying, I really am, but this kind of a difficult concept for me
> >> to grasp. What exactly are those mapped superclasses? What do you mean
> >> by "You need to implement the entity"? Do I have to define all the
> >> fields for the table/document all over again? Seems like the wrong way
> >> to go here...
>
> >> Volker
>
> > A mapped superclass is a class which contains some mapping which will be
> > inherited by the subclasses but which is not an entity itself (and so it has
> > no corresponding tables). You don't need to redefine all fields in the child
> > class. You just need to make your entity inherit from the mapped superclass.
> > And as I said, read the doc of the bundle to see what is needed to use the
> > bundle.
>
> > --
> > Christophe | Stof
>
> > --
> > If you want to report a vulnerability issue on symfony, please send it to
> > security at symfony-project.com
>
> > You received this message because you are subscribed to the Google
> > Groups "symfony users" group.
> > To post to this group, send email to symfony-users@googlegroups.com
> > To unsubscribe from this group, send email to
> > symfony-users+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/symfony-users?hl=en

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Assetic and php template

2011-05-23 Thread John Blobsmith
I try to use assetic with php template like this :

stylesheets(array('public/css/*'))
as $url): ?>



But it doesn't work.
I have the error :
Route "_assetic_0e3af84_0" does not exist.

Do you know where is the problem ?

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: I am finding a CMS based on Symfony2.0

2011-05-23 Thread Peter Dekkers
You could try Sonata's AdminBundle:

https://github.com/sonata-project/AdminBundle

http://rabaix.net/AdminBundle/html/index.html

http://sftuts.com/doc/jobeet/en/the-admin-generator.html

Cheers,
Peter

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] how to check if email address existed in db

2011-05-23 Thread Ethan
hello,everyone,
i created a register form:
class RegForm extends sfForm{
public function configure(){
   $this->setWidgets(array(
  ...
   'email'=> new
sfWidgetFormInputText(array('label'=>'email address:','default'=>'@')),
 
));
$this->setValidators(array(
   ...
   'email'=>new
sfValidatorEmail(array(),array('required'=>'Email cannot
empty','invalid'=>'Email invalid')),
   ...
   ));
  $this->setValidator('email',new
sfValidatorPropelUnique(array('model'=>'Userinfo','column'=>array('Uemail')),array('invalid'=>'email
EXISTS.')));
}
}
and i want to check whether email address existed in db before user
register. according to document, it seems need to use *sfValidatorPropelUnique
*,but when i try to add the red code, i received an error
 You must pass an array parameter to the clean() method (this validator can
only be used as a post validator).
can someone told me the right way to do this process?




--
 少许诺多兑现
--

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: Doctrine doesn't free up memory after transaction commit

2011-05-23 Thread Galou
Few years ago, I remember I meet the same problem in a database
migration script.
The problem was coming from the xdebug module. I don't know how this
module work but it was making the script growing up in the memory.
The problem was resolved by disabling the xdebug module.

On 21 mai, 16:55, mohdshakir  wrote:
> Can you elaborate?
>
> On May 21, 1:34 am, Galou  wrote:
>
>
>
>
>
>
>
> > It could be due to the php xdebug module.
>
> > Galou
>
> > On 20 mai, 09:14, Mohd Shakir Zakaria  wrote:
>
> > > I keep on getting this error when running one of my scripts;
>
> > > PHP Fatal error:  Allowed memory size of 1073741824 bytes exhausted
> > > (tried to allocate 71 bytes) in ...
> > > lib/symfony-1.4.11/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrin
> > >  e/Connection/Statement.php
> > > on line 246, ...
>
> > > The following is the stripped-down version of the script that's
> > > triggering the error;
>
> > > public function executeImportFile(sfWebRequest $request)
> > > {
> > >   ini_set('memory_limit', '1024M');
> > >   set_time_limit ( 0 );
>
> > >   //more codes here...
>
> > >   $files = scandir($workspace.'/'.$directory);
>
> > >   foreach ($files as $file) {
> > >     $path = $workspace.'/'.$directory.'/'.$file;
>
> > >     if ($file != "." && $file != "..") {
> > >       $this->importfile($path);
> > >     }
> > >   }
>
> > > }
>
> > > protected function importfile($path){
> > >   ini_set('memory_limit', '1024M');
> > >   set_time_limit ( 0 );
>
> > >   $connection =
> > > sfContext::getInstance()->getDatabaseManager()->getDatabase('doctrine')->ge
> > >  tDoctrineConnection();
> > >   $connection->beginTransaction();
> > >   try {
>
> > >     //more codes here...
>
> > >     while ($data = $reader->read()) //reads each line of a csv file
> > >     {
> > >       // send the line to another private function to be processed
> > >       // and then write to database
> > >       $this->writewave($data);
> > >     }
>
> > >     $connection->commit();
>
> > >   } catch (Exception $e) {
> > >     $connection->rollback();
> > >   }
>
> > > }
>
> > > What the script does is basically to read all the csv files in a
> > > folder (which contains tens of thousands of lines each), process it,
> > > and the write it to the database using Doctrine's transaction.
>
> > > While I don't think I need to set the memory limit and the time limit
> > > in both functions, the script quits as Doctrine uses up all the the
> > > allocated 1GB of memory.
>
> > > It will normally stop after processing 10 files, and allocating more
> > > memory will allow it to process a bit more files, and will still
> > > crash.
>
> > > Is there anything that I'm missing here that's causing the memory not
> > > to free up after processing each files?
>
> > > Mohd Shakir Zakariahttp://www.mohdshakir.net

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Yaml parser tries to evaluate the second % token in a string

2011-05-23 Thread kudu
This appears to be a bug in the yaml parser - just looking for
confirmation before escalating it.

The following yaml config line works as expected
foo: a printf template with token 1 '%s'

however if I add a second token thus
foo: a printf template with token 1 '%s' and token2 '%s'

Symfony2 bails, apparently because it's trying to evaluate the second
percent prefixed token as a DI parameter. Here's the error:

Fatal error: Uncaught exception 'Symfony\Component\DependencyInjection
\Exception\NonExistentParameterException' with message 'The service
"sr.message_helper" has a dependency on a non-existent parameter "s'
and token2 '".' in /usr/local/zend/apache2/htdocs/pchapman/vendor/
symfony/src/Symfony/Component/DependencyInjection/ParameterBag/
ParameterBag.php on line 79

Symfony\Component\DependencyInjection\Exception
\NonExistentParameterException: The service "sr.message_helper" has a
dependency on a non-existent parameter "s' and token2 '". in /usr/
local/zend/apache2/htdocs/pchapman/vendor/symfony/src/Symfony/
Component/DependencyInjection/ParameterBag/ParameterBag.php on line 79

Call Stack:
0.0019 335668   1. {main}() /usr/local/zend/apache2/htdocs/
pchapman/tierville-web/app_dev.php:0
0.01071278660   2. Symfony\Component\HttpKernel\Kernel-
>loadClassCache() /usr/local/zend/apache2/htdocs/pchapman/tierville-
web/app_dev.php:19
0.01071278748   3. Symfony\Component\HttpKernel\Kernel-
>boot() /usr/local/zend/apache2/htdocs/pchapman/tierville-app/
bootstrap.php.cache:711
0.01551381248   4. Symfony\Component\HttpKernel\Kernel-
>initializeContainer() /usr/local/zend/apache2/htdocs/pchapman/
tierville-app/bootstrap.php.cache:592
0.01821394244   5. Symfony\Component\HttpKernel\Kernel-
>buildContainer() /usr/local/zend/apache2/htdocs/pchapman/tierville-
app/bootstrap.php.cache:788
0.24614104484   6. Symfony\Component\DependencyInjection
\ContainerBuilder->compile() /usr/local/zend/apache2/htdocs/pchapman/
tierville-app/bootstrap.php.cache:860
0.24894122888   7. Symfony\Component\DependencyInjection
\Compiler\Compiler->compile() /usr/local/zend/apache2/htdocs/pchapman/
vendor/symfony/src/Symfony/Component/DependencyInjection/
ContainerBuilder.php:398
0.69888916292   8. Symfony\Component\DependencyInjection
\Compiler\ResolveParameterPlaceHoldersPass->process() /usr/local/zend/
apache2/htdocs/pchapman/vendor/symfony/src/Symfony/Component/
DependencyInjection/Compiler/Compiler.php:110

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en