arnaud-lb / php-memory-profiler

Memory profiler for PHP. Helps finding memory leaks in PHP scripts.
MIT License
870 stars 51 forks source link

fix minimal version #43

Closed remicollet closed 3 years ago

remicollet commented 3 years ago

According to https://github.com/arnaud-lb/php-memory-profiler/commit/4d8670ada0ce8d8ee943c3d55bfd224fde2c63b2#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5

Only 7.1+ is supported

And indeed, build fails with 7.0

/builddir/build/BUILD/php70-php-pecl-memprof-2.1.1/NTS/util.c: In function 'get_function_name':
/builddir/build/BUILD/php70-php-pecl-memprof-2.1.1/NTS/util.c:59:49: error: 'zend_pass_function' undeclared (first use in this function); did you mean 'zend_call_function'?
   59 |  if (&execute_data->func->internal_function == &zend_pass_function) {
      |                                                 ^~~~~~~~~~~~~~~~~~
      |                                                 zend_call_function
/builddir/build/BUILD/php70-php-pecl-memprof-2.1.1/NTS/util.c:59:49: note: each undeclared identifier is reported only once for each function it appears in
remicollet commented 3 years ago

This also rename package2.xml to package.xml, as this is no more needed.... since PHP 5...

Second commit add tests directory to pecl archive, useful for downstream packaging.

arnaud-lb commented 3 years ago

Thanks @remicollet !