Yii1 + PHP7 = Okay?

We are working for a Magento like e-com for about 2 years and missed the Yii2 boat… At least not before we have tested our business model and created our customer base. Either way… If we migrate from PHP [color="#FF0000"]5.5[/color] to PHP [color="#FF0000"]7.0[/color] will it be 100% compatible?

And are we really gonna boost our performance by a factor of 5x like they like to advertise? :blink:

Thank you for your time :)

There’s an issue.

Tests are failing on PHP7 #3995

You’d better wait for 1.1.17.

Thank you softark :)

Is the php7 hype real? By implementing php7 really gonna boost performance by a crazy amount?

Usually not that crazy but crazy enough to try it.

I’ve upgraded PHP from 5.6.x to 7.0.0 for some of my sites built with Yii 1.1.16, and they seem to be running fine without any problem. I’m not very sure, but the issue with “eval()” seems to appear only when you have given an invalid statements to it.

Caution: I’m not saying that you can do it too. Probably I’m just lucky enough. And note that the sites I played with PHP 7 are not the ones with serious missions.

And as for the performance, I forgot to measure it. Sorry.

But, yes, it looks faster, although not “by a crazy amount”. ;)

You could say that PHP 7 would reveal other bottle necks than PHP.

You should have RBAC with some rules which may fail as far as I understand.

I just tested with the following code:




//  yii/tests/framework/web/auth/AuthManagerTestBase.php.

public function testExecuteBizRule()

{

	$this->assertTrue($this->auth->executeBizRule(null,array(),null));

	$this->assertTrue($this->auth->executeBizRule('return 1==true;',array(),null));

	$this->assertTrue($this->auth->executeBizRule('return $params[0]==$params[1];',array(1,'1'),null));

	/* $this->assertFalse($this->auth->executeBizRule('invalid',array(),null)); */ // commented out !!

}



And the errors regarding “eval()” didn’t appear any more.

(Travis failed on the test with PHP 7 because of memcache, but that’s another story here.)

https://travis-ci.org/softark/yii/jobs/96748650

So, as far as we specify a valid statement as a biz rule (or, as far as we give a valid statement to eval() in general), Yii 1.1 will run on PHP 7 without any trouble. :D

My question isn’t regarding to your main problem with the compatibility but to the process of releasing your software by you. As I well understand you’ve been developing a product for two years without any release to the audience so you are not able to get any feedback?

Don’t get me wrong. I just try to understand how is your way of working on the software products.

Fixed.

GREAT!! Thank you.