From 351db35cebee220fdcc9e3c49d7c272177ed265f Mon Sep 17 00:00:00 2001 From: Nikolaos Dimopoulos Date: Wed, 21 Apr 2021 15:20:49 -0400 Subject: [PATCH 1/5] Updating Zephir --- .github/workflows/build-and-test.yml | 2 +- .github/workflows/codecoverage.yml | 2 +- .travis.yml | 2 +- appveyor.yml | 2 +- boxfile.7.4.yml | 2 +- tests/_ci/nanobox/boxfile.7.2.yml | 2 +- tests/_ci/nanobox/boxfile.7.3.yml | 2 +- tests/_ci/nanobox/boxfile.7.4.yml | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index f25c011b80..e9143706da 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -22,7 +22,7 @@ jobs: - name: Setup Environment Variables run: | echo "ZEPHIR_PARSER_VERSION=v1.3.6" >> $GITHUB_ENV - echo "ZEPHIR_VERSION=0.12.19" >> $GITHUB_ENV + echo "ZEPHIR_VERSION=0.12.21" >> $GITHUB_ENV - name: Setup PHP uses: shivammathur/setup-php@v2 diff --git a/.github/workflows/codecoverage.yml b/.github/workflows/codecoverage.yml index b6a77b0228..55e7bd19ee 100644 --- a/.github/workflows/codecoverage.yml +++ b/.github/workflows/codecoverage.yml @@ -47,7 +47,7 @@ jobs: - name: Setup Environment Variables run: | echo "ZEPHIR_PARSER_VERSION=v1.3.6" >> $GITHUB_ENV - echo "ZEPHIR_VERSION=0.12.19" >> $GITHUB_ENV + echo "ZEPHIR_VERSION=0.12.21" >> $GITHUB_ENV - name: Setup PHP uses: shivammathur/setup-php@v2 diff --git a/.travis.yml b/.travis.yml index 964ca188b0..c4725b9eeb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -38,7 +38,7 @@ services: env: global: - CC="gcc" - - ZEPHIR_VERSION="0.12.19" + - ZEPHIR_VERSION="0.12.21" - ZEPHIR_PARSER_VERSION="v1.3.6" - REPORT_COVERAGE=0 - PATH="${HOME}/.composer/vendor/bin:${PATH}" diff --git a/appveyor.yml b/appveyor.yml index afa6ec2b1e..775f1ec821 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -44,7 +44,7 @@ environment: PHP_SDK_VERSION: 2.1.9 ZEPHIR_PARSER_VERSION: 1.3.4 ZEPHIR_PARSER_RELEASE: 526 - ZEPHIR_VERSION: 0.12.19 + ZEPHIR_VERSION: 0.12.21 TEST_PHP_EXECUTABLE: C:\php\php.exe NO_INTERACTION: 1 diff --git a/boxfile.7.4.yml b/boxfile.7.4.yml index 1229dad01c..4d7813dcb8 100644 --- a/boxfile.7.4.yml +++ b/boxfile.7.4.yml @@ -140,7 +140,7 @@ run.config: - echo -e 'apc.enable_cli=1' >> "/data/etc/php/dev_php.ini" #=========================================================================== # Get the Zephir phar - - wget --no-clobber -O /data/bin/zephir https://github.com/phalcon/zephir/releases/download/0.12.19/zephir.phar + - wget --no-clobber -O /data/bin/zephir https://github.com/phalcon/zephir/releases/download/0.12.21/zephir.phar - chmod +x /data/bin/zephir data.memcached: diff --git a/tests/_ci/nanobox/boxfile.7.2.yml b/tests/_ci/nanobox/boxfile.7.2.yml index 2ba9880bd0..d36f3b1fc5 100644 --- a/tests/_ci/nanobox/boxfile.7.2.yml +++ b/tests/_ci/nanobox/boxfile.7.2.yml @@ -121,7 +121,7 @@ run.config: - echo -e 'apc.enable_cli=1' >> "/data/etc/php/dev_php.ini" #=========================================================================== # Get the Zephir phar - - wget --no-clobber -O /data/bin/zephir https://github.com/phalcon/zephir/releases/download/0.12.19/zephir.phar + - wget --no-clobber -O /data/bin/zephir https://github.com/phalcon/zephir/releases/download/0.12.21/zephir.phar - chmod +x /data/bin/zephir data.memcached: diff --git a/tests/_ci/nanobox/boxfile.7.3.yml b/tests/_ci/nanobox/boxfile.7.3.yml index 9a0f2ee985..8d1162c29b 100644 --- a/tests/_ci/nanobox/boxfile.7.3.yml +++ b/tests/_ci/nanobox/boxfile.7.3.yml @@ -140,7 +140,7 @@ run.config: - echo -e 'apc.enable_cli=1' >> "/data/etc/php/dev_php.ini" #=========================================================================== # Get the Zephir phar - - wget --no-clobber -O /data/bin/zephir https://github.com/phalcon/zephir/releases/download/0.12.19/zephir.phar + - wget --no-clobber -O /data/bin/zephir https://github.com/phalcon/zephir/releases/download/0.12.21/zephir.phar - chmod +x /data/bin/zephir data.memcached: diff --git a/tests/_ci/nanobox/boxfile.7.4.yml b/tests/_ci/nanobox/boxfile.7.4.yml index 1229dad01c..4d7813dcb8 100644 --- a/tests/_ci/nanobox/boxfile.7.4.yml +++ b/tests/_ci/nanobox/boxfile.7.4.yml @@ -140,7 +140,7 @@ run.config: - echo -e 'apc.enable_cli=1' >> "/data/etc/php/dev_php.ini" #=========================================================================== # Get the Zephir phar - - wget --no-clobber -O /data/bin/zephir https://github.com/phalcon/zephir/releases/download/0.12.19/zephir.phar + - wget --no-clobber -O /data/bin/zephir https://github.com/phalcon/zephir/releases/download/0.12.21/zephir.phar - chmod +x /data/bin/zephir data.memcached: From 5b0c3bbdb7862ef0da7932aa714f693d380ef47c Mon Sep 17 00:00:00 2001 From: Nikolaos Dimopoulos Date: Wed, 21 Apr 2021 15:28:25 -0400 Subject: [PATCH 2/5] Generate with 0.12.21 zephir --- ext/config.m4 | 2 ++ ext/php_phalcon.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ext/config.m4 b/ext/config.m4 index ce34ff6d2b..02a4e1dd2b 100644 --- a/ext/config.m4 +++ b/ext/config.m4 @@ -561,6 +561,8 @@ if test "$PHP_PHALCON" = "yes"; then phalcon/mvc/view/engine/volt/scanner.c phalcon/url/utils.c" PHP_NEW_EXTENSION(phalcon, $phalcon_sources, $ext_shared,, ) + PHP_ADD_BUILD_DIR([$ext_builddir/kernel/]) + PHP_ADD_BUILD_DIR([$ext_builddir/phalcon/]) PHP_SUBST(PHALCON_SHARED_LIBADD) old_CPPFLAGS=$CPPFLAGS diff --git a/ext/php_phalcon.h b/ext/php_phalcon.h index 5a467421dc..7bb1ae6618 100644 --- a/ext/php_phalcon.h +++ b/ext/php_phalcon.h @@ -14,7 +14,7 @@ #define PHP_PHALCON_VERSION "4.1.1" #define PHP_PHALCON_EXTNAME "phalcon" #define PHP_PHALCON_AUTHOR "Phalcon Team and contributors" -#define PHP_PHALCON_ZEPVERSION "0.12.19-4345593" +#define PHP_PHALCON_ZEPVERSION "0.12.21-8a412a1" #define PHP_PHALCON_DESCRIPTION "Phalcon is a full stack PHP framework, delivered as a PHP extension, offering lower resource consumption and high performance." typedef struct _zephir_struct_db { From 6fdff8b57aee22a2964345278375468c169cd578 Mon Sep 17 00:00:00 2001 From: Nikolaos Dimopoulos Date: Wed, 21 Apr 2021 15:28:50 -0400 Subject: [PATCH 3/5] Optimizing build --- build/php7/32bits/php_phalcon.h | 2 +- build/php7/64bits/php_phalcon.h | 2 +- build/php7/safe/php_phalcon.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build/php7/32bits/php_phalcon.h b/build/php7/32bits/php_phalcon.h index d3b56a9d88..4293068199 100644 --- a/build/php7/32bits/php_phalcon.h +++ b/build/php7/32bits/php_phalcon.h @@ -111,7 +111,7 @@ typedef zend_function zephir_fcall_cache_entry; #define PHP_PHALCON_VERSION "4.1.1" #define PHP_PHALCON_EXTNAME "phalcon" #define PHP_PHALCON_AUTHOR "Phalcon Team and contributors" -#define PHP_PHALCON_ZEPVERSION "0.12.19-4345593" +#define PHP_PHALCON_ZEPVERSION "0.12.21-8a412a1" #define PHP_PHALCON_DESCRIPTION "Phalcon is a full stack PHP framework, delivered as a PHP extension, offering lower resource consumption and high performance." typedef struct _zephir_struct_db { diff --git a/build/php7/64bits/php_phalcon.h b/build/php7/64bits/php_phalcon.h index d3b56a9d88..4293068199 100644 --- a/build/php7/64bits/php_phalcon.h +++ b/build/php7/64bits/php_phalcon.h @@ -111,7 +111,7 @@ typedef zend_function zephir_fcall_cache_entry; #define PHP_PHALCON_VERSION "4.1.1" #define PHP_PHALCON_EXTNAME "phalcon" #define PHP_PHALCON_AUTHOR "Phalcon Team and contributors" -#define PHP_PHALCON_ZEPVERSION "0.12.19-4345593" +#define PHP_PHALCON_ZEPVERSION "0.12.21-8a412a1" #define PHP_PHALCON_DESCRIPTION "Phalcon is a full stack PHP framework, delivered as a PHP extension, offering lower resource consumption and high performance." typedef struct _zephir_struct_db { diff --git a/build/php7/safe/php_phalcon.h b/build/php7/safe/php_phalcon.h index d3b56a9d88..4293068199 100644 --- a/build/php7/safe/php_phalcon.h +++ b/build/php7/safe/php_phalcon.h @@ -111,7 +111,7 @@ typedef zend_function zephir_fcall_cache_entry; #define PHP_PHALCON_VERSION "4.1.1" #define PHP_PHALCON_EXTNAME "phalcon" #define PHP_PHALCON_AUTHOR "Phalcon Team and contributors" -#define PHP_PHALCON_ZEPVERSION "0.12.19-4345593" +#define PHP_PHALCON_ZEPVERSION "0.12.21-8a412a1" #define PHP_PHALCON_DESCRIPTION "Phalcon is a full stack PHP framework, delivered as a PHP extension, offering lower resource consumption and high performance." typedef struct _zephir_struct_db { From e5f771fa7d3cc95bc7200fcda5f1fce3b75ffcc3 Mon Sep 17 00:00:00 2001 From: Nikolaos Dimopoulos Date: Wed, 21 Apr 2021 15:29:57 -0400 Subject: [PATCH 4/5] phpcs --- tests/unit/Acl/Adapter/Memory/AllowCest.php | 1 + tests/unit/Acl/Adapter/Memory/IsAllowedCest.php | 1 + 2 files changed, 2 insertions(+) diff --git a/tests/unit/Acl/Adapter/Memory/AllowCest.php b/tests/unit/Acl/Adapter/Memory/AllowCest.php index b18082b0ac..64b63bf6a2 100644 --- a/tests/unit/Acl/Adapter/Memory/AllowCest.php +++ b/tests/unit/Acl/Adapter/Memory/AllowCest.php @@ -22,6 +22,7 @@ use Phalcon\Test\Fixtures\Acl\TestComponentAware; use Phalcon\Test\Fixtures\Acl\TestRoleAware; use UnitTester; + use function str_replace; class AllowCest diff --git a/tests/unit/Acl/Adapter/Memory/IsAllowedCest.php b/tests/unit/Acl/Adapter/Memory/IsAllowedCest.php index 2d863c12ce..dc3265a40b 100644 --- a/tests/unit/Acl/Adapter/Memory/IsAllowedCest.php +++ b/tests/unit/Acl/Adapter/Memory/IsAllowedCest.php @@ -24,6 +24,7 @@ use Phalcon\Test\Fixtures\Acl\TestRoleComponentAware; use stdClass; use UnitTester; + use function str_replace; class IsAllowedCest From b5dd2d21597a8fd6b96c116190db43d888290456 Mon Sep 17 00:00:00 2001 From: Nikolaos Dimopoulos Date: Wed, 21 Apr 2021 15:43:08 -0400 Subject: [PATCH 5/5] Correcting tests again --- tests/unit/Acl/Adapter/Memory/AllowCest.php | 2 +- tests/unit/Acl/Adapter/Memory/IsAllowedCest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/unit/Acl/Adapter/Memory/AllowCest.php b/tests/unit/Acl/Adapter/Memory/AllowCest.php index 64b63bf6a2..c9c837cc3a 100644 --- a/tests/unit/Acl/Adapter/Memory/AllowCest.php +++ b/tests/unit/Acl/Adapter/Memory/AllowCest.php @@ -280,7 +280,7 @@ public function aclAdapterMemoryAllowFunctionException(UnitTester $I) { $errorMessage = "You did not provide any parameters when 'Guests' can " . "'update' 'Post'. We will use default action when no arguments. " . - "at tests/unit/Acl/Adapter/Memory/AllowCest.php:332"; + "at tests/unit/Acl/Adapter/Memory/AllowCest.php:334"; if (PHP_OS_FAMILY === 'Windows') { $errorMessage = str_replace('/', '\\', $errorMessage); diff --git a/tests/unit/Acl/Adapter/Memory/IsAllowedCest.php b/tests/unit/Acl/Adapter/Memory/IsAllowedCest.php index dc3265a40b..decfeea8cc 100644 --- a/tests/unit/Acl/Adapter/Memory/IsAllowedCest.php +++ b/tests/unit/Acl/Adapter/Memory/IsAllowedCest.php @@ -207,7 +207,7 @@ public function aclAdapterMemoryIsAllowedFunctionMoreParameters(UnitTester $I) $errorMessage = 'Number of parameters in array is higher than the ' . 'number of parameters in defined function when checking if ' . "'Members' can 'update' 'Post'. Extra parameters will be ignored. " . - "at tests/unit/Acl/Adapter/Memory/IsAllowedCest.php:242"; + "at tests/unit/Acl/Adapter/Memory/IsAllowedCest.php:244"; if (PHP_OS_FAMILY === 'Windows') { $errorMessage = str_replace('/', '\\', $errorMessage);