Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP7 Support #10378

Closed
quantumpacket opened this issue May 20, 2015 · 51 comments
Closed

PHP7 Support #10378

quantumpacket opened this issue May 20, 2015 · 51 comments

Comments

@quantumpacket
Copy link

PHP7 betas should be rolling out next month, so I think at least master should support it for testing purposes.

In PHP7 etc/standard/php_smart_str.h has been renamed to etc/standard/php_smart_string.h.

Compilation for master, 2.0.0, and 2.0.x both fail with the following error:

/tmp/compile_php_phalcon/cphalcon-2.0.x/build/64bits/phalcon.zep.c:184:40: fatal error: ext/standard/php_smart_str.h: No such file or directory
#include <ext/standard/php_smart_str.h>
^
compilation terminated.
make: *** [phalcon.lo] Error 1

I don't know C, otherwise would submit a patch. :)

@andresgutierrez
Copy link
Contributor

This is not an easy task, migration to PHP7 must have to be done in Zephir: zephir-lang/zephir#952

@quantumpacket quantumpacket changed the title PHP7 Compilation Failure PHP7 Support May 20, 2015
@salarmehr
Copy link

@andresgutierrez PHP 7 will be far faster than php5, also there is HHVM and Hacklang. Additionally, you have said migrating Zephir to PHP 7 is really time and effort demanding if not impossible. What is the point in migrating Zephir to PHP7. Why not you port the lovely Phalon to plain PHP instead? A huge number of PHP programmer can contribute, we will have 16 github issues instead of 612 issues. Those who started large project using Phalcon have not to migrate all of their code to another PHP framework and Phalcon will live forever. Phalcon can be "The PHP Framework For Web Artisans". Facebook and Zend have a lot of money to make PHP fast and faster. Please focus on pleasure and quality of PHP programming.

@andresgutierrez
Copy link
Contributor

@salarmehr I said is not an easy task not that it is impossible, I can't see your point, PHP7 is not faster than Zephir can be, also, Zephir is a powerful and easy language to use and more people is contributing to Phalcon. Do you think that write the PHQL/Volt parser in PHP7 will be faster than the one written in pure C? One thing is that you want to believe something and other is that it's real

@ovr
Copy link
Contributor

ovr commented May 26, 2015

@salarmehr facepalm

@salarmehr
Copy link

I did not claimed that PHP7 is faster than Zephir. I said "PHP 7 will be far faster than php5". I can understand you. You spent long time developing Zephir, on the other hand, I and others in Phalcon community investigate on Phalcon, we learned it deeply and used it as a foundation for our projects.

In Zephir home page you introduced it as a single-purpose language: "designed to ease the creation and maintainability of extensions for PHP ". Its a programming language designed for another language. If you plan to make it more versatile and writing pure-zephir web application possible (similar to what Hack do) it's a different story.

Please also take a look at this page: laravel/framework#3295

@hdogan
Copy link
Contributor

hdogan commented May 26, 2015

What is PHP 6?

@salarmehr
Copy link

@hdogan My bad, PHP5 ◕‿◕

@Green-Cat
Copy link
Contributor

Major 👎 to switching away from zephir.
Zephir is almost as simple as php, while being in many cases significantly faster.

@JCMais
Copy link

JCMais commented Dec 3, 2015

Guys: http://php.net/archive/2015.php#id2015-12-03-1

PHP 7.0.0 Released

@Izopi4a
Copy link
Member

Izopi4a commented Dec 4, 2015

@andresgutierrez , maybe if you create a list of "things" that has to be changed, with files and a very tiny hints, in a separated issue, create a new branch ( maybe 2.2 or directly on 2.1.x or 3.0 ?), and see if any of us can help you make phalcon works with php7. Unless you are already at the finishing point :D

@andrefauth
Copy link

I'd like to see Phalcon/Zephir ported to PHP 7. I'm using it for 18 months on a very big project (the project wasn't launched yet) with 10 other developers and would like to be able to continue using it. And now that PHP 7 has been released, a lot of people will start using it. Of course, there is a window of time where the most paranoid, like myself, will not update to the new version so soon. But definitely we would like that to happen in a good time-frame.

@hakimio
Copy link

hakimio commented Dec 7, 2015

Zephir works with PHP 7 (zephir-lang/zephir/issues/756), but there is still some C code in Phalcon which needs to be fixed.
Hope someone will take a look at it sometime soon. Would love to be able to use PHP 7 with Phalcon.

@Rewt0r
Copy link

Rewt0r commented Dec 8, 2015

+1

2 similar comments
@hzxie
Copy link

hzxie commented Dec 11, 2015

+1

@lianguan
Copy link
Contributor

👍

@JakeGlascock
Copy link

+1

@phpclub
Copy link

phpclub commented Feb 19, 2016

+1

@sergeyklay
Copy link
Contributor

@quantumpacket, @phpclub, @JakeGlascock, @PHEcho, @zjhzxhz, @Rewt0r, @hakimio,@andrefauth, @Izopi4a, @JCMais, @Green-Cat, @salarmehr, @hdogan

Hey mans, now you can try Phalcon 2.1.x with PHP 7. Just use latest Zephir with zephir build —backend=ZendEngine3 command

@Jurigag
Copy link
Contributor

Jurigag commented Feb 19, 2016

Well, is there anything need for test or it should work as it is ?

@Izopi4a
Copy link
Member

Izopi4a commented Feb 19, 2016

i will report tomorrow, busy playing diablo 3 atm :D

@sergeyklay
Copy link
Contributor

@Izopi4a 😄 anyway, create a separated issue

@phpclub
Copy link

phpclub commented Feb 20, 2016

zephir build —backend=ZendEngine3
PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in /zephir/Library/CompilerFile.php on line 173

@phpclub
Copy link

phpclub commented Feb 20, 2016

Under centos 6.x
zephir build —backend=ZendEngine3

Warning: Variable "_SESSION" assigned but not used in Phalcon\Session\Adapter::remove in /root/Soft/cphalcon/phalcon/session/adapter.zep on 204 [unused-variable]

     }
    -^


PHP Notice:  Use of undefined constant APC_ITER_ALL - assumed 'APC_ITER_ALL' in /root/Soft/zephir/Library/ClassDefinition.php on line 1743
PHP Notice:  Use of undefined constant APC_LIST_ACTIVE - assumed 'APC_LIST_ACTIVE' in /root/Soft/zephir/Library/ClassDefinition.php on line 1743
Warning: Variable "beforeLine" assigned but not used in Phalcon\Debug::showTraceItem in /root/Soft/cphalcon/phalcon/debug.zep on 339 [unused-variable]

       beforeLine, firstLine, afterLine, lastLine, i, linePosition, currentLine;
    -------------^


Warning: Function "\\sodium\\randombytes_buf" does not exist at compile time in /root/Soft/cphalcon/phalcon/security/random.zep on 118 [nonexistent-function]

       return \\Sodium\\randombytes_buf(len);
    ----------------------------------------^


Warning: Function "\\sodium\\randombytes_uniform" does not exist at compile time in /root/Soft/cphalcon/phalcon/security/random.zep on 309 [nonexistent-function]

       return \\Sodium\\randombytes_uniform(len);
    --------------------------------------------^

@phpclub
Copy link

phpclub commented Feb 20, 2016

/root/Soft/cphalcon/ext/phalcon/annotations/reader.zep.c: В функции ‘zim_Phalcon_Annotations_Reader_parse’:
/root/Soft/cphalcon/ext/phalcon/annotations/reader.zep.c:91: ошибка: несовместимый тип аргумента 1 функции ‘phannot_parse_annotations’
./phalcon/annotations/annot.h:44: замечание: expected ‘struct zval ’ but argument is of type ‘zval’
/root/Soft/cphalcon/ext/phalcon/annotations/reader.zep.c:115: ошибка: несовместимый тип аргумента 1 функции ‘phannot_parse_annotations’
./phalcon/annotations/annot.h:44: замечание: expected ‘struct zval *’ but argument is of type ‘zval’
/root/Soft/cphalcon/ext/phalcon/annotations/reader.zep.c:147: ошибка: несовместимый тип аргумента 1 функции ‘phannot_parse_annotations’
./phalcon/annotations/annot.h:44: замечание: expected ‘struct zval *’ but argument is of type ‘zval’
make: *
* [phalcon/annotations/reader.lo] Ошибка 1
make: *** Ожидание завершения заданий...
/root/Soft/cphalcon/ext/phalcon/annotations/reader.zep.c: В функции ‘zim_Phalcon_Annotations_Reader_parse’:
/root/Soft/cphalcon/ext/phalcon/annotations/reader.zep.c:91: ошибка: несовместимый тип аргумента 1 функции ‘phannot_parse_annotations’
./phalcon/annotations/annot.h:44: замечание: expected ‘struct zval ’ but argument is of type ‘zval’
/root/Soft/cphalcon/ext/phalcon/annotations/reader.zep.c:115: ошибка: несовместимый тип аргумента 1 функции ‘phannot_parse_annotations’
./phalcon/annotations/annot.h:44: замечание: expected ‘struct zval *’ but argument is of type ‘zval’
/root/Soft/cphalcon/ext/phalcon/annotations/reader.zep.c:147: ошибка: несовместимый тип аргумента 1 функции ‘phannot_parse_annotations’
./phalcon/annotations/annot.h:44: замечание: expected ‘struct zval *’ but argument is of type ‘zval’
make: *
* [phalcon/annotations/reader.lo] Ошибка 1

@phpclub
Copy link

phpclub commented Feb 20, 2016

PHP 7.0.3 (cli) (built: Feb 3 2016 11:40:05) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies

@Jurigag
Copy link
Contributor

Jurigag commented Feb 20, 2016

In Phalcon 2.1 support for APC should be dropped in favor of APCu.

@Izopi4a
Copy link
Member

Izopi4a commented Feb 20, 2016

@phpclub build and isntall this: https://github.com/krakjoe/apcu

also make sure you do zephir fullclean before zephir build

and i am not 100% sure but i think i increased my memory limit ( while building it ) i am not sure if problem was fixed as soon as i instakked apcu

@andrefauth
Copy link

Oh, nice. Thanks for the heads up. I'll let you know what happens.
Em 19/02/2016 18:46, "Serghei Iakovlev" notifications@github.com escreveu:

@quantumpacket https://github.com/quantumpacket, @phpclub
https://github.com/phpclub, @JakeGlascock
https://github.com/JakeGlascock, @PHEcho https://github.com/phecho,
@zjhzxhz https://github.com/zjhzxhz, @Rewt0r https://github.com/Rewt0r,
@hakimio https://github.com/hakimio,@andrefauth
https://github.com/andrefauth, @Izopi4a https://github.com/Izopi4a,
@JCMais https://github.com/JCMais, @Green-Cat
https://github.com/Green-Cat, @salarmehr https://github.com/salarmehr,
@hdogan https://github.com/hdogan

Hey mans, now you can try Phalcon 2.1.x with PHP 7. Just use latest Zephir
with zephir build —backend=ZendEngine3 command


Reply to this email directly or view it on GitHub
#10378 (comment).

@phpclub
Copy link

phpclub commented Feb 25, 2016

Thanx

zephir fullclean
[root@conf cphalcon]# zephir build —backend=ZendEngine3
Warning: Variable "_SESSION" assigned but not used in Phalcon\Session\Adapter::remove in /root/Soft/cphalcon/phalcon/session/adapter.zep on 204 [unused-variable]

 }
-^

PHP Notice: Use of undefined constant APC_ITER_ALL - assumed 'APC_ITER_ALL' in /root/Soft/zephir/Library/ClassDefinition.php on line 1743
PHP Notice: Use of undefined constant APC_LIST_ACTIVE - assumed 'APC_LIST_ACTIVE' in /root/Soft/zephir/Library/ClassDefinition.php on line 1743
Warning: Variable "beforeLine" assigned but not used in Phalcon\Debug::showTraceItem in /root/Soft/cphalcon/phalcon/debug.zep on 339 [unused-variable]

   beforeLine, firstLine, afterLine, lastLine, i, linePosition, currentLine;
-------------^

Warning: Variable "possibleSetter" declared but not used in Phalcon\Mvc\Model::assign in /root/Soft/cphalcon/phalcon/mvc/model.zep on 440 [unused-variable]

  var key, keyMapped, value, attribute, attributeField, possibleSetter, metaData, columnMap, dataMapped;
----------------------------------------------------------------------^

Warning: Function "\sodium\randombytes_buf" does not exist at compile time in /root/Soft/cphalcon/phalcon/security/random.zep on 119 [nonexistent-function]

   return \\Sodium\\randombytes_buf(len);
----------------------------------------^

Warning: Function "\sodium\randombytes_uniform" does not exist at compile time in /root/Soft/cphalcon/phalcon/security/random.zep on 310 [nonexistent-function]

   return \\Sodium\\randombytes_uniform(len);
--------------------------------------------^

Copying new kernel files...
Preparing for PHP compilation...
Preparing configuration file...
Compiling...
Installing...
Extension installed!
Add extension=phalcon.so to your php.ini
Don't forget to restart your web server

@phpclub
Copy link

phpclub commented Feb 25, 2016

Done! Where to download the stress tests for phalcon?

PHP Version 7.0.3
Web framework delivered as a C-extension for PHP
phalcon enabled
Author Phalcon Team and contributors
Version 2.1.0b
Build Date Feb 25 2016 10:56:47
Powered by Zephir Version 0.9.2a-dev

@nsossonko
Copy link
Contributor

If someone puts out some DLLs for Windows I can stress test them on my project.

@sergeyklay
Copy link
Contributor

@phpclub #11432 I do it. Unfortunately I do not have time to do it quickly.

@hzxie
Copy link

hzxie commented Feb 29, 2016

Failed to compile it in OS X 10.11.

PHP Information:

PHP 7.0.3 (cli) (built: Feb 16 2016 09:03:13) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies

Zephir Information:

 _____              __    _
/__  /  ___  ____  / /_  (_)____
  / /  / _ \/ __ \/ __ \/ / ___/
 / /__/  __/ /_/ / / / / / /
/____/\___/ .___/_/ /_/_/_/
         /_/

Zephir version 0.9.2a-dev

Error Log:

Build complete.
Don't forget to run 'make test'.


PHP Warning:  PHP Startup: Unable to load dynamic library '/private/tmp/zephir/Library/../parser/zephir_parser.so' - dlopen(/private/tmp/zephir/Library/../parser/zephir_parser.so, 9): Symbol not found: _zval_used_for_init
  Referenced from: /private/tmp/zephir/Library/../parser/zephir_parser.so
  Expected in: flat namespace
 in /private/tmp/zephir/Library/../parser/zephir_parser.so in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library '/private/tmp/zephir/Library/../parser/zephir_parser.so' - dlopen(/private/tmp/zephir/Library/../parser/zephir_parser.so, 9): Symbol not found: _zval_used_for_init
  Referenced from: /private/tmp/zephir/Library/../parser/zephir_parser.so
  Expected in: flat namespace
 in /private/tmp/zephir/Library/../parser/zephir_parser.so in Unknown on line 0
PHP Fatal error:  Uncaught Error: Call to undefined function Zephir\zephir_parse_file() in /private/tmp/zephir/Library/CompilerFile.php:173
Stack trace:
#0 /private/tmp/zephir/Library/CompilerFile.php(563): Zephir\CompilerFile->genIR(Object(Zephir\Compiler))
#1 /private/tmp/zephir/Library/Compiler.php(314): Zephir\CompilerFile->preCompile(Object(Zephir\Compiler))
#2 /private/tmp/zephir/Library/Compiler.php(353): Zephir\Compiler->preCompile('phalcon/acl.zep')
#3 /private/tmp/zephir/Library/Compiler.php(900): Zephir\Compiler->recursivePreCompile('phalcon')
#4 /private/tmp/zephir/Library/Compiler.php(1105): Zephir\Compiler->generate(Object(Zephir\Commands\CommandBuild))
#5 /private/tmp/zephir/Library/Compiler.php(1224): Zephir\Compiler->compile(Object(Zephir\Commands\CommandBuild), false)
#6 /private/tmp/zephir/Library/Compiler.php(1305): Zephir\Compiler->install(Object(Zephir\Commands\CommandBuild), false)
#7 /private/tmp/zephir/Library/Commands/CommandAbstract.php(108): Zephir\Compiler->build(Object(Zephir\Commands\CommandBuild in /private/tmp/zephir/Library/CompilerFile.php on line 173

Fatal error: Uncaught Error: Call to undefined function Zephir\zephir_parse_file() in /private/tmp/zephir/Library/CompilerFile.php:173
Stack trace:
#0 /private/tmp/zephir/Library/CompilerFile.php(563): Zephir\CompilerFile->genIR(Object(Zephir\Compiler))
#1 /private/tmp/zephir/Library/Compiler.php(314): Zephir\CompilerFile->preCompile(Object(Zephir\Compiler))
#2 /private/tmp/zephir/Library/Compiler.php(353): Zephir\Compiler->preCompile('phalcon/acl.zep')
#3 /private/tmp/zephir/Library/Compiler.php(900): Zephir\Compiler->recursivePreCompile('phalcon')
#4 /private/tmp/zephir/Library/Compiler.php(1105): Zephir\Compiler->generate(Object(Zephir\Commands\CommandBuild))
#5 /private/tmp/zephir/Library/Compiler.php(1224): Zephir\Compiler->compile(Object(Zephir\Commands\CommandBuild), false)
#6 /private/tmp/zephir/Library/Compiler.php(1305): Zephir\Compiler->install(Object(Zephir\Commands\CommandBuild), false)
#7 /private/tmp/zephir/Library/Commands/CommandAbstract.php(108): Zephir\Compiler->build(Object(Zephir\Commands\CommandBuild in /private/tmp/zephir/Library/CompilerFile.php on line 173

@Izopi4a
Copy link
Member

Izopi4a commented Feb 29, 2016

@zjhzxhz


cd _PATH_TO_ZEPHIR_/parser
make clean
phpize --clean

try to compile again

@lajosbencz
Copy link

Debian x64 Jessie
PHP Version 7.0.3
Zephir 0.9.2a-dev
Phalcon 2.1.x

Everything compiled just fine, the Phalcon extension is loaded without error and shows up in php -m, but when calling Phalcon\Mvc\Application::handle() i get a segmentation fault.

Any hints on how to get a stacktrace / give you guys useful info?

Edit: Please disregard, I've tried it on another machine and it's working! Must be some environmental problem at my end, because the 2nd is a virtual machine with the same software versions.

@hzxie
Copy link

hzxie commented Feb 29, 2016

@Izopi4a

Here's the output of executing clean command:

➜  parser git:(master) make clean
make: *** No rule to make target `clean'.  Stop.
➜  parser git:(master) phpize --clean
Cleaning..

And it's still not working. I got the same error message as previous.

@Izopi4a
Copy link
Member

Izopi4a commented Feb 29, 2016

@zjhzxhz do you have extension=/private/tmp/zephir/Library/../parser/zephir_parser.so in your php.ini by any chance ? if so remove it.

if you type php -v do you get 7.0.3 ..., also which php-config and which phpize should also show the path to your php 7.

do you have skype or something that we can chat and give it a try to fix it ?

@kaioken
Copy link
Member

kaioken commented Mar 3, 2016

just wanted to say , it worked perfectly

thanks

@phpclub
Copy link

phpclub commented Mar 10, 2016

Under Ubuntu 14.04

cphalcon# zephir build —backend=ZendEngine3

Warning: Variable "_SESSION" assigned but not used in Phalcon\Session\Adapter::remove in /root/Soft/cphalcon/phalcon/session/adapter.zep on 204 [unused-variable]

     }
    -^


PHP Notice:  Use of undefined constant APC_ITER_ALL - assumed 'APC_ITER_ALL' in /root/Soft/zephir/Library/ClassDefinition.php on line 1743
PHP Notice:  Use of undefined constant APC_LIST_ACTIVE - assumed 'APC_LIST_ACTIVE' in /root/Soft/zephir/Library/ClassDefinition.php on line 1743
Warning: Variable "beforeLine" assigned but not used in Phalcon\Debug::showTraceItem in /root/Soft/cphalcon/phalcon/debug.zep on 339 [unused-variable]

       beforeLine, firstLine, afterLine, lastLine, i, linePosition, currentLine;
    -------------^


Warning: Function "\\sodium\\randombytes_buf" does not exist at compile time in /root/Soft/cphalcon/phalcon/security/random.zep on 118 [nonexistent-function]

       return \\Sodium\\randombytes_buf(len);
    ----------------------------------------^


Warning: Function "\\sodium\\randombytes_uniform" does not exist at compile time in /root/Soft/cphalcon/phalcon/security/random.zep on 309 [nonexistent-function]

       return \\Sodium\\randombytes_uniform(len);
    --------------------------------------------^

Copying new kernel files...
Preparing for PHP compilation...
Preparing configuration file...
Compiling...
Installing...
Zephir\CompilerException: Internal extension compilation failed. Check compile-errors.log for more information

at Library/Compiler.php(1244)
#0 Library/Compiler.php(1305): Zephir\Compiler->install(Object(Zephir\Commands\CommandBuild), false)
#1 Library/Commands/CommandAbstract.php(108): Zephir\Compiler->build(Object(Zephir\Commands\CommandBuild))
#2 Library/Bootstrap.php(200): Zephir\Commands\CommandAbstract->execute(Object(Zephir\Config), Object(Zephir\Logger))
#3 compiler.php(21): Zephir\Bootstrap::boot()
#4 {main}


int phannot_parse_annotations(zval *result, zval *comment, zval *file_path, zval *line TSRMLS_DC);
     ^
/root/Soft/cphalcon/ext/phalcon/annotations/reader.zep.c:147:31: error: incompatible type for argument 1 of 'phannot_parse_annotations'
     ZEPHIR_LAST_CALL_STATUS = phannot_parse_annotations(methodAnnotations, &comment, &_7$$12, &_8$$12 TSRMLS_CC);
                               ^
In file included from /root/Soft/cphalcon/ext/phalcon/annotations/reader.zep.c:22:0:
./phalcon/annotations/annot.h:44:5: note: expected 'struct zval *' but argument is of type 'zval'
 int phannot_parse_annotations(zval *result, zval *comment, zval *file_path, zval *line TSRMLS_DC);
     ^
make: *** [phalcon/annotations/reader.lo] Ошибка 1
root@smialex:~/Soft/cphalcon# cat compile-errors.log 
/root/Soft/cphalcon/ext/phalcon/annotations/reader.zep.c: In function 'zim_Phalcon_Annotations_Reader_parse':
/root/Soft/cphalcon/ext/phalcon/annotations/reader.zep.c:91:29: error: incompatible type for argument 1 of 'phannot_parse_annotations'
   ZEPHIR_LAST_CALL_STATUS = phannot_parse_annotations(classAnnotations, &comment, &_0$$3, &_1$$3 TSRMLS_CC);
                             ^
In file included from /root/Soft/cphalcon/ext/phalcon/annotations/reader.zep.c:22:0:
./phalcon/annotations/annot.h:44:5: note: expected 'struct zval *' but argument is of type 'zval'
 int phannot_parse_annotations(zval *result, zval *comment, zval *file_path, zval *line TSRMLS_DC);
     ^
/root/Soft/cphalcon/ext/phalcon/annotations/reader.zep.c:115:31: error: incompatible type for argument 1 of 'phannot_parse_annotations'
     ZEPHIR_LAST_CALL_STATUS = phannot_parse_annotations(propertyAnnotations, &comment, &_3$$7, &_4$$7 TSRMLS_CC);
                               ^
In file included from /root/Soft/cphalcon/ext/phalcon/annotations/reader.zep.c:22:0:
./phalcon/annotations/annot.h:44:5: note: expected 'struct zval *' but argument is of type 'zval'
 int phannot_parse_annotations(zval *result, zval *comment, zval *file_path, zval *line TSRMLS_DC);
     ^
/root/Soft/cphalcon/ext/phalcon/annotations/reader.zep.c:147:31: error: incompatible type for argument 1 of 'phannot_parse_annotations'
     ZEPHIR_LAST_CALL_STATUS = phannot_parse_annotations(methodAnnotations, &comment, &_7$$12, &_8$$12 TSRMLS_CC);
                               ^
In file included from /root/Soft/cphalcon/ext/phalcon/annotations/reader.zep.c:22:0:
./phalcon/annotations/annot.h:44:5: note: expected 'struct zval *' but argument is of type 'zval'
 int phannot_parse_annotations(zval *result, zval *comment, zval *file_path, zval *line TSRMLS_DC);
     ^
make: *** [phalcon/annotations/reader.lo] Ошибка 1
make: *** Ожидание завершения заданий...
/root/Soft/cphalcon/ext/phalcon/annotations/reader.zep.c: In function 'zim_Phalcon_Annotations_Reader_parse':
/root/Soft/cphalcon/ext/phalcon/annotations/reader.zep.c:91:29: error: incompatible type for argument 1 of 'phannot_parse_annotations'
   ZEPHIR_LAST_CALL_STATUS = phannot_parse_annotations(classAnnotations, &comment, &_0$$3, &_1$$3 TSRMLS_CC);
                             ^
In file included from /root/Soft/cphalcon/ext/phalcon/annotations/reader.zep.c:22:0:
./phalcon/annotations/annot.h:44:5: note: expected 'struct zval *' but argument is of type 'zval'
 int phannot_parse_annotations(zval *result, zval *comment, zval *file_path, zval *line TSRMLS_DC);
     ^
/root/Soft/cphalcon/ext/phalcon/annotations/reader.zep.c:115:31: error: incompatible type for argument 1 of 'phannot_parse_annotations'
     ZEPHIR_LAST_CALL_STATUS = phannot_parse_annotations(propertyAnnotations, &comment, &_3$$7, &_4$$7 TSRMLS_CC);
                               ^
In file included from /root/Soft/cphalcon/ext/phalcon/annotations/reader.zep.c:22:0:
./phalcon/annotations/annot.h:44:5: note: expected 'struct zval *' but argument is of type 'zval'
 int phannot_parse_annotations(zval *result, zval *comment, zval *file_path, zval *line TSRMLS_DC);
     ^
/root/Soft/cphalcon/ext/phalcon/annotations/reader.zep.c:147:31: error: incompatible type for argument 1 of 'phannot_parse_annotations'
     ZEPHIR_LAST_CALL_STATUS = phannot_parse_annotations(methodAnnotations, &comment, &_7$$12, &_8$$12 TSRMLS_CC);
                               ^
In file included from /root/Soft/cphalcon/ext/phalcon/annotations/reader.zep.c:22:0:
./phalcon/annotations/annot.h:44:5: note: expected 'struct zval *' but argument is of type 'zval'
 int phannot_parse_annotations(zval *result, zval *comment, zval *file_path, zval *line TSRMLS_DC);
     ^

@freshman20
Copy link

No installation problems with ubuntu 14.04 here but with defaults events like beforeExecuteRoute.
It seems as if they are not called, onConstruct in controller didn't work too.

@Izopi4a
Copy link
Member

Izopi4a commented Mar 10, 2016

opened a bug here about contruct methods zephir-lang/zephir#1203

i need those in order to test the rest

@Izopi4a
Copy link
Member

Izopi4a commented Mar 12, 2016

@andresgutierrez could you please fix this zephir-lang/zephir#1203 so we can test the rest ?

@tflori
Copy link

tflori commented Mar 16, 2016

+1

@freshman20
Copy link

I believe I have found another bug.
Action
$this->view->title = 'foo';
in View should work this
{{ title }}
but it caused an error:
'Notice: Undefined variable: title'
Workaround:
{{ view.title }}

@Jurigag
Copy link
Contributor

Jurigag commented Mar 18, 2016

What happens if you use:

$view->setVar("title", "foo");

@freshman20
Copy link

same error

@Jurigag
Copy link
Contributor

Jurigag commented Mar 18, 2016

Well we need to deal currently with seg faults in tests, then if in test it will fail too i will add it to this list:

#11550

@Jurigag
Copy link
Contributor

Jurigag commented Mar 19, 2016

For me view doesn't even work in php 7. Such a code:

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;
});
/** @var \Phalcon\Mvc\View\Simple $view */
$view = $di->get('view');
echo $view->render('test.volt');

Displays nothing form test.volt even its adasdasdasdasd

EDIT: on php7 you have to create volt engine as an object, string doesn't work

@tobasar
Copy link

tobasar commented Mar 24, 2016

@freshman20 #11465

@googlle
Copy link
Contributor

googlle commented May 21, 2016

+1

@sergeyklay
Copy link
Contributor

Introduced in v3.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests