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

PHP8 support / errors #8

Closed
t3chn0m4g3 opened this issue Jun 3, 2022 · 6 comments
Closed

PHP8 support / errors #8

t3chn0m4g3 opened this issue Jun 3, 2022 · 6 comments

Comments

@t3chn0m4g3
Copy link

Are you planning for PHP8 support?
Building with BFR with PHP8 currently fails...

/opt/BFR/php_bfr.c: In function 'zif_override_function':
/opt/BFR/php_bfr.c:123:55: error: expected ')' before 'TSRMLS_CC'
  123 |                 zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sss",
      |                                      ~                ^~~~~~~~~
/opt/BFR/php_bfr.c:123:17: error: too few arguments to function 'zend_parse_parameters'
  123 |                 zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sss",
      |                 ^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/php8/main/php.h:35,
                 from /opt/BFR/php_bfr.h:27,
                 from /opt/BFR/php_bfr.c:24:
/usr/include/php8/Zend/zend_API.h:304:22: note: declared here
  304 | ZEND_API zend_result zend_parse_parameters(uint32_t num_args, const char *type_spec, ...);
      |                      ^~~~~~~~~~~~~~~~~~~~~
/opt/BFR/php_bfr.c:139:79: error: expected ')' before 'TSRMLS_CC'
  139 |         eval_name = zend_make_compiled_string_description(TEMP_OVRD_FUNC_DESC TSRMLS_CC);
      |                                                          ~                    ^~~~~~~~~
/opt/BFR/php_bfr.c:140:61: error: expected ')' before 'TSRMLS_CC'
  140 |         retval = zend_eval_string(eval_code, NULL, eval_name TSRMLS_CC);
      |                                  ~                          ^~~~~~~~~~
      |                                                             )
/opt/BFR/php_bfr.c:147:58: error: 'TSRMLS_C' undeclared (first use in this function); did you mean 'TSRM_H'?
  147 |                                 get_active_function_name(TSRMLS_C));
      |                                                          ^~~~~~~~
      |                                                          TSRM_H
/opt/BFR/php_bfr.c:147:58: note: each undeclared identifier is reported only once for each function it appears in
/opt/BFR/php_bfr.c:147:33: error: too many arguments to function 'get_active_function_name'
  147 |                                 get_active_function_name(TSRMLS_C));
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/php8/Zend/zend_API.h:29,
                 from /usr/include/php8/main/php.h:35,
                 from /opt/BFR/php_bfr.h:27,
                 from /opt/BFR/php_bfr.c:24:
/usr/include/php8/Zend/zend_execute.h:311:22: note: declared here
  311 | ZEND_API const char *get_active_function_name(void);
      |                      ^~~~~~~~~~~~~~~~~~~~~~~~
/opt/BFR/php_bfr.c:156:33: error: too many arguments to function 'get_active_function_name'
  156 |                                 get_active_function_name(TSRMLS_C));
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/php8/Zend/zend_API.h:29,
                 from /usr/include/php8/main/php.h:35,
                 from /opt/BFR/php_bfr.h:27,
                 from /opt/BFR/php_bfr.c:24:
/usr/include/php8/Zend/zend_execute.h:311:22: note: declared here
  311 | ZEND_API const char *get_active_function_name(void);
      |                      ^~~~~~~~~~~~~~~~~~~~~~~~
/opt/BFR/php_bfr.c:175:33: error: too many arguments to function 'get_active_function_name'
  175 |                                 get_active_function_name(TSRMLS_C));
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/php8/Zend/zend_API.h:29,
                 from /usr/include/php8/main/php.h:35,
                 from /opt/BFR/php_bfr.h:27,
                 from /opt/BFR/php_bfr.c:24:
/usr/include/php8/Zend/zend_execute.h:311:22: note: declared here
  311 | ZEND_API const char *get_active_function_name(void);
      |                      ^~~~~~~~~~~~~~~~~~~~~~~~
/opt/BFR/php_bfr.c:184:33: error: too many arguments to function 'get_active_function_name'
  184 |                                 get_active_function_name(TSRMLS_C));
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/php8/Zend/zend_API.h:29,
                 from /usr/include/php8/main/php.h:35,
                 from /opt/BFR/php_bfr.h:27,
                 from /opt/BFR/php_bfr.c:24:
/usr/include/php8/Zend/zend_execute.h:311:22: note: declared here
  311 | ZEND_API const char *get_active_function_name(void);
      |                      ^~~~~~~~~~~~~~~~~~~~~~~~
/opt/BFR/php_bfr.c: In function 'zif_rename_function':
/opt/BFR/php_bfr.c:200:55: error: expected ')' before 'TSRMLS_CC'
  200 |                 zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss",
      |                                      ~                ^~~~~~~~~
/opt/BFR/php_bfr.c:200:17: error: too few arguments to function 'zend_parse_parameters'
  200 |                 zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss",
      |                 ^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/php8/main/php.h:35,
                 from /opt/BFR/php_bfr.h:27,
                 from /opt/BFR/php_bfr.c:24:
/usr/include/php8/Zend/zend_API.h:304:22: note: declared here
  304 | ZEND_API zend_result zend_parse_parameters(uint32_t num_args, const char *type_spec, ...);
      |                      ^~~~~~~~~~~~~~~~~~~~~
/opt/BFR/php_bfr.c:211:58: error: 'TSRMLS_C' undeclared (first use in this function); did you mean 'TSRM_H'?
  211 |                                 get_active_function_name(TSRMLS_C),
      |                                                          ^~~~~~~~
      |                                                          TSRM_H
/opt/BFR/php_bfr.c:211:33: error: too many arguments to function 'get_active_function_name'
  211 |                                 get_active_function_name(TSRMLS_C),
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/php8/Zend/zend_API.h:29,
                 from /usr/include/php8/main/php.h:35,
                 from /opt/BFR/php_bfr.h:27,
                 from /opt/BFR/php_bfr.c:24:
/usr/include/php8/Zend/zend_execute.h:311:22: note: declared here
  311 | ZEND_API const char *get_active_function_name(void);
      |                      ^~~~~~~~~~~~~~~~~~~~~~~~
/opt/BFR/php_bfr.c:219:33: error: too many arguments to function 'get_active_function_name'
  219 |                                 get_active_function_name(TSRMLS_C),
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/php8/Zend/zend_API.h:29,
                 from /usr/include/php8/main/php.h:35,
                 from /opt/BFR/php_bfr.h:27,
                 from /opt/BFR/php_bfr.c:24:
/usr/include/php8/Zend/zend_execute.h:311:22: note: declared here
  311 | ZEND_API const char *get_active_function_name(void);
      |                      ^~~~~~~~~~~~~~~~~~~~~~~~
/opt/BFR/php_bfr.c:230:33: error: too many arguments to function 'get_active_function_name'
  230 |                                 get_active_function_name(TSRMLS_C), z_new_fname);
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/php8/Zend/zend_API.h:29,
                 from /usr/include/php8/main/php.h:35,
                 from /opt/BFR/php_bfr.h:27,
                 from /opt/BFR/php_bfr.c:24:
/usr/include/php8/Zend/zend_execute.h:311:22: note: declared here
  311 | ZEND_API const char *get_active_function_name(void);
      |                      ^~~~~~~~~~~~~~~~~~~~~~~~
/opt/BFR/php_bfr.c:237:33: error: too many arguments to function 'get_active_function_name'
  237 |                                 get_active_function_name(TSRMLS_C), z_orig_fname);
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/php8/Zend/zend_API.h:29,
                 from /usr/include/php8/main/php.h:35,
                 from /opt/BFR/php_bfr.h:27,
                 from /opt/BFR/php_bfr.c:24:
/usr/include/php8/Zend/zend_execute.h:311:22: note: declared here
  311 | ZEND_API const char *get_active_function_name(void);
      |                      ^~~~~~~~~~~~~~~~~~~~~~~~
/opt/BFR/php_bfr.c: In function 'bfr_zend_startup':
/opt/BFR/php_bfr.c:253:9: error: implicit declaration of function 'TSRMLS_FETCH'; did you mean 'TSRMLS_CACHE'? [-Werror=implicit-function-declaration]
  253 |         TSRMLS_FETCH();
      |         ^~~~~~~~~~~~
      |         TSRMLS_CACHE
cc1: all warnings being treated as errors
make: *** [Makefile:208: php_bfr.lo] Error 1
@glaslos
Copy link
Member

glaslos commented Jun 6, 2022

Haven't considered it yet. It does take some work. What is your motivation to switch to PHP8?

@t3chn0m4g3
Copy link
Author

PHP7 will stop to receive security updates by 2022-11-28, while PHP7.x is EOL since 2021-11-28. Alpine 3.16 already ships with PHP8 and even keeping Alpine 3.15 will not suffice regarding PHP's EOL for security updates.

@t3chn0m4g3
Copy link
Author

PHP7 is now EoL as well, are you planning on updating @glaslos?

@glaslos
Copy link
Member

glaslos commented Aug 13, 2023

Updated to support PHP8, can you give it a try?

@glaslos
Copy link
Member

glaslos commented Aug 13, 2023

@t3chn0m4g3
Copy link
Author

Works great! Thank you!

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

2 participants