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

prepare 2.0.0 release #3

Closed
wants to merge 1 commit into from
Closed

prepare 2.0.0 release #3

wants to merge 1 commit into from

Conversation

andypost
Copy link
Contributor

The extension works last 3 years without issues, meantime php5 is no longer supported so guess maintainers are OK to clean-up codebase a bit and make next major release

andypost added a commit to skilld-labs/aports that referenced this pull request Mar 31, 2019
algitbot pushed a commit to alpinelinux/aports that referenced this pull request Mar 31, 2019
liske pushed a commit to liske/aports that referenced this pull request Apr 7, 2019
@darrenoh
Copy link

darrenoh commented Apr 8, 2019

I have notified @ramsey and @chregu of this pull request. @ramsey was planning to create a new release back in January 2018 if tests passed.

@andypost
Copy link
Contributor Author

I used to package it with this patch in Alpinelinux and it works on all arches https://pkgs.alpinelinux.org/packages?name=php7-uploadprogress&branch=edge

@andypost
Copy link
Contributor Author

Rebased PR on current master, meantime needs to check 7.4 compatibility

@williamdes
Copy link

https://github.com/php/pecl-php-uploadprogress/releases/tag/uploadprogress-1.1.0

@ramsey
Copy link
Member

ramsey commented Jan 26, 2020

@andypost No need to rebase this. I'll take care of merging it into a 2.x branch. Thanks!

@williamdes
Copy link

I tried to build the extension on php 8.0 and could not, is php 8.0 support planned for 2.0 ?

build log

/bin/bash /tmp/pear/install/pear-build-defaultuserbo7ZDn/uploadprogress-1.1.0/libtool --mode=compile cc  -I. -I/tmp/pear/install/uploadprogress -DPHP_ATOM_INC -I/tmp/pear/install/pear-build-defaultuserbo7ZDn/uploadprogress-1.1.0/include -I/tmp/pear/install/pear-build-defaultuserbo7ZDn/uploadprogress-1.1.0/main -I/tmp/pear/install/uploadprogress -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /tmp/pear/install/uploadprogress/uploadprogress.c -o uploadprogress.lo
mkdir .libs
 cc -I. -I/tmp/pear/install/uploadprogress -DPHP_ATOM_INC -I/tmp/pear/install/pear-build-defaultuserbo7ZDn/uploadprogress-1.1.0/include -I/tmp/pear/install/pear-build-defaultuserbo7ZDn/uploadprogress-1.1.0/main -I/tmp/pear/install/uploadprogress -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/install/uploadprogress/uploadprogress.c  -fPIC -DPIC -o .libs/uploadprogress.o
/tmp/pear/install/uploadprogress/uploadprogress.c:70:95: error: expected ';', ',' or ')' before 'TSRMLS_DC'
 static int uploadprogress_php_rfc1867_file(unsigned int event, void  *event_data, void **data TSRMLS_DC)
                                                                                               ^~~~~~~~~
/tmp/pear/install/uploadprogress/uploadprogress.c: In function 'zm_startup_uploadprogress':
/tmp/pear/install/uploadprogress/uploadprogress.c:277:28: error: 'uploadprogress_php_rfc1867_file' undeclared (first use in this function); did you mean 'uploadprogress_mk_filename'?
     php_rfc1867_callback = uploadprogress_php_rfc1867_file;
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                            uploadprogress_mk_filename
/tmp/pear/install/uploadprogress/uploadprogress.c:277:28: note: each undeclared identifier is reported only once for each function it appears in
/tmp/pear/install/uploadprogress/uploadprogress.c: In function 'zif_uploadprogress_get_info':
/tmp/pear/install/uploadprogress/uploadprogress.c:329:47: error: expected ')' before 'TSRMLS_CC'
     if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &id, &id_lg) == FAILURE) {
                                               ^~~~~~~~~
/tmp/pear/install/uploadprogress/uploadprogress.c:329:9: error: too few arguments to function 'zend_parse_parameters'
     if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &id, &id_lg) == FAILURE) {
         ^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/local/include/php/main/php.h:35,
                 from /tmp/pear/install/uploadprogress/php_uploadprogress.h:32,
                 from /tmp/pear/install/uploadprogress/uploadprogress.c:21:
/usr/local/include/php/Zend/zend_API.h:280:14: note: declared here
 ZEND_API int zend_parse_parameters(int num_args, const char *type_spec, ...);
              ^~~~~~~~~~~~~~~~~~~~~
/tmp/pear/install/uploadprogress/uploadprogress.c: In function 'zif_uploadprogress_get_contents':
/tmp/pear/install/uploadprogress/uploadprogress.c:353:31: error: expected ')' before 'TSRMLS_CC'
         php_error_docref(NULL TSRMLS_CC, E_WARNING,
                               ^~~~~~~~~
/tmp/pear/install/uploadprogress/uploadprogress.c:353:9: error: too few arguments to function 'php_error_docref'
         php_error_docref(NULL TSRMLS_CC, E_WARNING,
         ^~~~~~~~~~~~~~~~
In file included from /tmp/pear/install/uploadprogress/php_uploadprogress.h:32,
                 from /tmp/pear/install/uploadprogress/uploadprogress.c:21:
/usr/local/include/php/main/php.h:339:23: note: declared here
 PHPAPI ZEND_COLD void php_error_docref(const char *docref, int type, const char *format, ...)
                       ^~~~~~~~~~~~~~~~
/tmp/pear/install/uploadprogress/uploadprogress.c:360:47: error: expected ')' before 'TSRMLS_CC'
     if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|l",
                                               ^~~~~~~~~
/tmp/pear/install/uploadprogress/uploadprogress.c:360:9: error: too few arguments to function 'zend_parse_parameters'
     if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|l",
         ^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/local/include/php/main/php.h:35,
                 from /tmp/pear/install/uploadprogress/php_uploadprogress.h:32,
                 from /tmp/pear/install/uploadprogress/uploadprogress.c:21:
/usr/local/include/php/Zend/zend_API.h:280:14: note: declared here
 ZEND_API int zend_parse_parameters(int num_args, const char *type_spec, ...);
              ^~~~~~~~~~~~~~~~~~~~~
/tmp/pear/install/uploadprogress/uploadprogress.c:366:31: error: expected ')' before 'TSRMLS_CC'
         php_error_docref(NULL TSRMLS_CC, E_WARNING, "length must be greater than or equal to zero");
                               ^~~~~~~~~
/tmp/pear/install/uploadprogress/uploadprogress.c:366:9: error: too few arguments to function 'php_error_docref'
         php_error_docref(NULL TSRMLS_CC, E_WARNING, "length must be greater than or equal to zero");
         ^~~~~~~~~~~~~~~~
In file included from /tmp/pear/install/uploadprogress/php_uploadprogress.h:32,
                 from /tmp/pear/install/uploadprogress/uploadprogress.c:21:
/usr/local/include/php/main/php.h:339:23: note: declared here
 PHPAPI ZEND_COLD void php_error_docref(const char *docref, int type, const char *format, ...)
                       ^~~~~~~~~~~~~~~~
/tmp/pear/install/uploadprogress/uploadprogress.c: In function 'uploadprogress_file_php_get_info':
/tmp/pear/install/uploadprogress/uploadprogress.c:405:5: warning: implicit declaration of function 'TSRMLS_FETCH'; did you mean 'TSRMLS_CACHE'? [-Wimplicit-function-declaration]
     TSRMLS_FETCH();
     ^~~~~~~~~~~~
     TSRMLS_CACHE
make: *** [Makefile:198: uploadprogress.lo] Error 1
ERROR: `make' failed

@ramsey
Copy link
Member

ramsey commented Jan 26, 2020

@williamdes After I merge these changes from @andypost, it should start building on PHP 8. Those checks for ZEND_ENGINE_3 are failing on PHP 8 (because it’s ZEND_ENGINE_4 on PHP 8), so it’s falling back to the old PHP 5 extension code.

@andypost
Copy link
Contributor Author

@ramsey Thank you a lot! I will try build and run new tests)

@andypost andypost closed this Jan 26, 2020
@ramsey
Copy link
Member

ramsey commented Jan 26, 2020

I was wrong about ZEND_ENGINE_4 on PHP 8. That is not defined, but I was able to get things building on PHP 8, with this commit: a9b5e45

I've just released version 1.1.2, which builds on PHP 5, PHP 7, and PHP 8: https://pecl.php.net/package/uploadprogress/1.1.2

@andypost, if you like, feel free to open a PR against the 2.x branch, removing all the #if statements, for a version that works only on modern/supported PHP versions.

@williamdes
Copy link

It works fine now 🎉
You rock !

@andypost
Copy link
Contributor Author

@ramsey as I got 20190529 (from PHP 7.4.2) is not master 20190128 (8.x guess)

so version comparison is strange...

@ramsey
Copy link
Member

ramsey commented Jan 26, 2020

As long as the API number is greater than the one I used, I think it will build. I think the TSRML macros were deprecated in one of the 7.x versions and removed in 8.0. I could be wrong, but it builds on all versions without any warnings or errors. Let me know if you run into any problems.

@andypost andypost mentioned this pull request Jan 27, 2020
@andypost
Copy link
Contributor Author

Finally TSRM removed in php/php-src@618b961

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

Successfully merging this pull request may close these issues.

4 participants