Browse Source

prepare 3.3.8 release

Puskás Zsolt 6 years ago
parent
commit
8b9610628a

+ 5 - 14
README.md

@@ -8,7 +8,7 @@
 [![Build Status](https://travis-ci.org/koseven/koseven.svg?branch=devel)](https://travis-ci.org/koseven/koseven)
 [![Build Status](https://travis-ci.org/koseven/koseven.svg?branch=devel)](https://travis-ci.org/koseven/koseven)
 [![Coverage Status](https://coveralls.io/repos/github/koseven/koseven/badge.svg?branch=devel)](https://coveralls.io/github/koseven/koseven?branch=devel)
 [![Coverage Status](https://coveralls.io/repos/github/koseven/koseven/badge.svg?branch=devel)](https://coveralls.io/github/koseven/koseven?branch=devel)
 
 
-## [Download 3.3.7](https://github.com/koseven/koseven/releases/tag/3.3.7)
+## [Download 3.3.8](https://github.com/koseven/koseven/releases/tag/3.3.8)
 
 
 ### [Join the Telegram group](https://telegram.me/koseven)
 ### [Join the Telegram group](https://telegram.me/koseven)
 
 
@@ -29,26 +29,17 @@ And so the Koseven repository was born and will keep this repository updated for
 
 
 ## Will work as dropin of Kohana?
 ## Will work as dropin of Kohana?
 
 
-If you were using 3.3.x version normally yes. Normally? There are 4 breaking changes that may affect you, be aware. Please check how to migrate.
-
-We have also added the pagination module.
-
-## Migrate Kohana 3.3.x to Koseven 3.3.7
-
-- **Kohana_Kohana_Exception**, all functions that received parameter Exception $e have been replaced to just $e. If you are extending the class verify you have the same.
-- **Kohana_URL**, now function site has a new parameter `$subdomain = NULL`, if you are extending the class and this function add it.
-- **Module encrypt**, now encryption works as a module, if you are using new Encrypt or similar you need to enable the module in your bootstrap ex: `'encrypt'       => MODPATH.'encrypt',` 
-- **MySQL driver** has been removed. If you are still using it, please install MySQLi driver and then edit your `config/database.php` and then set as `'type'       => 'MySQLi'`
+If you were using 3.3.x version you may need to make some small changes. Please refer to [upgrading from kohana](https://docs.koseven.ga/guide/kohana/upgrading-from-kohana) section of the documentation.
 
 
 ## What changes have you made?
 ## What changes have you made?
 
 
-So far is exactly as last stable version of KO 3.3.6 released on Jul 25, 2016. But compatible with PHP 7 / PHP 7.1.
+So far is mostly as the last stable version of Kohana 3.3.6 released on Jul 25, 2016. But compatible with PHP 7.
 Our focus is to keep the framework compatible with new releases of PHP, fix bugs and try to improve the speed.
 Our focus is to keep the framework compatible with new releases of PHP, fix bugs and try to improve the speed.
 New features can be added using modules.
 New features can be added using modules.
 
 
 ## Are modules of the original Kohana compatible?
 ## Are modules of the original Kohana compatible?
 
 
-Yes they are, just be sure that they are compatible with KO 3.3.X.
+Yes they are, just be sure that they are compatible with Kohana 3.3.X.
 An overview of Koseven’s team own modules can be found on [this](https://koseven.ga/modules.html) page.
 An overview of Koseven’s team own modules can be found on [this](https://koseven.ga/modules.html) page.
 There’s also a list online with a nice overview of existing modules maintained (or abandoned) by others. You can consult this list at [kohana-modules.com](https://koseven.ga/modules.html)
 There’s also a list online with a nice overview of existing modules maintained (or abandoned) by others. You can consult this list at [kohana-modules.com](https://koseven.ga/modules.html)
 
 
@@ -62,7 +53,7 @@ Feel free to [open an issue on github](https://github.com/koseven/koseven/issues
 
 
 ## Documentation
 ## Documentation
 
 
-We are working to improve the original Kohana documentation but in the meantime feel free to use the one provided by KO.
+We are working to improve the original Kohana documentation but in the meantime feel free to use the one provided by Kohana.
 
 
 Koseven documentation can be found at [docs.koseven.ga](https://docs.koseven.ga) which also contains an API browser.
 Koseven documentation can be found at [docs.koseven.ga](https://docs.koseven.ga) which also contains an API browser.
 
 

+ 1 - 1
system/classes/Kohana/Core.php

@@ -16,7 +16,7 @@
 class Kohana_Core {
 class Kohana_Core {
 
 
 	// Release version and codename
 	// Release version and codename
-	const VERSION  = '3.3.7';
+	const VERSION  = '3.3.8';
 	const CODENAME = 'lazarus';
 	const CODENAME = 'lazarus';
 
 
 	// Common environment type constants for consistency and convenience
 	// Common environment type constants for consistency and convenience

+ 23 - 38
system/guide/kohana/conventions.md

@@ -79,27 +79,12 @@ Don't put any characters inside empty brackets.
 
 
 Arrays may be single line or multi-line.
 Arrays may be single line or multi-line.
 
 
-	array('a' => 'b', 'c' => 'd')
+	['a' => 'b', 'c' => 'd']
 	
 	
-	array(
+	[
 		'a' => 'b', 
 		'a' => 'b', 
 		'c' => 'd',
 		'c' => 'd',
-	)
-
-##### Opening Parenthesis
-
-The opening array parenthesis goes on the same line.
-
-	// Correct
-	array(
-		...
-	)
-
-	// Incorrect:
-	array
-	(
-		...
-	)
+	]
 
 
 ##### Closing parenthesis
 ##### Closing parenthesis
 
 
@@ -108,55 +93,55 @@ The opening array parenthesis goes on the same line.
 The closing parenthesis of a multi-line single dimension array is placed on its own line, indented to the same level as the assignment or statement.
 The closing parenthesis of a multi-line single dimension array is placed on its own line, indented to the same level as the assignment or statement.
 
 
 	// Correct
 	// Correct
-	$array = array(
+	$array = [
 		...
 		...
-	)
+	]
 
 
 	// Incorrect
 	// Incorrect
-	$array = array(
+	$array = [
 		...
 		...
-		)
+		]
 
 
 ###### Multidimensional
 ###### Multidimensional
 
 
 The nested array is indented one tab to the right, following the single dimension rules.
 The nested array is indented one tab to the right, following the single dimension rules.
 
 
 	// Correct
 	// Correct
-	array(
-		'arr' => array(
+	[
+		'arr' => [
 			...
 			...
-		),
-		'arr' => array(
+		],
+		'arr' => [
 			...
 			...
-		),
-	)
+		],
+	]
 	
 	
-	array(
-		'arr' => array(...),
-		'arr' => array(...),
-	)
+	[
+		'arr' => [...],
+		'arr' => [...],
+	]
 	
 	
 ##### Arrays as Function Arguments
 ##### Arrays as Function Arguments
 
 
 
 
 	// Correct
 	// Correct
-	do(array(
+	do([
 		...
 		...
-	))
+	])
 	
 	
 	// Incorrect
 	// Incorrect
-	do(array(
+	do([
 		...
 		...
-		))
+		])
 
 
 As noted at the start of the array bracket section, single line syntax is also valid.
 As noted at the start of the array bracket section, single line syntax is also valid.
 
 
 	// Correct
 	// Correct
-	do(array(...))
+	do([...])
 	
 	
 	// Alternative for wrapping long lines
 	// Alternative for wrapping long lines
 	do($bar, 'this is a very long line',
 	do($bar, 'this is a very long line',
-		array(...));
+		[...]);
 
 
 ### Naming Conventions
 ### Naming Conventions
 
 

+ 1 - 2
system/guide/kohana/menu.md

@@ -19,8 +19,7 @@
    - [Routing](routing)
    - [Routing](routing)
    - [Error Handling](errors)
    - [Error Handling](errors)
    - [Tips & Common Mistakes](tips)
    - [Tips & Common Mistakes](tips)
-   - [Upgrading from v3.2](upgrading)
-   - [Upgrading from v3.3.3.1](upgrading-from-3-3-3-1)
+   - [Upgrading from Kohana](upgrading-from-kohana)
 - Basic Usage
 - Basic Usage
    - [Debugging](debugging)
    - [Debugging](debugging)
    - [Loading Classes](autoloading)
    - [Loading Classes](autoloading)

+ 0 - 23
system/guide/kohana/upgrading-from-3-3-3-1.md

@@ -1,23 +0,0 @@
-# Upgrading from 3.3.3.1
-
-Minor version upgrades are usually done in a drop-in fashion. Unfortunately, however, upgrading from 3.3.3.1 to 3.3.4 needs a little configuration. This is because a [security disclosure from HP Fortify](https://github.com/kohana/kohana/issues/74), that unveiled a serious [host header attack](https://github.com/kohana/core/issues/613) vulnerability.
-
-[!!] You *might* still be able to have a drop-in upgrade, in case you have set the `base_url` in the [Kohana::init] call to an absolute URL. We advise you however that you follow the step below to make your application secure, in case some day you decide to change your `base_url` to a relative URL.
-
-## Trusted Hosts
-
-You need to setup a list of trusted hosts. Trusted hosts are hosts that you expect your application to be accessible from.
-
-Open `application/config/url.php` and add regex patterns of these hosts. An example is given hereunder:
-
-~~~
-return array(
-	'trusted_hosts' => array(
-		'example\.org',
-		'.*\.example\.org',
-	),
-);
-~~~
-
-[!!] Do not forget to escape your dots (.) as these are regex patterns. These patterns should always fully match, as they are prepended with `^` and appended with `$`.
-

+ 13 - 0
system/guide/kohana/upgrading-from-kohana.md

@@ -0,0 +1,13 @@
+# Upgrading from Kohana
+
+If you were using 3.3.x version, there are 4 breaking changes that may affect you, be aware.
+
+- **Kohana_Kohana_Exception**, all functions that received parameter Exception $e have been replaced to just $e. If you are extending the class verify you have the same.
+- **Kohana_URL**, now function site has a new parameter `$subdomain = NULL`, if you are extending the class and this function add it.
+- **Module encrypt**, now encryption works as a module, if you are using new Encrypt or similar you need to enable the module in your bootstrap ex: `'encrypt'       => MODPATH.'encrypt',` 
+- **MySQL driver** has been removed. If you are still using it, please install MySQLi driver and then edit your `config/database.php` and then set as `'type'       => 'MySQLi'`
+
+## New modules included
+
+- Encrypt (separated from system)
+- Pagination

+ 0 - 100
system/guide/kohana/upgrading.md

@@ -1,100 +0,0 @@
-# Migrating from 3.2.x
-
-## HVMC Isolation
-
-HVMC Sub-request isolation has been improved to prevent exceptions leaking from this inner to the outer request. If you were previously catching any exceptions from sub-requests, you should now be checking the [Response] object returned from [Request::execute].
-
-## HTTP Exceptions
-
-The use of HTTP Exceptions is now encouraged over manually setting the [Response] status to, for example, '404'. This allows for easier custom error pages (detailed below);
-
-The full list of supported codes can be seen in the SYSPATH/classes/HTTP/Exception/ folder.
-
-Syntax:
-
-    throw HTTP_Exception::factory($code, $message, array $variables, Exception $previous);
-
-Examples:
-
-    // Page Not Found
-    throw HTTP_Exception::factory(404, 'The requested URL :uri was not found on this server.', array(
-            ':uri' => $this->request->uri(),
-        ));
-
-    // Unauthorized / Login Requied
-    throw HTTP_Exception::factory(401)->authenticate('Basic realm="MySite"');
-
-    // Forbidden / Permission Deined
-    throw HTTP_Exception::factory(403);
-
-## Redirects (HTTP 300, 301, 302, 303, 307)
-
-Redirects are no longer issued against the [Request] object. The new syntax from inside a controller is:
-
-    $this->redirect('http://www.google.com', 302);
-
-or from outside a controller:
-
-    HTTP::redirect('http://www.google.com', 302);
-
-## Custom Error Pages (HTTP 500, 404, 403, 401 etc)
-
-Custom error pages are now easier than ever to implement, thanks to some of the changes brought about by the HVMC and Redirect changes above.
-
-See [Custom Error Pages](tutorials/error-pages) for more details.
-
-## Browser cache checking (ETags)
-
-The Response::check_cache method has moved to [HTTP::check_cache], with an alias at [Controller::check_cache]. Previously, this method would be used from a controller like this:
-
-    $this->response->check_cache(sha1('my content'), Request $this->request);
-
-Now, there are two options for using the method:
-
-    $this->check_cache(sha1('my content'));
-
-which is an alias for:
-
-    HTTP::check_cache($this->request, $this->response, sha1('my content'));
-
-## PSR-0 support (file/class naming conventions)
-
-With the introduction of [PSR-0](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md) support, the autoloading of classes is case sensitive. Now, the file (and folder) names must match the class name exactly.
-
-Examples:
-
-    Kohana_Core
-
-would be located in
-
-    classes/Kohana/Core.php
-
-and
-
-    Kohana_HTTP_Header
-
-would be located in
-
-    classes/Kohana/HTTP/Header.php
-
-This also affects dynamically named classes such as drivers and ORMs. So for example, in the database config using `'mysql'` as the type instead of `'MySQL'` would throw a class not found error.
-
-## Query Builder Identifier Escaping
-
-The query builder will no longer detect columns like `COUNT("*")`. Instead, you will need to use `DB::expr()` any time you need an unescaped column. For example:
-
-    DB::select(DB::expr('COUNT(*)'))->from('users')->execute()
-
-## Route Filters
-
-In `3.3.0`, you can no longer pass a callback to `Route::uri()`. Instead, we've added the ability to define one or more filters which will be able to decide if the route matches and will also allow you to change any of the parameters. These filters will receive the `Route` object being tested, the currently matched `$params` array, and the `Request` object as the three parameters.
-
-    Route::set('route-name', 'some/uri/<id>')
-        ->filter(function($route, $params, $request) {
-            // Returning FALSE will make this route not match
-            // Returning an array will replace the $params sent to the controller
-        });
-
-These filters can be used for things like prepending the request method to the action, checking if a resource exists before matching the route, or any other logic that the URI alone cannot provide. You can add as many filters as needed so it's useful to keep filters as small as possible to make them reusable.
-
-See [Routing](routing#route-filters) for more details.