TIP: Use Markdown or, <pre> for multi line code blocks / <code> for inline code.
These forums are read-only and for archival purposes only!
Please join our new forums at discourse.kohanaframework.org
Userguide -module, namespaces and PSR-0
  • When using /guide-api/ (Userguide -module) there's some problem with PSR-0 naming policy or namespaces. Is there any workaround for this?

    PARENT FILE:

    /classes/lisa/john.php

    namespace lisa;
    
    class john
    {}
    

    WORKING EXTEND FILE:

    /classes/lisa/test/george.php

    namespace lisa;
    
    class test_george extends john
    {}
    

    FAILING EXTEND FILE:

    /classes/lisa/Test/george.php

    namespace lisa;
    
    class Test_george extends john
    {}
    

    ERROR GIVEN:

    ErrorException [ Fatal Error ]: require(): Cannot redeclare class lisa\john
    
    SYSPATH\classes\Kohana\Core.php [ 511 ]
    

    I'm using Windows environment.

  • Yeah, I ran into this issue a few months ago and am currently working on rewriting a lot of the userguide stuff. Unfortunately it simply does not work if you use namespaces. There's a ticket in redmine for this already and hopefully I can get it taken care of soon.

  • It is fixed?

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion