PHP 7 support

Hi.

I know we ask that a lot... however, I have to ask again.

Is there a timeline? rough estimation? progress indicator? anything?

How far is 2.1 from being production-ready with PHP 7?

Thanks.



9.7k

Hello friend,

> Support for php7 is on the works, only the parsers (PHQL, Volt, Annotations) need to be migrated to PHP7 extensions as these sections are purely C code. We hope to have a functional version soon.

This was the last update info we got on forum I think ..

You can check this link for updates also.. https://forum.phalconphp.com/discussion/9715/php-7-can-you-please-update-us-on-the-progress



235
edited Mar '16

I'm care about this,too, to be a phper , I want to use php 7 as soon as possible



66.6k

I guess mr. Andres is very busy, would be nice if we could help somehow to get the support for the php 7

Support for PHP7 is available, but still in beta: https://github.com/phalcon/cphalcon/issues/10378

You'll need to compile the 2.1.x branch using the latest version of Zephir (0.9.2a-dev). Make sure you use this command: zephir install --backend=ZendEngine3



11.6k

Yeah we have a new tutorial out for this

http://phalcon.io/phalconphp-and-php7

>Support for PHP7 is available, but still in beta: https://github.com/phalcon/cphalcon/issues/10378 > >You'll need to compile the 2.1.x branch using the latest version of Zephir (0.9.2a-dev). Make sure you use this command: zephir install --backend=ZendEngine3



66.6k

for me initialize method isnt call for Phalcon\Mvc\Router\Group

i reported an issue, but no responce so far.

Zephir fails to compile extensions that are linked with phalcon also.

Having problems compiling against PHP7 on ubuntu xenial LTS beta. I can compile other extensions for the PHP7, and have compiled Phalcon 2 against PHP5 previously.



66.6k

phalcon just doesnt work with php 7 yet. If Andy ever fix it they will propably regenerate the extensions and you iwll be able just to put it in your php.ini, but for now i dont think its worth the time to fix the compilation.

edited Apr '16

I've got a vagrant that begs to differ. It is probably pre-alpha, but you can now compile the 2.1.x branch on trusty

Special thanks to

See: This Gist



66.6k

also makde sure to check this

https://github.com/phalcon/cphalcon/issues/11550

also

https://github.com/phalcon/zephir/issues/1214

https://github.com/phalcon/zephir/issues/1218

https://github.com/phalcon/zephir/issues/1216

until those are fixed i wouldnt waste my time trying to complie it.

p.s. i manage to compile it etc... but it just dies in seg faults even in something as simple as

use Phalcon\Mvc\View;

$di = new \Phalcon\Di\FactoryDefault();

$di->set('view',function(){
    $view=new \Phalcon\Mvc\View\Simple;
    $view->registerEngines([
        '.volt'=>'Phalcon\Mvc\View\Engine\Volt'
    ]);
    return $view;
});
edited Apr '16

I think without an easily reproducible environment to test PHP7, how will we know of these problems?

The way I see it, it's just another thing off the minds of the people setting up dev & testing environments

UPDATE

Besides a few fixes to the generated code, I just ran

phalcon project test modules public true

It seemed to produce code that after a little tweaking to get around needed updates and a syntax error, worked without issue.