diff --git a/.github/actions/build-mac/action.yml b/.github/actions/build-mac/action.yml
index 770222f6..1ff98e49 100644
--- a/.github/actions/build-mac/action.yml
+++ b/.github/actions/build-mac/action.yml
@@ -37,9 +37,12 @@ runs:
- name: Enable Zephir Parser
shell: bash
run: |
+ php --ini
cp ./modules/zephir_parser.so "$(php -r 'echo ini_get("extension_dir");')/zephir_parser.so"
if [ "${{ matrix.ts }}" = "ts" ]; then
- echo "extension=zephir_parser.so" > /usr/local/etc/php/${{ matrix.php }}-zts/conf.d/ext-zephir_parser.ini
+ mkdir -p /opt/homebrew/etc/php/${{ matrix.php }}-zts/conf.d
+ echo "extension=zephir_parser.so" > /opt/homebrew/etc/php/${{ matrix.php }}-zts/conf.d/ext-zephir_parser.ini
else
- echo "extension=zephir_parser.so" > /usr/local/etc/php/${{ matrix.php }}/conf.d/ext-zephir_parser.ini
+ mkdir -p /opt/homebrew/etc/php/${{ matrix.php }}/conf.d
+ echo "extension=zephir_parser.so" > /opt/homebrew/etc/php/${{ matrix.php }}/conf.d/ext-zephir_parser.ini
fi
diff --git a/.github/actions/build-win/action.yml b/.github/actions/build-win/action.yml
index e7faacb1..c18a7369 100644
--- a/.github/actions/build-win/action.yml
+++ b/.github/actions/build-win/action.yml
@@ -16,6 +16,10 @@ inputs:
description: 'Target architecture (x64, x86)'
required: false
default: 'x64'
+ toolset:
+ description: 'MSVC toolset version (e.g: 14.0, 15.0, 16.0)'
+ required: false
+ default: '' # Use default toolset version for the selected msvc
runs:
using: 'composite'
@@ -53,19 +57,10 @@ runs:
cache_dir: ${{ env.CACHE_DIR }}
- name: Configure Developer Command Prompt for MSVC compiler
- uses: ilammy/msvc-dev-cmd@v1.10.0
- with:
- arch: ${{ inputs.arch }}
-
- # Workaround for
- # PHP Warning: PHP Startup: Can't load module 'C:\tools\php\ext\php_zephir_parser.dll'
- # as it's linked with 14.29, but the core is linked with 14.16 in Unknown on line 0
- - name: Configure Developer Command Prompt for MSVC compiler
- uses: ilammy/msvc-dev-cmd@v1.10.0
- if: ${{ inputs.php_version }} == '7.4'
+ uses: ilammy/msvc-dev-cmd@v1.13.0
with:
arch: ${{ inputs.arch }}
- toolset: 14.16
+ toolset: ${{ inputs.toolset }}
- name: Getting Details About Installed PHP
shell: powershell
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index ef12f040..73c88669 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -8,13 +8,12 @@
name: Zephir Parser CI
on:
- schedule:
- - cron: '0 2 * * *' # Daily at 02:00 runs only on default branch
+# schedule:
+# - cron: '0 2 * * *' # Daily at 02:00 runs only on default branch
push:
paths-ignore:
- '**.md'
- '**.txt'
- pull_request:
env:
RE2C_VERSION: 2.2
@@ -28,7 +27,7 @@ jobs:
strategy:
fail-fast: false
matrix:
- php: [ '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4' ]
+ php: [ '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5' ]
ts: [ 'ts', 'nts' ]
arch: [ 'x64' ]
@@ -42,28 +41,32 @@ jobs:
# Linux
- { name: ubuntu-gcc, os: ubuntu-latest, compiler: gcc, ccov: 'ON' }
# macOS
- - { name: macos-clang, os: macos-12, compiler: clang, ccov: 'OFF' }
+ - { name: macos-clang, os: macos-14, compiler: clang, ccov: 'OFF' }
# Windows
- - { php: '7.0', ts: 'nts', arch: 'x64', name: 'windows2019-vc14', os: 'windows-2019', compiler: 'vc14', ccov: 'OFF' }
- - { php: '7.0', ts: 'ts', arch: 'x64', name: 'windows2019-vc14', os: 'windows-2019', compiler: 'vc14', ccov: 'OFF' }
- - { php: '7.1', ts: 'nts', arch: 'x64', name: 'windows2019-vc14', os: 'windows-2019', compiler: 'vc14', ccov: 'OFF' }
- - { php: '7.1', ts: 'ts', arch: 'x64', name: 'windows2019-vc14', os: 'windows-2019', compiler: 'vc14', ccov: 'OFF' }
- - { php: '7.2', ts: 'nts', arch: 'x64', name: 'windows2019-vc15', os: 'windows-2019', compiler: 'vc15', ccov: 'OFF' }
- - { php: '7.2', ts: 'ts', arch: 'x64', name: 'windows2019-vc15', os: 'windows-2019', compiler: 'vc15', ccov: 'OFF' }
- - { php: '7.3', ts: 'nts', arch: 'x64', name: 'windows2019-vc15', os: 'windows-2019', compiler: 'vc15', ccov: 'OFF' }
- - { php: '7.3', ts: 'ts', arch: 'x64', name: 'windows2019-vc15', os: 'windows-2019', compiler: 'vc15', ccov: 'OFF' }
- - { php: '7.4', ts: 'nts', arch: 'x64', name: 'windows2019-vc15', os: 'windows-2019', compiler: 'vc15', ccov: 'OFF' }
- - { php: '7.4', ts: 'ts', arch: 'x64', name: 'windows2019-vc15', os: 'windows-2019', compiler: 'vc15', ccov: 'OFF' }
- - { php: '8.0', ts: 'nts', arch: 'x64', name: 'windows2019-vs16', os: 'windows-2019', compiler: 'vs16', ccov: 'OFF' }
- - { php: '8.0', ts: 'ts', arch: 'x64', name: 'windows2019-vs16', os: 'windows-2019', compiler: 'vs16', ccov: 'OFF' }
- - { php: '8.1', ts: 'nts', arch: 'x64', name: 'windows2019-vs16', os: 'windows-2019', compiler: 'vs16', ccov: 'OFF' }
- - { php: '8.1', ts: 'ts', arch: 'x64', name: 'windows2019-vs16', os: 'windows-2019', compiler: 'vs16', ccov: 'OFF' }
- - { php: '8.2', ts: 'nts', arch: 'x64', name: 'windows2019-vs16', os: 'windows-2019', compiler: 'vs16', ccov: 'OFF' }
- - { php: '8.2', ts: 'ts', arch: 'x64', name: 'windows2019-vs16', os: 'windows-2019', compiler: 'vs16', ccov: 'OFF' }
- - { php: '8.3', ts: 'nts', arch: 'x64', name: 'windows2019-vs16', os: 'windows-2019', compiler: 'vs16', ccov: 'OFF' }
- - { php: '8.3', ts: 'ts', arch: 'x64', name: 'windows2019-vs16', os: 'windows-2019', compiler: 'vs16', ccov: 'OFF' }
- #- { php: '8.4', ts: 'nts', arch: 'x64', name: 'windows2019-vs16', os: 'windows-2019', compiler: 'vs16', ccov: 'OFF' }
- #- { php: '8.4', ts: 'ts', arch: 'x64', name: 'windows2019-vs16', os: 'windows-2019', compiler: 'vs16', ccov: 'OFF' }
+ - { php: '7.0', ts: 'nts', arch: 'x64', name: 'windows2022-vc14', os: 'windows-2022', compiler: 'VC14', toolset: '', ccov: 'OFF' }
+ - { php: '7.0', ts: 'ts', arch: 'x64', name: 'windows2022-vc14', os: 'windows-2022', compiler: 'VC14', toolset: '', ccov: 'OFF' }
+ - { php: '7.1', ts: 'nts', arch: 'x64', name: 'windows2022-vc14', os: 'windows-2022', compiler: 'VC14', toolset: '', ccov: 'OFF' }
+ - { php: '7.1', ts: 'ts', arch: 'x64', name: 'windows2022-vc14', os: 'windows-2022', compiler: 'VC14', toolset: '', ccov: 'OFF' }
+ - { php: '7.2', ts: 'nts', arch: 'x64', name: 'windows2022-vc15', os: 'windows-2022', compiler: 'VC15', toolset: '', ccov: 'OFF' }
+ - { php: '7.2', ts: 'ts', arch: 'x64', name: 'windows2022-vc15', os: 'windows-2022', compiler: 'VC15', toolset: '', ccov: 'OFF' }
+ - { php: '7.3', ts: 'nts', arch: 'x64', name: 'windows2022-vc15', os: 'windows-2022', compiler: 'VC15', toolset: '', ccov: 'OFF' }
+ - { php: '7.3', ts: 'ts', arch: 'x64', name: 'windows2022-vc15', os: 'windows-2022', compiler: 'VC15', toolset: '', ccov: 'OFF' }
+
+ # MSVC toolsets 14.0 and 14.16 can no longer be installed on Windows runners
+ # See https://github.com/actions/runner-images/issues/12764
+ #- { php: '7.4', ts: 'nts', arch: 'x64', name: 'windows2022-vc15', os: 'windows-2022', compiler: 'VC15', toolset: '14.16', ccov: 'OFF' }
+ #- { php: '7.4', ts: 'ts', arch: 'x64', name: 'windows2022-vc15', os: 'windows-2022', compiler: 'VC15', toolset: '14.16', ccov: 'OFF' }
+
+ - { php: '8.0', ts: 'nts', arch: 'x64', name: 'windows2022-vc16', os: 'windows-2022', compiler: 'vs16', toolset: '14.29', ccov: 'OFF' }
+ - { php: '8.0', ts: 'ts', arch: 'x64', name: 'windows2022-vc16', os: 'windows-2022', compiler: 'vs16', toolset: '14.29', ccov: 'OFF' }
+ - { php: '8.1', ts: 'nts', arch: 'x64', name: 'windows2022-vc16', os: 'windows-2022', compiler: 'vs16', toolset: '14.29', ccov: 'OFF' }
+ - { php: '8.1', ts: 'ts', arch: 'x64', name: 'windows2022-vc16', os: 'windows-2022', compiler: 'vs16', toolset: '14.29', ccov: 'OFF' }
+ - { php: '8.2', ts: 'nts', arch: 'x64', name: 'windows2022-vc16', os: 'windows-2022', compiler: 'vs16', toolset: '14.29', ccov: 'OFF' }
+ - { php: '8.2', ts: 'ts', arch: 'x64', name: 'windows2022-vc16', os: 'windows-2022', compiler: 'vs16', toolset: '14.29', ccov: 'OFF' }
+ - { php: '8.3', ts: 'nts', arch: 'x64', name: 'windows2022-vc16', os: 'windows-2022', compiler: 'vs16', toolset: '14.29', ccov: 'OFF' }
+ - { php: '8.3', ts: 'ts', arch: 'x64', name: 'windows2022-vc16', os: 'windows-2022', compiler: 'vs16', toolset: '14.29', ccov: 'OFF' }
+ - { php: '8.4', ts: 'nts', arch: 'x64', name: 'windows2022-vc17', os: 'windows-2022', compiler: 'vs17', toolset: '14.44', ccov: 'OFF' }
+ - { php: '8.4', ts: 'ts', arch: 'x64', name: 'windows2022-vc17', os: 'windows-2022', compiler: 'vs17', toolset: '14.44', ccov: 'OFF' }
steps:
- uses: actions/checkout@v4
@@ -109,6 +112,7 @@ jobs:
ts: ${{ matrix.ts }}
msvc: ${{ matrix.compiler }}
arch: ${{ matrix.arch }}
+ toolset: ${{ matrix.toolset }}
env:
CACHE_DIR: 'C:\Downloads'
TOOLS_DIR: 'C:\tools'
@@ -195,7 +199,7 @@ jobs:
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
- php-version: '8.4'
+ php-version: '8.5'
tools: pecl
- name: Install System Dependencies
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a9957605..666e67dd 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
## [Unreleased] - xxxx-xx-xx
+## [1.8.0] - 2025-09-24
+### Added
+- Enabled PHP 8.5 support [#160](https://github.com/phalcon/php-zephir-parser/issues/160)
+
## [1.7.0] - 2024-11-23
### Added
- Enabled PHP 8.4 support [#154](https://github.com/phalcon/php-zephir-parser/issues/154)
diff --git a/package.xml b/package.xml
index 84f29659..3a83c311 100644
--- a/package.xml
+++ b/package.xml
@@ -12,11 +12,11 @@
anton@phalcon.io
yes
- 2024-11-23
+ 2025-09-24
- 1.7.0
- 1.7.0
+ 1.8.0
+ 1.8.0
stable
@@ -24,11 +24,11 @@
MIT
- Sat, Nov 23, 2024 - Zephir Parser 1.7.0
+ Wed, Sep 24, 2025 - Zephir Parser 1.8.0
= Added:
- - Enabled support for PHP 8.4
+ - Enabled support for PHP 8.5
@@ -215,7 +215,7 @@
7.0.0
- 8.4.99
+ 8.5.99
1.10
diff --git a/parser/lemon.c b/parser/lemon.c
index 7562bde9..5d416df4 100644
--- a/parser/lemon.c
+++ b/parser/lemon.c
@@ -41,7 +41,6 @@ extern int access(const char *path, int mode);
#endif
char *msort();
-extern void *malloc();
/******** From the file "action.h" *************************************/
struct action *Action_new();
@@ -305,7 +304,7 @@ struct symbol *Symbol_new();
int Symbolcmpp(/* struct symbol **, struct symbol ** */);
void Symbol_init(/* void */);
int Symbol_insert(/* struct symbol *, char * */);
-struct symbol *Symbol_find(/* char * */);
+struct symbol *Symbol_find(char *key); /* modern prototype to satisfy C2x */
struct symbol *Symbol_Nth(/* int */);
int Symbol_count(/* */);
struct symbol **Symbol_arrayof(/* */);
@@ -3620,7 +3619,7 @@ int mhflag; /* Output in makeheaders format if true */
}
tplt_xfer(lemp->name,in,out,&lineno);
- /* Generate code which executes every time a symbol is popped from
+ /* Generate code which executes when a symbol is popped from
** the stack while processing errors or while destroying the parser.
** (In other words, generate the %destructor actions)
*/
@@ -3729,7 +3728,7 @@ void ReportHeader(lemp)
struct lemon *lemp;
{
FILE *out, *in;
- char *prefix;
+ char *prefix;
char line[LINESIZE];
char pattern[LINESIZE];
int i;
@@ -4181,8 +4180,7 @@ char *key;
/* Return a pointer to data assigned to the given key. Return NULL
** if no such key. */
-struct symbol *Symbol_find(key)
-char *key;
+struct symbol *Symbol_find(char *key)
{
int h;
x2node *np;
diff --git a/tests/base/extension_info.phpt b/tests/base/extension_info.phpt
index e74f66a2..8254c68c 100644
--- a/tests/base/extension_info.phpt
+++ b/tests/base/extension_info.phpt
@@ -21,7 +21,7 @@ ob_start();
phpinfo(INFO_MODULES);
$info = trim(ob_get_clean());
-echo contains($info, 'Zephir Parser').PHP_EOL;
+//echo contains($info, 'zephir_parser').PHP_EOL;
echo contains($info, 'The Zephir Parser delivered as a C extension for the PHP language.').PHP_EOL;
echo contains($info, 'zephir_parser => enabled').PHP_EOL;
echo contains($info, 'Author => Zephir Team and contributors').PHP_EOL;
@@ -30,7 +30,6 @@ echo contains($info, 'Build Date =>').PHP_EOL;
?>
--EXPECT--
bool(true)
-Zephir Parser
The Zephir Parser delivered as a C extension for the PHP language.
zephir_parser => enabled
Author => Zephir Team and contributors