forked from yiisoft/yii2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added yii\base\Object for backwards compatibility
issue yiisoft#7936
- Loading branch information
Showing
8 changed files
with
78 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
/** | ||
* @link http://www.yiiframework.com/ | ||
* @copyright Copyright (c) 2008 Yii Software LLC | ||
* @license http://www.yiiframework.com/license/ | ||
*/ | ||
|
||
namespace yii\base; | ||
|
||
use Yii; | ||
|
||
/** | ||
* Object is the base class that implements the *property* feature. | ||
* | ||
* It has been replaced by [[BaseObject]] in version 2.0.13 because `object` has become a reserved word which can not be | ||
* used as class name in PHP 7.2. | ||
* | ||
* Please refer to [[BaseObject]] for detailed documentation and to the | ||
* [UPGRADE notes](https://github.com/yiisoft/yii2/blob/2.0.13/framework/UPGRADE.md#upgrade-from-yii-2012) | ||
* on how to migrate your application to use [[BaseObject]] class to make your application compatible with PHP 7.2. | ||
* | ||
* @author Qiang Xue <qiang.xue@gmail.com> | ||
* @since 2.0 | ||
* @deprecated since 2.0.13, the class name `Object` is invalid since PHP 7.2, use [[BaseObject]] instead. | ||
* @see https://wiki.php.net/rfc/object-typehint | ||
* @see https://github.com/yiisoft/yii2/issues/7936#issuecomment-315384669 | ||
*/ | ||
class Object extends BaseObject | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
namespace yiiunit\framework\base; | ||
|
||
|
||
use yii\base\Object; | ||
|
||
class BCObject extends \yii\base\Object | ||
{ | ||
public static $initCalled = false; | ||
|
||
public function __construct($config = []) | ||
{ | ||
Object::__construct($config); | ||
} | ||
|
||
public function init() | ||
{ | ||
static::$initCalled = true; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters