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
Kohana 3.1 RC1
  • Hello-

    Kohana 3.1 RC1 has been pushed, tagged and released. Please put it through the ringer! It is feature complete, so please only report bugs against it. You can report issues via http://dev.kohanaframework.org/projects/kohana3/issues

    Grab it @ https://github.com/kohana/kohana/tree/3.1/release/3.1.0 and have fun :)
  • Well done to everyone who put hours and hours into this new version, including the community. It is the product of everyones work. Please test the hell out of it over the next few weeks before final candidate.

    Happy New Year!
  • How about a miny changelog? Or small list of new features? :)
  • Here's the redmine report for all closed, fixed issues for 3.1: http://dev.kohanaframework.org/projects/kohana3/issues?query_id=36

    A more generic overview will come on the real release.

    The big change is how request/response handling is done. There's also improvements to validation and routing.
  • Awesome work guys. Will definetly be giving it run throught this weekend... as soon as this damn NYE hangover passes lol.
  • Great news, guys! Testing it right now.
    I wonder is there any manuals or other docs (at least brief) of KO3.1's key features?

    By the way, if a controller or action is not found, it just displays "404 Not Found" message even in development environment. How can I see standard Kohana's error screen with more detailed error description (what controller/action is not found etc)?
  • > I wonder is there any manuals or other docs (at least brief) of KO3.1's key features?

    Not yet, like I said above, we'll be working on that for the final release. You can see what's changed from my post above.
  • I am getting familiar with new Validation class, but this doesn't work for me:

    $text = array(
    'foo' => '1234567',
    );

    var_dump(Valid::min_length($text['foo'], 5)); // Thats OK

    $post = Validation::factory($text)

    ->rule('foo', 'min_length', array(NULL, 5));

    if ($post->check())
    {
    var_dump('OK');
    }

    $errors = $post->errors('foo');

    var_dump($errors);
    var_dump($post);

    I am getting error message:
    'foo must be at least 5 characters long'

    When I change it to 'max_length' it always 'OK' even if the string is too long.
  • Uh, there must be

    ->rule('foo', 'min_length', array(':value', 5));
  • > ->rule('foo', 'min_length', array(':value', 5));

    Yep, thats documented in the rule() method.
  • Before I
    put it through the ringer!
    I had a question - should 3.1 system/modules be able to transparently replace 3.0x of same?
  • 3.1 comes with API changes since it's a major release. I doesn't have to work with an application written for 3.0
  • > should 3.1 system/modules be able to transparently replace 3.0x of same?

    No, you should read: https://github.com/kohana/kohana/wiki/Kohana-Development-Procedures
  • I had a question - should 3.1 system/modules be able to transparently replace 3.0x of same?

    No, there are api differences, so it will require changes to your application's code.
  • Okay thanks for the link Zombor. Very helpful.
  • Which branch in the core git repository should I be using for 3.1?

    All the modules have a 3.1/master, but the core only has 3.1/release/3.1.0

  • On a related note the pagination branch is 3.1.x

    Are these correct, or should the modules and core all follow the same branch naming convention?
  • I've updated the first post to the correct location: https://github.com/kohana/kohana/tree/3.1/release/3.1.0

    The branch for the 3.1 release in kohana/kohana is release/3.1.0. It has submodules for all the proper module repository branches.

    > All the modules have a 3.1/master, but the core only has 3.1/release/3.1.0

    I didn't make a release branch for each module, as they are much smaller than core, and aren't likely to have any more changes.

    > On a related note the pagination branch is 3.1.x

    Pagination isn't going to be included in 3.1 release, but thanks for noting this. I'll get that changed when I have some time.

    > Are these correct, or should the modules and core all follow the same branch naming convention?

    I've only applied the naming conventions to the modules that will be released along with 3.1. The others will conform eventually.
  • @zombor

    Understood. I'm actually using the individual core and module repos, rather than the kohana/kohana one.
  • Also for those who are wondering about some of the API changes:

    Kohana::debug has been changed to Debug::vars (also the example in the phpdoc incorrectly lists the function as Debug::debug).

    Request::instance no longer exists. Request::current will return the current request being used.
  • I found this in the "kohana/http/error.php" view:

    <!DOCTYPE html>
    <html lang="<?php echo Kohana::$charset; ?>">
    ...


    Isn't this wrong? Since language should be "en" (or whatever language is set) and not the encodeing?
  • It should probably be this right?
    <!doctype html>
    <html lang="<?php echo I18n::$lang; ?>">
    <head>
    <meta charset="<?php echo Kohana::$charset; ?>" />
  • It's completely wrong because kohana uses xhtml, not html5.
  • @solidsnake, that's been fixed (the view was removed), see bff5081..., this change will be included with the next release.

  • Kohana shouldn't be dictating doctypes in reality. Use HTML5 if you want to, don't listen to @zombor ;)
  • > Kohana shouldn't be dictating doctypes in reality. Use HTML5 if you want to

    They can use html5 if they want, but kohana uses xhtml for all it's output (form helper, for example). That's our standard.
  • What part of the form helper isn't also valid HTML5? I cannot see anything in there that isn't.
  • There was a huge issue about it in redmine ;)

    You can't do attributes without values is the main issue I think. Also, it generates /> (which is still html5) instead of > (what people normally do in html5)
  • As long as you target xhtml, you're good to go with html5 (for the most part ;)).
  • I prefer XML style syntax in HTML5. Normally isn't applicable here. Also boolean attributes as per the spec can still have <input disabled="disabled" /> as well as just <input disabled />. Then again I didn't see the issue so I don't know what the problem was.

    HTML5 FTW!!
  • Don't take me seriously, it was all in jest
  • Looks really good guys.

    Changes to validation look really solid and will really help make it integrate better in complex libraries.

    Good to see your response/request stuff finally getting out Sam!

  • Congrats! I've been waiting for 3.1 RC to start my next project. My first KO3 project as well.

    kohana uses xhtml for all it's output

    @zombor: I thought xhtml was a thing of the past ;)

  • Says who? It's the latest finished spec by W3C ;)

    Debate that in a different thread though :)

  • @ neovive

    If you're writing HTML5, code generated by Kohana is HTML not XHTML, because Kohana still sends "text/html; charset=utf-8"

  • xhtml has always used "text/html; charset=utf-8" because it's rendered as html not xml. xhtml 1.1 however is another story.

  • Let's not get into this here. I said debate that stupid discussion in a different thread please.

  • Sorry for the newbie question.

    How do I download the RC1 and all the submodules?

    When I go to https://github.com/kohana/kohana/tree/3.1/release/3.1.0 the git URL that shows is https://github.com/kohana/kohana.git which I think is not the git URL for RC1.

    I tried

    git clone git://github.com/kohana/kohana.git
    cd kohana
    git submodule update --init

    but the downloaded submodules refere to 3.0.9

    Thanks,

  • You can just jump into system and change the branch

    git checkout --track -b mybranch-whatever origin/3.1/develop

  • thanks loonies,

    This is what worked for me (for 3.1.0 branch)

    $git clone git://github.com/kohana/kohana.git
    $cd kohana
    $git checkout --track origin/3.1/release/3.1.0
    $git submodule update --init
    

Howdy, Stranger!

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

In this Discussion