Re: [symfony-users] Re: Autoloading problem
Le 06/01/11 13:58, mwsaz a écrit : Hi, You need the full namespace : Also, you should be putting this before the 'Doctrine' line in registerNamespaces() $loader->registerNamespaces(array( ... 'DoctrineExtensions\\NestedSet' => $vendorDir.'/ doctrine2-nestedset/lib' )); On 5 jan, 18:33, "Yohan 'rouKs' G." wrote: Hi all, I'm trying to use the Doctrine2 NestedSet extension but I have a problem with autoloading. I have put the doctrine2-nestedset directory into my vendors and my autoload.php looks like this : $loader->registerNamespaces(array( ... 'DoctrineExtensions' => $vendorDir.'/doctrine2-nestedset/ lib', )); here is my Entity : Thanks for your response, it was just because of the position, i put the declaration before doctrine and it works fine. -- 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: Autoloading problem
Hi, You need the full namespace : Also, you should be putting this before the 'Doctrine' line in registerNamespaces() $loader->registerNamespaces(array( ... 'DoctrineExtensions\\NestedSet' => $vendorDir.'/ doctrine2-nestedset/lib' )); On 5 jan, 18:33, "Yohan 'rouKs' G." wrote: > Hi all, > > I'm trying to use the Doctrine2 NestedSet extension but I have a > problem with autoloading. > > I have put the doctrine2-nestedset directory into my vendors and my > autoload.php looks like this : > > $loader->registerNamespaces(array( > ... > 'DoctrineExtensions' => $vendorDir.'/doctrine2-nestedset/ > lib', > )); > > here is my Entity : > > > namespace Bundle\MenuBundle\Entity; > > use DoctrineExtensions\NestedSet\MultipleRootNode; > > class MenuNode implements MultipleRootNode > { > > But I have this error : Fatal error: Interface 'DoctrineExtensions > \NestedSet\MultipleRootNode' not found in .../src/Bundle/MenuBundle/ > Entity/MenuNode.php on line 8 > > Someone has an idea ? > > Thanks, > Yohan. -- 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: Autoloading problem
Thanks a lot, Kiril - I just didn't clear cache after I changed the case, as you told. On 18 нояб, 15:06, "Kiril Angov" <[EMAIL PROTECTED]> wrote: > Having used symfony a lot, I know for a fact that that is not > possible, that is to have autoloading work only in one action and not > in the other. After you change your file names and class names, make > sure you do "php symfony cc" and then try again. > > 2008/11/18 [EMAIL PROTECTED] <[EMAIL PROTECTED]>: > > > > > Kiril, I made sure that filenames and classnames have the same case. > > The problem is that the file is autoloaded only in index actions - and > > the same file is not autoloaded in any others. > > > On 14 нояб, 22:21, "Kiril Angov" <[EMAIL PROTECTED]> wrote: > >> Make sure you are using the right name for your file myClass.class.php > >> and MyClass.class.php are different on a case sensitive sistem and I > >> think that is your problem. PHP classes and functions are not case > >> sensitive (as far as I know) and if one time you call your class > >> $something = new myClass() and another time $something = new > >> MyClass(), these differ for the autoloading. > > >> Kiril > > >> On Wed, Nov 12, 2008 at 9:47 PM, [EMAIL PROTECTED] > > >> <[EMAIL PROTECTED]> wrote: > > >> > This path is relative to the site root. > >> > I use symfony 1.1 by the way. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Autoloading problem
Having used symfony a lot, I know for a fact that that is not possible, that is to have autoloading work only in one action and not in the other. After you change your file names and class names, make sure you do "php symfony cc" and then try again. 2008/11/18 [EMAIL PROTECTED] <[EMAIL PROTECTED]>: > > Kiril, I made sure that filenames and classnames have the same case. > The problem is that the file is autoloaded only in index actions - and > the same file is not autoloaded in any others. > > On 14 нояб, 22:21, "Kiril Angov" <[EMAIL PROTECTED]> wrote: >> Make sure you are using the right name for your file myClass.class.php >> and MyClass.class.php are different on a case sensitive sistem and I >> think that is your problem. PHP classes and functions are not case >> sensitive (as far as I know) and if one time you call your class >> $something = new myClass() and another time $something = new >> MyClass(), these differ for the autoloading. >> >> Kiril >> >> On Wed, Nov 12, 2008 at 9:47 PM, [EMAIL PROTECTED] >> >> <[EMAIL PROTECTED]> wrote: >> >> > This path is relative to the site root. >> > I use symfony 1.1 by the way. > > > --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Autoloading problem
Kiril, I made sure that filenames and classnames have the same case. The problem is that the file is autoloaded only in index actions - and the same file is not autoloaded in any others. On 14 нояб, 22:21, "Kiril Angov" <[EMAIL PROTECTED]> wrote: > Make sure you are using the right name for your file myClass.class.php > and MyClass.class.php are different on a case sensitive sistem and I > think that is your problem. PHP classes and functions are not case > sensitive (as far as I know) and if one time you call your class > $something = new myClass() and another time $something = new > MyClass(), these differ for the autoloading. > > Kiril > > On Wed, Nov 12, 2008 at 9:47 PM, [EMAIL PROTECTED] > > <[EMAIL PROTECTED]> wrote: > > > This path is relative to the site root. > > I use symfony 1.1 by the way. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Autoloading problem
Make sure you are using the right name for your file myClass.class.php and MyClass.class.php are different on a case sensitive sistem and I think that is your problem. PHP classes and functions are not case sensitive (as far as I know) and if one time you call your class $something = new myClass() and another time $something = new MyClass(), these differ for the autoloading. Kiril On Wed, Nov 12, 2008 at 9:47 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > This path is relative to the site root. > I use symfony 1.1 by the way. > > > --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Autoloading problem
This path is relative to the site root. I use symfony 1.1 by the way. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Autoloading problem
Is it full path to this class? 2008/11/12 [EMAIL PROTECTED] <[EMAIL PROTECTED]> > > Hi folks, > > I have noticed the following autoload problem. > I specified a class called "MyTools" in \lib\myTools.class.php - so it > should be autoloaded anywhere in my application. But it's autoloaded > only in actions called "executeIndex" and in templates called > "indexSuccess". > How can I change this odd behaviour and make this class autoloadable > anywhere? Or how can I load it by hand? > > > > --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Autoloading problem with Propel 1.3
Le 9 sept. 08 à 14:36, Eric Fredj a écrit : > Hi, > > It seems it should work fine because in SfNestedSetBuilder and > SfNestedSetPeerBuilder classes, the call to addIncludes() method > depends on the addInclude properties so the require() line should > not be generated. > > http://trac.symfony-project.org/ticket/3716 > > Can you check your propel.ini use the right builder ? I'm having the same issue using nested sets too. When will be released next version of sfPropelPlugin? (last release : 28/05/08) -- Nicolas CHARLOT http://www.isics.fr --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Autoloading problem with Propel 1.3
Hi, It seems it should work fine because in SfNestedSetBuilder and SfNestedSetPeerBuilder classes, the call to addIncludes() method depends on the addInclude properties so the require() line should not be generated. http://trac.symfony-project.org/ticket/3716 Can you check your propel.ini use the right builder ? ErIC [EMAIL PROTECTED] a écrit : > W odpowiedzi na e-mail od: ruFog otrzymany dnia 2008-09-06 01:07 : > >> It`s simple to comment require line in Your Base*NestedSet*.php >> files ;) >> >> >> > hmm but you must do it every model rebuild > really annoying --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Autoloading problem with Propel 1.3
W odpowiedzi na e-mail od: ruFog otrzymany dnia 2008-09-06 01:07 : > It`s simple to comment require line in Your Base*NestedSet*.php > files ;) > > hmm but you must do it every model rebuild really annoying --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Autoloading problem with Propel 1.3
It`s simple to comment require line in Your Base*NestedSet*.php files ;) --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Autoloading problem with Propel 1.3
W odpowiedzi na e-mail od: notjosh otrzymany dnia 2008-09-05 12:01 : > Hm, I recall having an issue similar to this when I used nested sets > in symfony 1.1 with Propel 1.3. But, uh, I thought that was fixed. > > I had to hack together a patch for it, though, but it was ugly as > hell. If you want, I can try to dig it up. > > I'm sure it's fixed now though. Hr..! > > hmm it is not fixed in last sfPropelPlugin - 1.3.0 i have the same issue when using nested set could you send patch --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Autoloading problem with Propel 1.3
Hm, I recall having an issue similar to this when I used nested sets in symfony 1.1 with Propel 1.3. But, uh, I thought that was fixed. I had to hack together a patch for it, though, but it was ugly as hell. If you want, I can try to dig it up. I'm sure it's fixed now though. Hr..! On Sep 4, 7:31 pm, "Yohan 'rouKs' G." <[EMAIL PROTECTED]> wrote: > Yohan 'rouKs' G. wrote: > > Hi, > > > I'm migrating from propel 1.2 to 1.3 (symfony1.1) and i've got some > > problems with the autoloading... > > > Fatal error: require() [function.require]: Failed opening required > > 'lib/model/om/BaseMenuNodePeer.php' (include_path='.:/usr/share/php:/ > > usr/share/pear:/usr/share/php5/symfony11/lib:/home/yohan/src/plugins/ > > sfPropelPlugin/lib/vendor/:/home/yohan/src/plugins/sfPropelPlugin/lib/ > > vendor/') in /home/yohan/src/lib/model/om/ > > BaseMenuNodeNestedSetPeer.php on line 3 > > > The include_path doesn't contains lib/model ! > > > Has someone a solution ? > > I found why this don't work but no solution :/ > > This is because the addIncludes = false in propel.ini doesn't work with > nested sets. If i manually remove includes, it works. > > Someone have a solution or a patch ? --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] Re: Autoloading problem with Propel 1.3
Yohan 'rouKs' G. wrote: > Hi, > > I'm migrating from propel 1.2 to 1.3 (symfony1.1) and i've got some > problems with the autoloading... > > Fatal error: require() [function.require]: Failed opening required > 'lib/model/om/BaseMenuNodePeer.php' (include_path='.:/usr/share/php:/ > usr/share/pear:/usr/share/php5/symfony11/lib:/home/yohan/src/plugins/ > sfPropelPlugin/lib/vendor/:/home/yohan/src/plugins/sfPropelPlugin/lib/ > vendor/') in /home/yohan/src/lib/model/om/ > BaseMenuNodeNestedSetPeer.php on line 3 > > The include_path doesn't contains lib/model ! > > Has someone a solution ? > > > > I found why this don't work but no solution :/ This is because the addIncludes = false in propel.ini doesn't work with nested sets. If i manually remove includes, it works. Someone have a solution or a patch ? --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---