Forums are in read-only mode while we transition to new software.
Kohana 3.3.0-RC2 Released
  • Kohana 3.3.0-RC2 is tagged and pushed up to github. This should be the last RC release before final release.

  • Awesome , all 'major' bugs should be fixed now :) I just fixed some stuff in the JSend module and in case you need a 3.3 version of OAuth before shadowhands' repo is updated, you can find it here.

  • Yahoo, it is finally coming :-)

  • Looks good just updated

  • Cool.

    A question re: the $directory parameter in Kohana_Core::auto_load($class, $directory = 'classes')

    Would it be good practice, ie; Kohana's intent, to also register a 'vendor' auto-loader if required;

        // in Kohana extends Kohana_Core
        public static function auto_load_vendor($class)
        {
            Kohana::auto_load($class, 'vendor');
        }
    
        // in bootstrap
        spl_autoload_register(array('Kohana', 'auto_load_vendor'));
    

    Rather than, as per the function's comments, loading one vendor class at a time;

        Kohana::auto_load('My_Class_Name', 'vendor');
    
  • This is the point of that change. So you can clone a PSR-0 compliant project anywhere (in vendor for example), and then register an autoloader for it. You could put it into a module's init.php for instance.

  • I'm waiting for a long time for this final realase, thanks a lot!!

  • i hope demo

  • Where do I find the release notes for 3.3? Thanks...

    • Henrik
  • It's not released yet :)

    If you are looking for changes, there's a summary in the migration page in the user guide, and a full list is available in redmine from a search (permalink will exist once released).

  • Thanks. I'm anxiously waiting for kohana 3.3 .

  • Thanks zombor.

    You mean here:https://github.com/kohana/userguide/tree/3.3/develop/guide/userguide? (don't see a migration page though). Don't go to any trouble, I can wait...

    • H
  • Thanks!

  • I'm anxiously waiting for kohana 3.3 final Release ;) ..pleaseeeeeeeeeeeeeeeeee...thanks!!!!!!

  • Very exciting! Error handling was a weak point in previous versions.

  • .....waiting for new version pleaseee 3.3

  • ORM isnt fully PSR-0 yet::

    On doing a Auth::instance()->login() using the ORM driver: ErrorException [ Fatal Error ]: Class 'Model_user' not found

    notice the _user not _User:

    [modules]$ grep -r "factory('user')" * orm/classes/Kohana/Auth/ORM.php: $user = ORM::factory('user'); orm/classes/Kohana/Auth/ORM.php: $user = ORM::factory('user'); orm/classes/Kohana/Auth/ORM.php: $user = ORM::factory('user'); orm/guide/orm/using.md: $user = ORM::factory('user')

    These are the offending files.

    I've put in a pull request: https://github.com/kohana/orm/pull/68

  • @Dave, Thanks for the pull request. In the future can you make sure you open an issue as well when creating a pull request? It makes them much easier to track.

  • It makes them much easier to track.

    We require them, in fact ;)

  • @zombor @Isaiah - my apologies! I seemed to have overlooked that part of the procedure, long day !

    I see my request has been accepted, good news ! Everything works super on my test development platform now.

  • @Dave @zombor @isaiah I thought I already fixed that, really don't know how I overlooked it :\

  • Not to worry :)

    Is there a deadline to get any more amends in before launch ? Not that I have found any more bugs, but I am gonna have a good look through today to see if I can break anything else :)

  • Do you have any final date for v3.3 stable?

    Or it's ready when it's ready? :)

  • php 5.4 is a stable version. The next kohana version can be only run on PHP 5.4 platform?

  • Will my Session Cache class will be included into 3.3 ? http://dev.kohanaframework.org/issues/4524

  • @taai I don't think so, it's been feature-locked for some time now... Still, that doesn't prevent you to have a public module repo on Github (I wouldn't clone the whole Cache repo but create a single module with added files only, instead).

  • Any update on release ?

  • Anyone have a script handy to rename class files and directories for the PSR-0 change? Suppose I could just do it but someone has gotta have one already!

  • No script but if you build one: best to read the class files for the names I think. For instance a class 'MySQL' is currently mysql.php. Doing a simple Upper on first letter and after underscores (_) won't always work. Mysql.php won't match MySQL.

  • My thoughts exactly. I'm just lazy and figured someone had something already. =)

  • Problem is it's not fool proof.

    OLD NAMES class Foo_ABC_123_Bar /foo/abc/123/bar.php

    class FOO_Abc_123_Baz /foo/abc/123/baz.php

    So what would we rename the "foo" and "abc" directories too. Totally doable though. Just do the first found or something and ignore the rest. If users weren't consistent with class names, too bad. It actually wouldn't be hard to collect the class names and call em afterward to make sure they're reachable.

    Meh, whatever. Bed.

  • For file renaming, just use a simple bash script. It won't guarantee you that you class names are accordingly, but in most cases, if you've followed kohana's guidelines, you should be fine I think.

    Call from within your classes directory in bash:

    for SRC in `find . -depth`
    do
        DST=`dirname "${SRC}"`/`basename "${SRC}" | sed -e 's/^./\U&/'`;
        if [ "${SRC}" != "${DST}" ]
        then
            [ ! -e "${DST}" ] && mv -T "${SRC}" "${DST}" || echo "${SRC} was not renamed"
        fi
    done
    

    Edit: You should, of course, backup your project before trying this!

  • Thanks. Yea, it handles most cases. Something like Kohana_HTML at /kohana/html.php would be renamed to /Kohana/Html.php instead of /Kohana/HTML.php which from my understanding would break. Those cases are so rare though that it matters little. Thanks again.

  • Dear devs! Any news on development? Work on 3.3 has been stopped? Need any help?

  • Dear devs! Any news on development? Work on 3.3 has been stopped? Need any help?

  • Sorry for three comments. I don't know what happened.

  • we're still working on it. it will be released when we have taken care of the bugs found in the RCs.

  • What's wrong with my installation?

    index.php

    echo Request::factory(TRUE, NULL, FALSE) WORKS echo Request::factory(TRUE, array(), FALSE) FAILS

    ErrorException [ Recoverable Error ]: Argument 2 passed to Kohana_Request::factory() must be an instance of HTTP_Cache, array given, called in index.php on line 117 and defined

  • Your second argument must be either NULL or an instance of HTTP_Cache, as it says. What are you trying to do?

  • Just a basic "hello, world!" with 3.3.0-RC2

    This is the index.php I'm using: https://github.com/kohana/kohana/blob/3.3/develop/index.php

  • Are you sure you have the correct 3.3 system directory? The second parameter is an array: https://github.com/kohana/core/blob/3.3/develop/classes/Kohana/Request.php#L57

    Looks like you are using the 3.2 version.

  • You're right, somehow I got 3.2 system directory. Thanks for a help!

  • I followed this: error-pages.md -tutorial.

    First I tried throw new Kohana_HTTP_Exception_404('test');

    this will run APPPATH/classes/HTTP/Exception.php get_response() -method.

    So, I get a nicer looking "Oops" page. I thought that I would get 404 version of get_response() from APPPATH/classes/HTTP/Exception/404.php.

    Then I tried some random URL like http://localhost/this-route-doesnt-exists.

    That throws me a Kohana_HTTP_Exception [ 404 ]: Unable to find a route to match the URI: this-route-doesnt-exists in SYSPATH/classes/Kohana/Request.php

    Latter will never run get_response() in these directories:

    APPPATH/classes/HTTP/Exception.php

    APPPATH/classes/HTTP/Exception/404.php

    SYSPATH/classes/Kohana/HTTP/Exception.php

    What I'm missing here?

  • First problem solved, I didn't use correct throw new HTTP_Exception_404(':file does not exist', array(':file' => 'Gaia'));

  • Any advice for getting custom 404 error page for undefined routes in 3.3 ? Override Kohana's exception handler like in 3.2 ?

    Haven't fully read PSR-0 standard yet, but have you noticed that in Windows environment filenames and directories can be all lowercase eg. \classes\controller\welcome.php

    This could be problematic, if development environment is Windows and production environment is Linux.

  • Perhaps I'm not following but can't you just have your default "catch-all" route go to a 404 controller method? Any matched route will go to the appropriate place. Any non-matched route will go to the 404 method.

    I'm just freshly getting back into Kohana (work's taken my time away) so perhaps I'm missing something though.

  • Oh nvmnd, I see what ur asking. Sorry I can't help =)

  • I did "override Kohana's exception handler" -trick. It works, but seems a little bit hacky. Well, at least I have nicer looking 404s.

  • I think there is a ticket for the fact that no routes matching should result in a 404 exception http://dev.kohanaframework.org/issues/4556

Howdy, Stranger!

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

In this Discussion