From ca5ddbbd347c16b027601626f051f0ff07832e52 Mon Sep 17 00:00:00 2001 From: Bogdan Padalko Date: Thu, 8 Mar 2018 14:15:51 +0200 Subject: [PATCH 1/6] Bump year --- LICENSE | 2 +- php_ref.h | 2 +- php_ref_functions.c | 2 +- php_ref_functions.h | 2 +- php_ref_notifier_exception.c | 2 +- php_ref_notifier_exception.h | 2 +- php_ref_reference.c | 2 +- php_ref_reference.h | 2 +- ref.c | 2 +- stubs/LICENSE | 2 +- stubs/src/AbstractReference.php | 2 +- stubs/src/NotifierException.php | 2 +- stubs/src/SoftReference.php | 2 +- stubs/src/WeakReference.php | 2 +- stubs/src/functions.php | 2 +- 15 files changed, 15 insertions(+), 15 deletions(-) diff --git a/LICENSE b/LICENSE index ad92bfe..599d760 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License -Copyright (c) 2016-2017 Bogdan Padalko +Copyright (c) 2016-2018 Bogdan Padalko Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in diff --git a/php_ref.h b/php_ref.h index 66b57af..fa73fff 100644 --- a/php_ref.h +++ b/php_ref.h @@ -1,7 +1,7 @@ /* * This file is part of the pinepain/php-ref PHP extension. * - * Copyright (c) 2016-2017 Bogdan Padalko + * Copyright (c) 2016-2018 Bogdan Padalko * * Licensed under the MIT license: http://opensource.org/licenses/MIT * diff --git a/php_ref_functions.c b/php_ref_functions.c index 4f60552..d2c9c1d 100644 --- a/php_ref_functions.c +++ b/php_ref_functions.c @@ -1,7 +1,7 @@ /* * This file is part of the pinepain/php-ref PHP extension. * - * Copyright (c) 2016-2017 Bogdan Padalko + * Copyright (c) 2016-2018 Bogdan Padalko * * Licensed under the MIT license: http://opensource.org/licenses/MIT * diff --git a/php_ref_functions.h b/php_ref_functions.h index e8d80f5..1c2b4d0 100644 --- a/php_ref_functions.h +++ b/php_ref_functions.h @@ -1,7 +1,7 @@ /* * This file is part of the pinepain/php-ref PHP extension. * - * Copyright (c) 2016-2017 Bogdan Padalko + * Copyright (c) 2016-2018 Bogdan Padalko * * Licensed under the MIT license: http://opensource.org/licenses/MIT * diff --git a/php_ref_notifier_exception.c b/php_ref_notifier_exception.c index 603fecd..8685809 100644 --- a/php_ref_notifier_exception.c +++ b/php_ref_notifier_exception.c @@ -1,7 +1,7 @@ /* * This file is part of the pinepain/php-ref PHP extension. * - * Copyright (c) 2016-2017 Bogdan Padalko + * Copyright (c) 2016-2018 Bogdan Padalko * * Licensed under the MIT license: http://opensource.org/licenses/MIT * diff --git a/php_ref_notifier_exception.h b/php_ref_notifier_exception.h index 7374d4b..68ced5c 100644 --- a/php_ref_notifier_exception.h +++ b/php_ref_notifier_exception.h @@ -1,7 +1,7 @@ /* * This file is part of the pinepain/php-ref PHP extension. * - * Copyright (c) 2016-2017 Bogdan Padalko + * Copyright (c) 2016-2018 Bogdan Padalko * * Licensed under the MIT license: http://opensource.org/licenses/MIT * diff --git a/php_ref_reference.c b/php_ref_reference.c index 758fc65..e3ea47d 100644 --- a/php_ref_reference.c +++ b/php_ref_reference.c @@ -1,7 +1,7 @@ /* * This file is part of the pinepain/php-ref PHP extension. * - * Copyright (c) 2016-2017 Bogdan Padalko + * Copyright (c) 2016-2018 Bogdan Padalko * * Licensed under the MIT license: http://opensource.org/licenses/MIT * diff --git a/php_ref_reference.h b/php_ref_reference.h index 4d75ac2..2bfc242 100644 --- a/php_ref_reference.h +++ b/php_ref_reference.h @@ -1,7 +1,7 @@ /* * This file is part of the pinepain/php-ref PHP extension. * - * Copyright (c) 2016-2017 Bogdan Padalko + * Copyright (c) 2016-2018 Bogdan Padalko * * Licensed under the MIT license: http://opensource.org/licenses/MIT * diff --git a/ref.c b/ref.c index 8ff9e48..f5cd087 100644 --- a/ref.c +++ b/ref.c @@ -1,7 +1,7 @@ /* * This file is part of the pinepain/php-ref PHP extension. * - * Copyright (c) 2016-2017 Bogdan Padalko + * Copyright (c) 2016-2018 Bogdan Padalko * * Licensed under the MIT license: http://opensource.org/licenses/MIT * diff --git a/stubs/LICENSE b/stubs/LICENSE index ad92bfe..599d760 100644 --- a/stubs/LICENSE +++ b/stubs/LICENSE @@ -1,6 +1,6 @@ The MIT License -Copyright (c) 2016-2017 Bogdan Padalko +Copyright (c) 2016-2018 Bogdan Padalko Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in diff --git a/stubs/src/AbstractReference.php b/stubs/src/AbstractReference.php index 7fb951c..4429c4e 100644 --- a/stubs/src/AbstractReference.php +++ b/stubs/src/AbstractReference.php @@ -3,7 +3,7 @@ /* * This file is part of the pinepain/php-ref PHP extension. * - * Copyright (c) 2016-2017 Bogdan Padalko + * Copyright (c) 2016-2018 Bogdan Padalko * * Licensed under the MIT license: http://opensource.org/licenses/MIT * diff --git a/stubs/src/NotifierException.php b/stubs/src/NotifierException.php index dd76cb9..514e08a 100644 --- a/stubs/src/NotifierException.php +++ b/stubs/src/NotifierException.php @@ -3,7 +3,7 @@ /* * This file is part of the pinepain/php-ref PHP extension. * - * Copyright (c) 2016-2017 Bogdan Padalko + * Copyright (c) 2016-2018 Bogdan Padalko * * Licensed under the MIT license: http://opensource.org/licenses/MIT * diff --git a/stubs/src/SoftReference.php b/stubs/src/SoftReference.php index 236a5b3..9295674 100644 --- a/stubs/src/SoftReference.php +++ b/stubs/src/SoftReference.php @@ -3,7 +3,7 @@ /* * This file is part of the pinepain/php-ref PHP extension. * - * Copyright (c) 2016-2017 Bogdan Padalko + * Copyright (c) 2016-2018 Bogdan Padalko * * Licensed under the MIT license: http://opensource.org/licenses/MIT * diff --git a/stubs/src/WeakReference.php b/stubs/src/WeakReference.php index 6b50dff..75f12a8 100644 --- a/stubs/src/WeakReference.php +++ b/stubs/src/WeakReference.php @@ -3,7 +3,7 @@ /* * This file is part of the pinepain/php-ref PHP extension. * - * Copyright (c) 2016-2017 Bogdan Padalko + * Copyright (c) 2016-2018 Bogdan Padalko * * Licensed under the MIT license: http://opensource.org/licenses/MIT * diff --git a/stubs/src/functions.php b/stubs/src/functions.php index 8a706a9..0df245a 100644 --- a/stubs/src/functions.php +++ b/stubs/src/functions.php @@ -3,7 +3,7 @@ /* * This file is part of the pinepain/php-ref PHP extension. * - * Copyright (c) 2016-2017 Bogdan Padalko + * Copyright (c) 2016-2018 Bogdan Padalko * * Licensed under the MIT license: http://opensource.org/licenses/MIT * From 61c5a4c1026d3f8773b88e9087cb673fe0238d58 Mon Sep 17 00:00:00 2001 From: Bogdan Padalko Date: Thu, 8 Mar 2018 14:15:03 +0200 Subject: [PATCH 2/6] Drop PHP < 7.2 support --- .travis.yml | 2 +- CMakeLists.txt | 2 +- README.md | 10 +- config.m4 | 4 +- package.xml | 2 +- php_ref.h | 20 +- php_ref_functions.c | 38 ++-- php_ref_reference.c | 6 +- provision/provision.sh | 12 +- scripts/refresh-package-xml.php | 17 +- scripts/replace_expect.php | 112 +++++++++++ stubs/composer.json | 2 +- stubs/src/functions.php | 6 +- tests/001-extension_info.phpt | 18 ++ tests/001-verify-method-case.phpt | 59 ++++++ tests/001-verify-methods-signature.phpt | 98 +++++++++ tests/001-verify_extension_entities.phpt | 240 +++++++++++++++++++++++ tests/003-functions.phpt | 24 ++- 18 files changed, 597 insertions(+), 75 deletions(-) create mode 100755 scripts/replace_expect.php create mode 100644 tests/001-extension_info.phpt create mode 100644 tests/001-verify-method-case.phpt create mode 100644 tests/001-verify-methods-signature.phpt create mode 100644 tests/001-verify_extension_entities.phpt diff --git a/.travis.yml b/.travis.yml index ad6caab..6a07f99 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,7 @@ dist: trusty language: php php: - - 7.1 + - 7.2 - nightly matrix: diff --git a/CMakeLists.txt b/CMakeLists.txt index 98244a7..924f6b1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.1) -project(php_ref) +project(php-ref) # NOTE: This CMake file is just for syntax highlighting in CLion diff --git a/README.md b/README.md index 9735c11..0fd3042 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ This extension adds [Soft Reference](https://en.wikipedia.org/wiki/Soft_referenc data structures that require advanced referencing model. -**PHP >= 7.1 required** +**PHP >= 7.2 required.** The last version that supports PHP 7.1 is `v0.5.0`. ### PLEASE READ: @@ -162,7 +162,7 @@ to add it to your project. $ sudo add-apt-repository -y ppa:ondrej/php $ sudo add-apt-repository -y ppa:pinepain/php $ sudo apt-get update -y - $ sudo apt-get install -y php7.1 php-ref + $ sudo apt-get install -y php7.2 php-ref $ php --ri ref #### OS X (homebrew) @@ -170,7 +170,7 @@ to add it to your project. $ brew tap homebrew/devtoo $ brew tap homebrew/php $ brew tap pinepain/devtools - $ brew install php71 php71-ref + $ brew install php72 php72-ref $ php --ri ref ### Windows @@ -189,12 +189,12 @@ To install extension globally run # sudo make install -You will need to copy the extension config to your php dir, here is example for Ubuntu with PHP 7.1 from +You will need to copy the extension config to your php dir, here is example for Ubuntu with PHP 7.2 from [Ondřej Surý's PPA for PHP](https://launchpad.net/~ondrej/+archive/ubuntu/php): # sudo cp provision/php/ref.ini /etc/php/mods-available/ # sudo phpenmod -v ALL ref - # sudo service php7.1-fpm restart + # sudo service php7.2-fpm restart You may also want to add php-ref extension as a [composer.json dependency](https://getcomposer.org/doc/02-libraries.md#platform-packages): diff --git a/config.m4 b/config.m4 index 6bba55a..2f3f6fd 100644 --- a/config.m4 +++ b/config.m4 @@ -11,8 +11,8 @@ if test "$PHP_REF" != "no"; then PHP_REF_FOUND_VERSION=`${PHP_CONFIG} --version` PHP_REF_FOUND_VERNUM=`${PHP_CONFIG} --vernum` - if test "$PHP_REF_FOUND_VERNUM" -lt "70100"; then - AC_MSG_ERROR([not supported. PHP version >= 7.1 required (found $PHP_REF_FOUND_VERSION)]) + if test "$PHP_REF_FOUND_VERNUM" -lt "70200"; then + AC_MSG_ERROR([not supported. PHP version >= 7.2 required (found $PHP_REF_FOUND_VERSION)]) else AC_MSG_RESULT([supported ($PHP_REF_FOUND_VERSION)]) fi diff --git a/package.xml b/package.xml index 015b599..f79cf83 100644 --- a/package.xml +++ b/package.xml @@ -155,7 +155,7 @@ - 7.1.0 + 7.2.0 1.4.0 diff --git a/php_ref.h b/php_ref.h index fa73fff..28a80ce 100644 --- a/php_ref.h +++ b/php_ref.h @@ -26,9 +26,9 @@ extern zend_module_entry php_ref_module_entry; #define PHP_REF_REVISION "dev" #endif -#if PHP_VERSION_ID < 70100 +#if PHP_VERSION_ID < 70200 // should never get her, but just in case -#error PHP >= 7.1 required +#error PHP >= 7.2 required #endif #define PHP_REF_NS "Ref" @@ -42,22 +42,6 @@ extern zend_module_entry php_ref_module_entry; #endif -// Add zend_type support (new since PHP 7.2) -#ifdef ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX - #define PHP_REF_ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(name, return_reference, required_num_args, classname, allow_null) \ - ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(name, return_reference, required_num_args, classname, allow_null) - - #define PHP_REF_ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(name, return_reference, required_num_args, type, allow_null) \ - ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(name, return_reference, required_num_args, type, allow_null) -#else - #define PHP_REF_ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(name, return_reference, required_num_args, classname, allow_null) \ - ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(name, return_reference, required_num_args, IS_OBJECT, #classname, allow_null) - - #define PHP_REF_ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(name, return_reference, required_num_args, type, allow_null) \ - ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(name, return_reference, required_num_args, type, NULL, allow_null) -#endif - - #ifdef ZTS #include "TSRM.h" #endif diff --git a/php_ref_functions.c b/php_ref_functions.c index d2c9c1d..6ccdc51 100644 --- a/php_ref_functions.c +++ b/php_ref_functions.c @@ -208,44 +208,44 @@ PHP_FUNCTION(is_obj_destructor_called) } -PHP_REF_ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(refcounted_arg, ZEND_RETURN_VALUE, 1, _IS_BOOL, 0) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(refcounted_arg, ZEND_RETURN_VALUE, 1, _IS_BOOL, 0) ZEND_ARG_INFO(0, value) ZEND_END_ARG_INFO() -PHP_REF_ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(refcount_arg, ZEND_RETURN_VALUE, 1, IS_LONG, 0) - ZEND_ARG_INFO(0, value) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(refcount_arg, ZEND_RETURN_VALUE, 1, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, object, IS_OBJECT, 0) ZEND_END_ARG_INFO() -PHP_REF_ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(softrefcounted_arg, ZEND_RETURN_VALUE, 1, _IS_BOOL, 0) - ZEND_ARG_INFO(0, object) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(softrefcounted_arg, ZEND_RETURN_VALUE, 1, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO(0, object, IS_OBJECT, 0) ZEND_END_ARG_INFO() -PHP_REF_ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(softrefcount_arg, ZEND_RETURN_VALUE, 1, IS_LONG, 0) - ZEND_ARG_INFO(0, object) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(softrefcount_arg, ZEND_RETURN_VALUE, 1, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, object, IS_OBJECT, 0) ZEND_END_ARG_INFO() -PHP_REF_ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(softrefs_arg, ZEND_RETURN_VALUE, 1, IS_ARRAY, 0) - ZEND_ARG_INFO(0, object) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(softrefs_arg, ZEND_RETURN_VALUE, 1, IS_ARRAY, 0) + ZEND_ARG_TYPE_INFO(0, object, IS_OBJECT, 0) ZEND_END_ARG_INFO() -PHP_REF_ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(weakrefcounted_arg, ZEND_RETURN_VALUE, 1, _IS_BOOL, 0) - ZEND_ARG_INFO(0, object) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(weakrefcounted_arg, ZEND_RETURN_VALUE, 1, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO(0, object, IS_OBJECT, 0) ZEND_END_ARG_INFO() -PHP_REF_ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(weakrefcount_arg, ZEND_RETURN_VALUE, 1, IS_LONG, 0) - ZEND_ARG_INFO(0, object) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(weakrefcount_arg, ZEND_RETURN_VALUE, 1, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, object, IS_OBJECT, 0) ZEND_END_ARG_INFO() -PHP_REF_ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(weakrefs_arg, ZEND_RETURN_VALUE, 1, IS_ARRAY, 0) - ZEND_ARG_INFO(0, object) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(weakrefs_arg, ZEND_RETURN_VALUE, 1, IS_ARRAY, 0) + ZEND_ARG_TYPE_INFO(0, object, IS_OBJECT, 0) ZEND_END_ARG_INFO() -PHP_REF_ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(object_handle_arg, ZEND_RETURN_VALUE, 1, IS_LONG, 0) - ZEND_ARG_INFO(0, object) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(object_handle_arg, ZEND_RETURN_VALUE, 1, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, object, IS_OBJECT, 0) ZEND_END_ARG_INFO() -PHP_REF_ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(is_obj_destructor_called_arg, ZEND_RETURN_VALUE, 1, _IS_BOOL, 0) - ZEND_ARG_INFO(0, object) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(is_obj_destructor_called_arg, ZEND_RETURN_VALUE, 1, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO(0, object, IS_OBJECT, 0) ZEND_END_ARG_INFO() const zend_function_entry php_ref_functions[] = { diff --git a/php_ref_reference.c b/php_ref_reference.c index e3ea47d..79814c9 100644 --- a/php_ref_reference.c +++ b/php_ref_reference.c @@ -585,17 +585,17 @@ static PHP_METHOD(WeakReference, notifier) ZEND_BEGIN_ARG_INFO_EX(arginfo_ref_reference___construct, ZEND_SEND_BY_VAL, ZEND_RETURN_VALUE, 1) - ZEND_ARG_INFO(0, referent) + ZEND_ARG_TYPE_INFO(0, referent, IS_OBJECT, 0) ZEND_ARG_CALLABLE_INFO(0, notify, 1) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_ref_reference_get, ZEND_SEND_BY_VAL, ZEND_RETURN_VALUE, 0) ZEND_END_ARG_INFO() -PHP_REF_ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ref_reference_valid, ZEND_RETURN_VALUE, 0, _IS_BOOL, 0) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ref_reference_valid, ZEND_RETURN_VALUE, 0, _IS_BOOL, 0) ZEND_END_ARG_INFO() -PHP_REF_ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ref_reference_notifier, ZEND_SEND_BY_VAL, 0, IS_CALLABLE, 1) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ref_reference_notifier, ZEND_SEND_BY_VAL, 0, IS_CALLABLE, 1) ZEND_ARG_CALLABLE_INFO(0, notify, 1) ZEND_END_ARG_INFO() diff --git a/provision/provision.sh b/provision/provision.sh index 1d1917b..ed9036e 100644 --- a/provision/provision.sh +++ b/provision/provision.sh @@ -7,14 +7,14 @@ sudo apt-get -y autoremove # Make sure these tools installed sudo DEBIAN_FRONTEND=noninteractive apt-get install -y git htop curl tshark pkgconf # Add PPA with fresh PHP 7: -sudo add-apt-repository -u -y ppa:ondrej/php-7.0 +sudo add-apt-repository -u -y ppa:ondrej/php # Install available php from packages -sudo apt-get install -y php7.0 php7.0-dev php7.0-fpm +sudo apt-get install -y php7.2 php7.2-dev php7.2-fpm # Configure php-fpm -sudo cp ~/php-ref/provision/php/www.conf /etc/php/7.0/fpm/pool.d/www.conf -sudo service php7.0-fpm restart +sudo cp ~/php-ref/provision/php/www.conf /etc/php/7.2/fpm/pool.d/www.conf +sudo service php7.2-fpm restart # Fix php executable detection with PHP7 (https://github.com/oerdnj/deb.sury.org/issues/142) sudo sed -i -e 's/^php_cli_binary=NONE$/php_cli_binary="\/usr\/bin\/php"/g' /usr/bin/php-config @@ -79,7 +79,7 @@ sudo cp -f /usr/share/nginx/html/index.html /var/www/html/index-nginx.html #phpize --clean && phpize && ./configure && sudo make install #sudo cp ~/php-ref/provision/php/ref.ini /etc/php/mods-available/ #sudo phpenmod -v ALL ref -#sudo service php7.0-fpm restart +#sudo service php7.2-fpm restart # For debugging segfault when extension fails in php-fpm mode: #sudo sh -c "echo '/home/vagrant/php-ref/coredump-%e.%p' > /proc/sys/kernel/core_pattern" @@ -91,7 +91,7 @@ sudo cp -f /usr/share/nginx/html/index.html /var/www/html/index-nginx.html sudo apt-get autoremove -y # This is for the future -# At this point it is good idea to do `phpbrew install 7.1` (or other version you want to test extension with) +# At this point it is good idea to do `phpbrew install 7.2` (or other version you want to test extension with) # and `phpbrew ext install ~/php-ref/` date > /home/vagrant/vagrant_provisioned_at diff --git a/scripts/refresh-package-xml.php b/scripts/refresh-package-xml.php index 6c05c4f..d14f24d 100755 --- a/scripts/refresh-package-xml.php +++ b/scripts/refresh-package-xml.php @@ -1,10 +1,10 @@ #!/usr/bin/env php - + * Copyright (c) 2015-2018 Bogdan Padalko * * Licensed under the MIT license: http://opensource.org/licenses/MIT * @@ -13,6 +13,7 @@ * http://opensource.org/licenses/MIT */ + chdir(__DIR__ . DIRECTORY_SEPARATOR . '..'); $contents = [ @@ -39,6 +40,7 @@ ], ]; + $files = []; $files[] = ''; @@ -103,6 +105,10 @@ $package = preg_replace("/\.+\<\/date\>/", '' . $datetime->format('Y-m-d') . '', $package); $package = preg_replace("/\.+\<\/time\>/", '', $package); +$new_package_filename = 'package-new.xml'; +if (isset($argv[1]) && '-f' == $argv[1]) { + $new_package_filename = 'package.xml'; +} // Replace version: @@ -117,9 +123,4 @@ $package = preg_replace("/\\d+\.\d+.\d+\<\/api\>/", '' . $version . '', $package); -$new_package_filename = 'package-new.xml'; -if (isset($argv[1]) && '-f' == $argv[1]) { - $new_package_filename = 'package.xml'; -} - file_put_contents($new_package_filename, $package); diff --git a/scripts/replace_expect.php b/scripts/replace_expect.php new file mode 100755 index 0000000..4ce8990 --- /dev/null +++ b/scripts/replace_expect.php @@ -0,0 +1,112 @@ +#!/usr/bin/env php + + * + * Licensed under the MIT license: http://opensource.org/licenses/MIT + * + * For the full copyright and license information, please view the + * LICENSE file that was distributed with this source or visit + * http://opensource.org/licenses/MIT + */ + +$tests_dir = realpath(__DIR__ . '/../tests'); + + +$mode = 'write'; + +$args = $argv; +unset($args[0]); + +foreach ($argv as $i => $item) { + if ($item == '--pretend') { + $mode = 'pretend'; + unset($args[$i]); + } +} + +if (count($args) > 1) { + echo 'Invalid options', PHP_EOL; + exit(1); +} + +if ($args) { + $mask = str_replace(['tests/', '.phpt', '.diff'], '', array_pop($args)); +} else { + $mask = '*'; +} + +$iterator = new GlobIterator($tests_dir . "/{$mask}.out", FilesystemIterator::KEY_AS_FILENAME); + +foreach ($iterator as $item) { + //var_dump($item); + $out_file = $iterator->key(); + $base_name = preg_replace('/\.out$/i', '', $iterator->key()); + $test_file = $base_name . '.phpt'; + + $test_content = file_get_contents($tests_dir . '/' . $test_file); + + if (false !== ($pos = strpos($test_content, '--EXPECT--'))) { + printf("--EXPECT-- [%s]" . PHP_EOL, $iterator->key()); + + $test_content = substr($test_content, 0, $pos); + $test_content .= '--EXPECT--' . PHP_EOL; + $test_content .= file_get_contents($tests_dir . '/' . $out_file); + $test_content .= PHP_EOL; + file_put_contents($tests_dir . '/' . $test_file, $test_content); + + foreach (['.diff', '.exp', '.log', '.mem', '.out', '.php', '.sh'] as $ext) { + @unlink($tests_dir . '/' . $base_name . $ext); + } + + continue; + //} elseif (0) { + } elseif (false !== ($pos = strpos($test_content, '--EXPECTF--'))) { + + printf("--EXPECTF-- [%s]" . PHP_EOL, $iterator->key()); + + // get replacements + + $tests = substr($test_content, 0, $pos); + $result = file_get_contents($tests_dir . '/' . $out_file); + + preg_match_all('#// EXPECTF: \-\-\-(.+)#', $tests, $expectf_search); + preg_match_all('#// EXPECTF: \+\+\+(.+)#', $tests, $expectf_replace); + + if (count($expectf_search) != count($expectf_replace)) { + printf("please, edit manually [%s]: searches and replaces count doesn't match" . PHP_EOL, $iterator->key()); + continue; + } + + foreach (array_combine($expectf_search[1], $expectf_replace[1]) as $search => $replace) { + $replace = str_replace('\\\\n', '!!(ಠ_ಠ)!!', $replace); + $replace = str_replace('\\n', "\n", $replace); + $replace = str_replace('!!(ಠ_ಠ)!!', '\\\\n', $replace); + + $result = preg_replace($search, $replace, $result); + } + + $test_content = $tests; + $test_content .= '--EXPECTF--' . PHP_EOL; + $test_content .= $result; + $test_content .= PHP_EOL; + + if ($mode == 'pretend') { + echo $result, PHP_EOL; + echo PHP_EOL; + + } elseif ($mode = 'write') { + file_put_contents($tests_dir . '/' . $test_file, $test_content); + + foreach (['.diff', '.exp', '.log', '.mem', '.out', '.php', '.sh'] as $ext) { + @unlink($tests_dir . '/' . $base_name . $ext); + } + } + + continue; + } + + printf("please, edit manually [%s]" . PHP_EOL, $iterator->key()); +} diff --git a/stubs/composer.json b/stubs/composer.json index e48b0e3..e6ed31a 100644 --- a/stubs/composer.json +++ b/stubs/composer.json @@ -25,6 +25,6 @@ } ], "require": { - "php": "~7.0" + "php": "~7.2" } } diff --git a/stubs/src/functions.php b/stubs/src/functions.php index 0df245a..2da2bcd 100644 --- a/stubs/src/functions.php +++ b/stubs/src/functions.php @@ -27,13 +27,13 @@ function refcounted(mixed $value): bool } /** - * Get real value references count (not counting value reference passed as a function argument) + * Get real object references count (not counting value reference passed as a function argument) * - * @param mixed $value + * @param object $object * * @return int */ -function refcount(mixed $value): int +function refcount(object $object): int { } diff --git a/tests/001-extension_info.phpt b/tests/001-extension_info.phpt new file mode 100644 index 0000000..6c62eda --- /dev/null +++ b/tests/001-extension_info.phpt @@ -0,0 +1,18 @@ +--TEST-- +ref extension info +--SKIPIF-- + +--FILE-- +info(); + +?> +--EXPECTF-- +ref + +Ref support => enabled +Version => %s +Revision => %s +Compiled => %s @ %s diff --git a/tests/001-verify-method-case.phpt b/tests/001-verify-method-case.phpt new file mode 100644 index 0000000..f9e61b5 --- /dev/null +++ b/tests/001-verify-method-case.phpt @@ -0,0 +1,59 @@ +--TEST-- +Check whether all methods follows naming convention +--SKIPIF-- + +--FILE-- +getClasses(); + + +class MethodsCaseVerifier +{ + private $invalid = []; + + public function verifyClass(ReflectionClass $class) + { + foreach ($class->getMethods() as $m) { + $this->verifyMethod($m); + } + } + + public function verifyMethod(ReflectionMethod $method) + { + if (strtolower($method->getName()[0]) == $method->getName()[0]) { + return; + } + + $method_name = $method->getDeclaringClass()->getName() . '::' . $method->getName(); + + if (isset($this->invalid[$method_name])) { + return; + } + + $this->invalid[$method_name] = true; + + echo "{$method_name}() - invalid method name", PHP_EOL; + } + + public function isValid() + { + return empty($this->invalid); + } +} + +$v = new MethodsCaseVerifier(); + + +foreach ($classes as $c) { + $v->verifyClass($c); +} + +if ($v->isValid()) { + echo 'All methods are valid', PHP_EOL; +} + +?> +--EXPECT-- +All methods are valid diff --git a/tests/001-verify-methods-signature.phpt b/tests/001-verify-methods-signature.phpt new file mode 100644 index 0000000..19518ce --- /dev/null +++ b/tests/001-verify-methods-signature.phpt @@ -0,0 +1,98 @@ +--TEST-- +Check whether methods signature is valid +--SKIPIF-- + +--FILE-- +getClasses(); + + +class Verifier +{ + private $invalid = []; + + public function verifyClass(ReflectionClass $class) + { + foreach ($class->getMethods() as $m) { + $this->verifyMethod($m); + } + } + + public function verifyMethod(ReflectionMethod $method) + { + foreach ($method->getParameters() as $p) { + $this->verifyParameter($p); + } + + if ($method->getReturnType()) { + $type = $method->getReturnType(); + + if (!$type || $type->isBuiltin()) { + return; + } + + if(!class_exists($type) && !interface_exists($type)) { + $method_name = $method->getDeclaringClass()->getName() . '::' . $method->getName(); + $shortcut = $method_name . '/return type'; + if (isset($this->invalid[$shortcut])) { + return; + } + + $this->invalid[$shortcut] = true; + + echo "{$method_name}() method's return type is invalid ($type)", PHP_EOL; + } + } + + } + + protected function verifyReturnType(ReflectionType $rt) { + + } + + public function verifyParameter(ReflectionParameter $parameter) + { + $type = $parameter->getType(); + + if (!$type || $type->isBuiltin()) { + return; + } + + if (!class_exists($type) && !interface_exists($type)) { + $method_name = $parameter->getDeclaringClass()->getName() . '::' . $parameter->getDeclaringFunction()->getName(); + $param_name = $parameter->getName(); + + $shortcut = $method_name . '/' . $param_name; + + if (isset($this->invalid[$shortcut])) { + return; + } + + $this->invalid[$shortcut] = true; + + echo "{$method_name}() method's parameter {$parameter->getName()} has invalid type ($type)", PHP_EOL; + } + } + + public function isValid() + { + return empty($this->invalid); + } +} + +$v = new Verifier(); + + +foreach ($classes as $c) { + $v->verifyClass($c); +} + +if ($v->isValid()) { + echo 'All method parameters are valid', PHP_EOL; +} + +?> +--EXPECT-- +All method parameters are valid diff --git a/tests/001-verify_extension_entities.phpt b/tests/001-verify_extension_entities.phpt new file mode 100644 index 0000000..9c38628 --- /dev/null +++ b/tests/001-verify_extension_entities.phpt @@ -0,0 +1,240 @@ +--TEST-- +Check all extension entities +--SKIPIF-- + +--FILE-- +getName(), PHP_EOL; + // echo 'Version: ', $re->getVersion(), PHP_EOL; + + echo PHP_EOL; + echo 'Extension-global functions:', PHP_EOL; + + if ($re->getFunctions()) { + foreach ($re->getFunctions() as $rf) { + $this->dumpFunction($rf); + } + } else { + echo 'none', PHP_EOL; + } + + echo PHP_EOL; + echo 'Extension-global constants:', PHP_EOL; + + if ($re->getConstants()) { + foreach ($re->getConstants() as $name => $value) { + echo "$name = ", var_export($value, true), PHP_EOL; + } + } else { + echo 'none', PHP_EOL; + } + + echo PHP_EOL; + echo 'Extension-global classes:', PHP_EOL; + + if ($re->getClasses()) { + foreach ($re->getClasses() as $rc) { + $this->dumpClass($rc); + echo PHP_EOL; + } + } else { + echo 'none', PHP_EOL; + } + + + } + + protected function dumpClass(ReflectionClass $rc) + { + if ($rc->isTrait()) { + echo 'trait '; + } elseif ($rc->isInterface()) { + echo 'interface '; + } else { + if ($rc->isAbstract()) { + echo 'abstract '; + } + + if ($rc->isFinal()) { + echo 'final '; + } + + echo 'class '; + } + + echo $rc->getName(), PHP_EOL; + + if ($rc->getParentClass()) { + echo ' extends ', $rc->getParentClass()->getName(), PHP_EOL; + } + + foreach ($rc->getInterfaces() as $ri) { + echo ' implements ', $ri->getName(), PHP_EOL; + } + + foreach ($rc->getTraits() as $rt) { + echo ' use ', $rt->getName(), PHP_EOL; + } + + foreach ($rc->getConstants() as $name => $value) { + echo " const {$name} = ", var_export($value, true), PHP_EOL; + } + + foreach ($rc->getProperties() as $rp) { + if ($rp->getDeclaringClass() != $rc) { + continue; + } + + echo ' '; + + if ($rp->isStatic()) { + echo 'static '; + } + + + if ($rp->isPublic()) { + echo 'public '; + } + + if ($rp->isProtected()) { + echo 'protected '; + } + + if ($rp->isPrivate()) { + echo 'private '; + } + + echo '$', $rp->getName(); + echo PHP_EOL; + } + + + + foreach ($rc->getMethods() as $rm) { + if ($rm->getDeclaringClass() != $rc) { + continue; + } + + echo ' '; + + if ($rm->isAbstract()) { + echo 'abstract '; + } + + if ($rm->isFinal()) { + echo 'final '; + } + + if ($rm->isPublic()) { + echo 'public '; + } + + if ($rm->isProtected()) { + echo 'protected '; + } + + if ($rm->isPrivate()) { + echo 'private '; + } + + if ($rm->isStatic()) { + echo 'static '; + } + + echo 'function ', $rm->getName(); + echo $this->dumpPartialFunction($rm), PHP_EOL; + } + } + + protected function dumpFunction(ReflectionFunction $rf) + { + if ($rf->inNamespace()) { + echo $rf->getNamespaceName(), ': '; + } + + echo 'function ', $rf->getName(); + + echo $this->dumpPartialFunction($rf); + echo PHP_EOL; + } + + protected function dumpPartialFunction(ReflectionFunctionAbstract $rf) + { + $ret = '('; + + $parameters = []; + foreach ($rf->getParameters() as $parameter) { + $parameters[] = $this->dumpParameter($parameter); + } + + $ret .= implode(', ', $parameters); + + $ret .= ')'; + + if ($rf->hasReturnType()) { + $ret .= ': ' . ($rf->getReturnType()->allowsNull() ? '?' : '') . $rf->getReturnType(); + } + + return $ret; + } + + protected function dumpParameter(ReflectionParameter $rp) + { + $ret = []; + + $ret[] = $rp->hasType() ? ($rp->allowsNull() ? '?' : '') . (string)$rp->getType() : null; + $ret[] = ($rp->isVariadic() ? '...' : '') . "\${$rp->getName()}"; + + // $ret[] = $rp->isOptional() ? '= ?' : ''; + + return trim(implode(' ', $ret)); + } +} + +$d = new Dumper(); + +$d->dumpExtension(); + +?> +--EXPECT-- +Extension-global functions: +Ref: function Ref\refcounted($value): bool +Ref: function Ref\refcount(object $object): int +Ref: function Ref\softrefcounted(object $object): bool +Ref: function Ref\softrefcount(object $object): int +Ref: function Ref\softrefs(object $object): array +Ref: function Ref\weakrefcounted(object $object): bool +Ref: function Ref\weakrefcount(object $object): int +Ref: function Ref\weakrefs(object $object): array +Ref: function Ref\object_handle(object $object): int +Ref: function Ref\is_obj_destructor_called(object $object): bool + +Extension-global constants: +none + +Extension-global classes: +class Ref\NotifierException + extends Exception + implements Throwable + private $exceptions + public function __construct($message, $exceptions, $code, $previous) + public function getExceptions() + +abstract class Ref\AbstractReference + public function __construct(object $referent, ?callable $notify) + public function get() + public function valid(): bool + public function notifier(?callable $notify): ?callable + +class Ref\SoftReference + extends Ref\AbstractReference + +class Ref\WeakReference + extends Ref\AbstractReference diff --git a/tests/003-functions.phpt b/tests/003-functions.phpt index ca3a783..78625b6 100644 --- a/tests/003-functions.phpt +++ b/tests/003-functions.phpt @@ -44,10 +44,20 @@ $helper->header('Test Ref\refcount'); $helper->export_annotated('refcount($obj1)', refcount($obj1)); $helper->export_annotated('refcount($obj2)', refcount($obj2)); $helper->export_annotated('refcount(new stdClass())', refcount(new stdClass())); -$helper->export_annotated('refcount(null)', refcount(null)); -$helper->export_annotated('refcount(42)', refcount(42)); -$helper->line(); +try { + $helper->export_annotated('refcount(null)', refcount(null)); +} catch (TypeError $e) { + $helper->exception_export($e); +} + +try { + $helper->export_annotated('refcount(42)', refcount(42)); +} catch (TypeError $e) { + $helper->exception_export($e); +} + +$helper->line(); $weak_ref1a = new WeakReference($obj1); @@ -130,8 +140,8 @@ Test Ref\refcount: refcount($obj1): integer: 2 refcount($obj2): integer: 1 refcount(new stdClass()): integer: 0 -refcount(null): integer: 0 -refcount(42): integer: 0 +TypeError: Argument 1 passed to Ref\refcount() must be an object, null given +TypeError: Argument 1 passed to Ref\refcount() must be an object, integer given Test Ref\weakrefcounted: ------------------------ @@ -158,7 +168,7 @@ array(2) refcount(2){ NULL } [1]=> - object(Ref\WeakReference)#6 (2) refcount(2){ + object(Ref\WeakReference)#7 (2) refcount(2){ ["referent":"Ref\AbstractReference":private]=> object(stdClass)#2 (0) refcount(3){ } @@ -170,7 +180,7 @@ array(2) refcount(2){ Single weak ref reported for object with weakrefs(): ok array(1) refcount(2){ [0]=> - object(Ref\WeakReference)#7 (2) refcount(2){ + object(Ref\WeakReference)#8 (2) refcount(2){ ["referent":"Ref\AbstractReference":private]=> object(stdClass)#3 (0) refcount(2){ } From be86d566e2b598876d468952417298bae442e599 Mon Sep 17 00:00:00 2001 From: Bogdan Padalko Date: Thu, 8 Mar 2018 14:25:16 +0200 Subject: [PATCH 3/6] Add "next" PHP version support --- tests/003-functions.phpt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/003-functions.phpt b/tests/003-functions.phpt index 78625b6..b54bf64 100644 --- a/tests/003-functions.phpt +++ b/tests/003-functions.phpt @@ -126,7 +126,7 @@ $helper->assert('Object stored to external value during destructor call', is_obj $helper->export_annotated('is_obj_destructor_called($external)', is_obj_destructor_called($external)); ?> ---EXPECT-- +--EXPECTF-- Test Ref\refcounted: -------------------- refcounted($obj1): boolean: true @@ -141,7 +141,7 @@ refcount($obj1): integer: 2 refcount($obj2): integer: 1 refcount(new stdClass()): integer: 0 TypeError: Argument 1 passed to Ref\refcount() must be an object, null given -TypeError: Argument 1 passed to Ref\refcount() must be an object, integer given +TypeError: Argument 1 passed to Ref\refcount() must be an object, int%S given Test Ref\weakrefcounted: ------------------------ From ecd794c659d32a1380492336644220a9cfbfa5df Mon Sep 17 00:00:00 2001 From: Bogdan Padalko Date: Thu, 8 Mar 2018 14:30:02 +0200 Subject: [PATCH 4/6] Drop official windows support --- README.md | 5 --- appveyor.yml | 93 ---------------------------------------------------- config.w32 | 5 +-- 3 files changed, 3 insertions(+), 100 deletions(-) delete mode 100644 appveyor.yml diff --git a/README.md b/README.md index 0fd3042..678c37c 100644 --- a/README.md +++ b/README.md @@ -173,11 +173,6 @@ to add it to your project. $ brew install php72 php72-ref $ php --ri ref -### Windows - -Windows builds can be found at [php-ref Appveyor build page](https://ci.appveyor.com/project/pinepain/php-ref). -Pick artifacts from build which match your platform (x86 or x64), PHP release.major version and thread safety (ZTS or NTS). - ### Building from sources git clone https://github.com/pinepain/php-ref.git diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index de25baa..0000000 --- a/appveyor.yml +++ /dev/null @@ -1,93 +0,0 @@ -platform: - - x86 - - x64 - -environment: - matrix: - - PHP_VERSION: 7.1.8 - THREAD_SAFE: true - - PHP_VERSION: 7.1.8 - THREAD_SAFE: false - - - PHP_SDK: c:\projects\php-sdk - -matrix: - fast_finish: true - -os: Windows Server 2012 -clone_folder: c:\projects\php-sdk\php-ref-ci\vc14\x86\php\ext\ref - -init: - - ps: | - # Determine thread safety and debug command arguments for PHP configuration - If ($env:THREAD_SAFE -Match "true") { - $env:ENABLE_DISABLE_THREAD_SAFETY="--enable-zts" - $env:TS_OR_NTS="ts" - $env:OUTDIR="Release_TS" - } Else { - $env:ENABLE_DISABLE_THREAD_SAFETY="--disable-zts" - $env:TS_OR_NTS="nts" - $env:OUTDIR="Release" - } - - $env:PHP="$($env:PHP_VERSION.Substring(0, $env:PHP_VERSION.indexOf('.', 2)))" - - If ($env:APPVEYOR_REPO_TAG -Match "true") { - $env:EXT_VERSION = "$($env:APPVEYOR_REPO_TAG_NAME.TrimStart('v', '.'))" - } else { - $env:EXT_VERSION = "$($env:APPVEYOR_REPO_COMMIT.Substring(0, 8))" - } - - $env:ARTIFACT_NAME="php_ref-$($env:EXT_VERSION)-$($env:PHP)-$($env:TS_OR_NTS)-vc14-$($env:PLATFORM).zip" - -install: - - cd %PHP_SDK% - - curl -fSL -o php-sdk-binary-tools-20110915.zip "http://windows.php.net/downloads/php-sdk/php-sdk-binary-tools-20110915.zip" - - 7z.exe x php-sdk-binary-tools-20110915.zip - - call bin\phpsdk_setvars.bat - - call bin\phpsdk_buildtree.bat php-ref-ci - - cd php-ref-ci\vc14\x86 - - curl -fSL -o "php-%PHP_VERSION%.tar.gz" "http://us1.php.net/distributions/php-%PHP_VERSION%.tar.gz" - - ren php php-%PHP_VERSION% - - 7z.exe x php-%PHP_VERSION%.tar.gz -y - - 7z.exe x php-%PHP_VERSION%.tar -y | find /v "Extracting" - - cd php-%PHP_VERSION% - - mkdir %OUTDIR% - -build_script: - - '"%VS140COMNTOOLS%\VsDevCmd" %PLATFORM%' - - set - - echo Building PHP [%PHP_VERSION%] - - '%PHP_SDK%\bin\phpsdk_setvars' - - buildconf - - configure --disable-all --enable-cli --enable-ref=shared %ENABLE_DISABLE_THREAD_SAFETY% - - nmake - -after_build: - - cd %OUTDIR% - - dir - - dir ext - - dir ext\ref - - 7z a %ARTIFACT_NAME% php_ref.dll - - appveyor PushArtifact %ARTIFACT_NAME% - -test_script: - - cd c:\projects\php-sdk\php-ref-ci\vc14\x86\php-%PHP_VERSION% - - set NO_INTERACTION=1 - - set REPORT_EXIT_STATUS=1 - - "%OUTDIR%\\php.exe run-tests.php -p %OUTDIR%\\php.exe ext/ref/tests/ -d extension=php_ref.dll -d extension_dir=%OUTDIR%\\" - -on_failure: - - cd c:\projects\php-sdk\php-ref-ci\vc14\x86\php-%PHP_VERSION%\ext\ref\tests - - ps: | - $Result = Get-ChildItem .\* -Include *.diff, *.out, *.mem | sort $Name | ForEach-Object { - Write-Output "FILE: $_" - Get-Content $_ - Write-Output " " - } - - If ($Result.length) { - Write-Output $Result - exit 1 - } diff --git a/config.w32 b/config.w32 index ead0ee7..ee1f816 100644 --- a/config.w32 +++ b/config.w32 @@ -1,5 +1,6 @@ -ARG_ENABLE("ref", "enable ref support", "no"); +#ARG_ENABLE("ref", "enable ref support", "no"); if (PHP_REF != "no") { - EXTENSION("ref", "ref.c php_ref_notifier_exception.c php_ref_reference.c php_ref_functions.c", PHP_REF_SHARED, "/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"); + EXTENSION("ref", "ref.c", PHP_REF_SHARED, "/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"); } +`` From b5fc072a1799f09b1544d02140622753e6181308 Mon Sep 17 00:00:00 2001 From: Bogdan Padalko Date: Thu, 8 Mar 2018 15:06:53 +0200 Subject: [PATCH 5/6] Do not run memchecks on nightly builds atm --- .travis.yml | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6a07f99..47defa2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,21 +3,23 @@ dist: trusty language: php -php: - - 7.2 - - nightly +env: + global: + - NO_INTERACTION=1 + - TEST_TIMEOUT=120 matrix: allow_failures: - php: nightly -env: - global: - - NO_INTERACTION=1 - - TEST_TIMEOUT=120 - matrix: - - - - TEST_PHP_ARGS=-m + include: + - php: 7.2 + - php: 7.2 + env: TEST_PHP_ARGS=-m + + - php: nightly +# - php: nightly +# env: TEST_PHP_ARGS=-m before_install: - phpize && ./configure && make From 80c81e4e90050b8d67d6af24a279cd50eea79db1 Mon Sep 17 00:00:00 2001 From: Bogdan Padalko Date: Thu, 8 Mar 2018 15:26:20 +0200 Subject: [PATCH 6/6] Update homebre php-ref formula name to reflect upcoming changes [skip ci] --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 678c37c..8f7252c 100644 --- a/README.md +++ b/README.md @@ -167,10 +167,10 @@ to add it to your project. #### OS X (homebrew) - $ brew tap homebrew/devtoo + $ brew tap homebrew/dupes $ brew tap homebrew/php $ brew tap pinepain/devtools - $ brew install php72 php72-ref + $ brew install php php-ref $ php --ri ref ### Building from sources