[symfony-users] IMPORTANT: Getting help on symfony1 or Symfony2

2011-06-23 Thread Fabien Potencier
After an opinionated discussion 
(http://groups.google.com/group/symfony-users/browse_thread/thread/ca3d1cd6662ca1d6/1372435731045ea0), 
I've decided to create two new mailing-lists that are

*replacing* the current one:

 * symfony1: http://groups.google.com/group/symfony1
 * Symfony2: http://groups.google.com/group/Symfony2

This mailing-list has been switched to the archive mode; all messages 
will remain browseable and searchable but new messages will be rejected. 
So, subscribe to at least one of the new mailing-lists.


More information here:

http://symfony.com/blog/getting-help-on-symfony1-or-symfony2

Fabien

--
Fabien Potencier
Sensio CEO - Symfony lead developer
sensiolabs.com | symfony.com | fabien.potencier.org
Tél: +33 1 40 99 80 80

--
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: Any chance of creating a new Google group for Symfony2 only?

2011-06-21 Thread Fabien Potencier

On 6/21/11 5:49 PM, Luis Cordova wrote:

don't fabien you will give more work to everybody
as you said the problem will be only for few more months
then sf1.x will die out and problem solved :)


symfony1 is not going to die anytime soon. End of maintenance is end of 
2012; and people will continue to use it even after that. So, "the end 
of life" of symfony1 will probably be in 2015-2020, not sooner. At 
Sensio, we still have symfony 1.0 applications that won't be migrated to 
1.4 for instance. And that's fine.


Fabien


On Tue, Jun 21, 2011 at 9:58 AM, Jeremiah Dodds
  wrote:



2011/6/21 Fabien Potencier


I've been thinking about this mailing-list issue a lot during the last few
months and I'm still convinced that creating more mailing-lists is not the
right solution. Anyway, as many people think the contrary, here is what I
propose now:

We create two new mailing-lists: one for symfony1 and one for Symfony2. To
be clear, this mailing-list (symfony-users) will die. That way, there is no
"legacy" mailing-list, all symfony users will be treated the same way: they
will have to do something about their subscription.

If everybody agree, I will start the migration and send invitations for
all current subscribers.

Cheers,
Fabien


+ 1 . How do you feel about having the forums and mailing lists mirror each
other via mail2forum or similar?

--
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: Any chance of creating a new Google group for Symfony2 only?

2011-06-21 Thread Fabien Potencier

On 6/10/11 2:32 PM, Georg wrote:

Hello,

I am not yet using sf2.

I am quite frustrated with the mailing list ATM.

I used to read the mailing list along to help people when I knew
something, learned a few tricks from answers by others, and had a place
to get quick answers.

Now on most mails I don't even understand the subject, I don't bother to
find the mails where I could help, and i don't ask anymore, because
obviously most sf1 users act in the same way as I do.
Check how many sf1 questions were asked and answered 5 moth ago and now.
This could either mean that nobody is using sf1 any more (which I doubt)
or the list is not working for sf1 people any more (which is the case IMO).

[RANT]I wonder what are the things that are shared between symfony 1 and
symfony 2? That both are a PHP MVC framework and have the same name?
TO me this feels like if I had a single mailing list for Drupal and
Typo3, because both are PHP CMS[/RANT]


Yes and no. They share the same philosophy but the implementation 
details are different. The web evolves very fast and so the framework 
should also evolve.



[RANT2]Check http://www.symfony-project.org/installation:
sf1.4 is the only stable symfony version ATM, and is supported until
november 2012. I strongly hope (even if I have a different feeling),
that at least until mid 2012, sf1 is not treated as legacy. There isn't
even an update possible, I am afraid that companies will rethink their
decision to develop in symfony if they are left standing in the rain.


symfony1 is very stable and the few pain points are not really fixable 
without badly breaking BC. I review all the tickets and I've done some 
bug fixes in the last few weeks on symfony 1.4. But frankly, there is 
not a lot to do. Anyway, we are about to release a new version of 
symfony 1.4 including these minor fixes.



(Yes, I know this mail
http://groups.google.com/group/symfony-devs/msg/f13ab956a61567cc by
fabien, let me quote:
[QUOTE]Keep in mind that symfony is an Open-Source project, so everybody
can contribute and scratch its itch. The core developers and all plugin
developers are all working for free. Of course, Sensio sponsors the
framework, of course it dedicates a lot of time and money to it, and of
it can even provide extended support for all versions for companies
willing to pay. And do you know how many companies, except Sensio
customers, signed up for extended support in the last 2 years? None!
Yep, that's right, not a single one. [/QUOTE]
[/RANT2]

That's why I would like to have symfony-users and syomfony2-users as
opposed to symfony-legacy-users.

As always, keep up the great work. And I will switch to sf2, when it is
stable (and probably has 1 as minor version number ;-) or when the
*symfony2-users* list doesn't complain too much). But I will be stuck
with sf1 for quite a long time with existing projects. And as pointed
out above, I don't feel they have a lot together.


I've been thinking about this mailing-list issue a lot during the last 
few months and I'm still convinced that creating more mailing-lists is 
not the right solution. Anyway, as many people think the contrary, here 
is what I propose now:


We create two new mailing-lists: one for symfony1 and one for Symfony2. 
To be clear, this mailing-list (symfony-users) will die. That way, there 
is no "legacy" mailing-list, all symfony users will be treated the same 
way: they will have to do something about their subscription.


If everybody agree, I will start the migration and send invitations for 
all current subscribers.


Cheers,
Fabien


Regards
Georg

Am 10.06.2011 07:24, schrieb Fabien Potencier:

On 6/9/11 10:17 PM, Chris Sedlmayr wrote:

Hi all,

I don't think we are against the idea of creating a Symfony2 specific
group, but we must ensure that finding help in the right place is the
main priority.


I'm against creating a Symfony2 specific group. If we were to create a
new group, then it would be a symfony-legacy group. Do we want to create
a ghetto?

Fabien


Also, it's worth noting that there is significant time involved with
moderating this group alone, which I am not complaining about as it
means we have an incredibly active community of developers and users
which is fantastic!

I'll bring it up and we can go from there?


Thanks,
Chris Sedlmayr


On Jun 9, 8:16 am, Ricky   wrote:

+1

It's a good idea that there is symfony2 group seperately, as we
sometimes can find our solution or get help from others more clearly.

On Jun 9, 10:54 am, Anton Patrikeyev
wrote:








+1



2011/5/18 mepk



+1



marcelo



On 18 mayo, 05:05, Leo Jokinen   wrote:

+1 since only interested of SF2



-Leo-



From: symfony-users@googlegroups.com [mailto:

symfony-users@googlegroups.com] On Behalf Of Marco Pivetta

Sent: 18. toukokuuta 2011 10:39
To: symfony-users@googlegroups.com
Subject: Re: [symfony-users] Re: Any chance of creating a new Google


Re: [symfony-users] Recursive Routing in Symfony 2

2011-06-20 Thread Fabien Potencier

On 6/20/11 5:15 PM, ddanninger wrote:

Hi,

iam wondering is it possible to use recursive routing like:


/service/folder1
/service/folder1/folder2/folder3
/service/folder1/folder2/../folder10

Just found information for symfony 1.4 so as the routing is different
in 2.0 i would be pleased to get some help =)


pattern: /service/{folders}
requirements:
folders: .*

$folders = implode('/', $request->getAttribute('folders');

Fabien



best regards
dominik danninger



--
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] Recursive Routing in Symfony 2

2011-06-20 Thread Fabien Potencier

On 6/20/11 5:15 PM, ddanninger wrote:

Hi,

iam wondering is it possible to use recursive routing like:


/service/folder1
/service/folder1/folder2/folder3
/service/folder1/folder2/../folder10

Just found information for symfony 1.4 so as the routing is different
in 2.0 i would be pleased to get some help =)


pattern: /service/{folders}
requirements:
folders: .*

$folders = implode('/', $request->getAttribute('folders');

Fabien



best regards
dominik danninger



--
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] [beta5] routing problem, problem with generated file ../../app/cache/dev/appdevUrlMatcher.php

2011-06-17 Thread Fabien Potencier

Can you send me the generated appdevUrlMatcher.php file?

Fabien

--
Fabien Potencier
Sensio CEO - Symfony lead developer
sensiolabs.com | symfony.com | fabien.potencier.org
Tél: +33 1 40 99 80 80

On 6/17/11 11:58 AM, Michael Holm wrote:

Hi,

I have a major problem with my routings, i've just upgraded to
Symfony2 Beta5, and suddenly something just didnt work no more..

I have deleted my cache, just in case of that i havent checked..

Then i saw the error:

 1. in kernel.root_dir/cache/dev/appdevUrlMatcher.php at line 406  - +
 403. return array (  '_controller' =>
'Club\\ShopBundle\\Controller\\AdminTra
 nsactionController::indexAction',  '_route' =>
'admin_shop_transaction',);
 404. }
 405.
 406. throw 0<  count($allow) ? new
MethodNotAllowedException(array_unique($allow)
 ) : new ResourceNotFoundException();
 407. }
 408. var_dump($pathinfo);
 409. die();

Which led me to this auto generated file, and i saw i had 4 equal
lines like this:
 if (0 === strpos($pathinfo, '/admin')) {

I can see that the route in in the autogenerated file, but its in an
admin section which will never be hit due to all the dublicated if
statements..

So.. that cannot be true? I will never end up in any of the if
statements since they are in the same level..

I use route annotations and here is a sample of my controller:

class AdminUserController extends Controller
{
   /**
* @Route("/user")
* @Template()
*/
   public function indexAction()
   {
 $em = $this->get('doctrine')->getEntityManager();

 $filter = 
$em->getRepository('ClubUserBundle:Filter')->findActive($this->get('security.context')->getToken()->getUser());

 $order_by = array();

And a snippet from the routing.yml file:

_admin_user:
   resource: "@ClubUserBundle/Controller/AdminUserController.php"
   type: annotation
   prefix: /admin

It worked perfectly in Beta4.. so, hope someone can help me..? It
really seems like a bug with the routing generator..

Best regards,
Michael Holm



--
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] [Beta4] Handle file upload with array data

2011-06-15 Thread Fabien Potencier

On 6/15/11 12:29 PM, dbenjamin wrote:

Hi,

I'm trying to handle multiple file uploads with a binded array.

// FilesType
$builder
->add('photo1', 'file', array(type' => 'file'))
->add('photo2', 'file', array('type' => 'file'))
->add('photo3', 'file', array('type' => 'file'))
;

// controller
$files = array(
'photo1' => null,
'photo2' => null,
'photo3' => null,
);

$form = $this->createForm(new FilesType(), $files);
if ('POST' == $request->getMethod()) {
$form->bindRequest($request); // Throws an error
}

This actually throws an error from DataTransformer : "The key "file"
should be empty or instance of File"

That should work, no ? I'm not sure what i'm doing wrong.

Any idea ?


As we have refactored uploading a lot recently, can you try with the 
latest version of master?


Thanks,
Fabien



Thanks,
Benjamin.

--
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] [symfony2] file upload example?

2011-06-13 Thread Fabien Potencier

On 6/11/11 12:24 PM, Ruben de Vries wrote:

Are there any bundles on github that demonstrate a fileupload?

I'm trying to implement handling the fileupload but I'm not really
sure how to do it 'the symfony way'

So some source code to dig through on github would be really helpfull
(A)


https://github.com/symfony/symfony-docs/blob/master/reference/forms/types/file.rst

https://github.com/symfony/symfony-docs/blob/master/cookbook/doctrine/file_uploads.rst

Fabien

--
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] file upload example?

2011-06-11 Thread Fabien Potencier
I'm working on updating the documentation to include an exmaple of a 
file upload with and without Doctrine.


It should be available on Monday.

Fabien

--
Fabien Potencier
Sensio CEO - Symfony lead developer
sensiolabs.com | symfony.com | fabien.potencier.org
Tél: +33 1 40 99 80 80

On 6/11/11 12:24 PM, Ruben de Vries wrote:

Are there any bundles on github that demonstrate a fileupload?

I'm trying to implement handling the fileupload but I'm not really
sure how to do it 'the symfony way'

So some source code to dig through on github would be really helpfull
(A)



--
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: Any chance of creating a new Google group for Symfony2 only?

2011-06-09 Thread Fabien Potencier

On 6/9/11 10:17 PM, Chris Sedlmayr wrote:

Hi all,

I don't think we are against the idea of creating a Symfony2 specific
group, but we must ensure that finding help in the right place is the
main priority.


I'm against creating a Symfony2 specific group. If we were to create a 
new group, then it would be a symfony-legacy group. Do we want to create 
a ghetto?


Fabien


Also, it's worth noting that there is significant time involved with
moderating this group alone, which I am not complaining about as it
means we have an incredibly active community of developers and users
which is fantastic!

I'll bring it up and we can go from there?


Thanks,
Chris Sedlmayr


On Jun 9, 8:16 am, Ricky  wrote:

+1

It's a good idea that there is symfony2 group seperately, as we
sometimes can find our solution or get help from others more clearly.

On Jun 9, 10:54 am, Anton Patrikeyev
wrote:








+1



2011/5/18 mepk



+1



marcelo



On 18 mayo, 05:05, Leo Jokinen  wrote:

+1 since only interested of SF2



-Leo-



From: symfony-users@googlegroups.com [mailto:

symfony-users@googlegroups.com] On Behalf Of Marco Pivetta

Sent: 18. toukokuuta 2011 10:39
To: symfony-users@googlegroups.com
Subject: Re: [symfony-users] Re: Any chance of creating a new Google

group for Symfony2 only?



+1 as I am COMPLETELY not interested in Symfony 1.X and joined here to

just follow some of the issues coming of sf2 :)

Marco Pivetta
@Ocramiushttp://marco-pivetta.com



On 18 May 2011 09:21, Yanko Simeonoff
zech...@gmail.com>>  wrote:

+1



On 05/18/2011 10:12 AM, Zolzaya Erdenebaatar wrote:
+1On Wed, May 18, 2011 at 3:11 AM, Alan Bem
alan@gmail.com>>  wrote:



+1



2011/5/18 realmfoo
konstantin.leb...@gmail.com>>

+1



--
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
symfony-users%2bunsubscr...@googlegroups.com>

For more options, visit this group athttp://

groups.google.com/group/symfony-users?hl=en



--
Pozdrawiam,
Alan Bem



Profil na GoldenLine.pl



--
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
symfony-users%2bunsubscr...@googlegroups.com>

For more options, visit this group athttp://

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
symfony-users+unsubscr...@googlegroups.com>

For more options, visit this group athttp://

groups.google.com/group/symfony-users?hl=en



--



Greets,



Yanko Simeonoff
--
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
symfony-users%2bunsubscr...@googlegroups.com>

For more options, visit this group athttp://

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 athttp://

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...@go

Re: [symfony-users] Re: getting a fatal error using swiftmailer

2011-06-04 Thread Fabien Potencier

On 6/3/11 10:58 PM, Roger Webb wrote:

I went through this *exact* issue and found an answer on the list.

You *MUST* retrieve the "mailer" before creating a new Swift_Message

$mailer = $this->get('mailer');

$message = \Swift_Message::newInstance()->...


Correct. This will not be needed anymore as of beta4.

Fabien


Roger

On Jun 3, 9:27 am, Kevin  wrote:

I was also having this issue, updating to sf2 master cleared it up for
me.

On Jun 2, 10:35 am, keymaster  wrote:








Getting the identical error, also on Sf2 Beta3.



*Fatal error*: Call to a member function clearAll() on a non-object in 
*C:\Program
Files
(x86)\Zend\Apache2\htdocs\Symfony\vendor\swiftmailer\lib\classes\Swift\Mime\SimpleMimeEntity.php
* on line *822



Here is the code:
*
$message = \Swift_Message::newInstance()->setSubject( 'Contact Email' )
 ->setFrom( 's...@example.com' )
 ->setTo( 'recipi...@example.com' )
 ->setBody( 'Hi There' );
$this->get( 'mailer' )->send( $message );




--
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] Any chance of creating a new Google group for Symfony2 only?

2011-05-16 Thread Fabien Potencier

On 5/16/11 7:15 PM, keymaster wrote:

Having all the symfony 1.x releases mixed in with Symfony 2 posts can
sometimes make it difficult to discern which Symfony people are talking
about in their posts.

Not everyone is explicit on whether they are referring to Symfony1 or
Symfony2.

This is not only a problem for those working on Symfony2, but even those
trying to wade through symfony 1.x have to wade through newbies on
symfony 2.x.

An additional confusion is some Symfony 1.x people seem to be using
Doctrine 2.

It might be wise to separate the discussions of the two groups as the
two products are different enough from each other to warrant it.



That's the problem of the mailing-lists vs a forum. As I said already, I 
don't want to split the community and add more mailing-lists. This is 
already quite complicated as we have two mailing-lists and a forum.


The real question to me is: Do we need to move all the discussions to 
the forum, where it is much easier to organize conversations by topic?


Fabien




--
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] Symfony2 localized homepage

2011-05-14 Thread Fabien Potencier

This was a bug that has been fixed in master (or in the upcoming beta2).

--
Fabien Potencier
Sensio CEO - Symfony lead developer
sensiolabs.com | symfony.com | fabien.potencier.org
Tél: +33 1 40 99 80 80

On 5/14/11 9:37 PM, Dmitry Bykadorov wrote:

Env:

app/config/config.yml:
 session:
 default_locale: en
 translator: { fallback: en }

src\VendorBundle\Resources\config\routing\configurator.xml


   
 VendorBundle:Main:index
 en
 en|ru
   


But homepage without locale (/) return 404. /en/ or /ru/ works fine.
What i'm doing wrong?



--
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] Documentation - Community Contributed Suggestions

2011-05-11 Thread Fabien Potencier


On 5/11/11 6:06 PM, Christophe COEVOET wrote:

Le 11/05/2011 17:45, keymaster a écrit :

The documentation is slowly improving, thanks very much to those
involved.

Symfony2 is a huge framework, and the documentation undertaking is
understandably difficult. The documentation team have really done a
great job so far for software which has only just reached beta1, and I
think everyone realizes the documentation team is working hard at
continually improving it.

As the documentation fills out, it will no doubt become more difficult
for the documentation team to know where the weak points are and where
the community's pain points are.

One easy suggestion might be to create a sticky thread on this forum
called "Documentation Suggestions", and simply put a message in the
"Book" directing people to add a post to this thread whenever they
come across an issue they feel should be documented and isn't, or
where the documentation should be improved,or perhaps even is incorrect.

It should be made clear that the documentation team is always free to
accept or ignore any or all of the community contributed suggestions,
but it might be an easy way to get fairly practical feedback on where
the major pain points are, and thus where documention efforts might
best be further focused.

I think that putting it on the mailing-list is not the best solution as
it would be difficult to find the mails to check follow the needs. It
would be easier IMO to use the github issue tracker of the symfony-docs
repository (not enabled currently but my suggestion is to enable it).


Done. You can now create tickets for the Symfony2 doc.

Fabien

--
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] Doctrine ORM: Non-existent service "registry"

2011-05-05 Thread Fabien Potencier

On 5/5/11 2:34 PM, Leo Jokinen wrote:

Le 05/05/2011 14:06, Leo Jokinen a écrit :

Hi,

I followed Symfony book and got the error: You have requested a non-

existent service "registry"


The registry is only available as of beta2, which is to be released.

Fabien


My code:
public function indexAction()
{
$em = $this->get('registry')->getEntityManager();
// ...
}

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

So what do I need to enable Doctrine registry?

Regards,

Leo Jokinen

The service is named 'doctrine', not 'registry'.


That didn't work either.

This works in my controller:
$em = $this->get('doctrine.orm.entity_manager');

These not:
$em = $this->get('registry')->getEntityManager();
$em = $this->get('doctrine')->getEntityManager();
$em = $this->get('doctrine.orm')->getEntityManager();

So do I really need to write that string 'doctrine.orm.entity_manager' all the 
time or is there a better solution?

-Leo-



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


Re: [symfony-users] [Symfony2][Forms] Object value in Twig template

2011-05-05 Thread Fabien Potencier

On 5/5/11 11:29 AM, Bernhard Schussek wrote:

2011/5/5 Don Pinkster:

Awesome, thanks! Maybe possible to make a shortcut for this? Like: {{
form.name.value }}


No, this would break consistency. Better documentation should solve
this problem.


Can someone create a ticket so that we can update the doc at some point?

Thanks,

Fabien


Bernhard



--
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] doctrine:generate:repositories not found

2011-05-04 Thread Fabien Potencier

It's now done in the dotrine:generate:entities command.

--
Fabien Potencier
Sensio CEO - Symfony lead developer
sensiolabs.com | symfony.com | fabien.potencier.org
Tél: +33 1 40 99 80 80

On 5/4/11 3:58 PM, umpirsky wrote:

Looks like there is no doctrine:generate:repositories command in
Symfony2 beta1.

Is it removed? How can I generate repostories now?



--
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] doctrine:generate:repositories

2011-04-30 Thread Fabien Potencier

On 4/30/11 9:25 PM, Sergio Perez wrote:

Hi everybody,

After import (doctrine:mapping:import) from a existing database, I try
to create the repositories with

app/console doctrine:generate:repositories MyBundle and I get “SKIP no
custom repository for MyBundle\Entity\entityname

What does it means?


If means that you have not defined the "repositoryClass" option in the 
metadata. This command is not really useful anyway as it just generates 
an empty class.


Fabien


What am I doing wrong?

The correct step for import a existing database are:

1)app/console doctrine:mapping:import Bundlename

2)app/console doctrine:generate:repositories Bundlename ???

Thanks

Sergio Pérez

*Informática ALBATRONIC, SL*

Av. Blas Otero, 10 Local 1

18200 Maracena - Granada

Tlf: +34 958410343

Fax: +34 958421504

www.albatronic.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


Re: Aw: Re: Aw: Re: [symfony-users] DoctrineMongoDBBundle missing in Beta1?

2011-04-29 Thread Fabien Potencier

On 4/29/11 4:57 PM, Conrad wrote:

ok Thanks,
then I need to roll back to pr12 and wait for it to be avaiable


No need to rollback to PR12. It won't change anything. The MongoDB 
bundle is not compatible with Symfony 2.0 and won't be until Doctrine 
2.1 is released.


Fabien


--
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: Aw: Re: [symfony-users] DoctrineMongoDBBundle missing in Beta1?

2011-04-29 Thread Fabien Potencier

On 4/29/11 4:48 PM, Conrad wrote:

Thanks Fabien, since I started my project a couple of weeks ago, I
always used the latest doctrine-common instead with the one symfony
comes with and never had bigger problems with annotations (except
creating indexes and sometimes validation) - do you think there is going
to be "bigger" trouble?


You cannot use the FrameworkExtraBundle and SecurityExtraBundle.

Fabien


Conrad

--
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] DoctrineMongoDBBundle missing in Beta1?

2011-04-29 Thread Fabien Potencier

On 4/29/11 4:31 PM, Conrad wrote:

I was just trying to update my project from pr12 to beta and found out
that the DoctrineMongoDBBundle is missing... did it move somewhere else?
Where can I get it?


As the release timeline for the MongoDB bundle is different from 
Symfony2, it has been moved into its own repository:


https://github.com/symfony/DoctrineMongoDBBundle

Be warned that it needs Doctrine common 2.1 and that some Symfony 
features (annotations) do not work with this version of Doctrine common.



Fabien


Thanks,
Conrad

--
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: The attribute "key" must be set for path "doctrine.dbal.connections.default.driverOptions"

2011-04-28 Thread Fabien Potencier

On 4/28/11 2:53 PM, Noel GUILBERT wrote:

I'm suspecting a bug with this configuration entry. I cannot figure
out the problem, but with this config it's working:

doctrine:
 dbal:
driver:   %database_driver%
 host: %database_host%
 dbname:   %database_name%
 user: %database_user%
 password: %database_password%
 options:
 key:   dbname
 value: cool

Note the "key" and "value" keys: the configuration builder is only
able to parse this configuration...

Does someone know what's wrong here?


The configuration is probably wrong. Can you create a ticket? I will 
have a look at this later.


Fabien


Thanks,

On Apr 28, 12:16 pm, noel guilbert  wrote:

Hi,

I'm trying to add some connections options in dbal connections, and I
have this error:

The attribute "key" must be set for path
"doctrine.dbal.connections.default.driverOptions"

Here is my configuration:

# Doctrine Configuration
doctrine:
 dbal:
 driver:   %database_driver%
 host: %database_host%
 dbname:   %database_name%
 user: %database_user%
 password: %database_password%
 options:
 foo: bar

Any ideas?

Thanks

--
Noël GUILBERThttp://www.noelguilbert.com/
Twitter :http://twitter.com/noelguilbert




--
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: Re : Re: Re : Re: [symfony-users] [sf2] Access to current route

2011-04-27 Thread Fabien Potencier


On 4/27/11 9:54 AM, winzou wrote:

Unfortunatly there isn't the "requirements" parameter of the route in
the request attributes. That's why I'm only fetching the name of the
route from the request attributes, and then use it to retrieve the Route
from the RouteCollection, to finaly reach the requirements via
$route->getRequirement('_format').
A long way just to get the route requirements !


Again, you cannot rely on the RouteCollection being available. That's 
not always the case.


Fabien


--
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: Re : Re: [symfony-users] [sf2] Access to current route

2011-04-26 Thread Fabien Potencier


On 4/26/11 5:35 PM, winzou wrote:

My aim is to change the RequestFormat if there is a P-JAX header
defined, but only if the route requirement of _format (or _method or
whatever) allows it.
In other words, I want the route config file to decide if I can render a
different template for my action ( via
...->render('x:x:x.'.$request->getRequestFormat().'.twig') ) when I
receive a p-jax request.

Is there a better way than my listener ?


All information from the route is available in the request attributes.

Fabien


--
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] [sf2] Access to current route

2011-04-26 Thread Fabien Potencier

On 4/26/11 4:47 PM, winzou wrote:

Hi all,

I didn't manage to find an easy way to retrieve the current matched
route. I'm from an onCoreController listener, but the question is for
everywhere else.
The only way I found is that one :
$this->router->getRouteCollection()->get($event->getRequest()->attributes->get('_route'))

So I pass through the RouteCollection and the _route attribute of the
Request. Any easier solution ?


It's not possible. The Route object is not always available (never in 
production as a matter of fact). Why do you need the Route object?


Fabien


And actually I have another linked question. I want to retrieve the
_format requirement of the current route. But if I do a
$route->getRequirement('_format'), I retrieve a string like
'html|xml|css' instead of an array('html', 'xml', 'css'). Any other way
than doing an explode myself ?

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


--
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] No route found for "GET /_configurator/step' When clicking 'Configure your application...'

2011-04-26 Thread Fabien Potencier

fixed now.

--
Fabien Potencier
Sensio CEO - Symfony lead developer
sensiolabs.com | symfony.com | fabien.potencier.org
Tél: +33 1 40 99 80 80

On 4/26/11 10:32 AM, Erkhembayar Gantulga wrote:

I loaded vendors.sh,
then submit " The options "page_id" do not exist".

--
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] Symfony2 returning a JSON object

2011-04-26 Thread Fabien Potencier

On 4/24/11 2:57 PM, stickaforkinme wrote:

I'm sure this is a really really stupid question but I can't seem to
find a clean way to return a JSON object, i.e. by not calling a
controller and just returning the result of json_encode. This was easy
is Symfony 1.x but I have no idea how to do it in Symfony2. Any body
know how to do this??

I have a simple action function and just want to return a json object
containing some data, that's all.


In your action:

return new Response(json_encode($data));

Fabien

--
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] No route found for "GET /_configurator/step' When clicking 'Configure your application...'

2011-04-26 Thread Fabien Potencier

This has been fixed now.

--
Fabien Potencier
Sensio CEO - Symfony lead developer
sensiolabs.com | symfony.com | fabien.potencier.org
Tél: +33 1 40 99 80 80

On 4/25/11 4:19 PM, codecowboy wrote:

I have installed Symfony2 PR12 which displays the welcome page and
demo application. However, when I try to use the configurator, I get
the error:

# request.ERROR: Symfony\Component\HttpKernel\Exception
\NotFoundHttpException: No route found for "GET /_configurator/
step" (uncaught exception)

The error is occurs when I go to 
http://local.symfony2/app_dev.php/_configurator/

I have the following in routing_dev.yml:

_configurator:
 resource: "@SymfonyWebConfiguratorBundle/Resources/config/routing/
configurator.xml"
 prefix:   /_configurator

But can't see a WebConfiguratorBundle anywhere.

Any ideas how to resolve? I installed without vendors and ran:

  * `bin/vendors.sh` (use `--min` if you don't want all the history)
  * `bin/build_bootstrap.php`
  * `app/console assets:install web/`

The readme says I should be able to access config.php in a browser to
do 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


Re: [symfony-users] [symfony2] difference between count(...) and ...->count() in Testing?

2011-04-26 Thread Fabien Potencier

On 4/25/11 10:11 PM, Sebastian Göttschkes wrote:

Hi,

I'm reading the docs about Testing right now, and I got confused over
the usage of count() and ->count():
http://symfony.com/doc/2.0/book/testing.html

Under the headline "Usefull Assertions" it says in the first example to
use count($crawler->filter($selector)) and in the second line
$crawler->filter($selector)->count(). Is there any reason when to use
each one or are they just similar?


They do exactly the same. I have updated the doc to avoid the confusion.

Fabien


Regards,
Sebastian

--
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] chance in the logo the symfony2??

2011-04-21 Thread Fabien Potencier

On 4/21/11 9:19 AM, Helysm wrote:

Greetings Symfoneros

In one of my wanderings through the web page comes to a foundation
called Dojo Foundation, and immediately I noticed the great similarity
with the logo of them with the new style also symfony page.

http://dojofoundation.org/


The logos are indeed pretty similar, but this is really just a coincidence.

Fabien



Hely Suarez Marin
Member of Research and Development Seed Free Software UFPS
No to Software Piracy! Legal Sea with Colombia! Use Free Software ...
Cúcuta



--
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-04-17 Thread Fabien Potencier


On Apr 16, 4:46 am, Luis Cordova  wrote:
> I am getting a notice:
>
> Notice: serialize(): "sessionverses" returned as member variable from
> __sleep() but does not exist in
> /home/cordoval/sites-2/memorizescripture/vendor/symfony/src/Symfony/Compone 
> nt/Security/Core/Authentication/Token/AbstractToken.php
> on line 136 Notice: serialize(): "chapter" returned as member variable
> from __sleep() but does not exist in
> /home/cordoval/sites-2/memorizescripture/vendor/symfony/src/Symfony/Compone 
> nt/Security/Core/Authentication/Token/AbstractToken.php
> on line 136
>
> I found :
> To summerize: in a given class hierarchy in which parent classes
> contain private member variables, those variables are serialized when
> __sleep() is not defined. However, once __sleep() is defined, there is
> no way to make those private member variables serialized as well. From
> that point on, serialization is performed from the visibility scope of
> the subclass. It is particularly important to note this little quirk
> when designing base classes that their derivables may be serialized,
> or when subclassing an external library class.
>
> However my question is how do i avoid this, since this is in twig that
> I am doing lazy loading with user then user.sessions, then
> session.sessionverses, then sessionverse.verse.Chapter etc
>
> Can someone please hint? thanks

Have you tried to use the Serialize interface instead. In the
serialize()/unserialize() methods, you can do pretty much what you
need
to serialize/unserialize your objects.

Fabien


> Luis

-- 
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: [Symfony2] PR8->current: Unable to find the controller for path "/login_check"

2011-04-05 Thread Fabien Potencier
Have you update your security configuration? All regexes must now be 
"complete":


Before:

  profiler:
  pattern:  /_profiler/.*

After:

  profiler:
  pattern:  ^/_profiler

More information here: 
https://github.com/symfony/symfony/blob/master/UPDATE.md


Fabien

--
Fabien Potencier
Sensio CEO - Symfony lead developer
sensiolabs.com | symfony.com | fabien.potencier.org
Tél: +33 1 40 99 80 80

On 4/4/11 11:10 PM, Christian Schaefer wrote:

hi all,

thanks for raising this topic. I experience the exact same behaviour.
I am still running on PR8 for that exact reason.

apparently the listener do not get called any longer.

I tried to hunt this down but run out of time and reverted back to
PR8.
I got as far as there is a method generated in app/cache/
appDevDebug..something that instantiates the security authentication
provider. It looked the same as in PR8 so there is nothing wrong with
the code generation.

but with PR8 it would die() when I enter one while in PR9 it would
never be called.


hope this puts someone in the right direction?


cheers
/Christian


On 4 Apr., 22:44, Dennis Jacobfeuerborn
wrote:

On Monday, April 4, 2011 10:31:30 PM UTC+2, Christophe COEVOET wrote:


  Le 04/04/2011 22:27, Dennis Jacobfeuerborn a écrit :



I just upgraded from PR8 to the current git state but this broke the
security stuff. Apparently the security component no longer handles the
_security_check route?



Unable to find the controller for path "/login_check". Maybe you forgot to
add the matching route in your routing configuration?



You need to define a controller as the listener intercept the request *
only* when the credentials are right. If they are wrong the request is not
intercepted and then goes to the controller (this was still the case
before).



I'm not sure I understand. How can the framework even determine if the


credentials are right if it doesn't intercept the /login_check call?

This code works fine in PR8 but apparently no longer in the current git
version and I didn't see any other required changes mentioned in the updates
file for the security component apart from the regexp changes for the
patterns.

Regards,
   Dennis




--
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] I ~think I found a bug. I need your advice before submitting the issue.

2011-03-31 Thread Fabien Potencier

On 4/1/11 3:09 AM, oscar balladares wrote:

Hi everybody, as I mentioned I think I found a bug in the Request component.
Before submitting the issue I need you to confirm or advice me if this
is really a bug and not a feature or misusing.

I resume, I have a main layout, which render a controller's response
template, in that template I want to show the current
route (app.request.attributes.get('_route')), but it will fail. If I try
to get the current controller instead
(app.request.attributes.get('_controller') it
will succeed. And if I 'include' the template instead 'render' the
controller (that returns the template as response) it will succeed also.
So seeing that everything else works fine, I'm pretty sure this is a
bug. But I need your opinion/advice to see if Im right.


This is not a bug. To have a route, you need to have matched an HTTP 
URL. But when you render a controller directly, this does not happen. 
That's why the _route attribute is empty. I will make a modification to 
return '_internal' instead as this is actually the internal route used 
by embedded controllers.


Fabien


I would want to report it to Symfony's trac system. This is the scenario:

I have a Layout.html.twig.

on In I have:
/**
Store/layout.html.twig
**/

{% render 'Store:Client:showMeTheCurrentRoute' %}
   {% block content %}
   {% endblock %}


-

The controller:

/**
  Store/ClientController
**/
showMeTheCurrentRouteAction()
{
   return $this->render('Store:Client:showMeTheCurrentRoute.html.twig');
}

--
The template:
/**
Store/Client/showMeTheCurrentRoute.html.twig
/**
 {{ app.request.attributes.get('_route') }}

---

On That scenario, the route won't be printed, (also no error, warning,
notice, nothing).
If I change '_route' by '_controller' it will print the current
controller. If I
use 'include' instead 'render', it will  succeed:

/**
Store/layout.html.twig
**/

{% include 'Store:Client:showMeTheCurrentRoute.html.twig %}



Hope you can tell me if this "IS" or "NOT" a bug

--
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: EntityChoiceField - Is it going away?

2011-03-28 Thread Fabien Potencier


On 3/28/11 10:36 PM, Roger Webb wrote:

It's gone of the api.symfony-reloaded.org/master documentation.  I see
it here now:  
http://api.symfony.com/2.0/Symfony/Component/Form/EntityChoiceField.html

I take it the symfony-reloaded one is no longer being maintained.  It
might be a good idea to take that site down if that's the case.


I've just activated the redirection from the old API to the new one.

Fabien


Roger

On Mar 28, 3:32 pm, Roger Webb  wrote:

Subject says it all.  I see it's still in the right place in the
source tree (under vendor/), but I noticed it was missing from the
master documentation.  This has me worried, as I use this in several
parts of my site.  It's not a big deal if it is going away, but I need
to know so I can refactor.

Thanks,

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][Symfony2]Multiple routes in annotations

2011-03-26 Thread Fabien Potencier

On 3/26/11 5:55 PM, georg wrote:

Hi,

has this been solved or has a solution been found?
I'm also very interested in achieving the same thing as Mark.


/**
 * @extra:Routes({
 *   @extra:Route("/index"),
 *   @extra:Route("/index.{_format}")
 * })
 */
public function indexAction() {
return array();
}

Fabien


thanks
georg

--
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: Overriding Error Templates

2011-03-26 Thread Fabien Potencier

On 3/26/11 2:36 PM, weaverryan wrote:

Hey guys-

The docs are correct for the latest master. If you're using PR8 (and
probably PR7), use the following path:

 app/FrameworkBundle/view/Exception/error.html.twig


This is the right path but unfortunately it was not working under PR7 
and PR8.


Fabien


I want to STRESS however that the correct going forward (after PR8)
will be:

 app/Resources/FrameworkBundle/views/Exception/error.html.twig:

I hope that helps guys - these types of changes are beginning to less
and less frequent.

Thanks!

On Mar 25, 9:42 am, Damon Jones  wrote:

I've not been able to get this to work either and I've been trying
since at least PR7 through to PR8 (with the new path).

On Mar 25, 9:50 am, weaverryan  wrote:








Hey Sam!



There could be a problem with the documentation, but it also depends
on how up-to-date the Symfony that you're using is. The code and
documentation was updated recently to use a new path (the path that
you're trying to use). If you have older code, however, you may need
to place the file at "app/views/FrameworkBundle/Exception/
error.html.twig".



If neither work, let me know - as the Symfony2 core solidifies, we're
going through the docs to be sure that everything is fully up-to-date.



Thanks!



On Mar 24, 9:57 am, Sam  wrote:



I'm starting to explore Symfony2 and I love what I've seen so far. I'm
having issues overriding error templates. I've followed the
instructions on this page (http://symfony.com/doc/2.0/cookbook/
controller/error_pages.html) which lists the location to put my error
template at (app/Resources/FrameworkBundle/views/Exception/
error.html.twig). However it is still using the default template.



I'm making sure to clear my cache using both "app/console cache:clear"
as well as "rm -rf app/cache/*".



I've also tried having the page at (app/Resources/FrameworkBundle/
Exception/error.html.twig).



When I have it at (app/views/FrameworkBundle/views/Exception/
error.html.twig) or (app/views/FrameworkBundle/Exception/
error.html.twig) I was able to get symfony to throw an error when I
introduced an error into the template so it is seeing it there but
still not using it.



Is this a bug? Or am I doing something wrong?




--
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] Controller naming format (confusing)

2011-03-10 Thread Fabien Potencier

On 3/10/11 7:39 PM, Hany El-Kerdany wrote:

Dear All,

I was reading in the Symfony2 book, specifically the controller naming
format in the Routing chapter, and the following question keeps jumping
in my head. The documentation mentions:

The routing path: /SensioBlogBundle:Blog:show/
Means that the following PHP method will be executed:
/Sensio\BlogBundle\Controller\BlogController::showAction()/

My question is, what if I have these methods in three different bundles
.. wouldn't that result in a conflict?
*SensioBlogBundle*\Controller\BlogController::showAction()
*SensioBlog\Bundle*\Controller\BlogController::showAction()
*Sensio\BlogBundle*\Controller\BlogController::showAction()


No conflict can occur. SensioBlogBundle is the name of the name and 
there is a one to one relation between the bundle name and its namespace.


Moreover, from the three namespaces you mention, only one makes sense.

Fabien


--
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] [Symfony2]

2011-02-25 Thread Fabien Potencier

On 2/25/11 11:39 PM, Alex Pilon wrote:

Hey,

I cloned symfony2 sandbox from git and set up a virtual host pointing to
the web directory. It pretty well worked out of the box except:

http://symfony2.local/app_dev.php

Gives me an error that says

URL "" is not valid (it does not start with a /).

However http://symfony2.local/app_dev.php*/* works fine.

Any reason for this?


This is a bug introduced recently. I'm going to fix it today.

Fabien


--
Alex Pilon
(613) 608-1480

--
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] [Symfony 2] Embedding Controller to Template

2011-02-25 Thread Fabien Potencier

On 2/25/11 6:08 PM, Jan Eichhorn wrote:

Hi,
i've read the Documentation about Templating with Twig.
In the Section:


  Embedding Controllers

is mentioned that controllers could be used with the include tag.
But this dosen't work so far.

I try this:

{% include 'PageBundle:Meta:mainNavigation' %}
inside the Template.


Replace include with render


in this bundle there is a Meta Controller and an mainNavigationAction
wich returns some HTML as response.

i always get the exception that this Template
"PageBundle:Meta:mainNavigation" dosent exists.

So what i have to do to include this Controller??

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


--
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] [PR6] Using ESI tag renders nothing

2011-02-23 Thread Fabien Potencier

On 2/23/11 7:37 AM, Christophe Beyer wrote:

I found the right syntax :
http://docs.symfony-reloaded.org/master/guides/cache/http.html#symfony2-reverse-proxy-configuration

In the app.config section (not framework) :
esi:
enabled: true

But now, I have this error in the area rendered by the ESI tag :

*Warning*: SQLite3Stmt::execute() [sqlite3stmt.execute
]:
Unable to execute statement: constraint failed in
*/Users/cbeyer/../symfony2/sandboxpr6/vendor/symfony/src/Symfony/Component/HttpKernel/Profiler/SQLiteProfilerStorage.php*
on line *154*

*Fatal error*: Call to a member function finalize() on a non-object in
*/Users/cbeyer/.../symfony2/sandboxpr6/vendor/symfony/src/Symfony/Component/HttpKernel/Profiler/SQLiteProfilerStorage.php*
on line *155*
503 Service Unavailable


This bug has been fixed since then. As a temporary workaround, you can 
change the code to read as follows:


$res = @$stmt->execute();
if (false === $res) {
throw new \RuntimeException(sprintf('Error executing 
SQLite query "%s"', $query));

}

Fabien




Who can help me ?

Thanks,




--
Christophe Beyer





Le 11 févr. 2011 à 13:50, stof a écrit :


On Fri, 11 Feb 2011 13:45:31 +0100, Christophe Beyer
mailto:cbe...@cap-tic.fr>>
wrote:

No, I didn't modify my config file in this way.

What should I add in the config file ?


I found nothing in the documentation :(



Seems like the doc has not been updated on this point. Here is the config:

app.config:
esi: ~

Regards

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


--
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] Generate application

2011-02-22 Thread Fabien Potencier


On 2/22/11 3:38 PM, Tipoun wrote:

Hello,

I am a Symfony1 user.
Today, I try Symfony2 but I don't understand how to create an
application when I use source code from https://github.com/symfony/symfony

I know there is a sandbox, but I would like to know how to create an
application from scratch.


Symfony2 is not stable yet. You should use the sandbox.

Fabien


Any help ?
Thank you

Tipoun



--
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] [Symfony 2 / Twig] Design issue for templates in a CMS context

2011-02-13 Thread Fabien Potencier

On 2/12/11 12:12 PM, dbenjamin wrote:

Hi,

I just can't find a way to achieve an use case with a modular project
and Twig. Maybe i'm missing something.

Let's consider a CMS context and a NewsBundle bundle ("module").

The user can create a page in his website structure, i.e : "News item page".
Then he can assign a layout (a presentation) and a route to this page,
i.e : layout.html.twig and newsView route with "/news/{slug}/" pattern.
And then he has to fill this page with content elements, which can be
static elements like a title (i.e. ), a text block, etc. But it can
also be a module, like a news one.

>

So, the presentation layer source code will be similar to the following :

* layout.html.twig : https://gist.github.com/823695
* News/view.html.twig : https://gist.github.com/823697


I suppose that the user can create a page from scratch or customize a 
"module". If that's the case, for the latter, the page (view.html.twig) 
should extend the module (CmsNewsBundle:News:view.html.twig in your 
example.)



The render tag is, i think, the more appropriate to use in a modular CMS
context.

The thing is, i have no way to set the  content with my
current news title because my news module (get by the render tag) knows
nothing about my layout. But i still need for SEO to be able to do it :)

In a way, that's logic, but maybe i'm not the only one to be confronted
to this.

Any advice ?


Thanks.


--
Benjamin Dulau - anonymation CEO
anonymation.com  | code.anonymation.com

ben...@anonymation.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


Re: [symfony-users] [symfony 2] Homepage route matches everything after updating vendors

2011-02-04 Thread Fabien Potencier


On 2/4/11 8:25 AM, phil0 wrote:

After updating my vendors recently, a few things has happened to my project:

* The homepage route seems to now be matching everything, so that no
  matter the url, the homepage is shown.
* Any calls to $view['router']->generate(...) in the dev environment
  now forgets adding "dev.php" to the url, so that all links link to
  the prod environment - similar to setting no_script_name=true in sf1.

This is an excerpt of my routing.yml file:

hello:

pattern: /{name}

defaults: { _controller: ReportingBundle:Report:show }


homepage:

pattern: /

defaults: { _controller: ReportingBundle:Report:dashboard }


Requests to both / and /whatever point to the dashboard action in the
Report controller of the ReportingBundle.

Can anyone tell me why?


In your front controllers, change the 'new Request()' call to 
'Request::createFromGlobals()'.


Fabien


--
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: symfony2 : 3rd-party libraries

2011-01-31 Thread Fabien Potencier


On 2/1/11 7:59 AM, Adrien Mogenet wrote:

Yes, this is the whole class name SF2 is attempting to load... Despite
I declared this class using "prefixes" in autoloader.

I agree this is not very logical, (at least, not so transparent) but I
don't think this could be a bug in autoloader.


Please read the PHP 5.3 namespaces doc and you will understand everything.

Fabien


On 31 jan, 22:40, Christophe COEVOET  wrote:

Le 31/01/2011 22:30, Adrien Mogenet a crit :>  I don't understand, GeSHI is not 
using namespaces !


But if I use  new GeSHI_Displayer, is does not work ;
\GeSHI_Displayer does !


If there is no namespace it is logical. But in your previous message you
talked about 'Application\EbBundle\Controller\GeSHi_Displayer' (which is
effectively the class which is used when using GeSHI_Displayer without
the \ in your controller)


On 31 jan, 21:48, Christophe COEVOETwrote:

Le 31/01/2011 21:43, Adrien Mogenet a crit :>I moved the class within 
src/vendor/geshi/GeSHI/Displayer.php ... but

nothing happened :-x
Class 'Application\EbBundle\Controller\GeSHi_Displayer'

If you are using this namespace, you have to autoload it according to
the namespace and it has to be in
Application/EbBundle/Controller/GeSHI_Displayer.php
The PEAR convention is used for classes not using namespaces.



--
Christophe | Stof


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


Re: [symfony-users] [S2PR5] ESI tag syntax in Twig file

2011-01-25 Thread Fabien Potencier

On 1/25/11 2:17 PM, Christophe BEYER wrote:

Hello,

I want to use ESI tag on my S2 (PR5) website, in Twig templates. It
seems not working, and I think the documentation is wrong :

http://docs.symfony-reloaded.org/guides/cache/http.html?highlight=standalone#using-edge-side-includes

{% render '...:list' with [], ['standalone': true] %}

Is this correct : ?

{% render '...:list' with {}, {'standalone': true} %}


Correct. I have fixed the doc.

Fabien



Thanks,

Christophe



PS: is it possible/allowed to write in French on this mailing-list ?



--
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: Symfony2 Twig Helpers and _view variable

2011-01-24 Thread Fabien Potencier

On 1/24/11 5:02 PM, Jérôme TEXIER wrote:

Hi Fabien,

My question is just what is the best way to use some user-defined
helper functions (for instance a bread crumb function) on Twig.
Before PR5, I was injecting helper class (Templating\Helper
\FooHelper.php) on the view and had access to those functions via the
former _view variable.

I was thinking on how to use those functions now without the _view
variable.
I understand now that I simply should define those functions as
Twig_Function_Method on a TwigExtension.


Two possibilities:

 * create a Twig function (so you have {{ foo() }})
 * register a global variable (so you have {{ foo.bar() }})

Fabien



On 24 jan, 00:48, Fabien Potencier  wrote:

On 1/24/11 5:20 AM, Jérôme TEXIER wrote:


Hello,



sincehttps://github.com/symfony/symfony/commit/b60d254be2f9b9a8b1340a8f7b4...
_view variable no more exist on templates.
Before PR5, I was using this variable to access to some injected Twig
helper functions.
It doesn't seem really clear to me now what it's best way to do it now
without this variable.
Should we use request global variable to get a defined helper
service ?


Can you give me an example of what you are trying to do?

Fabien




--
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 Twig Helpers and _view variable

2011-01-23 Thread Fabien Potencier

On 1/24/11 5:20 AM, Jérôme TEXIER wrote:

Hello,

since 
https://github.com/symfony/symfony/commit/b60d254be2f9b9a8b1340a8f7b40270748692ca5
_view variable no more exist on templates.
Before PR5, I was using this variable to access to some injected Twig
helper functions.
It doesn't seem really clear to me now what it's best way to do it now
without this variable.
Should we use request global variable to get a defined helper
service ?


Can you give me an example of what you are trying to do?

Fabien

--
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] sf2 + sf2Forms + Twig over escaping issue

2011-01-12 Thread Fabien Potencier

On 1/12/11 1:45 PM, OlegZinchenko wrote:

In my form I have next:

$this->add(new DateField('dateBefore'));

in Twig template I have next:


 {% for field in form %}
 {{ field|render_label }}
 {{ field|render }}
 {% endfor %}


as result I have next view, IMO it`s twig issue I call it "over
escaping"
http://h1813090.stratoserver.net/files/share/12_1_2011/zm02zg5ofEeXU4V52ySkRQ.png

This issue occurs only at DateField, others fields are render good,
even others dropdowns.


This has been fixed in the master. Be careful as this filter is now a 
function:


 
  {% for field in form %}
  {{ form_label(field) }}
  {{ form_field(field) }}
  {% endfor %}
 

Fabien

--
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] Test suite of symfony 2

2010-12-14 Thread Fabien Potencier

On 12/14/10 1:21 PM, Alessandro Nadalin wrote:

Hi Fabien,

2010/12/14 Fabien Potencier:

You must use the latest stable version of PHPUnit.


Sorry, terrible mistake of mine.

But after upgrading to 3.5.5 I get, as previously:

PHP Fatal error:  Cannot redeclare class FooClass in
/var/www/symfony2/tests/Symfony/Tests/Component/DependencyInjection/Fixtures/includes/foo.php
on line 4


That's weird as it definitely works for me. Have you a special 
phpunit.xml, or do you use the one that comes with Symfony2?


Fabien



--
Fabien Potencier
Sensio CEO - symfony lead developer
sensiolabs.com | symfony-project.org | fabien.potencier.org
Tél: +33 1 40 99 80 80

On 12/14/10 11:00 AM, Alessandro Nadalin wrote:


Hi Fabien,

2010/12/14 Fabien Potencier:


Which version of PHPUnit do you use?


phpunit --version: PHPUnit 3.5.0RC2 by Sebastian Bergmann.

Following some hints of the italian symfony ML I've tried to use the
vPR4 tag ( instead of the master ) on the Git repo, but the,
frustrating :), error that I get ( after a few tests run properly )
is:

PHP Fatal error:  Cannot redeclare class FooClass in

/var/www/symfony2/tests/Symfony/Tests/Component/DependencyInjection/Fixtures/includes/foo.php
on line 4



--
Fabien Potencier
Sensio CEO - symfony lead developer
sensiolabs.com | symfony-project.org | fabien.potencier.org
Tél: +33 1 40 99 80 80

On 12/13/10 12:43 PM, odino wrote:


Hi guys,

I was trying to fix a bug on Sf2 tracker. To do that I needed to build
the environment:
* forked the symfony/symfony repo
* cloned on my local machine
* installed required PEAR packages
* installed ( eventually updated ) the vendors

but when i run phpunit I get a fatal error:
Call to undefined method
PHPUnit_Framework_MockObject_MockBuilder::getMockForAbstractClass()
in /var/www/symfony2/tests/Symfony/Tests/Component/Routing/Loader/
AnnotationDirectoryLoaderTest.php on line 27

ideas?



--
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] Test suite of symfony 2

2010-12-14 Thread Fabien Potencier

You must use the latest stable version of PHPUnit.

--
Fabien Potencier
Sensio CEO - symfony lead developer
sensiolabs.com | symfony-project.org | fabien.potencier.org
Tél: +33 1 40 99 80 80

On 12/14/10 11:00 AM, Alessandro Nadalin wrote:

Hi Fabien,

2010/12/14 Fabien Potencier:

Which version of PHPUnit do you use?


phpunit --version: PHPUnit 3.5.0RC2 by Sebastian Bergmann.

Following some hints of the italian symfony ML I've tried to use the
vPR4 tag ( instead of the master ) on the Git repo, but the,
frustrating :), error that I get ( after a few tests run properly )
is:

PHP Fatal error:  Cannot redeclare class FooClass in
/var/www/symfony2/tests/Symfony/Tests/Component/DependencyInjection/Fixtures/includes/foo.php
on line 4



--
Fabien Potencier
Sensio CEO - symfony lead developer
sensiolabs.com | symfony-project.org | fabien.potencier.org
Tél: +33 1 40 99 80 80

On 12/13/10 12:43 PM, odino wrote:


Hi guys,

I was trying to fix a bug on Sf2 tracker. To do that I needed to build
the environment:
* forked the symfony/symfony repo
* cloned on my local machine
* installed required PEAR packages
* installed ( eventually updated ) the vendors

but when i run phpunit I get a fatal error:
Call to undefined method
PHPUnit_Framework_MockObject_MockBuilder::getMockForAbstractClass()
in /var/www/symfony2/tests/Symfony/Tests/Component/Routing/Loader/
AnnotationDirectoryLoaderTest.php on line 27

ideas?



--
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] Test suite of symfony 2

2010-12-14 Thread Fabien Potencier

Which version of PHPUnit do you use?

--
Fabien Potencier
Sensio CEO - symfony lead developer
sensiolabs.com | symfony-project.org | fabien.potencier.org
Tél: +33 1 40 99 80 80

On 12/13/10 12:43 PM, odino wrote:

Hi guys,

I was trying to fix a bug on Sf2 tracker. To do that I needed to build
the environment:
* forked the symfony/symfony repo
* cloned on my local machine
* installed required PEAR packages
* installed ( eventually updated ) the vendors

but when i run phpunit I get a fatal error:
Call to undefined method
PHPUnit_Framework_MockObject_MockBuilder::getMockForAbstractClass()
in /var/www/symfony2/tests/Symfony/Tests/Component/Routing/Loader/
AnnotationDirectoryLoaderTest.php on line 27

ideas?



--
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: Setter injection in controllers

2010-12-08 Thread Fabien Potencier

That is definitely weird. Can you create a ticket?

Thanks,
Fabien

--
Fabien Potencier
Sensio CEO - symfony lead developer
sensiolabs.com | symfony-project.org | fabien.potencier.org
Tél: +33 1 40 99 80 80

On 12/8/10 12:42 PM, benjamin.dulau wrote:

In fact, i think there is an issue here.

The xml driver for configuration does not seem to work well.

First of all, with the new PR4, the line :



Causes a crash of the application with a xsd validation error.


For the setter injection, when i use exactly the same configuration,
it works with YAML but not with XML.

For example, the YAML :
services:
 hello_controller:
 class: "Application\HelloBundle\Controller\HelloController"
 shared: true
 calls:
   - [ setTestService, [ @test_service ] ]
 test_service:
 class: "Application\HelloBundle\Service\Impl\TestService"

Works fine !

The equivalent XML :

 
 
 
 
 
 
 
 

Doesn't work, the setter method is not invoked.


cya,
Benjamin.


On 8 déc, 02:11, Marijn  wrote:

Perhaps this article will help 
you:http://avalanche123.com/post/1215273326/symfony2-controller-testing

On Dec 7, 1:44 pm, "benjamin.dulau"  wrote:








Hi,



Where can i find an example for setter injection in Symfony 2 please ?



I'm trying to do something like :



use Application\HelloBundle\Service;



class HelloController extends Controller
{
 /**
  * @var ITestService
  */
 private $testService;



 public function indexAction($name)
 {
 $test = $this->testService->say('Hey give me my service
instance !!');
 return $this->render('HelloBundle:Hello:index.twig',
array('name' =>  $name, 'test' =>  $test));
 }



 public function setTestService(ITestService $testService)
 {
 $this->testService = $testService;
 return $this;
 }



}



But i'm missing something, what should be the configuration for that ?




 
 
 
 
 
 




Thanks.



br,
Benjamin.




--
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: inject a dependency in constructor at runtime

2010-12-07 Thread Fabien Potencier

On 12/6/10 9:06 PM, Florian wrote:

Ok I should have reformulated my question:

I know it's actually impossible to do that, but the goal of my
question is: How to bypass the problem ?


A Paginator is probably not an object you want to manage with the DIC.

The DIC is good at managing "global" objects like a logger, the user 
(from the session), a database connection, ... all the objects for which 
you only need one instance. For everything else, the DIC is not the 
solution (like your model objects for instance -- you need many 
articles, products, ...).


Fabien


Do I have to modify the lib to work with setters injection ?

On Dec 6, 8:59�pm, Florian  wrote:

Hi,

simple question:

Is it possible to inject dependency at runtime with SF2 DI container ?

For example, I'm using a Zend\Paginator\Paginator who needs an adapter
as first argument of its constructor.
This adapter needs a Doctrine Query object as first argument of its
constructor too.

Can I inject the Query object at runtime, like this ?

$this->container->getPaginatorService($query);

Thanks!
Florian.




--
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] Learning Symfony2 is difficult because...

2010-12-07 Thread Fabien Potencier

On 12/7/10 1:24 AM, Flukey wrote:

Also, from reading a presentation (http://www.slideshare.net/jwage/
symfony2-and-doctrine2-integration) i'm confused about actions. In
this slideshow it says the action should extend the
sfDoctrineController. Should I use that?


The Doctrine controller has been removed and does not exist anymore. 
Just use the standard Controller class and get the entity manager from 
the container directly as explained in the doc.


Fabien



Thanks muchly!

Jamie



--
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] Symfony taking a beating in favorite-PHP-framework poll

2010-12-02 Thread Fabien Potencier

On 12/3/10 2:53 AM, Tom Boutell wrote:

Hey guys, Symfony is taking a real beating in this poll:

http://whatshallwe.com/s/b1d75e0a72d66218

As a Symfony fan (and as the author of the poll app, which is written
*in* Symfony), I am shamelessly appealing to you to jump in and vote
(:


Those polls do not mean anything. Have a look at FuelPHP, a fork of 
CodeIgniter. This is a new framework, started a month ago ;)


Anyway, if you add the Symfony and Symfony2 votes, we are doing quite well.

Fabien


(Note that you can vote "for" and "against" as many frameworks as you
wish, once each. This has a lot to do with why so many frameworks are
ranked low - people tend to spread their hate around all the
frameworks they don't use (: The app was really intended for questions
like "where shall we have dinner," where "no" votes are quite
important, but I am interested in how it is playing out for this
question)



--
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] [SF2] Tiny thoughts

2010-11-30 Thread Fabien Potencier

On 11/29/10 7:22 PM, Lideln wrote:

Hi there,

I just read the entire Symfony 2 quick tour. I found many useful and
smart things, which are great !
But I also wondered about a few (tiny) things, that are more about
ease of use.
Hope I get an answer here :)


The answer: Explicit is always better than implicit. In symfony1, we 
have all kind of things that happen automagically. You know them and you 
know how they, but a newcomer can just scratch its head to understand 
what's going on. Futhermore, when you want to escape from the default 
behavior, it's a bit more complex; also because you now have a different 
way of doing things. Symfony2 basically solves these problems.



1) I'm sorry that we lost the ability to "return nothing" in the
action (which would default to a specific template). Instead now, we
have to write "$this->render('HelloBundle:Hello:index', array('name'
=>  $name));", which is long and useless. I think the SF1.4 way was
quicker. (but I am definitely fond of the arguments-like new way of
dealing parameters :) )


Probably quicker to write but definitely less flexible. In Symfony2, 
there is only one way, and the one true way is as flexible as you might 
need.



2) Can't we define layouts in view.yml anymore ? Do we have to use "extend('HelloBundle::layout') ?>" in every single view ?


The layout belongs to the template. So, it's much better now. Also, just 
have a look at all the problems we have we the default layout in 
symfony1 (and all the related tickets we just cannot solve easily). As 
before, there is now only one way to define a layout. It is much easier 
to learn and to master.



3) Is there a shortcut like "$view->render('hello')" (that would
default the namespace to the current one, if not specified) ?


Again, in symfony1, the fact that a partial for instance tries to 
automatically determines the context falls apart pretty quickly (just 
try that with a partial used in two different modules).



These are just tiny thoughts (and other ones that were even tinier so
I did not bother to write them), but as much as I find the SF2
features awesome, I find it a bit more complex to use (but maybe it's
also a question of habit).


When learning Symfony2, you need to put symfony1 aside and more 
importantly, you need to use Symfony2 for a small project to understand 
all the benefits of the new approach.


Thanks for the feedback,
Fabien


Thank you for your answers :)

A humble SF user.



--
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] [Symfony 2] Custom validator with a boolean option?

2010-11-27 Thread Fabien Potencier

On 11/27/10 5:20 AM, Gustavo Adrian wrote:

Ok, I wanted to start my contribution with this little issue. It's a
small fix so it's a great way to learn how to contribute. I'm not very
familiarized with github, and I've been working with git for a few
weeks. I've followed the steps shown on the docs that talks about
contribution at:
http://docs.symfony-reloaded.org/master/contributing/code/patches.html

My
branch: https://github.com/gfalco/symfony/tree/ticket_9297

Added two simple
things: The test against an empty string so it returns true with null
AND an empty string. And I've added the unit test accordingly.

So, if I'm right, next step is a pull request?


Yes,

Fabien



Thanks!

On Fri, Nov 26, 2010 at 11:27 PM, Gustavo Adrian
mailto:comfortablynum...@gmail.com>> wrote:

 > Ok, that's a bug. Can you file a ticket please? :)

Of course :) http://trac.symfony-project.org/ticket/9297



On Fri, Nov 26, 2010 at 4:22 PM, Bernhard Schussek
mailto:bschus...@gmail.com>> wrote:

2010/11/26 Gustavo Adrian mailto:comfortablynum...@gmail.com>>:
 > The Url constraint for instance. How could you make it
optional? if you
 > don't enter any value on the field, it would complain because
the only way
 > it returns true is if $value === null

Ok, that's a bug. Can you file a ticket please? :)

Bernhard
--
Software Architect & Engineer
Blog: http://webmozarts.com
Twitter: http://twitter.com/webmozart

--
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] [Symfony2] Twig

2010-11-21 Thread Fabien Potencier

On 11/21/10 8:22 PM, noel guilbert wrote:

You can get it through the _view variable:

{{ _view.request.getParameter('page') }}


Never use _view. It's not documented and can be removed any time.

Fabien


++
Noel

On Sun, Nov 21, 2010 at 7:58 PM, Francis Besset mailto:francis.bes...@free.fr>> wrote:

Hi all,

I am currently creating my project with Symfony2.
I started making templates with PHP but I want to migrate on Twig.

How can I access at the instance Request in the twig template?
With PHP there is $view['request'].


Thanks,
Francis.

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




--
Noël GUILBERT
http://www.noelguilbert.com/
Twitter : http://twitter.com/noelguilbert
http://www.sensiolabs.com
http://www.symfony-project.com
Sensio Labs
Tél: +33 1 40 99 80 80

--
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] [Symfony2] Twig

2010-11-21 Thread Fabien Potencier

Pass the request as an argument to the template.

--
Fabien Potencier
Sensio CEO - symfony lead developer
sensiolabs.com | symfony-project.org | fabien.potencier.org
Tél: +33 1 40 99 80 80

On 11/21/10 7:58 PM, Francis Besset wrote:

Hi all,

I am currently creating my project with Symfony2.
I started making templates with PHP but I want to migrate on Twig.

How can I access at the instance Request in the twig template?
With PHP there is $view['request'].


Thanks,
Francis.



--
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] Security Component : absolute path of redirections

2010-11-13 Thread Fabien Potencier

On 11/13/10 4:03 PM, gordonslondon wrote:

Hi,

My login page is on: http://www.example.com/login
My Account page is on: http://secure.example.com/admin/

The firewall rule is: /admin/*

When i'm not logged in and go to: http://secure.example.com/admin/
this redirects me to http://secure.example.com/login

QUESTION: how to redirect to http://www.example.com/login and not
http://secure.example.com/login.

I haven't found any options to redirect in these case, is there a
solution ?


This is not possible yet but should be easy enough to add. Can you 
create a ticket for that issue?


Fabien

--
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] [Symfony 2] General Questions

2010-11-05 Thread Fabien Potencier

Documentation for the master is here:

http://docs.symfony-reloaded.org/master/

Fabien

--
Fabien Potencier
Sensio CEO - symfony lead developer
sensiolabs.com | symfony-project.org | fabien.potencier.org
Tél: +33 1 40 99 80 80

On 11/5/10 3:46 PM, Gustavo Adrian wrote:

Hi,

I'll use Symfony 2 for my next project in my job. I was testing the
sandbox at home and the latest version at git too. What I would like is,
obviusly, use the latest version because it has a lot of changes, in
comparison with PR3, in terms of syntax, etc. This is a project that
will be product, not a project of one month only. So I think it's better
to use the latest version of Symfony. I don't mind to keep updating my
code with the latest changes. But I would like to know how much out
dated are the docs in comparison with the latest version of Symfony at git

Also, is there a plan to release a new sandbox updated soon? If that's
the case maybe I can wait a little longer and use that version instead.


In any case, thanks in advance for reading 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


--
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: All new symfony developers please read...

2010-11-01 Thread Fabien Potencier


On 11/1/10 5:15 PM, Massimiliano Arione wrote:

On 29 Ott, 16:24, "cordo...@gmail.com"  wrote:

oh!!! What exactly are we missing in the English version?


Everything updated in the repository in the last 2 or 3 weeks (about)


I am sure Fabien will take action if he notices.


So, please let him know.
I already did and I don't want to bother him too much.


I'm working on it.

Fabien


cheers
Massimiliano



--
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] HTTP 404 Error on newest "A week of symfony"

2010-11-01 Thread Fabien Potencier

fixed now.

--
Fabien Potencier
Sensio CEO - symfony lead developer
sensiolabs.com | symfony-project.org | fabien.potencier.org
Tél: +33 1 40 99 80 80

On 11/1/10 11:22 AM, Michał Piotrowski wrote:

Hi,

2010/11/1 J. Dreesen:

Some hours ago, Javier Eguiluz wrote the newest "A week of symfony"
which is number 200! I like this weekly overview very much, but sadly,
this time I couldn't read it, because the URL
http://www.symfony-project.org/blog/2010/10/31/a-week-of-symfony-200-25-31-october-2010
is not found :(

Symfony team, can you please fix this? Thx in advance!


I  think that we should cc someone from sf team.

http://trac.symfony-project.org/roadmap
it is also a little messy

Kind regards,
Michal



Jacob

--
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: Symfony2 Security

2010-10-24 Thread Fabien Potencier

On 10/24/10 9:00 PM, Michael wrote:

another issue i noticed, when calling "/login_check" or even "/logout"
it will only run the FormAuthenticationListener even handler if they
are relative.. in this case "/user/logout". maybe when trying to match
the request path check special links


The listeners compare the path info, so they will only execute if the 
path info is exactly the configured path.


Fabien

--
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 Security

2010-10-22 Thread Fabien Potencier

On 10/23/10 12:56 AM, Michael wrote:

Does anybody have any clue how to use this featured.. i have looked at
the document at 
http://docs.symfony-reloaded.org/master/guides/security/index.html
but:

1. only work for Doctrine, not for MongoDB


MongoDB is not yet supported but will be


2. there is no instructions on how to validate the form and execute
the login / logout process


No need to validate the form, it's done by the security layer.


Any ideas? Can someone provide a good example?


Good examples are in the documentation. Follow the instructions and it 
should work.


Fabien

--
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: Mixing YML and XML configuration

2010-10-04 Thread Fabien Potencier
Just import the XML resource from a YAML one or the other way around. It 
works natively.


Fabien

--
Fabien Potencier
Sensio CEO - symfony lead developer
sensiolabs.com | symfony-project.org | fabien.potencier.org
Tél: +33 1 40 99 80 80

On 10/4/10 8:24 PM, bkuberek wrote:

Hi all! I was hoping to get a dummy question answered. I have set my
Kernel.php to load .yml files but some of the bundles, including
DoctrineUserBundle, uses XML files.

How can I make use of both YML and XML config files?

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


Re: [symfony-users] Symfony2 form bug?

2010-09-28 Thread Fabien Potencier
That's a known bug and there is a ticket for it already. But I'm not 
fixing it because the rendering will probably be changed to a 
template-based approach (see the fields_as_templates branch -- where 
this bug is fixed):


http://github.com/fabpot/symfony/tree/fields_as_templates

Expect some documentation on the template-based form rendering later 
this week.


Fabien

--
Fabien Potencier
Sensio CEO - symfony lead developer
sensiolabs.com | symfony-project.org | fabien.potencier.org
Tél: +33 1 40 99 80 80

On 9/29/10 4:38 AM, Dennis Jacobfeuerborn wrote:

When I set up a form like this in the controller:

$form = new Form('system', $system, $this["validator"] );
$form->add(new TextField('name'));
$form->add(new TextField('description'));

and then render it like this in the form like this:

renderFormTag('#') ?>
 renderErrors() ?>
 render() ?>
 


then the "_token" field for the CSRF protection gets assigned a label
even though the field itself is of the type "hidden". That results in
the word "token" being rendered in the form.
Do I have to disable this manually or shouldn't the form render labels
for hidden fields?

Regards,
   Dennis



--
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: Symfony2PR3: Call to undefined method helloDevDebugProjectContainer::getService

2010-09-24 Thread Fabien Potencier

On 9/24/10 7:03 PM, Pablo Godel wrote:

Fabien, this seems like good information to include in the Official
Documentation.


I know, but the container documentation is not written yet ;)


Pablo

On Sun, Sep 19, 2010 at 3:13 AM, Fabien Potencier
mailto:fabien.potenc...@symfony-project.com>> wrote:

The following statements are all equivalent:


$this['doctrine.orm.entity_manager']
$this->container['doctrine.orm.entity_manager']

$this->container->get('doctrine.orm.entity_manager')
$this->container->getDoctrine_Orm_EntityManager()

The fastest:


$this->container->get('doctrine.orm.entity_manager')

The shortest:


$this['doctrine.orm.entity_manager']

HTH,
Fabien

--
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] Official replacement for getParameter() in Symfony2PR3?

2010-09-24 Thread Fabien Potencier

I have just fixed the documentation.

--
Fabien Potencier
Sensio CEO - symfony lead developer
sensiolabs.com | symfony-project.org | fabien.potencier.org
Tél: +33 1 40 99 80 80

On 9/24/10 6:28 PM, Pablo Godel wrote:

Funny I just posted a question in the devs list about the same
getRequest() issue.

Pablo


On Mon, Sep 20, 2010 at 9:29 PM, Dennis Jacobfeuerborn
mailto:djacobfeuerb...@gmail.com>> wrote:

I'm trying to get the Form stuff working and while I'm reasonably
successfull I'm not sure I'm doing things the right way.
The Documentation mentions the following:
$this->getRequest()->getParameter('customer')

This does not appear to be current anymore. What I replaced it with
is:
$this['request']->get('system')

This seems to work as intended but the comment for that function in
the Request class says you are not supposed to use get() in a
controller. So what *am* I supposed to use instead?

Regards,
  Dennis

--
If you want to report a vulnerability issue on symfony, please send
it to security at symfony-project.com <http://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
<mailto:symfony-users@googlegroups.com>
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
<mailto:symfony-users%2bunsubscr...@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: Symfony2PR3: Call to undefined method helloDevDebugProjectContainer::getService

2010-09-19 Thread Fabien Potencier

The following statements are all equivalent:

$this['doctrine.orm.entity_manager']
$this->container['doctrine.orm.entity_manager']
$this->container->get('doctrine.orm.entity_manager')
$this->container->getDoctrine_Orm_EntityManager()

The fastest:

$this->container->get('doctrine.orm.entity_manager')

The shortest:

$this['doctrine.orm.entity_manager']

HTH,
Fabien

--
Fabien Potencier
Sensio CEO - symfony lead developer
sensiolabs.com | symfony-project.org | fabien.potencier.org
Tél: +33 1 40 99 80 80

On 9/19/10 8:56 AM, spike3111 wrote:

Ok Tim, your solution works, the documentation said to use getService.
I looked again the documentation on the site of symfony, and it just
changed in my opinion, and now the code is just $em =
$this['doctrine.orm.entity_manager'];

So what to choose? If the documentation has been updated, so I will
use this.

On 19 sep, 03:49, Dennis Jacobfeuerborn
wrote:

Hm, so I found that I apparently can store the yml files in Resources/
config/doctrine/metadata/orm/*.yml.
However when I do so doctrine:schema:create no longer dumps the
User.php file but still says "No Metadata
Classes to process". It doesn't even matter what the yaml file
contains (e.g. some random garbage).

On Sep 19, 3:29 am, Dennis Jacobfeuerborn
wrote:


That still leaves the question why a) doctrine:schema:create outputs
the contents of Entity/User.php on the screen and b) says "No Metadata
Classes to process." after doing so.
In Symfony1 I used yaml to define the schema but I don't know where to
put the yaml file for the schema definition in Symfony2 or how to tell
Symfony2 to use the yaml schema and generate the classes from that.



On Sep 19, 2:22 am, Tim Nagel  wrote:



I wouldnt be looking into the cache classes for methods to use - they're
auto generated, and the format used may change. (Unlikely but possible) The
method I use to get things, based on looking at other projects at
symfony2bundles is



$em = $this->container->get('doctrine.orm.entity_manager');



You get the string from the DI config in each component you're interested
in.



As for needing table name and other info - no, @Entity is enough to define
an entity. Doctrine will use its default name schemes without them.



t



On 19/09/2010 6:58 AM, "Richard D Shank"  wrote:



I think you'll need to have your table name and maybe some other info, I
don't remember off hand.  Here is more info about 
doctrine2http://www.doctrine-project.org/projects/orm/2.0/docs/reference/enSpe...
read the Annotations Reference chapter.



Richard



On 09/18/2010 12:23 PM, Dennis Jacobfeuerborn wrote:



I just wanted to be sure that this is rea...







--
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 virtualhost

2010-09-15 Thread Fabien Potencier

On 9/15/10 3:22 AM, Josh wrote:

How do a setup a VirtualHost for Symfony2? There is no virtualhost
examples anywhere, and it's vastly different from 1.x..


There is nothing special to do, just create a classic virtualhost.


Don't want to use the sandbox either.


Why?

--
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-sandbox PR3] doctrine:mapping:import , error runtime

2010-09-14 Thread Fabien Potencier
Can you open a ticket for the Doctrine problem on the Doctrine ticketing 
system?


http://www.doctrine-project.org/jira/secure/Dashboard.jspa

Thanks,

Fabien

--
Fabien Potencier
Sensio CEO - symfony lead developer
sensiolabs.com | symfony-project.org | fabien.potencier.org
Tél: +33 1 40 99 80 80

On 9/14/10 11:01 AM, spike3111 wrote:

Hello,
   I test the sandbox PR3, and I wanted to test the command
doctrine:mapping:import with a simple database with three tables
(categories, articles, members). I have the following exception:

  [ErrorException]

Runtime Notice: Only variables should be passed by reference in C:
\Users\moi\Documents
\devweb\sandsf2\src\vendor\doctrine\lib\Doctrine\ORM\Mapping\Driver
\DatabaseDriver.php line 195


and another question I wanted to try to import another base and I got
the message database unknow LONGBLOB Requested, not support it.
  Not supported yet?



--
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] [sf2] Doctrine Schema

2010-09-13 Thread Fabien Potencier
On 9/14/10 1:59 AM, Craige wrote:
> Hey guys,
> 
> I've been eagerly awaiting Symfony 2, but I see that the public site
> now says it's not expected until March. Unfortunate, but no big deal.
> I'd rather have the team do it right than do it fast.
> 
> Anyway, I've was planning (and still am planning) to program my new
> project with Symfony 2. Given the recent change of events however,
> I've decided to take this extra time to put towards Database/Model
> structuring, as well as interface design and mockup;  I'm not one to
> sit and twiddle my thumbs while I wait.
> 
> So, my question is as follows:
> 
> How does Symfony two handle Models between Applications. Ie, in
> Symfony 1.4, all models were globally accessible by all applications
> within a project.  Is this still the case with Symfony 2?

This document answers your question:

http://docs.symfony-reloaded.org/guides/symfony1.html

> Also, where are the .yaml Schema files stored these days? I kind of
> gathered that each application/bundle has it's own directory for them,
> but what should I do with my global schema?
> 
> Thanks a lot, guys!  I figured this was a logical step to take given
> the new time lapse.
> 

-- 
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] Are the design of Symfony2 and Doctrine2 in right direction?

2010-09-13 Thread Fabien Potencier

On 9/12/10 4:23 PM, Fangzx wrote:

I play Symfony2 and Doctrine2 for two weeks, and I came from
Java(5years) and Python/Django(3years). My questions:
1. Doctrine2  is so like Java Hibernate and is too heavy, I don't like
that, for example, why not use pulic properties directly instead of
setter and getter in the entity class.


This is not needed. You can just use public properties if you want.


2. Symfony2 is more Java like than Django, all is class, I don't like
that, I think the function should be first class citizen.


Just read the current discussion about implementing generic views as 
classes in Django.



3. Why every route want a name in Symfony2 ?

I switched to Lithium (li3) today, and hope Symfony2 can get something
useful from  Lithium .


Good luck!

Fabien


Sorry for my bad English.



--
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] session_start() error in Functional tests

2010-09-03 Thread Fabien Potencier
We are working on a specific Session storage class for functional test. 
Should be available soon.


--
Fabien Potencier
Sensio CEO - symfony lead developer
sensiolabs.com | symfony-project.org | fabien.potencier.org
Tél: +33 1 40 99 80 80

On 9/3/10 11:15 AM, Florian wrote:

Ok thanks!

I'll try to debug this to find what's happening.

It seems to be called only once in
src/vendor/symfony/src/Symfony/Component/HttpFoundation/SessionStorage/NativeSessionStorage.php



Le 03/09/2010 10:54, Fabien Potencier a écrit :

I'm not sure how it worked before as there is no Session storage class
yet for functional tests.

Fabien

--
Fabien Potencier
Sensio CEO - symfony lead developer
sensiolabs.com | symfony-project.org | fabien.potencier.org
Tél: +33 1 40 99 80 80

On 9/2/10 9:57 PM, Florian Klein wrote:


Bien sur, voici un lien du fichier sur github:

http://github.com/docteurklein/Symfony2-e-commerce/blob/master/src/Application/ECommerceBundle/Tests/Controller/ECommerceControllerTest.php


Ca sera peut etre plus simple a visualiser.

Sinon, je l 'ai mis en pièce jointe.

<http://github.com/docteurklein/Symfony2-e-commerce/blob/master/src/Application/ECommerceBundle/Tests/Controller/ECommerceControllerTest.php>Merci,

Florian.

2010/9/2 Fabien Potencier mailto:fabien.potenc...@symfony-project.com>>

Can you send me your test file?

--
Fabien Potencier
Sensio CEO - symfony lead developer
sensiolabs.com <http://sensiolabs.com> | symfony-project.org
<http://symfony-project.org> | fabien.potencier.org
<http://fabien.potencier.org>
Tél: +33 1 40 99 80 80

On 9/2/10 4:57 PM, Florian wrote:

Hi!

I'm encoutering an error since an upgrade to the latest Symfony2.


1) Application\ECommerceBundle\Tests\Controller
\ECommerceControllerTest::testIndex
A session had already been started - ignoring session_start()

/var/www/Symfony2-e-commerce/src/vendor/symfony/src/Symfony/Component/
HttpFoundation/SessionStorage/NativeSessionStorage.php:83
/var/www/Symfony2-e-commerce/src/vendor/symfony/src/Symfony/Component/
HttpFoundation/Session.php:52
/var/www/Symfony2-e-commerce/src/vendor/symfony/src/Symfony/Component/
HttpFoundation/Request.php:250
/var/www/Symfony2-e-commerce/src/vendor/symfony/src/Symfony/Component/
HttpKernel/DataCollector/RequestDataCollector.php:41
/var/www/Symfony2-e-commerce/src/vendor/symfony/src/Symfony/Bundle/
FrameworkBundle/DataCollector/RequestDataCollector.php:30
/var/www/Symfony2-e-commerce/src/vendor/symfony/src/Symfony/Component/
HttpKernel/Profiler/Profiler.php:238
/var/www/Symfony2-e-commerce/src/vendor/symfony/src/Symfony/Component/
HttpKernel/Profiler/ProfilerListener.php:87
/var/www/Symfony2-e-commerce/src/vendor/symfony/src/Symfony/Framework/
Debug/EventDispatcher.php:101
/var/www/Symfony2-e-commerce/src/vendor/symfony/src/Symfony/Component/
HttpKernel/HttpKernel.php:159
/var/www/Symfony2-e-commerce/src/vendor/symfony/src/Symfony/Component/
HttpKernel/HttpKernel.php:89
/var/www/Symfony2-e-commerce/src/vendor/symfony/src/Symfony/Framework/
Kernel.php:209
/var/www/Symfony2-e-commerce/src/vendor/symfony/src/Symfony/Framework/
Client.php:92
/var/www/Symfony2-e-commerce/src/vendor/symfony/src/Symfony/Component/
BrowserKit/Client.php:208
/var/www/Symfony2-e-commerce/src/Application/ECommerceBundle/Tests/
Controller/ECommerceControllerTest.php:13

Do you have an idea why ?


--
If you want to report a vulnerability issue on symfony, please send
it to security at symfony-project.com <http://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
<mailto:symfony-users@googlegroups.com>
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
<mailto:symfony-users%2bunsubscr...@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] [Symfony2] session_start() error in Functional tests

2010-09-03 Thread Fabien Potencier
I'm not sure how it worked before as there is no Session storage class 
yet for functional tests.


Fabien

--
Fabien Potencier
Sensio CEO - symfony lead developer
sensiolabs.com | symfony-project.org | fabien.potencier.org
Tél: +33 1 40 99 80 80

On 9/2/10 9:57 PM, Florian Klein wrote:


Bien sur, voici un lien du fichier sur github:

http://github.com/docteurklein/Symfony2-e-commerce/blob/master/src/Application/ECommerceBundle/Tests/Controller/ECommerceControllerTest.php

Ca sera peut etre plus simple a visualiser.

Sinon, je l 'ai mis en pièce jointe.

<http://github.com/docteurklein/Symfony2-e-commerce/blob/master/src/Application/ECommerceBundle/Tests/Controller/ECommerceControllerTest.php>Merci,
Florian.

2010/9/2 Fabien Potencier mailto:fabien.potenc...@symfony-project.com>>

Can you send me your test file?

--
Fabien Potencier
Sensio CEO - symfony lead developer
sensiolabs.com <http://sensiolabs.com> | symfony-project.org
<http://symfony-project.org> | fabien.potencier.org
<http://fabien.potencier.org>
Tél: +33 1 40 99 80 80

On 9/2/10 4:57 PM, Florian wrote:

Hi!

I'm encoutering an error since an upgrade to the latest Symfony2.


1) Application\ECommerceBundle\Tests\Controller
\ECommerceControllerTest::testIndex
A session had already been started - ignoring session_start()

/var/www/Symfony2-e-commerce/src/vendor/symfony/src/Symfony/Component/
HttpFoundation/SessionStorage/NativeSessionStorage.php:83
/var/www/Symfony2-e-commerce/src/vendor/symfony/src/Symfony/Component/
HttpFoundation/Session.php:52
/var/www/Symfony2-e-commerce/src/vendor/symfony/src/Symfony/Component/
HttpFoundation/Request.php:250
/var/www/Symfony2-e-commerce/src/vendor/symfony/src/Symfony/Component/
HttpKernel/DataCollector/RequestDataCollector.php:41
/var/www/Symfony2-e-commerce/src/vendor/symfony/src/Symfony/Bundle/
FrameworkBundle/DataCollector/RequestDataCollector.php:30
/var/www/Symfony2-e-commerce/src/vendor/symfony/src/Symfony/Component/
HttpKernel/Profiler/Profiler.php:238
/var/www/Symfony2-e-commerce/src/vendor/symfony/src/Symfony/Component/
HttpKernel/Profiler/ProfilerListener.php:87
/var/www/Symfony2-e-commerce/src/vendor/symfony/src/Symfony/Framework/
Debug/EventDispatcher.php:101
/var/www/Symfony2-e-commerce/src/vendor/symfony/src/Symfony/Component/
HttpKernel/HttpKernel.php:159
/var/www/Symfony2-e-commerce/src/vendor/symfony/src/Symfony/Component/
HttpKernel/HttpKernel.php:89
/var/www/Symfony2-e-commerce/src/vendor/symfony/src/Symfony/Framework/
Kernel.php:209
/var/www/Symfony2-e-commerce/src/vendor/symfony/src/Symfony/Framework/
Client.php:92
/var/www/Symfony2-e-commerce/src/vendor/symfony/src/Symfony/Component/
BrowserKit/Client.php:208
/var/www/Symfony2-e-commerce/src/Application/ECommerceBundle/Tests/
Controller/ECommerceControllerTest.php:13

Do you have an idea why ?


--
If you want to report a vulnerability issue on symfony, please send
it to security at symfony-project.com <http://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
<mailto:symfony-users@googlegroups.com>
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
<mailto:symfony-users%2bunsubscr...@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] [Symfony2] session_start() error in Functional tests

2010-09-02 Thread Fabien Potencier

Can you send me your test file?

--
Fabien Potencier
Sensio CEO - symfony lead developer
sensiolabs.com | symfony-project.org | fabien.potencier.org
Tél: +33 1 40 99 80 80

On 9/2/10 4:57 PM, Florian wrote:

Hi!

I'm encoutering an error since an upgrade to the latest Symfony2.


1) Application\ECommerceBundle\Tests\Controller
\ECommerceControllerTest::testIndex
A session had already been started - ignoring session_start()

/var/www/Symfony2-e-commerce/src/vendor/symfony/src/Symfony/Component/
HttpFoundation/SessionStorage/NativeSessionStorage.php:83
/var/www/Symfony2-e-commerce/src/vendor/symfony/src/Symfony/Component/
HttpFoundation/Session.php:52
/var/www/Symfony2-e-commerce/src/vendor/symfony/src/Symfony/Component/
HttpFoundation/Request.php:250
/var/www/Symfony2-e-commerce/src/vendor/symfony/src/Symfony/Component/
HttpKernel/DataCollector/RequestDataCollector.php:41
/var/www/Symfony2-e-commerce/src/vendor/symfony/src/Symfony/Bundle/
FrameworkBundle/DataCollector/RequestDataCollector.php:30
/var/www/Symfony2-e-commerce/src/vendor/symfony/src/Symfony/Component/
HttpKernel/Profiler/Profiler.php:238
/var/www/Symfony2-e-commerce/src/vendor/symfony/src/Symfony/Component/
HttpKernel/Profiler/ProfilerListener.php:87
/var/www/Symfony2-e-commerce/src/vendor/symfony/src/Symfony/Framework/
Debug/EventDispatcher.php:101
/var/www/Symfony2-e-commerce/src/vendor/symfony/src/Symfony/Component/
HttpKernel/HttpKernel.php:159
/var/www/Symfony2-e-commerce/src/vendor/symfony/src/Symfony/Component/
HttpKernel/HttpKernel.php:89
/var/www/Symfony2-e-commerce/src/vendor/symfony/src/Symfony/Framework/
Kernel.php:209
/var/www/Symfony2-e-commerce/src/vendor/symfony/src/Symfony/Framework/
Client.php:92
/var/www/Symfony2-e-commerce/src/vendor/symfony/src/Symfony/Component/
BrowserKit/Client.php:208
/var/www/Symfony2-e-commerce/src/Application/ECommerceBundle/Tests/
Controller/ECommerceControllerTest.php:13

Do you have an idea why ?



--
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] HelloControllerTest.php PHPUnit Test Fail in the sandbox PR3 branch

2010-09-02 Thread Fabien Potencier

That works for me. Looks like you don't use PHP 5.3.

--
Fabien Potencier
Sensio CEO - symfony lead developer
sensiolabs.com | symfony-project.org | fabien.potencier.org
Tél: +33 1 40 99 80 80

On 9/2/10 3:20 PM, Fangzx wrote:

I am using symfony2 sandbox PR3 branch + PHPUnit 3.5.0RC2 in Windows
XP.

cd symfony-sandbox
phpunit -c hello


PHPUnit 3.5.0RC2 by Sebastian Bergmann.

E

Time: 2 seconds, Memory: 3.50Mb

There was 1 error:

1) Application\HelloBundle\Tests\Controller
\HelloControllerTest::testIndex
RuntimeException: Parse error: syntax error, unexpected
T_ENCAPSED_AND_WHITESPAC
E in - on line 149


FAILURES!
Tests: 1, Assertions: 0, Errors: 1.




--
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]: Some questions about console and bundles

2010-08-31 Thread Fabien Potencier

On 8/31/10 2:21 PM, Dennis Benkert wrote:

You only need one application per "project". The CLI will probably
change a lot (as we will probably have a .phar tool to boostrap a
project independently of having Symfony installed somewhere on your
machine). But, for now, you never need to execute the
init:application command (as you should use the sandbox to get started).


So, taking a look into the glass ball there will be a change in how to
handle frontends and backends in Symfony2 and also in the defintion of
application? If so, are there any information already? :)


You might want to read the following documents:

http://github.com/symfony/symfony-docs/blob/PR3/guides/symfony1.rst

http://github.com/symfony/symfony-docs/commit/58dacfb8be50c58ba29c9ffb312f898676b7da5d

Fabien

--
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]: Some questions about console and bundles

2010-08-31 Thread Fabien Potencier

On 8/31/10 8:11 AM, Dennis Benkert wrote:

Hi,

during the last days I again had the chance to take a look at Symfony2
again. After some search through the mailing list and the
documentation I have some questions that came to my mind and the
answers may be helpful for others, too.

The console script is always located in a specific application folder
(e.g. hello/console or myApplication/console). Although I know that
this makes perfectly sense for commands related to a specific
application I wonder if it wouldn't be helpfull to have a console
script placed in the base directory of your application. This may
handle some global commands (like initiating a bundle or application).
For me it felt a bit odd to create an application with a console
command based in another application (like "php hello/console
init:application ..."). So my question is: Will there be a global
console script in the future?


You only need one application per "project". The CLI will probably 
change a lot (as we will probably have a .phar tool to boostrap a 
project independently of having Symfony installed somewhere on your 
machine). But, for now, you never need to execute the init:application 
command (as you should use the sandbox to get started).



As it shows to me now model related classes (like Doctrine Entities,
API Model Classes, etc.) are now somewhat "bound" to a bundle. This
would in fact mean that there is no global "model" namespace (I know
we had no namespaces in symfony 1.x. I use namespace here just to make
things easier) where model code resides but instead you will always
relate a model to some bundle. Is this correct?


Correct, everything should be in a bundle.


If you're creating a third party bundle (e.g. in a namespace like
Bundle\MyCompany\MyProductBundle) you will of course provide a
Resources folder that would contain view files. Let's say I would copy
this third party bundle to my new project and wanted to overwrite the
view files to customize them for my design. How would I be able to do
this? Can I somehow "overwrite" the view files by creating a bundle
with the same name in my project's Application namespace?


You can override the templates in the "global" views/ directory (under 
the app/ directory) or by creating an 
application\MyCompany\MyProductBundle bundle. It depends on what you are 
trying to do, but both should work.


Fabien


Cheers, Dennis



--
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] The service "router" does not exist.

2010-08-28 Thread Fabien Potencier

Use the sandbox PR3 tag.

Fabien

--
Fabien Potencier
Sensio CEO - symfony lead developer
sensiolabs.com | symfony-project.org | fabien.potencier.org
Tél: +33 1 40 99 80 80

On 8/28/10 12:09 PM, Stephan Ebelt wrote:

Hello,

I am trying to get the sandbox HelloKernel.php file adopted to the latest HEAD
of Symfony2 (271b9637). It took a number of things to fix and now I am stuck at
this:

===
InvalidArgumentException: The service "router" does not exist. in 
lib/vendor/symfony/src/Symfony/Component/DependencyInjection/Container.php on line 185
Call Stack
#   TimeMemory  FunctionLocation
1   0.0004  326548  {main}( )   ../index_dev.php:0
2   0.0068  513336  Symfony\Framework\Kernel->handle( )  ../index_dev.php:14
3   0.0665  1285164 guiDevDebugProjectContainer->getHttpKernelService( ) 
../Kernel.php:209
4   0.0665  1285308 
Symfony\Component\DependencyInjection\Container->__call( )   ../Container.php:0
5   0.0666  1285668 Symfony\Component\DependencyInjection\Container->get( ) 
 ../Container.php:270
6   0.0666  1285756 guiDevDebugProjectContainer->getHttpKernelService( ) 
../Container.php:181
7   0.0678  1327476 guiDevDebugProjectContainer->getEventDispatcherService( 
)../guiDevDebugProjectContainer.php:78
8   0.0762  1617228 Symfony\Framework\Debug\EventDispatcher->__construct( ) 
 ../guiDevDebugProjectContainer.php:40
9   0.0763  1617228 Symfony\Framework\EventDispatcher->__construct( )
../EventDispatcher.php:38
10  0.0763  1617768 Symfony\Component\DependencyInjection\Container->get( ) 
 ../EventDispatcher.php:32
11  0.0764  1617860 guiDevDebugProjectContainer->getRequestListenerService( 
)../Container.php:181
12  0.0768  1635896 Symfony\Component\DependencyInjection\Container->get( ) 
 ../guiDevDebugProjectContainer.php:189
===

I put a print_r($this->getServiceIds()); on line 187 in
../guiDevDebugProjectContainer.php (in the cache/ dir) and well, there is no
"router" in this list. Now I am lost at where the router service should be
coming from? Hints anyone?

perhaps the Framework is not loaded properly? I use its namespace like this

use Symfony\Bundle\FrameworkBundle\FrameworkBundle;

and call

new FrameworkBundle()

in registerBundles(). Has anything changed here?

there is nothing written to logs/dev.log yet.

stephan



--
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] Suggestion for symfony download page - offer legacy versions

2010-08-27 Thread Fabien Potencier

All legacy versions of symfony are now available on the installation page:

http://www.symfony-project.org/installation#legacy

Fabien

--
Fabien Potencier
Sensio CEO - symfony lead developer
sensiolabs.com | symfony-project.org | fabien.potencier.org
Tél: +33 1 40 99 80 80

On 8/27/10 11:11 AM, halfer wrote:

@Sensio:

We are still using symfony 1.0 and my firm is very happy with it, and
there is no enthusiasm for upgrading. Now that I am moving onto
another role, we had a need to download the latest tarball - which of
course is no longer offered on the downloads page.

Since many legacy Sourceforge projects can be downloaded, I wonder if
symfony could do the same? I think this might be of use to other
legacy users too. I appreciate a Subversion checkout can be used, but
it's not quite as convenient (our firewall blocks that kind of
outgoing traffic).

@all: Does anyone else think this would be useful?

Thanks all.



--
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] Suggestion for symfony download page - offer legacy versions

2010-08-27 Thread Fabien Potencier

You can download any "old" versions... if you know the URL ;)

For instance, here is how to download symfony 1.0.17:

http://pear.symfony-project.com/get/symfony-1.0.17.tgz

I will see if we can add a page that list all these outdated versions 
somewhere on the official website.


Fabien

--
Fabien Potencier
Sensio CEO - symfony lead developer
sensiolabs.com | symfony-project.org | fabien.potencier.org
Tél: +33 1 40 99 80 80

On 8/27/10 11:11 AM, halfer wrote:

@Sensio:

We are still using symfony 1.0 and my firm is very happy with it, and
there is no enthusiasm for upgrading. Now that I am moving onto
another role, we had a need to download the latest tarball - which of
course is no longer offered on the downloads page.

Since many legacy Sourceforge projects can be downloaded, I wonder if
symfony could do the same? I think this might be of use to other
legacy users too. I appreciate a Subversion checkout can be used, but
it's not quite as convenient (our firewall blocks that kind of
outgoing traffic).

@all: Does anyone else think this would be useful?

Thanks all.



--
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: constructor in controller class

2010-08-19 Thread Fabien Potencier

On 8/19/10 8:51 AM, symfony.reloa...@googlemail.com wrote:

Hello,

what about "initializing" your custom controller class.
Is it suitable to overrite the __constructor of the inherited class
Symfony\Framework\FoundationBundle\Controller, and there to call the
parent constructor?


You can inherit the constructor, but you cannot add more arguments (they 
won't be filled by the framework). But as the argument is the container, 
everything you need should probably be stored in the Container already.



Are there similar to the Zend Framework init(), preDispatch() and
postDispatch methods in a controller class which are called by the
dispatcher, if existant?


Nope.

The current implementation of the Controllers will probably still 
change. I want to be able to remove the need to extend a base Controller 
class. If you have a look at the current Controller base class, you will 
see that there is nothing more than proxy methods.


Fabien

--
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: [DI] How can I put data into getFooService?

2010-08-14 Thread Fabien Potencier

On 8/14/10 3:54 PM, Константин wrote:

Hm, why my messages not shows?

Yes, it similar to Factory.

Translate
__construct(Translate_DriverAbstract $driver, $namespace)

$driver inject by container
$namespace - send by hand


That's not possible. You can use a setter instead. You can also keep the 
namespace in the constrcutor but give it a default value.


Fabien

--
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] [DI] How can I put data into getFooService?

2010-08-14 Thread Fabien Potencier


On 8/14/10 9:39 AM, Константин wrote:

I need send data to some services on the fly. Something like

$sc->getTranslatorService('translation namespace');

How can I do that?


I'm not sure I understand the question here. You get the service, and 
then you can do whatever you want with it. It looks like you are looking 
to create kind of a factory here, right?


Fabien

--
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] [DI] How to inject $sc to service?

2010-08-14 Thread Fabien Potencier

On 8/14/10 1:00 PM, Константин wrote:

Hello!

Some services should get service container, something like this:

// class mySC extends Container
public functon getBarService()
{
   $instance = new Bar_Class();
   $instance->injectSC($this);
   return $instance;
}

How to do that?


The container is always available as the 'service_container' service.

Fabien

--
Fabien Potencier
Sensio CEO - symfony lead developer
sensiolabs.com | symfony-project.org | fabien.potencier.org
Tél: +33 1 40 99 80 80

--
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] Dependency Injection in Symfony2

2010-08-11 Thread Fabien Potencier


On 8/12/10 12:24 AM, Brandon Turner wrote:

Is there anyway to load the default configuration for a bundle *without*
a line such as:

#config.yml:
mybundle.config: ~
in a configuration file? Is it correct to assume that the following
procedure must *always* be done to install a bundle that utilizes
semantic configuration:

1) Install the bundle in src/Bundle/%vendor%/%bundle%
2) Enable bundle in application kernel. (e.g. in hello/HelloKernel.php
add new MyBundle() to the registerBundles method)
3) Add custom configuration.
3a) If the default configuration suffices, add "mybundle.config: ~" to
your config.yml file (xml, php, ini, etc)

I guess I'm wondering if it is possible to avoid step 3a and if so how?



Yes, it is possible but I don't recommend it. I think it's better to be 
more explicit. As a matter of fact, it was very easy to do with PR2, and 
a little less easy with PR3 (just to remind you that this is probably 
not the best thing to do ;)). Here is the code (I suppose that you have 
created an extension as you talk about "semantic" configuration):


class FooBundle extends Bundle
{
public function registerExtensions(ContainerBuilder $container)
{
// will register the FooBundle extension(s) found in 
DependencyInjection/ directory

parent::registerExtensions($container);

// load some defaults
$container->load('foo', 'config', array(/* you default config 
for the foo.config namespace */));

}
}

Fabien



Thanks,
Brandon



--
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: Architectural Confusion in Symfony2

2010-08-11 Thread Fabien Potencier

On 8/11/10 9:08 PM, Jay wrote:

Each app has different auth requirements and possibly different
configurations. Isn't that why in most of the tutorials you speak of a
"Frontend" app, which kind of implies that there would also be a
"Backend" app? And then if we were to build an api that api might have
special auth to deal with valid clients who have permission to use the
api?


I suppose that you are referring to symfony 1 tutorial. I won't talk 
about security as this is not yet implemented in Symfony2, but we will 
take care of that requirement without the need for several applications.


Most of the time (read always), you only need one application with Symfony2.

Fabien

--
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] Architectural Confusion in Symfony2

2010-08-11 Thread Fabien Potencier

On 8/11/10 8:30 PM, Jay wrote:

In trying to structure our website using three apps and various
bundles, we’ve run into a major architectural fork in the road which
nobody seems to have the right answer for.
I’ll try and paint the picture as clearly and quickly as possible:

Assume 3 applications: Frontend, Backend, and Api


Why do you want to create three different applications? Create just one 
application, and your problems are solved.


Fabien

--
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 PR3 and keeping up with the Symfony2 sandbox changes

2010-08-10 Thread Fabien Potencier

I will update the sandbox next week and I will release a Symfony2 PR3 also.

Fabien

--
Fabien Potencier
Sensio CEO - symfony lead developer
sensiolabs.com | symfony-project.org | fabien.potencier.org
Tél: +33 1 40 99 80 80

On 8/10/10 6:30 PM, djones wrote:

Hi all,

I'm trying to keep up with changes to Symfony2 so that I don't learn
things that are outdated. I've been working with the current github
sandbox and that's all working fine, but I believe that for some
features (validation w/ annotations,etc.) I need to checkout the PR3
branch. When I do this I'm getting lots of errors, presumably because
some other things have changed. Do I need to update anything else to
get PR3 in a usable state?

I'd be very grateful if someone could point me in the right direction.



--
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: Error in symfony2 on Win7

2010-08-03 Thread Fabien Potencier

This fix has been applied some days ago. So it will be included in PR3.

Fabien

--
Fabien Potencier
Sensio CEO - symfony lead developer
sensiolabs.com | symfony-project.org | fabien.potencier.org
Tél: +33 1 40 99 80 80

On 8/3/10 5:55 PM, BStep wrote:

Just found this:

http://raw.trac.symfony-project.org/ticket/8810

The suggested fix seems to do the trick, although I received an error
message saying could not write to the logs folder in "E:
\prtldev2\hello/logs" instead of "\logs". Not sure if this could
produce a problem elsewhere.

On Aug 3, 10:30 am, BStep  wrote:

I am also getting the same error message with the newest sandbox
release (sandbox_2_0_PR2). I verified that the changes mentioned by
Fabien are in my sandbox version. I am using IIS7 on Windows Server
2008 and I do not have spaces in my directory structure - the path to
index_dev.php is E:\prtldev2\web\index_dev.php.

Are there other configuration changes I may need to make? Thanks.

For reference, here is my full error message:

Fatal error: Uncaught exception 'InvalidArgumentException' with
message '[WARNING 1549] failed to load external entity "file:///
E:prtldev2/src/vendor/symfony/src/Symfony/Components/
DependencyInjection/Loader/schema/dic/services/services-1.0.xsd" (in n/
a - line 0, column 0) [WARNING 3084] Element '{http://www.w3.org/2001/
XMLSchema}import': Failed to locate a schema at location 'file:///
E:prtldev2/src/vendor/symfony/src/Symfony/Components/
DependencyInjection/Loader/schema/dic/services/services-1.0.xsd'.
Skipping the import. (in in_memory_buffer - line 8, column 0) [ERROR
1845] Element '{http://www.symfony-project.org/schema/dic/services}
container': No matching global declaration available for the
validation root. (in 
file:///E:/prtldev2/src/vendor/symfony/src/Symfony/Foundation/Resources/con 
fig/services.xml
- line 5, column 0)' in E:\prtldev2\src\vendor\symfony\src\Symfony
\Components\DependencyInjection\Loader\XmlFileLoader.php:283 Stack
trace: #0 E:\prtldev2\src\vendor\symfony\src\Symfony\Components
\DependencyInjection\Loa in E:\prtldev2\src\vendor\symfony\src\Symfony
\Components\DependencyInjection\Loader\XmlFileLoader.php on line 283

On Jul 16, 9:12 am, kranberry  wrote:




Hi,



I'm totally new to Synfony and just downloaded the Symfony2 sandbox.
I'm running IIS under Windows 7 (64-bit) and I received the same error
message as above.  I checked that my build included the changes
mentioned above and it does.  What else do I need to change in order
to get this first tutorial working?  Very frustrating.



Thanks,
Jon



On May 21, 9:33 am, Fabien Potencier


project.com>  wrote:

fixed 
now:http://github.com/fabpot/symfony/commit/269651235ae830fe8d93800f3fc70...



This patch will be included in the next version of the sandbox (end of
June). In the meantime, you can just apply the patch or store yourSymfony 
projectin a path with no whitespaces.



Fabien



--
Fabien Potencier
Sensio CEO -symfonylead developer
sensiolabs.com |symfony-project.org | fabien.potencier.org
Tél: +33 1 40 99 80 80



On 5/21/10 12:20 PM, AigerVoid wrote:



System conf: Win7 Ult., apache2, php 5.3.2,mysql5



http://localhost/sandbox/web/check.php-OK,allrequired is green



but in:
http://localhost/sandbox/web/index_dev.php/



Warning: DOMDocument::schemaValidateSource()
[domdocument.schemavalidatesource]: InvalidSchemain C:\Program Files
\xampp\htdocs\sandbox\src\vendor\symfony\src\Symfony\Components
\DependencyInjection\Loader\XmlFileLoader.php on line 295



Fatal error:Uncaughtexception'InvalidArgumentException' with
message '[ERROR 1824] Element '{http://www.w3.org/2001/XMLSchema}
import', attribute 'schemaLocation': 'C:/Program Files/xampp/htdocs/
sandbox/src/vendor/symfony/src/Symfony/Components/DependencyInjection/
Loader/schema/dic/services/services-1.0.xsd' is not a valid value of
the atomic type 'xs:anyURI'. (in in_memory_buffer - line 8, column 0)
[ERROR 3037] Element '{http://www.w3.org/2001/XMLSchema}import': The
character content is not a valid value of the atomic type 'xs:anyURI'.
(in in_memory_buffer - line 8, column 0)' in C:\Program Files\xampp
\htdocs\sandbox\src\vendor\symfony\src\Symfony\Components
\DependencyInjection\Loader\XmlFileLoader.php:297 Stack trace: #0 C:
\Program Files\xampp\htdocs\sandbox\src\vendor\symfony\src\Symfony
\Components\DependencyInjection\Loader\XmlFileLoader.php(248):Symfony
\Components\DependencyInjection\Loader\XmlFileLoader-

validateSchema(Object(DOMDocument), 'C:\Program File...') #1 C:

\Program Files\xampp\htdocs\sandbox\src\vendor in C:\Program Files
\xampp\htdocs\sandbox\src\vendor\symfony\src\Symfony\Components
\DependencyInjection\Loader\XmlFileLoader.php on line 297



--
If you want to report a vulnerability issue onsymfony, please send it to 
security atsymfony-project.com



Re: [symfony-users] Twig Usage

2010-08-01 Thread Fabien Potencier


On 7/31/10 4:42 PM, aikistudio wrote:

Hello,

is anyone using Twig template framework in a serious project? If yes,
how is it doing so far?

I'm considering using it for a new webapp, but it seems nobody has
being talking about it anymore.


This is the symfony mailing-list, so it makes sense. The Twig 
mailing-list is here:


http://groups.google.com/group/twig-users

Fabien



I'm looking forward to your replies.

Best Regards,
Paulo



--
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: Doctrine Configuration - Yaml Imports

2010-07-27 Thread Fabien Potencier


On 7/28/10 5:58 AM, Brandon Turner wrote:

All,

I have two config files for my production and development Symfony2
environments:

#config.yml

doctrine.orm:
auto_generate_proxy_classes: false
metadata_cache_driver: apc
result_cache_driver: apc
query_cache_driver: apc


#config_dev.yml

imports:
- { resource: config.yml }

doctrine.orm:
auto_generate_proxy_classes: true


My goal is to override the auto_generate_proxy_classes setting in the
dev environment, but leave all other doctrine settings the same. The
config file above seems like it would work (based on a Symfony 1
mentality of merging config files) but it does not. The dev environment
uses default Array caches instead of apc caches. It appears you must
explicitly specify settings in each config file - you cannot rely on
them cascading, even with an import statement.

Does anyone know if this is by design or a bug. If it is by design what
is the use case for the imports functionality? The Dependency Injection
documentation seems to imply, but doesn't explicitly state, that
definitions from the imported file will cascade if not defined in the
current file.


It's definitely a bug. Can you open a ticket for that issue?

Thanks,
Fabien



Thanks for your help!

Brandon





--
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 - database query in the model

2010-07-26 Thread Fabien Potencier

On 7/26/10 11:47 AM, Vincent UNG wrote:

Hi !

I'm using Symfony2 for personal project and for fun too !
Well... it's more for testing this new version.

Anyway, I was wondering, how can I execute a database query inside my
models

Actually, when I create an instance of an object, I give the $this-

container->getService('database_connection') of the controller to the

model like this :

$dbc = $this->container->getService('database_connection');
$obj = new Model($dbc);
// doing stuff with my $obj
// ...

I guess this is not the right way, but what is the right way ?
Can someone help me ?


Looks good to me.

Fabien



(My English might be quite bad, sorry for that)



--
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] moving plugins to symfony 2.0?

2010-07-26 Thread Fabien Potencier

On 7/26/10 11:18 AM, sebastian wrote:

are there any plans for migrating plugins to symfony 2.0 in the form
of bundles? there doesn't seem to be any mention of it on the plugins
page or individual plugin pages.


It's too early. Things need to be stable before even thinking of 
migrating current plugins.


Fabien

--
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] first test and first question

2010-07-13 Thread Fabien Potencier


On 7/13/10 10:04 AM, samuel wrote:

ok,but we can put javascript library in vendor directory or is only for
php library ?


You should not bundle any vendor with a bundle. That said, the tools to 
ease installation and management of such dependencies are not available 
yet. So, don't pay too much attention to this specific rule for now.


Fabien



2010/7/13 Fabien Potencier mailto:fabien.potenc...@symfony-project.com>>

On 7/12/10 11:14 PM, samuel wrote:

Hello,
I'm seeing in the symfony2 best practice : "A bundle must not embed
third-party libraries."

What about javascript libraries ?
I think they should forward the same logic and don't be present
in the
bundle, isn't it ?


Yes, you are right.

Fabien


--
If you want to report a vulnerability issue on symfony, please
send it
to security at symfony-project.com <http://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
<mailto:symfony-users@googlegroups.com>
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
<mailto:symfony-users%2bunsubscr...@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 <http://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
<mailto:symfony-users@googlegroups.com>
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
<mailto:symfony-users%2bunsubscr...@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] [symfony2] first test and first question

2010-07-12 Thread Fabien Potencier

On 7/12/10 11:14 PM, samuel wrote:

Hello,
I'm seeing in the symfony2 best practice : "A bundle must not embed
third-party libraries."

What about javascript libraries ?
I think they should forward the same logic and don't be present in the
bundle, isn't it ?


Yes, you are right.

Fabien



--
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] Symfony2 comments and questions

2010-07-12 Thread Fabien Potencier

On 7/11/10 1:17 PM, Tarjei wrote:

Hi, here are my initial questions and comments regarding Symfony2.


Wow, that's a lot of feedback! Thank you very much. My answers below..


1. Deployment.
Are you planning a .phar deployment solution where the src directory
gets bundled up as a .phar file and distributed to the server? Have
you though through the different deploments scenarios for bundles?


Possibly. Packaging and distribution is something we will take care of 
late in the Symfony2 timeline as this orthogonal to everything else.



How do you plan to handle images and javascripts packaged with
bundles?


There is a command to install them under the web/ root directory.


2. Filters
A killer feature I miss is the old filters framework for requests.
Should events be used in the future?


Yep, we have events now. There are more flexible.


3. Names
The console command should start with a letter that no other directory
in the same directory starts with. I.e. not console and config as that
would reduce the number of redundant hits to tab.


Any idea?


Also, I find the separation of templates into Resources/views a bit
strange. Templates are a very important part of every webapplication
and should be easier to find- I.e. they should have a toplevel
directory in a bundle.


The reasonning behind this decision is to put all non-classes into one 
directory (the Resources/ directory). It contains templates, config 
files, assets, ...



5. Routing.
How does a bundles routing fit within the routing of a complete
system?

As I understand it, each bundle may be routed to a suburl where it
then has complete control over the namespace, but also that you can
route a single uri into a bundle. Is this essentially the idea?


Correct


6. Status of the security features.
symfony has a nice and ready security system based on credentials.
Will this system be used, or are you planning something new?

Has development of sfGuard for 2.0 started?


We will of course have something... probably for Symfony2 PR3... but I'm 
getting ahead of myself here ;)




When do you think the first version of the admin generator will show
up?


Not planned yet as we need everything else before even thinking about it.


7. Bundles
I like the concept of bundles and how they work, but one thing I found
confusing when reading through the documentation and the examples is
the difference between a bundle in src\Bundle and src\Application. The
difference should be explained somewhere.


src\Bundle is for generic bundles not related to the application (think 
third-party bundles)


src\Application is for bundles tied to the application (they cannot be 
reused)



Another thing I think you'll want is a tool for creating / working
with bundles and applications that is outside the application
directory( i.e. a bit like mvn).


That's possible. You can host bundles anywhere you want (just change the 
getBundleDirs() in your kernel so that Symfony2 can find them).



Versioning of bundles is also something I think you'll want to add
already now. Also a way to declare dependencies.


That's part of the distribution process as you don't want to check 
dependencies at runtime. So, that's something that we will work on after 
the first beta.


Fabien

--
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 PR3

2010-07-09 Thread Fabien Potencier


On 7/9/10 3:49 PM, Ekinox wrote:

Hello,

I have juste finished reading Symfony2's documentation. It often
speaks of a Symfony2 PR3 package. However, when I looked at the
installation page ( http://symfony-reloaded.org/code ), I did not see
any Symfony2 PR3 package ... The ZIP and TGZ archives are all PR2
releases, and I believe that the GIT and SVN repositories are out of
sync with the documentation. So, where may I find a PR3 download ?


As far as I remember, there is only one occurrence of PR3 in the 
documentation (and that's only when talking of best practices). Ok, I 
have just checked and I can confirm that there is only 1 occurrence.




Another question would be : Will Symfony2 's interface evolve just a
little, or will it be rethought before the final release ? So I will
know if I should use it for a big project. In fact, I may not use
symfony 1.4 ; as the project chief (even if it is not a professional
project) thinks it is too heavy (and I think he is not so wrong). Zend
isn't what we are looking for. So we saw Symfony2 and CakePHP. Should
we use Symfony2 or CakePHP ? Knowing that the project should be passed
in production server around September. If there will be still some
bugs, that's not a so big problem (we would just have to update the
Symfony2 version we have), but if the interface is regularly
rethought, it might cause problems. So, CakePHP or Symfony2 ?


Symfony2 API is not stable. It still changes a lot.

Fabien



Thank you for the answer(s),
Ekinox



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


  1   2   3   4   >