yiisoft/yii

Deprecated dynamic properties in yii\framework\gii\components\Pear\Text\Diff\Engine\native.php .

mdeweerd opened this issue · 6 comments

Deprecated: Creation of dynamic property Text_Diff_Engine_native::$xchanged is deprecated .../yii\framework\gii\components\Pear\Text\Diff\Engine\native.php on line 41

I ran into this when performing a 'diff' in the yii code generator.

Non of the properties are defined in native.php.

I dropped in the following definitions, more may be needed:

    public $xchanged;
    public $ychanged;
    public $xv;
    public $yv;
    public $xind;
    public $yind;
    public $seq;
    public $in_seq;
    public $lcs;

What Yii version do you have?

Yii v1.1.28

This is related to assignments to class properties that are not declared:

https://github.com/yiisoft/yii/blob/1.1.28/framework/gii/components/Pear/Text/Diff/Engine/native.php#L41-L43 .

I opened a PR in upstream - there were also some changes to replace looping over list() the approach for the latter is different than that in Yii where unshift was applied.

pear/Text_Diff#8

I created a PR and applied changes even though the upstream PR is not yet merged.

Fixed with #4536