Re: [symfony-users] Use compenents from symfony 2.0 in symfony 1.4

2011-02-09 Thread Gareth McCumskey
I am not entirely sure but from what I have seen of symfony 2 it would not be possible. Firstly because symfony 2 requires php 5.3 as its minimum php version and symfony 1.4 requires php 5.2. In addition, from what I understand, the class structures of everything in symfony 2 is different to those

[symfony-users] Re: Use compenents from symfony 2.0 in symfony 1.4

2011-02-09 Thread soulfly
We use php 5.3 with symfony 1.4 - working good. On Feb 9, 11:14 am, Gareth McCumskey gmccums...@gmail.com wrote: I am not entirely sure but from what I have seen of symfony 2 it would not be possible. Firstly because symfony 2 requires php 5.3 as its minimum php version and symfony 1.4

Re: [symfony-users] Re: Use compenents from symfony 2.0 in symfony 1.4

2011-02-09 Thread Gareth McCumskey
I never said 1.4 couldn't work on php 5.3. To help with your problem, it would probably be easier to port the symfony 1.4 ode to a symfony 2 application than symfony 2 to 1.4. On Wed, Feb 9, 2011 at 10:27 AM, soulfly yelena...@gmail.com wrote: We use php 5.3 with symfony 1.4 - working good.

[symfony-users] Re: Use compenents from symfony 2.0 in symfony 1.4

2011-02-09 Thread soulfly
I just try to know if it possible to take one component - Routing and use it in project on sf 1.4. May be it's enough to take folder with routes and pu it in folder in symfony 1.4. But may be I should write smth in factories or elsewhere. On Feb 9, 11:51 am, Gareth McCumskey gmccums...@gmail.com

Re: [symfony-users] Re: Use compenents from symfony 2.0 in symfony 1.4

2011-02-09 Thread Bernhard Schussek
Hi Soulfly, Yes, that should be possible if you use PHP 5.3. 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

Re: [symfony-users] [S2PR6] Mapping a form for an entity

2011-02-09 Thread Bernhard Schussek
Hi Christophe, In your configure() method, add the call $this-setDataClass('Name\Space\BreveRequest'); The namespace needs to be corrected, of course. Bernhard -- Software Architect Engineer Blog: http://webmozarts.com Twitter: http://twitter.com/webmozart -- If you want to report a

[symfony-users] Re: Use compenents from symfony 2.0 in symfony 1.4

2011-02-09 Thread soulfly
How? Is there any instructions? On Feb 9, 12:15 pm, Bernhard Schussek bschus...@gmail.com wrote: Hi Soulfly, Yes, that should be possible if you use PHP 5.3. Bernhard -- Software Architect Engineer Blog:http://webmozarts.com Twitter:http://twitter.com/webmozart -- If you want to

Re: [symfony-users] Re: Use compenents from symfony 2.0 in symfony 1.4

2011-02-09 Thread Bernhard Schussek
Not that I know, sorry. Maybe if you search on Google. 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

Re: [symfony-users] Re: Use compenents from symfony 2.0 in symfony 1.4

2011-02-09 Thread Gareth McCumskey
But ... symfony 1.4 has routing capabilities already built in. On Wed, Feb 9, 2011 at 11:01 AM, soulfly yelena...@gmail.com wrote: I just try to know if it possible to take one component - Routing and use it in project on sf 1.4. May be it's enough to take folder with routes and pu it in

[symfony-users] Re: Use compenents from symfony 2.0 in symfony 1.4

2011-02-09 Thread soulfly
We tested our project with xhprof and realized that routes take 30% of script executing. And we expect that routes in symfony 2.0 have better performance (even take in consideration that it in beta version now). So we have to optimize code or use better solution. On Feb 9, 1:35 pm, Gareth

Re: [symfony-users] Re: Use compenents from symfony 2.0 in symfony 1.4

2011-02-09 Thread Gareth McCumskey
Do you currently have performance related issues with your application? If you do not actually have performance issues then I would say not to worry about. If the application is performing efficiently, 30% of an efficient app is still efficient. If your application is struggling performance-wise

[symfony-users] [Symfony2] Long Polling

2011-02-09 Thread Gabriele Genta
Hello, I'm trying to implement long polling in a Synfony 2 project to shorten response times in a real-time application I'm making. Essentially I have an ajax front end that requests data to the symfony-driven backend through XHR. My problem arises when I try to send a second request to the

Re: [symfony-users] [Symfony2] Long Polling

2011-02-09 Thread Gareth McCumskey
The problem is session write locking. We had the same issue in symfony 1. I don't know how to do this for symfony 2 but I wrote a blog post to deal with it in symfony 1. Perhaps you can just convert this for use with symfony 2:

Re: [symfony-users] [S2PR6] Mapping a form for an entity

2011-02-09 Thread Christophe Beyer
Ok, but I have now an another error... In my controller : if ($form-isValid()) { $em-persist($breveRequest); $em-flush(); } = error Class Application\xxx\BreveRequest is not a valid entity or mapped super class. In my case, perhaps I need to map the form with the Breve Entity

Re: [symfony-users] Re: Use compenents from symfony 2.0 in symfony 1.4

2011-02-09 Thread Yelena Bunina
We have performance issues, so we take xhprof to find the problem. Another big part in execution take Doctrine stuff calls. And in some places we have to refuse from Doctrine using plain sql (e.g. tasks). So I need an answer at my distinct question: how to built in symfiny's 2 route into symfony

Re: [symfony-users] Re: Use compenents from symfony 2.0 in symfony 1.4

2011-02-09 Thread Gareth McCumskey
I'm not trying to argue :) Only trying to help as the first thing that comes to my mind is that trying to shoehorn symfony2 stuff into symfony1, especially when you do not really know for sure if the symfony2 stuff will actually improve performance, seems to be a little rushed. Other things to

Re: [symfony-users] Re: Use compenents from symfony 2.0 in symfony 1.4

2011-02-09 Thread Yelena Bunina
Whats new in routing: - Moved to components - Increased performance. Don't create rout object at any routing rule - When compare rout and url using strpos() except pre_match - To generate url and routes uses different objetcs (ProjectUrlGenerator, ProjectUrlMatcher) I think it is great to

Re: [symfony-users] [S2PR6] Mapping a form for an entity

2011-02-09 Thread Bernhard Schussek
It already tells you the problem. BreveRequest need to be mapped. Try $ app/console doctrine:schema:info to find out whether the class is mapped. If it is not, consult the Doctrine documentation. Bernhard -- Software Architect Engineer Blog: http://webmozarts.com Twitter:

Re: [symfony-users] Re: Use compenents from symfony 2.0 in symfony 1.4

2011-02-09 Thread Gareth McCumskey
My point is not there aren't performance improvements if you were able to switch to symfony 2 routing. My point is that the risk vs rewards is not worth it as long as other options exist with a better risk vs reward. Hacking symfony 1 to use symfony 2 routing might never work well after hours of

Re: [symfony-users] Re: Use compenents from symfony 2.0 in symfony 1.4

2011-02-09 Thread Johannes Schmitt
Note that there is no such concept like Object, or ObjectCollection routes in Symfony2. So, the routing systems are not functionally equivalent. Kind regards, Johannes On Wed, Feb 9, 2011 at 12:56 PM, Yelena Bunina yelena...@gmail.com wrote: Oh I forgot to tell that we use APC :) On Wed,

Re: [symfony-users] Re: Trying to send emails

2011-02-09 Thread basos g
On 8 February 2011 18:27, Alex Pilon alex.pi...@gmail.com wrote: Would the mail server discarding the message make the mail function on the php side fail? I always thought that php mail code failed when it could not contact the mail server for some reason. Some errors can cause the swift

Re: [symfony-users] [S2PR6] Mapping a form for an entity

2011-02-09 Thread Christophe Beyer
Hum... I got this error : [InvalidArgumentException] Command doctrine:schema:info is not defined. -- Christophe Le 9 févr. 2011 à 12:47, Bernhard Schussek a écrit : It already tells you the problem. BreveRequest need to be mapped. Try $ app/console

Re: [symfony-users] [S2PR6] Mapping a form for an entity

2011-02-09 Thread Bernhard Schussek
Argh, sorry: doctrine:mapping:info -- Software Architect Engineer Blog: http://webmozarts.com Twitter: http://twitter.com/webmozart 2011/2/9 Christophe Beyer cbe...@cap-tic.fr: Hum... I got this error : [InvalidArgumentException]  Command doctrine:schema:info is not defined. --

[symfony-users] Re: Long Polling

2011-02-09 Thread Gabriele Genta
Thanks Garreth for your response. As I pointed out in my original post, though, I already tried the fixes regarding session files locking by calling session_write_close() and also by discarding session saving at all, by doing something like this: function foo() {} session_set_save_handler(foo,

Re: [symfony-users] Re: Long Polling

2011-02-09 Thread Gareth McCumskey
With symfony 1 you cannot use session_write_close reliably. There is a specific symfony function you call on the sfUser object to actualy have it close properly ;) Thats why I linked my blog post to help with that info. On Wed, Feb 9, 2011 at 3:04 PM, Gabriele Genta gabriele.ge...@gmail.comwrote:

Re: [symfony-users] [S2PR6] Mapping a form for an entity

2011-02-09 Thread Christophe Beyer
I got all files which are in myApp/myBundle/Entity... It works now when I write this : 1. In my controller : use myAppl\myBundle\Entity\Actualite; $breve = new Actualite(); $form = BreveForm::create($this-get('form.context'), 'breve'); $form-bind($this-get('request'), $breve); if

[symfony-users] Re: Long Polling

2011-02-09 Thread Gabriele Genta
Ok then, following your advice I found a more canonical way of handling the problem without forcing the framework. To do so I configured symfony so that a session is not started automatically and I've also told it to use the ArraySessionStorage in place of the native one. As a result, now the

[symfony-users] [Symfony2] Valid constraint when checking against a lazy loaded object

2011-02-09 Thread Gustavo Adrian
Hi all, I'm wondering if I'm doing the right thing regarding validation of associated entities. Suppose you have the following entities (simplified to show you my point): /** @orm:Entity */ class Country { // ..Some Fields } /** @orm:Entity */ class State { // Some Fields..

Re: [symfony-users] [Symfony2] Valid constraint when checking against a lazy loaded object

2011-02-09 Thread Christophe COEVOET
Le 09/02/2011 14:55, Gustavo Adrian a écrit : Hi all, I'm wondering if I'm doing the right thing regarding validation of associated entities. Suppose you have the following entities (simplified to show you my point): /** @orm:Entity */ class Country { // ..Some Fields } /**

Re: [symfony-users] [Symfony2] Valid constraint when checking against a lazy loaded object

2011-02-09 Thread Gustavo Adrian
Without trying to access any field on the Country entity, it hasn't any field loaded at all. When I try to access any field, it fully loads the Country and it works. I thought it was for the lazy loading process but you're right, it's only for associations (it wouldn't make sense in other way).

[symfony-users] Problem with tasks, context and session storage

2011-02-09 Thread Basil Hussain
I am writing a custom task for my Symfony project. In it I am sending a bunch of e-mails generated using content from the database. To compose the e-mail message, I am using an instance of sfPartialView so that I can use the same partial template for each message and substitute in the data. The

[symfony-users] Re: Including a custom global YAML file?

2011-02-09 Thread Loïc
Hi, I was wondering how to deal with the same question and found that you can add your custom config file globally in your application config file that way apps/my_app/config/my_appConfiguration.class.php ?php class my_appConfiguration extends sfApplicationConfiguration { public function

[symfony-users] How to let the user choose the upload directory ?

2011-02-09 Thread Manu
I have a form used to upload images in my blog engine. The files are uploaded to web/uploads, but I'd like to add a choice widget to let the users pick from a list of folders, for instance 'photos', 'cliparts', 'logos'. Here's my form class ImageForm extends BaseForm { public function

[symfony-users] Re: multiple problems with Symfony 1.4 installation - msg#00943

2011-02-09 Thread Ryan Walker
I am searching for a solution to an authentication problem and I see that Serg had the same problem (#2 below) way back in May of last year before I was on this list. As far as I can tell, no solution was posted to list. In my development environment on Mac OS X, sfDoctrineGuardPlugin is

[symfony-users] Re: Use compenents from symfony 2.0 in symfony 1.4

2011-02-09 Thread Matt Robinson
On Feb 9, 9:01 am, soulfly yelena...@gmail.com wrote: I just try to know if it possible to take one component - Routing and use it in project on sf 1.4. May be it's enough to take folder with routes and pu it in folder in symfony 1.4. But may be I should write smth in factories or elsewhere.

[symfony-users] Re: [Symfony2] How to create Forms in PR6?

2011-02-09 Thread Matt Robinson
On Feb 8, 6:33 pm, Dennis Jacobfeuerborn djacobfeuerb...@gmail.com wrote: I figured something like that would be the case but wasn't sure because the documentation doesn't mention a required name parameter:http://docs.symfony-reloaded.org/master/guides/forms/overview.html This should probably

Re: [symfony-users] Re: multiple problems with Symfony 1.4 installation - msg#00943

2011-02-09 Thread Christophe COEVOET
Le 09/02/2011 17:57, Ryan Walker a écrit : I am searching for a solution to an authentication problem and I see that Serg had the same problem (#2 below) way back in May of last year before I was on this list. As far as I can tell, no solution was posted to list. In my development

Re: [symfony-users] Problem with tasks, context and session storage

2011-02-09 Thread Justen Doherty
i had a bit of fun when trying to get partial/url helpers working in my task, i had to put the context logic at the top of my execute method like this: protected function execute($arguments = array(), $options = array()) { // initialize the database connection $this-configuration =

Re: [symfony-users] Re: multiple problems with Symfony 1.4 installation - msg#00943

2011-02-09 Thread Jochen Daum
Hi, On 10 February 2011 06:26, Christophe COEVOET s...@notk.org wrote: Le 09/02/2011 17:57, Ryan Walker a écrit : I am searching for a solution to an authentication problem and I see that Serg had the same problem (#2 below) way back in May of last year before I was on this list. As far as

Re: [symfony-users] Re: Use compenents from symfony 2.0 in symfony 1.4

2011-02-09 Thread Gareth McCumskey
Well heelll.. I been saying that all day. Maybe not as clearly but that is in essence what I have been trying to point out. Developer time by the hour, especially since you don't really have any idea how long that integration could take, it could be a couple hours or a couple weeks, vs ANY

Re: [symfony-users] How to let the user choose the upload directory ?

2011-02-09 Thread Gareth McCumskey
The save() methods reads its location the same way you can by using sfConfig::get('sf_upload_dir'). And where there's a getter theres usually a setter. So before calling save use: sfConfig::set('sf_upload_dir', sfConfig::get('sf_root_dir').DIRECTORY_SEPERATOR.'new_directory'); Now when save

Re: [symfony-users] Including a custom global YAML file?

2011-02-09 Thread Gareth McCumskey
Actually, all my apps so far are symfony 1.1 due to PHP version limitations on our production servers and the autoloading works a treat for us with no problems whatsoever. On 15/01/2011 15:48, Felix E. Klee wrote: On Sat, Jan 15, 2011 at 11:59 AM, Gareth McCumskey gmccums...@gmail.com wrote:

Re: [symfony-users] Re: Long Polling

2011-02-09 Thread Gareth McCumskey
Well, in that case, have you verified that your web server is configured correctly? Is it perhaps set to only allow one process or connection at a time which would cause your queuing problem? Typically Apache should be able to handle very many child processes but often this setting can

[symfony-users] Re: How to let the user choose the upload directory ?

2011-02-09 Thread Manu
Nice suggestion ! unfortunately it doesn't seem to work in my case... I'm not sure 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

[symfony-users] Re: How to let the user choose the upload directory ?

2011-02-09 Thread Manu
Maybe it's because I'm using a custom validator ? class mySfValidatorFile extends sfValidatorFile { protected function configure($options = array(), $messages = array()) { parent::configure(); $this-addOption('validated_file_class', 'sfValidatedFileFab'); } } class

Re: [symfony-users] Re: Use compenents from symfony 2.0 in symfony 1.4

2011-02-09 Thread Yelena Bunina
Hi all! Thanx a lot for your attention. You are right - In our project we use nginx and its cache. Also we use mysql cache queries and put mysql full into the memory, we use APC to cache php code, we don't use Doctrine when there is no much business logic (in tasks) to make performance better.

Re: [symfony-users] Re: Use compenents from symfony 2.0 in symfony 1.4

2011-02-09 Thread Alex Pilon
Symfony 2 was rebuilt from. It is not architected the same way as symfony 1 at all. If you are going to put in the effort to hack symfony 2 components into symfony 1 you might as well just rebuild the application in symfony 2. Now if you are going to say that symfony 2 is not ready for production

[symfony-users] Re: Long Polling

2011-02-09 Thread Gabriele Genta
I finally pointed out the problem, and it has nothing to do with symfony, nor the server configuration. The problem was on the client side of the application: I'm developing it with Sproutcore, and using their development server (sc-server) to test it; unfortunately, sc-server does not support

Re: [symfony-users] Re: Use compenents from symfony 2.0 in symfony 1.4

2011-02-09 Thread Gabriel Petchesi
There was a project which attempted to replace symfony routing by mod_rewrite rules, have a look here: http://trac.symfony-project.org/browser/plugins/swOptimizeRoutesPlugin/trunk/README gabriel http://trac.symfony-project.org/browser/plugins/swOptimizeRoutesPlugin/trunk/README On Wednesday,

Re: [symfony-users] Re: Long Polling

2011-02-09 Thread Gareth McCumskey
I figured it was something server related either session (which we determined was the case) or the actual web server configuration (as was the case) as any framework that doesn't allow concurrent requests would be essentially useless. Imagine developing an application only one user at a time

Re: [symfony-users] Re: Use compenents from symfony 2.0 in symfony 1.4

2011-02-09 Thread Gareth McCumskey
After all this what have we come back to. For now, temporarily, get some more hardware. What will this do for you? Buy you some time so that you can go through your application logic and try to optimise. If routing was 30% of the performance bottle-neck then go look at that other 70% even. You

[symfony-users] [Symfony 2] Doctrine:generate:entities strange behaviour in PR6

2011-02-09 Thread Nikita Korotaev
Hi everyone, I have entities mapped with Doctrine annotaions, like: /** * @orm:Id * @orm:Column(type=integer) * @orm:generatedValue(strategy=IDENTITY) */ protected $id = null; /** * @orm:Column(type=string, length=255, unique=true, nullable=false, name=email) */ protected

Re: [symfony-users] [Symfony 2] Doctrine:generate:entities strange behaviour in PR6

2011-02-09 Thread Christophe COEVOET
Le 10/02/2011 01:49, Nikita Korotaev a écrit : Hi everyone, I have entities mapped with Doctrine annotaions, like: /** * @orm:Id * @orm:Column(type=integer) * @orm:generatedValue(strategy=IDENTITY) */ protected $id = null; /** * @orm:Column(type=string, length=255, unique=true,

Re: [symfony-users] Re: Use compenents from symfony 2.0 in symfony 1.4

2011-02-09 Thread Yelena Bunina
Hi all! Thanks a lot for your essential advices! I'll take it in mind. Won't be hacking current symfony 1 :) On Thu, Feb 10, 2011 at 12:47 AM, Gareth McCumskey gmccums...@gmail.comwrote: After all this what have we come back to. For now, temporarily, get some more hardware. What will this

Re: [symfony-users] Fwd: problem with doctrine:build dsn

2011-02-09 Thread Gareth McCumskey
Do you have the php-pdo driver for mysql installed? I am not sure how this is done on Windows but it seems as if that is your problem. If you are unsure, create a single php script with the following: ?php phpinfo(); ? and run that in your browser. It will give you information about what has

Re: [symfony-users] How to bind one(or more) fields in the form?

2011-02-09 Thread raymond wang
Well, I've tried, but this will return schema error. 2011/2/9 Gareth McCumskey gmccums...@gmail.com If this is symfony 1.x you do not need to do anything funky. You can just bind your own array to the form. $values = array(_csrf_token=$request-getParameter('_csrf_token'),

[symfony-users] Re: The CSRF token is invalid

2011-02-09 Thread Ed
やった Solved it. As has been mentioned in various other places, you need to pass what you called the form id to the form create function, so: $form = NewUserForm::create($this-get('form.context'), 'user'); (notice the second argument) On Feb 8, 3:56 pm, Ed binar...@googlemail.com wrote: Here

[symfony-users] Merge Form..

2011-02-09 Thread Vaibhav Rajput
Hello Friends i m useing symfony 1.4 with doctrine orm... i have follwing schema... User: columns: username: { type: string(255), notnull: true, unique: true } password: { type: string(255), notnull: true, unique: true } UserProfile: actAs: { Timestampable: ~ } columns:

[symfony-users] [Symfony2] Logging security events (syslog)

2011-02-09 Thread Manfred Dohmen
Hello, is there a convenient way to have security events like login and logout (along with other custom app events) sent to syslog? I found this http://groups.google.com/group/symfony-devs/msg/ cbe0902e9cb51bec post describing how to use Zend logger. All I found for now is some debugging in S2

[symfony-users] Problem with security in symfony2

2011-02-09 Thread Klaas Naaijkens
Hi, I am struggling with the security system in symfony2 most of my day now. I have this in my config_dev.yml (running with the latest version of symfony2 github) - security.config: providers: main: users: foo: { password: foo } firewalls:

[symfony-users] Problem setting up authentication in symfony2

2011-02-09 Thread Klaas Naaijkens
Hi, I am struggling with the security system in symfony2 for about a day now. I have this in my config_dev.yml (running with the latest version of symfony2 github) - security.config: providers: main: users: foo: { password: foo } firewalls: