Skip to content

Commit e8dec41

Browse files
authored
Merge pull request #165 from zephir-lang/development
1.8.0
2 parents 7da0962 + 7b143eb commit e8dec41

File tree

9 files changed

+67
-135
lines changed

9 files changed

+67
-135
lines changed

.github/actions/build-mac/action.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,12 @@ runs:
3737
- name: Enable Zephir Parser
3838
shell: bash
3939
run: |
40+
php --ini
4041
cp ./modules/zephir_parser.so "$(php -r 'echo ini_get("extension_dir");')/zephir_parser.so"
4142
if [ "${{ matrix.ts }}" = "ts" ]; then
42-
echo "extension=zephir_parser.so" > /usr/local/etc/php/${{ matrix.php }}-zts/conf.d/ext-zephir_parser.ini
43+
mkdir -p /opt/homebrew/etc/php/${{ matrix.php }}-zts/conf.d
44+
echo "extension=zephir_parser.so" > /opt/homebrew/etc/php/${{ matrix.php }}-zts/conf.d/ext-zephir_parser.ini
4345
else
44-
echo "extension=zephir_parser.so" > /usr/local/etc/php/${{ matrix.php }}/conf.d/ext-zephir_parser.ini
46+
mkdir -p /opt/homebrew/etc/php/${{ matrix.php }}/conf.d
47+
echo "extension=zephir_parser.so" > /opt/homebrew/etc/php/${{ matrix.php }}/conf.d/ext-zephir_parser.ini
4548
fi

.github/actions/build-win/action.yml

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ inputs:
1616
description: 'Target architecture (x64, x86)'
1717
required: false
1818
default: 'x64'
19+
toolset:
20+
description: 'MSVC toolset version (e.g: 14.0, 15.0, 16.0)'
21+
required: false
22+
default: '' # Use default toolset version for the selected msvc
1923

2024
runs:
2125
using: 'composite'
@@ -53,19 +57,10 @@ runs:
5357
cache_dir: ${{ env.CACHE_DIR }}
5458

5559
- name: Configure Developer Command Prompt for MSVC compiler
56-
uses: ilammy/[email protected]
57-
with:
58-
arch: ${{ inputs.arch }}
59-
60-
# Workaround for
61-
# PHP Warning: PHP Startup: Can't load module 'C:\tools\php\ext\php_zephir_parser.dll'
62-
# as it's linked with 14.29, but the core is linked with 14.16 in Unknown on line 0
63-
- name: Configure Developer Command Prompt for MSVC compiler
64-
uses: ilammy/[email protected]
65-
if: ${{ inputs.php_version }} == '7.4'
60+
uses: ilammy/[email protected]
6661
with:
6762
arch: ${{ inputs.arch }}
68-
toolset: 14.16
63+
toolset: ${{ inputs.toolset }}
6964

7065
- name: Getting Details About Installed PHP
7166
shell: powershell

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "daily"

.github/workflows/ci.yml

Lines changed: 35 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,12 @@
88
name: Zephir Parser CI
99

1010
on:
11-
schedule:
12-
- cron: '0 2 * * *' # Daily at 02:00 runs only on default branch
11+
# schedule:
12+
# - cron: '0 2 * * *' # Daily at 02:00 runs only on default branch
1313
push:
1414
paths-ignore:
1515
- '**.md'
1616
- '**.txt'
17-
pull_request:
1817

1918
env:
2019
RE2C_VERSION: 2.2
@@ -28,7 +27,7 @@ jobs:
2827
strategy:
2928
fail-fast: false
3029
matrix:
31-
php: [ '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4' ]
30+
php: [ '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5' ]
3231
ts: [ 'ts', 'nts' ]
3332
arch: [ 'x64' ]
3433

@@ -42,31 +41,35 @@ jobs:
4241
# Linux
4342
- { name: ubuntu-gcc, os: ubuntu-latest, compiler: gcc, ccov: 'ON' }
4443
# macOS
45-
- { name: macos-clang, os: macos-12, compiler: clang, ccov: 'OFF' }
44+
- { name: macos-clang, os: macos-14, compiler: clang, ccov: 'OFF' }
4645
# Windows
47-
- { php: '7.0', ts: 'nts', arch: 'x64', name: 'windows2019-vc14', os: 'windows-2019', compiler: 'vc14', ccov: 'OFF' }
48-
- { php: '7.0', ts: 'ts', arch: 'x64', name: 'windows2019-vc14', os: 'windows-2019', compiler: 'vc14', ccov: 'OFF' }
49-
- { php: '7.1', ts: 'nts', arch: 'x64', name: 'windows2019-vc14', os: 'windows-2019', compiler: 'vc14', ccov: 'OFF' }
50-
- { php: '7.1', ts: 'ts', arch: 'x64', name: 'windows2019-vc14', os: 'windows-2019', compiler: 'vc14', ccov: 'OFF' }
51-
- { php: '7.2', ts: 'nts', arch: 'x64', name: 'windows2019-vc15', os: 'windows-2019', compiler: 'vc15', ccov: 'OFF' }
52-
- { php: '7.2', ts: 'ts', arch: 'x64', name: 'windows2019-vc15', os: 'windows-2019', compiler: 'vc15', ccov: 'OFF' }
53-
- { php: '7.3', ts: 'nts', arch: 'x64', name: 'windows2019-vc15', os: 'windows-2019', compiler: 'vc15', ccov: 'OFF' }
54-
- { php: '7.3', ts: 'ts', arch: 'x64', name: 'windows2019-vc15', os: 'windows-2019', compiler: 'vc15', ccov: 'OFF' }
55-
- { php: '7.4', ts: 'nts', arch: 'x64', name: 'windows2019-vc15', os: 'windows-2019', compiler: 'vc15', ccov: 'OFF' }
56-
- { php: '7.4', ts: 'ts', arch: 'x64', name: 'windows2019-vc15', os: 'windows-2019', compiler: 'vc15', ccov: 'OFF' }
57-
- { php: '8.0', ts: 'nts', arch: 'x64', name: 'windows2019-vs16', os: 'windows-2019', compiler: 'vs16', ccov: 'OFF' }
58-
- { php: '8.0', ts: 'ts', arch: 'x64', name: 'windows2019-vs16', os: 'windows-2019', compiler: 'vs16', ccov: 'OFF' }
59-
- { php: '8.1', ts: 'nts', arch: 'x64', name: 'windows2019-vs16', os: 'windows-2019', compiler: 'vs16', ccov: 'OFF' }
60-
- { php: '8.1', ts: 'ts', arch: 'x64', name: 'windows2019-vs16', os: 'windows-2019', compiler: 'vs16', ccov: 'OFF' }
61-
- { php: '8.2', ts: 'nts', arch: 'x64', name: 'windows2019-vs16', os: 'windows-2019', compiler: 'vs16', ccov: 'OFF' }
62-
- { php: '8.2', ts: 'ts', arch: 'x64', name: 'windows2019-vs16', os: 'windows-2019', compiler: 'vs16', ccov: 'OFF' }
63-
- { php: '8.3', ts: 'nts', arch: 'x64', name: 'windows2019-vs16', os: 'windows-2019', compiler: 'vs16', ccov: 'OFF' }
64-
- { php: '8.3', ts: 'ts', arch: 'x64', name: 'windows2019-vs16', os: 'windows-2019', compiler: 'vs16', ccov: 'OFF' }
65-
#- { php: '8.4', ts: 'nts', arch: 'x64', name: 'windows2019-vs16', os: 'windows-2019', compiler: 'vs16', ccov: 'OFF' }
66-
#- { php: '8.4', ts: 'ts', arch: 'x64', name: 'windows2019-vs16', os: 'windows-2019', compiler: 'vs16', ccov: 'OFF' }
46+
- { php: '7.0', ts: 'nts', arch: 'x64', name: 'windows2022-vc14', os: 'windows-2022', compiler: 'VC14', toolset: '', ccov: 'OFF' }
47+
- { php: '7.0', ts: 'ts', arch: 'x64', name: 'windows2022-vc14', os: 'windows-2022', compiler: 'VC14', toolset: '', ccov: 'OFF' }
48+
- { php: '7.1', ts: 'nts', arch: 'x64', name: 'windows2022-vc14', os: 'windows-2022', compiler: 'VC14', toolset: '', ccov: 'OFF' }
49+
- { php: '7.1', ts: 'ts', arch: 'x64', name: 'windows2022-vc14', os: 'windows-2022', compiler: 'VC14', toolset: '', ccov: 'OFF' }
50+
- { php: '7.2', ts: 'nts', arch: 'x64', name: 'windows2022-vc15', os: 'windows-2022', compiler: 'VC15', toolset: '', ccov: 'OFF' }
51+
- { php: '7.2', ts: 'ts', arch: 'x64', name: 'windows2022-vc15', os: 'windows-2022', compiler: 'VC15', toolset: '', ccov: 'OFF' }
52+
- { php: '7.3', ts: 'nts', arch: 'x64', name: 'windows2022-vc15', os: 'windows-2022', compiler: 'VC15', toolset: '', ccov: 'OFF' }
53+
- { php: '7.3', ts: 'ts', arch: 'x64', name: 'windows2022-vc15', os: 'windows-2022', compiler: 'VC15', toolset: '', ccov: 'OFF' }
54+
55+
# MSVC toolsets 14.0 and 14.16 can no longer be installed on Windows runners
56+
# See https://github.com/actions/runner-images/issues/12764
57+
#- { php: '7.4', ts: 'nts', arch: 'x64', name: 'windows2022-vc15', os: 'windows-2022', compiler: 'VC15', toolset: '14.16', ccov: 'OFF' }
58+
#- { php: '7.4', ts: 'ts', arch: 'x64', name: 'windows2022-vc15', os: 'windows-2022', compiler: 'VC15', toolset: '14.16', ccov: 'OFF' }
59+
60+
- { php: '8.0', ts: 'nts', arch: 'x64', name: 'windows2022-vc16', os: 'windows-2022', compiler: 'vs16', toolset: '14.29', ccov: 'OFF' }
61+
- { php: '8.0', ts: 'ts', arch: 'x64', name: 'windows2022-vc16', os: 'windows-2022', compiler: 'vs16', toolset: '14.29', ccov: 'OFF' }
62+
- { php: '8.1', ts: 'nts', arch: 'x64', name: 'windows2022-vc16', os: 'windows-2022', compiler: 'vs16', toolset: '14.29', ccov: 'OFF' }
63+
- { php: '8.1', ts: 'ts', arch: 'x64', name: 'windows2022-vc16', os: 'windows-2022', compiler: 'vs16', toolset: '14.29', ccov: 'OFF' }
64+
- { php: '8.2', ts: 'nts', arch: 'x64', name: 'windows2022-vc16', os: 'windows-2022', compiler: 'vs16', toolset: '14.29', ccov: 'OFF' }
65+
- { php: '8.2', ts: 'ts', arch: 'x64', name: 'windows2022-vc16', os: 'windows-2022', compiler: 'vs16', toolset: '14.29', ccov: 'OFF' }
66+
- { php: '8.3', ts: 'nts', arch: 'x64', name: 'windows2022-vc16', os: 'windows-2022', compiler: 'vs16', toolset: '14.29', ccov: 'OFF' }
67+
- { php: '8.3', ts: 'ts', arch: 'x64', name: 'windows2022-vc16', os: 'windows-2022', compiler: 'vs16', toolset: '14.29', ccov: 'OFF' }
68+
- { php: '8.4', ts: 'nts', arch: 'x64', name: 'windows2022-vc17', os: 'windows-2022', compiler: 'vs17', toolset: '14.44', ccov: 'OFF' }
69+
- { php: '8.4', ts: 'ts', arch: 'x64', name: 'windows2022-vc17', os: 'windows-2022', compiler: 'vs17', toolset: '14.44', ccov: 'OFF' }
6770

6871
steps:
69-
- uses: actions/checkout@v4
72+
- uses: actions/checkout@v5
7073

7174
- name: Install PHP ${{ matrix.php }}
7275
uses: shivammathur/setup-php@v2
@@ -109,6 +112,7 @@ jobs:
109112
ts: ${{ matrix.ts }}
110113
msvc: ${{ matrix.compiler }}
111114
arch: ${{ matrix.arch }}
115+
toolset: ${{ matrix.toolset }}
112116
env:
113117
CACHE_DIR: 'C:\Downloads'
114118
TOOLS_DIR: 'C:\tools'
@@ -167,7 +171,7 @@ jobs:
167171

168172
- name: Upload Code Coverage Report
169173
if: matrix.ccov == 'ON'
170-
uses: codecov/codecov-action@v4
174+
uses: codecov/codecov-action@v5
171175
with:
172176
token: ${{ secrets.CODECOV_TOKEN }}
173177
files: ./lcov.info
@@ -190,12 +194,12 @@ jobs:
190194
runs-on: ubuntu-latest
191195

192196
steps:
193-
- uses: actions/checkout@v4
197+
- uses: actions/checkout@v5
194198

195199
- name: Install PHP
196200
uses: shivammathur/setup-php@v2
197201
with:
198-
php-version: '8.4'
202+
php-version: '8.5'
199203
tools: pecl
200204

201205
- name: Install System Dependencies
@@ -260,7 +264,7 @@ jobs:
260264

261265
steps:
262266
- name: Checkout Code
263-
uses: actions/checkout@v4
267+
uses: actions/checkout@v5
264268
with:
265269
fetch-depth: 1
266270

@@ -271,7 +275,7 @@ jobs:
271275
272276
- name: Download Zephir Parser build artifacts
273277
id: download
274-
uses: actions/download-artifact@v4
278+
uses: actions/download-artifact@v5
275279
with:
276280
path: ./build-artifacts
277281

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
66

77
## [Unreleased] - xxxx-xx-xx
88

9+
## [1.8.0] - 2025-09-24
10+
### Added
11+
- Enabled PHP 8.5 support [#160](https://github.com/phalcon/php-zephir-parser/issues/160)
12+
913
## [1.7.0] - 2024-11-23
1014
### Added
1115
- Enabled PHP 8.4 support [#154](https://github.com/phalcon/php-zephir-parser/issues/154)

docker/windows/Dockerfile

Lines changed: 0 additions & 77 deletions
This file was deleted.

package.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,23 @@
1212
<email>[email protected]</email>
1313
<active>yes</active>
1414
</lead>
15-
<date>2024-11-23</date>
15+
<date>2025-09-24</date>
1616
<time>10:00:00</time>
1717
<version>
18-
<release>1.7.0</release>
19-
<api>1.7.0</api>
18+
<release>1.8.0</release>
19+
<api>1.8.0</api>
2020
</version>
2121
<stability>
2222
<release>stable</release>
2323
<api>stable</api>
2424
</stability>
2525
<license uri="https://github.com/zephir-lang/php-zephir-parser/blob/development/LICENSE">MIT</license>
2626
<notes>
27-
Sat, Nov 23, 2024 - Zephir Parser 1.7.0
27+
Wed, Sep 24, 2025 - Zephir Parser 1.8.0
2828

2929
= Added:
3030

31-
- Enabled support for PHP 8.4
31+
- Enabled support for PHP 8.5
3232
</notes>
3333
<contents>
3434
<dir name="/">
@@ -215,7 +215,7 @@
215215
<required>
216216
<php>
217217
<min>7.0.0</min>
218-
<max>8.4.99</max>
218+
<max>8.5.99</max>
219219
</php>
220220
<pearinstaller>
221221
<min>1.10</min>

parser/lemon.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ extern int access(const char *path, int mode);
4141
#endif
4242

4343
char *msort();
44-
extern void *malloc();
4544

4645
/******** From the file "action.h" *************************************/
4746
struct action *Action_new();
@@ -305,7 +304,7 @@ struct symbol *Symbol_new();
305304
int Symbolcmpp(/* struct symbol **, struct symbol ** */);
306305
void Symbol_init(/* void */);
307306
int Symbol_insert(/* struct symbol *, char * */);
308-
struct symbol *Symbol_find(/* char * */);
307+
struct symbol *Symbol_find(char *key); /* modern prototype to satisfy C2x */
309308
struct symbol *Symbol_Nth(/* int */);
310309
int Symbol_count(/* */);
311310
struct symbol **Symbol_arrayof(/* */);
@@ -3620,7 +3619,7 @@ int mhflag; /* Output in makeheaders format if true */
36203619
}
36213620
tplt_xfer(lemp->name,in,out,&lineno);
36223621

3623-
/* Generate code which executes every time a symbol is popped from
3622+
/* Generate code which executes when a symbol is popped from
36243623
** the stack while processing errors or while destroying the parser.
36253624
** (In other words, generate the %destructor actions)
36263625
*/
@@ -3729,7 +3728,7 @@ void ReportHeader(lemp)
37293728
struct lemon *lemp;
37303729
{
37313730
FILE *out, *in;
3732-
char *prefix;
3731+
char *prefix;
37333732
char line[LINESIZE];
37343733
char pattern[LINESIZE];
37353734
int i;
@@ -4181,8 +4180,7 @@ char *key;
41814180

41824181
/* Return a pointer to data assigned to the given key. Return NULL
41834182
** if no such key. */
4184-
struct symbol *Symbol_find(key)
4185-
char *key;
4183+
struct symbol *Symbol_find(char *key)
41864184
{
41874185
int h;
41884186
x2node *np;

tests/base/extension_info.phpt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ ob_start();
2121
phpinfo(INFO_MODULES);
2222
$info = trim(ob_get_clean());
2323

24-
echo contains($info, 'Zephir Parser').PHP_EOL;
24+
//echo contains($info, 'zephir_parser').PHP_EOL;
2525
echo contains($info, 'The Zephir Parser delivered as a C extension for the PHP language.').PHP_EOL;
2626
echo contains($info, 'zephir_parser => enabled').PHP_EOL;
2727
echo contains($info, 'Author => Zephir Team and contributors').PHP_EOL;
@@ -30,7 +30,6 @@ echo contains($info, 'Build Date =>').PHP_EOL;
3030
?>
3131
--EXPECT--
3232
bool(true)
33-
Zephir Parser
3433
The Zephir Parser delivered as a C extension for the PHP language.
3534
zephir_parser => enabled
3635
Author => Zephir Team and contributors

0 commit comments

Comments
 (0)