Re: [symfony-users] [Symfony 2] Is there anyone working on a bundle for backup - restore databases?

2011-06-22 Thread Gustavo Adrian
as a better way for backup / restore handling, please let me know. Thanks! 2011/6/22 oscar balladares > +1 It would a very nice utility. I'm pretty sure it will catch community > attention. > > Does It will be like the admin bundle? with a GUI for such task? Does it > would hav

[symfony-users] [Symfony 2] Is there anyone working on a bundle for backup - restore databases?

2011-06-22 Thread Gustavo Adrian
Hi everyone, As far as I know, the best way to backup/restore a database is using the utility each db vendor provides for such a task. That's why I've started to work today in a bundle that provides a way to execute these utilities within symfony's environment. I had it working some time ago, but

Re: [symfony-users] Re: Any chance of creating a new Google group for Symfony2 only?

2011-06-21 Thread Gustavo Adrian
+1 2011/6/21 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

Re: [symfony-users] Re: File upload and mime type detection issues

2011-06-20 Thread Gustavo Adrian
rting this issue this weekend. 2011/6/17 Louis Huppenbauer > btw - zip for docx is not that far off. > docx-files are essentially zipped xml-files ;) > > sincerely > louis > > 2011/6/17 Gustavo Adrian : > > Thanks for the tip! Yes, this topic is a real headache. I ha

Re: [symfony-users] Re: File upload and mime type detection issues

2011-06-17 Thread Gustavo Adrian
mes with .doc documents. It says that it is a > application/vnd.ms-office instead of ms-word > > This is why microsoft sucks. > > On 17 Giu, 15:22, Gustavo Adrian wrote: > > Is someone having this issue? > > > > 2011/6/16 Gustavo Adrian > > > > > >

[symfony-users] Re: [Symfony 2] File upload and mime type detection issues

2011-06-17 Thread Gustavo Adrian
Is someone having this issue? 2011/6/16 Gustavo Adrian > Hi all, > > I wanted to ask you guys if you've found a "definitive" way to handle mime > type detection issues. I recently implemented file upload handling in my app > with Symfony 2 and I'm having pro

[symfony-users] [Symfony 2] File upload and mime type detection issues

2011-06-16 Thread Gustavo Adrian
Hi all, I wanted to ask you guys if you've found a "definitive" way to handle mime type detection issues. I recently implemented file upload handling in my app with Symfony 2 and I'm having problems detecting, for example, .docx files. When I upload a .docx, it detects a mime type of "application/

Re: [symfony-users] [Symfony 2] Doctrine Proxies throws annotation exceptions

2011-06-08 Thread Gustavo Adrian
Ok. I'll try it now. Thanks a lot! 2011/6/8 Christophe COEVOET > Le 08/06/2011 20:43, Gustavo Adrian a écrit : > > Hi, >> >> Using Symfony's master branch, Doctrine's master branch, Doctrine Common's >> 3.0.x branch and Doctrine Dbal's

[symfony-users] [Symfony 2] Doctrine Proxies throws annotation exceptions

2011-06-08 Thread Gustavo Adrian
Hi, Using Symfony's master branch, Doctrine's master branch, Doctrine Common's 3.0.x branch and Doctrine Dbal's master branch, I'm getting: "[Semantical Error] The annotation "@private" in method Proxies\StateModuleBundleEntityStateProxy::__load() was never imported" I suppose this error is beca

[symfony-users] Re: [Symfony 2] Session problem at login, except with Firefox

2011-06-08 Thread Gustavo Adrian
Nevermind. I'm having odd problems with my local development server. It seems that some of the strange problems are directly related with this. Thanks. 2011/6/8 Gustavo Adrian > Hi, > > Yesterday I've updated symfony. I was using beta1 (or previous one, don't > rem

[symfony-users] [Symfony 2] Session problem at login, except with Firefox

2011-06-08 Thread Gustavo Adrian
Hi, Yesterday I've updated symfony. I was using beta1 (or previous one, don't remember). I could login to my app with other browsers like chrome without problems, but now when I try it, it throws: "Your session has timed-out, or you have disabled cookies." This happens with IE, Chrome, Safari an

[symfony-users] Re: [Symfony 2] After updating vendors: [notice] child pid xxxxx exit signal Segmentation fault (11)

2011-06-08 Thread Gustavo Adrian
Well, in case anyone had the same problem: After updating vendors again (there were some commits after my last update), and updating apc from 3.1.3 to 3.1.9 the issue is no longer appearing. I still don't know what caused it though. Thanks 2011/6/7 Gustavo Adrian > Hi all, > >

[symfony-users] [Symfony 2] After updating vendors: [notice] child pid xxxxx exit signal Segmentation fault (11)

2011-06-07 Thread Gustavo Adrian
Hi all, I've updated all my vendors today. I really don't know if it's something specific to Symfony, but I just wanted to know if some of you guys is getting the same error. Everything was working nice before the update. After making all the necessary changes to make my app work with Symfony beta

Re: [symfony-users] Any chance of creating a new Google group for Symfony2 only?

2011-05-17 Thread Gustavo Adrian
+1 for splitting mailing lists. If someone wants to see Symfony 1 and 2 messages, he/she could just join both groups. I don't really like forums so I don't have an opinion about that. I don't really mind if there's a forum or not. Having these mailing lists is really enough for me, so splitting thi

Re: [symfony-users] Re: How to setup an easy upgradeable Symfony2 app

2011-04-25 Thread Gustavo Adrian
I use the vendors.sh script and I update it to include new vendors. Three simple reasons: 1) It's faster for development. I don't need to download anything from github every time I need to clone my project somewhere else. I just need to download vendors when I want to update them. 2) I don't have

Re: [symfony-users] [symfony2] Calling a PHP Function

2011-04-18 Thread Gustavo Adrian
$doc = new \DOMDocument(); By default, if you try to create an instance of a class which is not fully qualified (in your case just "DOMDocument") PHP will look for the class on the current namespace (Acme\DemoBundle\Controller in your case). More info: http://www.php.net/manual/en/language.namesp

Re: [symfony-users] Re: Session and Security Bundle questions

2011-04-13 Thread Gustavo Adrian
gt; > Any ideas would be much appreciated! > Kevin > > On Mar 18, 10:36 am, Gustavo Adrian > wrote: > > Hi all, > > > > I've configured my security environment successfully using "native" > session > > storage type. But when I try to use t

Re: [symfony-users] Re: [Symfony2] Security ACL: SQLSTATE 23000 error (duplicated entry) while updating field ACEs

2011-04-11 Thread Gustavo Adrian
e ACE for ALLOW permissions, and one ACE for DENY permissions. If I want to inherit some permission, I just remove the permission of the mask and let it bubble up the check for the parent security identity. I'll try to reproduce the issue I had before when I get back home. Thanks! 2011/4/11 Gusta

Re: [symfony-users] Re: [Symfony2] Security ACL: SQLSTATE 23000 error (duplicated entry) while updating field ACEs

2011-04-11 Thread Gustavo Adrian
it right now. > > Kind regards, > Johannes > > > > On Fri, Apr 8, 2011 at 10:35 PM, Gustavo Adrian < > comfortablynum...@gmail.com> wrote: > >> Of course. I'll try to reproduce the issue in a test. In the meantime I >> want to clarify that I don&#x

Re: [symfony-users] Re: the means of:@orm:Entity(repositoryClass="Acme\MyBundle\Entity\UserRepository")

2011-04-08 Thread Gustavo Adrian
Specifying a repository class with that annotation you'll get a repo of that class when you do: $repo = $entityManager->getRepository('Your/Entity/Class'); That way you can have a repository with custom methods for that specific entity. 2011/4/8 kassel > Yes from there i'm read, and i need t

Re: [symfony-users] Re: [Symfony2] Security ACL: SQLSTATE 23000 error (duplicated entry) while updating field ACEs

2011-04-08 Thread Gustavo Adrian
re if there's a technical reason to not update the $granting property of an ACE. Thanks! Best regards. 2011/4/8 Johannes Schmitt > It would be nice if you can provide a failing test case in > MutableAclProviderTest, otherwise just create a ticket, and I'll take a loo

[symfony-users] Re: [Symfony2] Security ACL: SQLSTATE 23000 error (duplicated entry) while updating field ACEs

2011-04-08 Thread Gustavo Adrian
r the same unique index, which have this fields: class_id, object_identity_id, field_name and ace_order. Thanks. 2011/4/8 Gustavo Adrian > Hi all, > > During the update process of fields ACEs I'm getting this error: > > SQLSTATE[23000]: Integrity constraint violation: 1062 D

[symfony-users] [Symfony2] Security ACL: SQLSTATE 23000 error (duplicated entry) while updating field ACEs

2011-04-08 Thread Gustavo Adrian
Hi all, During the update process of fields ACEs I'm getting this error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '12-1106-entityTypeFriendly-1' for key 'UNIQ_46C8B806EA000B103D9AB4A64DEF17BCE4289BF4' I explain what I'm doing: As I allow to change the type of grantin

Re: [symfony-users] Re: Symfony2 authentication with User Entity

2011-04-08 Thread Gustavo Adrian
gt;} > > And nothing the same point of exception, and same value of $this- > >getCredentials()==NULL > > Waht i made wraon, my code is basic, only uses an entity for > validate, into logs i've saw that make an query to BD with username > > Thanks > > >

Re: [symfony-users] Re: Symfony2 authentication with User Entity

2011-04-08 Thread Gustavo Adrian
One thing I've noticed. Your role is ADMON. If your roles are defined as strings, they should have the "ROLE_" prefix as stated here: http://symfony.com/doc/2.0/book/security/users.html#roles So your role should be ROLE_ADMON 2011/4/8 k

[symfony-users] Re: [Symfony2] Problem with service on CLI commands

2011-04-08 Thread Gustavo Adrian
t')); } I know, it's really ugly. Looking at the Definition class of the DIC I see a factory option. Maybe this could be solved better with a factory, but I still don't know how it works with the DIC, so I'll use this solution in the meantime and then I'll look for ano

[symfony-users] [Symfony2] Problem with service on CLI commands

2011-04-08 Thread Gustavo Adrian
Hi Tim, thanks for answering. Yes, I've tried that before but, on CLI I get: [Symfony\Component\DependencyInjection\Exception\InactiveScopeException] You cannot create a service ("application_service_abstract.request") of an inactive scope ("request"). I need to use that service on a CLI command

[symfony-users] [Symfony2] Problem with service on CLI commands

2011-04-07 Thread Gustavo Adrian
Hi all, I have a service which needs the request service as its first argument. So far, I've been using this since it's the only way I've found that works for me: It works nice. But the problem appears if I want to access this service from a CLI command. Obviusly, it throws this excep

Re: [symfony-users] Re: [Symfony2] Security ACL and hierarchical tree of users and groups.

2011-04-06 Thread Gustavo Adrian
attributes", and "permission bitmasks". > > Kind regards, > Johannes > > > On Tue, Apr 5, 2011 at 10:41 PM, Gustavo Adrian < > comfortablynum...@gmail.com> wrote: > >> Ok I think I have an idea about this case. I'd appreciate if you can give &g

[symfony-users] Re: [Symfony2] Security ACL and hierarchical tree of users and groups.

2011-04-05 Thread Gustavo Adrian
ssion combination, I'd return the $ace->isGranting() result. This way, as soon it finds an ALLOW or DENY, it returns the result. What do you think? 2011/4/5 Gustavo Adrian > Hi there! > > I recently came up with this question: How to implement ACL with a > hierarchical tree

[symfony-users] [Symfony2] Security ACL and hierarchical tree of users and groups.

2011-04-05 Thread Gustavo Adrian
Hi there! I recently came up with this question: How to implement ACL with a hierarchical tree of users and other entities? I had an idea before but now that I'm almost at the middle of the implementation and that I understand better the ACL I realized it was wrong. Having the following tree: D

Re: [symfony-users] [Symfony2] Security ACL: Check for class-field / object-field permissions from the security context?

2011-04-04 Thread Gustavo Adrian
That was quick! Thanks a lot, it works like a charm :) 2011/4/4 Johannes Schmitt > $securityContext->isGranted('CREATE', new FieldVote($oid, 'field')); > -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message bec

[symfony-users] [Symfony2] Security ACL: Check for class-field / object-field permissions from the security context?

2011-04-04 Thread Gustavo Adrian
Hi all, If we want to check a class permission / object permission like CREATE, we would do: if ($securityContext->isGranted('CREATE', $objectIdentity) { // Do something } Now, what if I want to check for class-field or object-field? I looked at the SecurityContext class but I didn't find a

Re: [symfony-users] [Symfony2] Problem with last commit of master branch

2011-04-01 Thread Gustavo Adrian
Good catch! I didn't see that change. Thanks for the info! :) 2011/4/1 Illya Klymov > This is due to this commit by Fabien - > https://github.com/symfony/symfony/commit/ce4a8de789fbcbc965a3be3bdee362ba17fc0dc8 > Now session.default_locale is not used :) > > -- > If you want to report a vulnera

Re: [symfony-users] Re: How to extend from an app's template now?

2011-04-01 Thread Gustavo Adrian
Well, after updating everything it didn't work. So I moved temporarily my app/Resources/views/base.html.twig to a bundle and now it works like a charm. I'll take a look again later if I find the error and I'll let you know guys what happend. Thanks. 2011/4/1 Gustavo Adrian &

Re: [symfony-users] Re: How to extend from an app's template now?

2011-04-01 Thread Gustavo Adrian
download the SE PR9 and import your bundle, anyway > bundles are meant to be able to hook up very easily. > > I'm using PR9 and base.html.twig is in app/Resources/views and is working. > > Saludos. > > 2011/4/1 Gustavo Adrian > >> Yes, I cleared the cache and remove

Re: [symfony-users] Re: How to extend from an app's template now?

2011-04-01 Thread Gustavo Adrian
ger Webb wrote: > > If you just upgraded to PR9, the base template is now in app/Resources/ > > base.html.twig > > > > https://github.com/symfony/symfony/blob/master/UPDATE.md > > > > The upgrade from PR8 to PR9 was a bit more painful that previous > > one

[symfony-users] Re: [Symfony2] How to extend from an app's template now?

2011-04-01 Thread Gustavo Adrian
/myapp/app/Resources', *true*) this file: /var/www/myapp/app/Resources/views/layout.html.twig exists. I don't know why it doesn't find it. 2011/4/1 Gustavo Adrian > Hi, > > I have in one of my bundle's templates: > > {% extends "::layout.html.twig" %} >

[symfony-users] [Symfony2] How to extend from an app's template now?

2011-04-01 Thread Gustavo Adrian
Hi, I have in one of my bundle's templates: {% extends "::layout.html.twig" %} This extended from app/views/layout.html.twig. After updating Symfony it throws an exception: "Unable to find template ""::layout.html.twig"". at line 0" How should I extend now from application specific templates?

Re: [symfony-users] [Symfony2] Problem with last commit of master branch

2011-03-31 Thread Gustavo Adrian
Ok, found the issue, but I still don't know why it appeared. I added this to my config.yml parameters: session.default_locale: es But I didn't defined in any place %session.default_locale%. Were there any changes adding this parameter? Thanks. -- If you want to report a vulnerabilit

Re: [symfony-users] [Symfony2] Problem with last commit of master branch

2011-03-31 Thread Gustavo Adrian
Yes. It was the first thing I did but it doesn't work. On Thu, Mar 31, 2011 at 10:22 AM, Christophe COEVOET wrote: > Le 31/03/2011 15:00, Gustavo Adrian a écrit : > > Hi all, >> >> I recently updated symfony (2 weeks ago was my last update). I'm receiving

[symfony-users] [Symfony2] Problem with last commit of master branch

2011-03-31 Thread Gustavo Adrian
Hi all, I recently updated symfony (2 weeks ago was my last update). I'm receiving this error: "Uncaught exception 'InvalidArgumentException' with message 'The parameter "session.default_locale" must be defined" I didn't change anything in my config.yml: framework: session: defaul

Re: [symfony-users] [Symfony2] [Doctrine2] Accessing container or any othet service right from Entity. Is it possible?

2011-03-30 Thread Gustavo Adrian
I still think the best alternative is to use an extension with i18n tables to manage translations. It's a lot easier to handle translations and it doesn't mean it overloads your DB that much. It's just one JOIN. You can always use cache strategies to avoid performance problems. Still, if you reall

Re: [symfony-users] Re: ODM insisting ... Problems with data / load

2011-03-30 Thread Gustavo Adrian
andez Sanchez'); $manager->persist($persona3); $manager->flush(); } The EntityManager is already passed to the load function. You don't need to get it from the container. 2011/3/30 César Hernández > Thanks Gustavo, > effectively add the driver was missing in

Re: [symfony-users] Re: ODM insisting ... Problems with data / load

2011-03-30 Thread Gustavo Adrian
ect00 mongo.native_long00 mongo.no_id00 > mongo.utf811 > > what remains is to declare an instance of the class mongo > but where? > > > > 2011/3/31 Gustavo Adrian > >> Your function should look like: >> >> public function load($manager) >> { &g

Re: [symfony-users] Re: ODM insisting ... Problems with data / load

2011-03-30 Thread Gustavo Adrian
Your function should look like: public function load($manager) { $user1 = new User(); $user1->setName('Cesar Hernandez'); $manager->persist($user); $user2 = new User(); $user2->setName('May-lhing Sanchez'); $manager->persist($user); $user3 = new User

Re: [symfony-users] [Symfony2] [Doctrine2] Accessing container or any othet service right from Entity. Is it possible?

2011-03-30 Thread Gustavo Adrian
You should use a Doctrine extension to manage translations: https://github.com/l3pp4rd/DoctrineExtensions On Wed, Mar 30, 2011 at 11:52 AM, Alexander Kachkaev < alex.kachk...@gmail.com> wrote: > My question is already listed in the topic. I’d like to explain why I would > like to have this featu

Re: [symfony-users] Re: [Symfony2] Security ACL: General questions

2011-03-29 Thread Gustavo Adrian
es. > > One of the principles of the ACL system is that each domain object instance > has exactly one ACL instance. That ACL instance will also hold the > class-scoped ACEs, but you need to create an ACL for each object instance. > > Kind regards, > Johannes > > On Tue, Mar 29

[symfony-users] Re: [Symfony2] Security ACL: General questions

2011-03-29 Thread Gustavo Adrian
ate an ObjectIdentity object with some random ID (in my case "-1"), so the ACL component has no way to know which object identity referers to my class-scope ACL. Is this the expected behaviour? if it is, should I create an ACL for the object and make it inherit from the class-scope ACL

[symfony-users] [Symfony2] Security ACL: General questions

2011-03-29 Thread Gustavo Adrian
Hi all, I'm still working with the ACL feature. Now I'm implementing class scope permissions. What I'd need to know is how to work with indexes. If I want to update a class ACE, I would have this: $acl = $aclProvider->findAcl( $classIdentity, array( $securityIdentity ) ); $classAces = $acl->getC

Re: [symfony-users] Re: How to retrieve related objects with ACL

2011-03-29 Thread Gustavo Adrian
You don't use the ACL to retrieve objects. You use ACL to check if some security identity has permission to do whatever you want (CREATE, EDIT, etc) with some object identity. Remember that a Security identity is a way to abstract your user (or whatever entity you need to check if it has permission

Re: [symfony-users] [Symfony2] Security ACL question

2011-03-24 Thread Gustavo Adrian
call $this->objectIdentityRetrievalStrategy->getObjectIdentity($object) if it's not already an ObjectIdentityInterface object. Pull request: https://github.com/symfony/symfony/pull/381 Best regards. On Thu, Mar 24, 2011 at 7:48 PM, Gustavo Adrian wrote: > I think it's better to add this check dir

Re: [symfony-users] [Symfony2] Security ACL question

2011-03-24 Thread Gustavo Adrian
add a unit test to verify this behavior. > > Thanks, > Johannes > > > > On Thu, Mar 24, 2011 at 4:03 PM, Gustavo Adrian < > comfortablynum...@gmail.com> wrote: > >> Can anyone verify this? if this is indeed a bug then I'll create a pull >> request.

Re: [symfony-users] [Symfony2] Security ACL question

2011-03-24 Thread Gustavo Adrian
Can anyone verify this? if this is indeed a bug then I'll create a pull request. If not, what I am doing wrong? Thanks. On Wed, Mar 23, 2011 at 4:55 PM, Gustavo Adrian wrote: > Ok, I think I've found the reason for this behaviour. On the > "ObjectIdentityRetriev

Re: [symfony-users] [Symfony2] Security ACL question

2011-03-23 Thread Gustavo Adrian
rks like I want and it successfully denies me the creation of a Comment object. What I still don't know if I'm doing the right thing when I try to check If a user has a class-scope permission to CREATE a Comment, like in the example I've shown before. Thanks :) On Wed, Mar 23, 2011 a

Re: [symfony-users] [Symfony2] Security ACL question

2011-03-23 Thread Gustavo Adrian
t have an ACL for an ObjectIdentity, or if it doesn't have any object identity on the DB referring to the ObjectIdentity passed to the isGrant method. So I still don't know which of both cases is wrong. Thanks in advance! On Wed, Mar 23, 2011 at 12:14 PM, Gustavo Adrian < co

Re: [symfony-users] [Symfony2] Security ACL question

2011-03-23 Thread Gustavo Adrian
sed on which entry permissions was granted, to which object > permission was granted, etc. The AuditLogger is only called if the value of > audit_success/_failure is true. > > Kind regards, > Johannes > > > On Tue, Mar 22, 2011 at 9:42 PM, Gustavo Adrian < > comfortablynum

Re: [symfony-users] [Symfony2] Security ACL question

2011-03-22 Thread Gustavo Adrian
ace. How methods like updateClassAuditing (with $auditSuccess and $auditFailure parameters) works? Thanks in advance and sorry if I asked too many questions, but this is a wonderful feature and I'd love to know all its possibilities :) On Mon, Mar 21, 2011 at 4:26 PM, Gustavo Adr

Re: [symfony-users] [Symfony2] Security ACL question

2011-03-21 Thread Gustavo Adrian
Great! even easier than I thought. I'm beginning to love this feature :) Thanks a lot! On Mon, Mar 21, 2011 at 4:22 PM, Christophe COEVOET wrote: > Le 21/03/2011 20:11, Gustavo Adrian a écrit : > > Hi all, >> >> I'm starting to implement the ACL feature on my

[symfony-users] [Symfony2] Security ACL question

2011-03-21 Thread Gustavo Adrian
Hi all, I'm starting to implement the ACL feature on my app and, for what I''ve read and what I've already implemented, I must say: it's BEAUTIFUL. Great job guys. It's just what I was looking for :) I have one question about this wonderful feature: 1) I've already implemented object scope permi

[symfony-users] [Symfony2] Session and Security Bundle questions

2011-03-18 Thread Gustavo Adrian
Hi all, I've configured my security environment successfully using "native" session storage type. But when I try to use the PDO session and I try to login, it logs OK, but when it redirects to homepage it suddenly goes back to the login page. My session data saved on DB: _symfony2|a:3:{s:6:"_flas

Re: [symfony-users] Re: Service Container's Service "Scope"

2011-03-17 Thread Gustavo Adrian
e_thread/thread/a7207406c82ef07a/e2626c00f5cb9749 > > Kind regards, > Johannes > > > On Thu, Mar 17, 2011 at 4:01 PM, Gustavo Adrian < > comfortablynum...@gmail.com> wrote: > >> Ooops, I didn't know that :P. Which would be the right way to inject the >> requ

Re: [symfony-users] Re: Service Container's Service "Scope"

2011-03-17 Thread Gustavo Adrian
ttributes like >> scope and synthetic, I couldn't find information in the documentation. >> >> >> On Thu, Mar 17, 2011 at 15:16, Gustavo Adrian < >> comfortablynum...@gmail.com> wrote: >> >>> I use this to inject the request in my services: >

[symfony-users] Re: Service Container's Service "Scope"

2011-03-17 Thread Gustavo Adrian
I use this to inject the request in my services: Then I can inject the request in my services. On 15 mar, 22:41, Hany El-Kerdany wrote: > Hi All, > > I tried to abuse the service container a little, and use it to inject core > container services (like the request) object into my contro

Re: [symfony-users] [Symfony2] Services scoping question

2011-03-16 Thread Gustavo Adrian
Thanks a lot for your help Christophe! It's really much clearer now. I'll take a look at the request service to get more knowledge about custom scopes. Best regards. On Thu, Mar 17, 2011 at 12:12 AM, Christophe COEVOET wrote: > Le 17/03/2011 04:02, Gustavo Adrian a écrit : >

Re: [symfony-users] [Symfony2] Services scoping question

2011-03-16 Thread Gustavo Adrian
totype-scoped service, which is solved disabling the "strict" attribute. Does any of what I said make sense? It's better to learn this stuff now than when it's too late :) Oh, and one more question. Container scope means only one instance. Prototyped means a new instance ea

Re: [symfony-users] [Symfony2] Services scoping question

2011-03-16 Thread Gustavo Adrian
when I add them to the "module" service, it doesn't throw the exception. Which could be the problem if a single instantiated service (in this particular case, "module") has a reference to a service which can be instantiated many times (in this particular case, "servic

Re: [symfony-users] [Symfony2] Services scoping question

2011-03-16 Thread Gustavo Adrian
in a unit test. Thanks for your answer! Best regards. On Wed, Mar 16, 2011 at 6:27 PM, Johannes Schmitt wrote: > On first sight, this looks like a bug. Could it be that you added a custom > scope? > > Kind regards, > Johannes > > On Wed, Mar 16, 2011 at 10:16 PM, Gustavo Ad

[symfony-users] [Symfony2] Services scoping question

2011-03-16 Thread Gustavo Adrian
Hi all, I'm having some issues with service scoping. I'll try to describe my situation the best I can. If something is not clear, please tell me :). Having this base classes: , Module (which can have services) . Service (which can have other services) I could have something like this: UserModu

Re: [symfony-users] [Symfony2] How to create a shared service?

2011-03-15 Thread Gustavo Adrian
Great. Thanks a lot! :) On Tue, Mar 15, 2011 at 12:43 PM, Christophe COEVOET wrote: > Le 15/03/2011 16:38, Gustavo Adrian a écrit : > > Hi all, >> >> I tried to configure a service with the attribute "shared" but when I use >> it, it throws an error. I s

[symfony-users] [Symfony2] How to create a shared service?

2011-03-15 Thread Gustavo Adrian
Hi all, I tried to configure a service with the attribute "shared" but when I use it, it throws an error. I saw in the DIC's docs that this is the attribute I should use to make a service shared. How can I do this in Symfony 2? Thanks. -- If you want to report a vulnerability issue on symfon

Re: [symfony-users] Re: ERP development ( SF 1.4 or 2.0 ? )

2011-03-03 Thread Gustavo Adrian
Actually there're a lot of Bundles and Doctrine extensions now (including a nested set implementation). Everyone has a different opinion on this matter. I'm using Symfony 2 for my CRM and I must say it's the best choice I made. I need the flexibility it gives you. Anyway, the only way to know is t

Re: [symfony-users] [Symfony 2] A way to load fixtures in a user defined order, taking into account associations?

2011-03-03 Thread Gustavo Adrian
class is the StateFixtures). But I think I can detect that too and throw an exception in that case. Thanks for your comments! On Thu, Mar 3, 2011 at 6:39 AM, Christophe COEVOET wrote: > Le 03/03/2011 05:45, Gustavo Adrian a écrit : > > Actually playing around with the interface I

Re: [symfony-users] [Symfony 2] A way to load fixtures in a user defined order, taking into account associations?

2011-03-02 Thread Gustavo Adrian
rds. On Thu, Mar 3, 2011 at 1:08 AM, oscar balladares wrote: > Good tip. I will tag this. > > 2011/3/2 Gustavo Adrian > > Great! I didn't know it was a new interface for this. I'll give it a try >> now. >> >> Thanks a lot guys! >> >> >> On W

Re: [symfony-users] [Symfony2] Base table or view not found error: Doctrine and case-sensitive table names

2011-03-02 Thread Gustavo Adrian
Did you tried to force the table name to have its name in lower case?: @orm:Table(name="wish") On Tue, Mar 1, 2011 at 8:14 PM, olimination wrote: > Hello, > > I have used the console command "php app\console > doctrine:schema:create" for automatically creating my database schema > out of my ann

Re: [symfony-users] [Symfony 2] A way to load fixtures in a user defined order, taking into account associations?

2011-03-02 Thread Gustavo Adrian
Great! I didn't know it was a new interface for this. I'll give it a try now. Thanks a lot guys! On Wed, Mar 2, 2011 at 3:08 PM, Christophe COEVOET wrote: > Le 02/03/2011 19:06, Alex Pilon a écrit : > > I do not know very much about symfony2 at the moment, however in symfony 1 >> if you load a

Re: [symfony-users] [Symfony 2] A way to load fixtures in a user defined order, taking into account associations?

2011-03-02 Thread Gustavo Adrian
which is not loaded yet in the DB. Is there a way to define an order for the bundles to load their fixtures? maybe using the order in which they're added in the array in "registerBundles"? Thanks! On Wed, Mar 2, 2011 at 2:50 PM, Christophe COEVOET wrote: > Le 02/03/2011 18:47,

Re: [symfony-users] [Symfony 2] Latest symfony 2 (2011/03/02): Uncaught exception 'InvalidArgumentException' with message 'Route "_wdt" does not exist

2011-03-02 Thread Gustavo Adrian
, Christophe COEVOET wrote: > Le 02/03/2011 18:43, Gustavo Adrian a écrit : > > Hi all! >> >> I've updated my symfony 2's copy to the latest one. I've updated all the >> major changes. I have only one problem, and it happens only on the "dev" &

[symfony-users] [Symfony 2] A way to load fixtures in a user defined order, taking into account associations?

2011-03-02 Thread Gustavo Adrian
Hi everyone, I'd like to know if there's a way to load fixtures from different bundles in order (without calling explicitly doctrine:data:load for each bundle by hand). I create the bundle's instances (in the "registerBundles" method on my AppKernel) in the order it should be loaded. Is there a wa

[symfony-users] [Symfony 2] Latest symfony 2 (2011/03/02): Uncaught exception 'InvalidArgumentException' with message 'Route "_wdt" does not exist

2011-03-02 Thread Gustavo Adrian
Hi all! I've updated my symfony 2's copy to the latest one. I've updated all the major changes. I have only one problem, and it happens only on the "dev" environment. On every page I get this: Fatal error: Uncaught exception 'InvalidArgumentException' with message 'Route "_wdt" does not exist.' i

Re: [symfony-users] ERP development ( SF 1.4 or 2.0 ? )

2011-03-01 Thread Gustavo Adrian
2.0. No doubt about that (in my case). For a system like an ERP you need flexibility. And that's one of the strenghts of Symfony 2.0. Doctrine 2.0 is more robust too, with lots of features a big app needs, and being a data mapper instead of an active record gives you more freedom when you design yo

Re: [symfony-users] [Symfony 2]Validation on Form post: AssertsType like int, integer, decimal will always throw an error.

2011-03-01 Thread Gustavo Adrian
eate something like isIntValue( > ) on my entity, and bind a AssertTrue validation rule to it. > So I will end throwing away major AssertType constraints like: int, > integer, double, float, decimal. > > Thanks again!! > > > 2011/2/28 Gustavo Adrian > > In this particular

Re: [symfony-users] [Symfony 2]Validation on Form post: AssertsType like int, integer, decimal will always throw an error.

2011-02-28 Thread Gustavo Adrian
In this particular case I do a type casting before binding the data to the object's property. So: $value = ( int ) $dataFromPost; $object->setIntegerValue( $value ); And then I force the user to type integer values on the form field via javascript. If he/she sends a value that's not an integer a

Re: [symfony-users] [Symfony 2] Custom "getter" validation method question

2011-02-28 Thread Gustavo Adrian
Ok, thanks for the quick answer! On Mon, Feb 28, 2011 at 1:21 PM, Bernhard Schussek wrote: > 2011/2/28 Gustavo Adrian : > > If I have the validation method named "isAddressValid", the resulting > > property name is "addressValid". But in my case I'd it to

[symfony-users] [Symfony 2] Custom "getter" validation method question

2011-02-28 Thread Gustavo Adrian
Hi all, I'm using the "getter" validation feature of the Validator component. Is there a way to change the resulting mapping name of the property? I explain myself: If I have the validation method named "isAddressValid", the resulting property name is "addressValid". But in my case I'd it to be o

Re: [symfony-users] [Symfony2] - @HasLifecycleCallbacks

2011-02-10 Thread Gustavo Adrian
You have the annotation in your ID field. You need to put this annotation at the class level: /** * @orm:Entity(repositoryClass="Sensio\HelloBundle\Entity\Repository\CustomerRepository") * @orm:HasLifecycleCallbacks */ class Customer { //... } Regards. On Thu, Feb 10, 2011 at 5:31 AM, st

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

2011-02-09 Thread Gustavo Adrian
e sense in other way). The strange thing is that now I try it with other entities with similar associations and it works. I'll inspect the problem a little further and I'll get back if I can find an answer. Thanks a lot. On Wed, Feb 9, 2011 at 11:11 AM, Christophe COEVOET wrote: > Le 0

[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] Re: How to access symfony 2 command line

2011-02-08 Thread Gustavo Adrian
It seems to be a permissions problem. Give write permissions to dirs app/cache and app/logs On Tue, Feb 8, 2011 at 2:20 PM, deepak wrote: > Here is the complete command line output ... > --- > PHP Deprecated: Comments starting with '#' are deprecated in /etc/ > php5/cli/conf.d/m

Re: [symfony-users] Using adoDB with symfony

2011-01-21 Thread Gustavo Adrian
I think the last alternative should be to switch to adoDB. Your app is almost done. You'd have to make a LOT of work to make it happen (if it's possible). IT in some cases delegates work when they shouldn't. In my case I had this problem a lot of times. If you have a 486 with Windows 3.11 and you

Re: [symfony-users] Re: Could not find any configured connections

2011-01-11 Thread Gustavo Adrian
very recent changes to the doctrine command line task. I didn't look > any further than that commit in the repository so there may be more. > > > On Mon, Jan 10, 2011 at 3:38 PM, Gustavo Adrian < >> comfortablynum...@gmail.com> wrote: >> >>> I'm hav

Re: [symfony-users] Re: Symfony2 Sandbox & git

2011-01-10 Thread Gustavo Adrian
o the sandbox. > > On Jan 10, 8:41 am, Gustavo Adrian > wrote: > > From the repo: > > > > git://github.com/symfony/symfony-sandbox.git< > https://github.com/symfony/symfony-sandbox> > > > > > > > > > > > > > > >

Re: [symfony-users] Re: Symfony2 Sandbox & git

2011-01-10 Thread Gustavo Adrian
it, or something else entirely? > > On Jan 10, 8:35 am, Gustavo Adrian > wrote: > > I've been using the sandbox with vendors updated with the scripts that > > symfony comes with (on bin/ directory). First I've tried to use > submodules > > but for a few reasons I

Re: [symfony-users] Symfony2 Sandbox & git

2011-01-10 Thread Gustavo Adrian
I've been using the sandbox with vendors updated with the scripts that symfony comes with (on bin/ directory). First I've tried to use submodules but for a few reasons I decided to stick with just cloning my vendors with the scripts of the sandbox. When I want to update my vendors, I just run ./bin

Re: [symfony-users] Re: Could not find any configured connections

2011-01-10 Thread Gustavo Adrian
I'm having the same problem. It was working two days ago before updating my vendors. Was anything changed concerning the doctrine connection configuration? I was using: doctrine.dbal: dbname:mydb user: myuser password: mypassword Thanks! On Mon, Jan 10, 2011 at 10:32 AM

Re: [symfony-users] [Symfony2] Application transaction question

2011-01-06 Thread Gustavo Adrian
> solution :) > > > On Thu, Jan 6, 2011 at 2:00 AM, Gustavo Adrian < > comfortablynum...@gmail.com> wrote: > >> First of all, thanks a lot for your feedback on this matter Gareth. it's >> really very helpful. >> >> The notification via web service

Re: [symfony-users] [Symfony2] Application transaction question

2011-01-05 Thread Gustavo Adrian
logic that if the notification has > not been able to be sent after x number of tries inform an admin or > something about a problem. > > > On Tue, Jan 4, 2011 at 7:35 PM, Gustavo Adrian < > comfortablynum...@gmail.com> wrote: > >> I mean a notification system for o

Re: [symfony-users] [Symfony2] Application transaction question

2011-01-04 Thread Gustavo Adrian
see if a transaction was successful, such as a web page to see the > newly created entity. > > Perhaps reconsider the need to have an entire transactions success/failure > be dependant on a notification. > > > On Tue, Jan 4, 2011 at 1:52 PM, Gustavo Adrian < > comfortablyn

Re: [symfony-users] [Symfony2] Application transaction question

2011-01-04 Thread Gustavo Adrian
en there are > far better ways to communicate between software systems than using the > relatively unreliable method of email. > > TLDNR: It is very very difficult to verify that an email sent to a specific > recipient arrived (I would even lean to impossible). Find an alternate way

[symfony-users] [Symfony2] Application transaction question

2011-01-03 Thread Gustavo Adrian
Hi all, I know is not a Symfony specific question but I was wondering how do you guys manage a situation like the following: . Create an entity and save it to the database . Save the log to a file or whatever resource the system has . Send an email to notify people involved with the entity that t

  1   2   3   >