Skip to content

Commit

Permalink
Adjusted versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
samdark committed Jun 10, 2018
1 parent 32efb09 commit c184ef8
Show file tree
Hide file tree
Showing 59 changed files with 169 additions and 165 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ group: edge
#branches:
# only:
# - master
# - 2.1
# - 3.0


#
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The framework is easy to adjust to meet your needs, because Yii has been designe
Installation
------------

- The minimum required PHP version of Yii 2.1 is PHP 7.1.
- The minimum required PHP version of Yii 3.0 is PHP 7.1.
- [Follow the Definitive Guide](https://www.yiiframework.com/doc-2.0/guide-start-installation.html)
in order to get step by step instructions.

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
],
"extra": {
"branch-alias": {
"dev-master": "2.0.x-dev"
"dev-master": "3.0.x-dev"
}
}
}
2 changes: 1 addition & 1 deletion docs/guide-ja/db-dao.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Yii 2.0 では、DAO は下記の DBMS のサポートを内蔵しています
- [Oracle](http://www.oracle.com/us/products/database/overview/index.html)
- [MSSQL](https://www.microsoft.com/en-us/sqlserver/default.aspx): バージョン 2008 以上。

> Info: Yii 2.1 以降では、CUBRID、Oracle および MSSQL に対する DAO サポートは、フレームワーク内蔵のコア・コンポーネント
> Info: Yii 3 以降では、CUBRID、Oracle および MSSQL に対する DAO サポートは、フレームワーク内蔵のコア・コンポーネント
としては提供されていません。それらは、独立した [エクステンション](structure-extensions.md) としてインストールされる
必要があります。[yiisoft/yii2-oracle](https://www.yiiframework.com/extension/yiisoft/yii2-oracle) および
[yiisoft/yii2-mssql](https://www.yiiframework.com/extension/yiisoft/yii2-mssql)
Expand Down
2 changes: 1 addition & 1 deletion docs/guide-ja/structure-extensions.md
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ Yii は下記のコア・エクステンション (または ["公式エクス
- [yiisoft/yii2-twig](https://github.com/yiisoft/yii2-twig):
[Twig](http://twig.sensiolabs.org/) に基づいたテンプレート・エンジンを提供します。

下記の公式エクステンションは Yii 2.1 以上のためのものです。
下記の公式エクステンションは Yii 3 以上のためのものです。
これらは、Yii 2.0 ではコア・フレームワークに含まれていますので、インストールする必要はありません。.

- [yiisoft/yii2-captcha](https://www.yiiframework.com/extension/yiisoft/yii2-captcha):
Expand Down
2 changes: 1 addition & 1 deletion docs/guide-ru/tutorial-yii-as-micro-framework.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ cd micro-app
```json
{
"require": {
"yiisoft/yii2": "~2.1.0"
"yiisoft/yii2": "~3.0.0"
}
}
```
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/db-dao.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ In Yii 2.0, DAO supports the following databases out of the box:
- [Oracle](http://www.oracle.com/us/products/database/overview/index.html)
- [MSSQL](https://www.microsoft.com/en-us/sqlserver/default.aspx): version 2008 or higher.

> Info: In Yii 2.1 and later, the DAO supports for CUBRID, Oracle and MSSQL are no longer provided as the built-in
> Info: In Yii 3 and later, the DAO supports for CUBRID, Oracle and MSSQL are no longer provided as the built-in
core components of the framework. They have to be installed as the separated [extensions](structure-extensions.md).
There are [yiisoft/yii2-oracle](https://www.yiiframework.com/extension/yiisoft/yii2-oracle) and
[yiisoft/yii2-mssql](https://www.yiiframework.com/extension/yiisoft/yii2-mssql) in the
Expand Down
12 changes: 6 additions & 6 deletions docs/guide/intro-yii.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,20 +41,20 @@ via simple and elegant interfaces.
Yii Versions
------------

Yii currently has three major versions available: 1.1, 2.0 and 2.1. Version 1.1 is the old generation and is now in maintenance mode. Version 2.0 is a complete rewrite of Yii, adopting the latest
technologies and protocols, including Composer, PSR, namespaces, traits, and so forth. Version 2.1 is a cleaned up and refactored version of 2.0 that represents the current
Yii currently has three major versions available: 1.1, 2.0 and 3. Version 1.1 is the old generation and is now in maintenance mode. Version 2.0 is a complete rewrite of Yii, adopting the latest
technologies and protocols, including Composer, PSR, namespaces, traits, and so forth. Version 3 is a cleaned up and refactored version of 2.0 that represents the current
generation of the framework and will receive the main development efforts over the next few years.
This guide is mainly about version 2.1.
This guide is mainly about version 3.


Requirements and Prerequisites
------------------------------

Yii 2.1 requires PHP 7.1 or above. You can find more detailed
Yii 3 requires PHP 7.1 or above. You can find more detailed
requirements for individual features by running the requirement checker included in every Yii release.

Using Yii requires basic knowledge of object-oriented programming (OOP), as Yii is a pure OOP-based framework.
Yii 2.1 also makes use of the latest features of PHP, such as [namespaces](http://www.php.net/manual/en/language.namespaces.php)
Yii 3 also makes use of the latest features of PHP, such as [namespaces](http://www.php.net/manual/en/language.namespaces.php)
and [traits](http://www.php.net/manual/en/language.oop5.traits.php). Understanding these concepts will help
you more easily pick up Yii 2.1.
you more easily pick up Yii 3.

2 changes: 1 addition & 1 deletion docs/guide/runtime-routing.md
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ and `http://example.com/path/` are different URLs, serving the same content for
By default normalizer collapses consecutive slashes, adds or removes trailing slashes depending on whether the
suffix has a trailing slash or not, and redirects to the normalized version of the URL using [permanent redirection](https://en.wikipedia.org/wiki/HTTP_301).
The normalizer can be configured globally for the URL manager or individually for each rule - by default each rule will use the normalizer
from URL manager. Since version 2.1.0 normalizer is enabled by default in [[yii\web\UrlManager|UrlManager]]. You can set
from URL manager. Since version 3.0.0 normalizer is enabled by default in [[yii\web\UrlManager|UrlManager]]. You can set
[[yii\web\UrlRule::$normalizer|UrlRule::$normalizer]] to `false` to disable normalization for particular URL rule.

The following shows an example configuration for the UrlNormalizer:
Expand Down
4 changes: 2 additions & 2 deletions docs/guide/structure-extensions.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ The following example shows the `composer.json` file for the `yiisoft/yii2-imagi

// package dependencies
"require": {
"yiisoft/yii2": "~2.1.0",
"yiisoft/yii2": "~3.0.0",
"imagine/imagine": "v0.5.0"
},

Expand Down Expand Up @@ -451,7 +451,7 @@ registered on [Packagist](https://packagist.org/) and can be easily installed as
- [yiisoft/yii2-twig](https://www.yiiframework.com/extension/yiisoft/yii2-twig):
provides a template engine based on [Twig](http://twig.sensiolabs.org/).

The following official extensions are for Yii 2.1 and above.
The following official extensions are for Yii 3.0.0 and above.
You don't need to install them for Yii 2.0, since they are included in the core framework.

- [yiisoft/yii2-captcha](https://www.yiiframework.com/extension/yiisoft/yii2-captcha):
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/tutorial-yii-as-micro-framework.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Create file `composer.json` under the `micro-app` directory using your favorite
```json
{
"require": {
"yiisoft/yii2": "~2.1.0"
"yiisoft/yii2": "~3.0.0"
}
}
```
Expand Down
18 changes: 9 additions & 9 deletions docs/guide/tutorial-yii-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,17 +119,17 @@ Now you can use most features provided by Yii. For example, you can create Activ
to work with databases.


Using Yii 2 with Yii 1 <span id="using-both-yii2-yii1"></span>
Using Yii 3 with Yii 1 <span id="using-both-yii2-yii1"></span>
----------------------

If you were using Yii 1 previously, it is likely you have a running Yii 1 application. Instead of rewriting
the whole application in Yii 2, you may just want to enhance it using some of the features only available in Yii 2.
the whole application in Yii 3, you may just want to enhance it using some of the features only available in Yii 3.
This can be achieved as described below.

> Note: Yii 2.1 requires PHP 7.1 or above. You should make sure that both your server and the existing application
> Note: Yii 3 requires PHP 7.1 or above. You should make sure that both your server and the existing application
> support this.
First, install Yii 2 in your existing application by following the instructions given in the [last subsection](#using-yii-in-others).
First, install Yii 3 in your existing application by following the instructions given in the [last subsection](#using-yii-in-others).

Second, modify the entry script of the application as follows,

Expand All @@ -138,20 +138,20 @@ Second, modify the entry script of the application as follows,
require __DIR__ . '/../components/Yii.php';

// configuration for Yii 2 application
$yii2Config = require __DIR__ . '/../config/yii2/web.php';
new yii\web\Application($yii2Config); // Do NOT call run(), yii2 app is only used as service locator
$yii3Config = require __DIR__ . '/../config/yii3/web.php';
new yii\web\Application($yii3Config); // Do NOT call run(), yii2 app is only used as service locator

// configuration for Yii 1 application
$yii1Config = require __DIR__ . '/../config/yii1/main.php';
Yii::createWebApplication($yii1Config)->run();
```

Because both Yii 1 and Yii 2 have the `Yii` class, you should create a customized version to combine them.
Because both Yii 1 and Yii 3 have the `Yii` class, you should create a customized version to combine them.
The above code includes the customized `Yii` class file, which can be created as follows.

```php
$yii2path = '/path/to/yii2';
require $yii2path . '/BaseYii.php'; // Yii 2.x
$yii3path = '/path/to/yii3';
require $yii3path . '/BaseYii.php'; // Yii 3.x

$yii1path = '/path/to/yii1';
require $yii1path . '/YiiBase.php'; // Yii 1.x
Expand Down
20 changes: 10 additions & 10 deletions docs/internals/release.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,23 +63,23 @@ Making an extension release includes only one command (e.g. for redis):

The default release command will release a new minor version from the currently checked out branch.
To release another version than the default, you have to specify it using the `--version` option, e.g.
`--version=2.1.0`, or `--version=2.1.0-beta`.
`--version=3.0.0`, or `--version=3.0.0-alpha`.


#### Release a new major version e.g. 2.1.0
#### Release a new major version e.g. 3.0.0

Releasing a new major version includes a branch change as described in the
[versioning policy](versions.md).
The following describes an example of releasing version `2.1.0` which has been
developed on the `2.1` branch derived from `master`. `master` has contained the `2.0.x` versions
The following describes an example of releasing version `3.0.0` which has been
developed on the `3.0` branch derived from `master`. `master` has contained the `2.0.x` versions
before.

- create a new branch `2.0` from `master`
- create a new branch `3.0` from `master`
- ensure composer.json does not contain a branch alias on this branch anymore.
- merge necessary changes from `master` to `2.1`
- point `master` to the lastest commit on `2.1`
- adjust composer.json branch alias for master to `2.1.x-dev`.
- delete `2.1` branch
- merge necessary changes from `master` to `3.0`
- point `master` to the lastest commit on `3.0`
- adjust composer.json branch alias for master to `3.0.x-dev`.
- delete `3.0` branch

Now check out `master` and run the release command with the `--version=2.1.0` option.
Now check out `master` and run the release command with the `--version=3.0.0` option.

20 changes: 11 additions & 9 deletions docs/internals/versions.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,24 @@ Yii Versioning
==============

This document summarizes the versioning policy of Yii. Our current versioning strategy is
a variant of [Semantic Versioning](http://semver.org/).
[Semantic Versioning](http://semver.org/).

Within the core developer team, we have emphasized several times that it is important to keep 2.0.x releases backwards
Within the core developer team, we have emphasized several times that it is important to keep major releases backwards
compatible. But this is an ideal plan. In a real world this is hard to achieve. See [Backwards Compatibility](bc.md)
document for detailed description of what BC is.

In summary, our versioning policy for Yii 2 is as follows:
## Yii 2.0.x versioning policy

## Version numbers
In Yii 2.0.x Yii wasn't following SemVer precisely. Our versioning policy for Yii 2 is as follows:

### Version numbers

Version numbers are in the format of `2.x.y.z`, where the `z` can be skipped for releases for which `z` is `0`.

A possible Yii version 3 is not covered here as we'd expect it to be like 2.0 over 1.0. We expect that this only happens every 3 to 5 years,
depending on external technology advancement (such as PHP upgraded from 5.0 to 5.4).

### `2.X.0`: major releases
#### `2.X.0`: major releases

Backwards compatibility breaking releases, which contain major features and changes that may break BC. Upgrading from
earlier versions may not be trivial, but a complete upgrade guide will be available.
Expand All @@ -30,7 +32,7 @@ earlier versions may not be trivial, but a complete upgrade guide will be availa
* Requires major news releases and marketing effort.


### `2.x.Y`: minor releases
#### `2.x.Y`: minor releases

Minor releases, which are mostly BC-compatible. Ideally, we hope they contain only changes that do not affect backwards
compatibility. However, it is not always possible to keep everything 100% BC-compatible, so upgrade notes are recorded
Expand All @@ -46,7 +48,7 @@ to it so that users can enjoy them earlier.
* With news announcements. Project site will be updated.


### `2.x.y.Z`: patch releases
#### `2.x.y.Z`: patch releases

Patch releases, which should be 100% BC-compatible, containing bug fixes only.
No news announcement or project site update (unless it contains major/security issue fixes).
Expand All @@ -59,7 +61,7 @@ The release process is mostly automatic.
* Should be merged back to master branch on release


## Branching policy
### Branching policy

* `master` branch is the development branch for the current stable major release, currently `2.0.x` versions.
* Each new major release will be developed on a branch named after the version number, e.g. `2.1`.
Expand All @@ -74,7 +76,7 @@ The following image shows an illustration of the branches on changing commit his
![Branching policy](versions-branches.png)


## Releases
### Releases

Framework and official extension projects are released independently of each other, i.e. version number mismatch between
framework and extension is expected. The Application Templates are always released together with the framework.
Expand Down
10 changes: 5 additions & 5 deletions framework/BaseYii.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class BaseYii
*/
public static function getVersion()
{
return '2.1.0-dev';
return '3.0.0-dev';
}

/**
Expand Down Expand Up @@ -361,13 +361,13 @@ public static function setLogger($logger)

/**
* @var ProfilerInterface profiler instance.
* @since 2.1
* @since 3.0.0
*/
private static $_profiler;

/**
* @return ProfilerInterface profiler instance.
* @since 2.1
* @since 3.0.0
*/
public static function getProfiler()
{
Expand All @@ -379,7 +379,7 @@ public static function getProfiler()

/**
* @param ProfilerInterface|\Closure|array|null $profiler profiler instance or its DI compatible configuration.
* @since 2.1
* @since 3.0.0
*/
public static function setProfiler($profiler)
{
Expand Down Expand Up @@ -407,7 +407,7 @@ public static function setProfiler($profiler)
* @param mixed $message the message to be logged. This can be a simple string or a more
* complex data structure, such as array.
* @param string $category the category of the message.
* @since 2.1.0
* @since 3.0.0
*/
public static function log($level, $message, $category = 'application')
{
Expand Down
4 changes: 2 additions & 2 deletions framework/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Yii Framework 2 Change Log
==========================

2.1.0 under development
3.0.0 under development
-----------------------

- Bug #16065: Remove using `date.timezone` at `yii\base\Application`, use `date_default_timezone_get()` instead (sashsvamir)
Expand Down Expand Up @@ -604,7 +604,7 @@ Yii Framework 2 Change Log
- Enh #12758: Added the ability to use instances of `\yii\db\Query` class as values in the `\yii\db\QueryBuilder::insert()` method (PowerGamer1)
- Enh #12771: Skip \yii\rbac\PhpManager::checkAccessRecursive and \yii\rbac\DbManager::checkAccessRecursive if role assignments are empty (Ni-san)
- Enh #12790: Added `scrollToErrorOffset` option for `yii\widgets\ActiveForm` which adds ability to specify offset in pixels when scrolling to error (mg-code)
- Enh #12798: Changed `yii\cache\Dependency::getHasChanged()` (deprecated, to be removed in 2.1) to `yii\cache\Dependency::isChanged()` (dynasource)
- Enh #12798: Changed `yii\cache\Dependency::getHasChanged()` (deprecated, to be removed in 3.0) to `yii\cache\Dependency::isChanged()` (dynasource)
- Enh #12807: Added console controller checks for `yii\console\controllers\HelpController` (schmunk42)
- Enh #12816: Added `columnSchemaClass` option for `yii\db\Schema` which adds ability to specify custom `yii\db\ColumnSchema` class (nanodesu88)
- Enh #12854: Added `RangeNotSatisfiableHttpException` to cover HTTP error 416 file request exceptions (zalatov)
Expand Down
2 changes: 1 addition & 1 deletion framework/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ composer require yiisoft/yii2
or add

```json
"yiisoft/yii2": "~2.1.0",
"yiisoft/yii2": "~3.0.0",
```

to the require section of your composer.json.
Loading

0 comments on commit c184ef8

Please sign in to comment.