Skip to content
Merged

1.8.0 #165

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
ace8437
Delete docker directory
Jeckerson Jun 19, 2025
2c04402
Merge pull request #159 from zephir-lang/158-docker-didnt-works
Jeckerson Jun 19, 2025
40fcbf4
#160 - Enable PHP8.5 support
Jeckerson Sep 24, 2025
4a3c7d0
Add dependabot.yml
Jeckerson Sep 24, 2025
d601372
Merge branch 'development' into #160-php8.5
Jeckerson Sep 24, 2025
b56d4c5
Disable 'schedule' trigger
Jeckerson Sep 24, 2025
9ffc34b
Bump actions/download-artifact from 4 to 5
dependabot[bot] Sep 24, 2025
55bab1c
Bump actions/checkout from 4 to 5
dependabot[bot] Sep 24, 2025
fa2b530
Bump codecov/codecov-action from 4 to 5
dependabot[bot] Sep 24, 2025
2047f5f
Merge pull request #164 from zephir-lang/dependabot/github_actions/co…
Jeckerson Sep 24, 2025
54a218f
#160 - Update macOS version in CI configuration to 13
Jeckerson Sep 24, 2025
5c69afc
Merge pull request #163 from zephir-lang/dependabot/github_actions/ac…
Jeckerson Sep 24, 2025
907a22d
Merge pull request #162 from zephir-lang/dependabot/github_actions/ac…
Jeckerson Sep 24, 2025
9430f4f
#160 - Update macOS version in CI configuration to 14
Jeckerson Sep 25, 2025
f471c53
#160 - Adjust test case
Jeckerson Sep 25, 2025
09a13fc
#160 - Adjust test case
Jeckerson Sep 25, 2025
66cd9c1
#160 - Adjust test case
Jeckerson Sep 25, 2025
f0f85c4
#160 - Adjust test case
Jeckerson Sep 25, 2025
d3386b8
#160 - Adjust path in test
Jeckerson Sep 25, 2025
d71ce1f
#160 - Revert version
Jeckerson Sep 25, 2025
d08128c
#160 - Revert version path
Jeckerson Sep 25, 2025
427edfa
#160 - Replace `windows-2019` to `windows-2022` image
Jeckerson Sep 27, 2025
207c810
#160 - Fix warning
Jeckerson Sep 27, 2025
99a28f9
#160 - Add debug command
Jeckerson Sep 27, 2025
a6185f6
#160 - Change PHP path in MacOS (homebrew)
Jeckerson Sep 27, 2025
c3e72d0
#160 - Remove pull_request trigger from CI configuration
Jeckerson Sep 27, 2025
d2032c9
#160 - Review Windows server Visual studio versions
Jeckerson Sep 27, 2025
2fad272
#160 - Review Windows server Visual studio versions
Jeckerson Sep 27, 2025
894b681
#160 - Update MSVC compiler configuration to use version 1.13.0
Jeckerson Sep 27, 2025
41a920d
#160 - Add MSVC toolset version input to action.yml and update CI con…
Jeckerson Sep 27, 2025
0552348
#160 - Add configuration files for PHP project and update action.yml
Jeckerson Sep 27, 2025
7978647
#160 - Add toolset parameter to CI configuration
Jeckerson Sep 27, 2025
a60bf82
#160 - Remove toolset version from Windows CI configuration for PHP v…
Jeckerson Sep 27, 2025
5f693eb
#160 - Update toolset versions for PHP 7.4 and 8.0 in CI configuration
Jeckerson Sep 27, 2025
aafae87
#160 - Add debug output
Jeckerson Sep 27, 2025
3af9f92
#160 - Set default `toolset` for PHP 7.4
Jeckerson Sep 27, 2025
4aa4f74
#160 - Add mkdir for `conf.d` folder if it misses
Jeckerson Sep 27, 2025
2a707b4
#160 - Set default `toolset` and change `compiler` for PHP 7.4
Jeckerson Sep 27, 2025
b5727bf
#160 - Set default `toolset` and change `compiler` for PHP 7.4
Jeckerson Sep 27, 2025
33e1f31
#160 - Update compiler to 'vc15' for PHP 7.4 in CI configuration
Jeckerson Sep 27, 2025
582a68f
#160 - Set default `toolset` and change `compiler` for PHP 7.4
Jeckerson Sep 27, 2025
16820ae
#160 - Set `toolset` `14.29` for PHP7.4
Jeckerson Sep 27, 2025
37fb8f5
#160 - Set `toolset` `14.16` for PHP7.4
Jeckerson Sep 27, 2025
901a60d
#160 - Disable PHP7.4 in Windows
Jeckerson Sep 27, 2025
7b143eb
Merge pull request #161 from zephir-lang/#160-php8.5
Jeckerson Sep 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/actions/build-mac/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
17 changes: 6 additions & 11 deletions .github/actions/build-win/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
66 changes: 35 additions & 31 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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' ]

Expand All @@ -42,31 +41,35 @@ 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
- uses: actions/checkout@v5

- name: Install PHP ${{ matrix.php }}
uses: shivammathur/setup-php@v2
Expand Down Expand Up @@ -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'
Expand Down Expand Up @@ -167,7 +171,7 @@ jobs:

- name: Upload Code Coverage Report
if: matrix.ccov == 'ON'
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./lcov.info
Expand All @@ -190,12 +194,12 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5

- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.4'
php-version: '8.5'
tools: pecl

- name: Install System Dependencies
Expand Down Expand Up @@ -260,7 +264,7 @@ jobs:

steps:
- name: Checkout Code
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
fetch-depth: 1

Expand All @@ -271,7 +275,7 @@ jobs:

- name: Download Zephir Parser build artifacts
id: download
uses: actions/download-artifact@v4
uses: actions/download-artifact@v5
with:
path: ./build-artifacts

Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
77 changes: 0 additions & 77 deletions docker/windows/Dockerfile

This file was deleted.

12 changes: 6 additions & 6 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,23 @@
<email>anton@phalcon.io</email>
<active>yes</active>
</lead>
<date>2024-11-23</date>
<date>2025-09-24</date>
<time>10:00:00</time>
<version>
<release>1.7.0</release>
<api>1.7.0</api>
<release>1.8.0</release>
<api>1.8.0</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<license uri="https://github.com/zephir-lang/php-zephir-parser/blob/development/LICENSE">MIT</license>
<notes>
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
</notes>
<contents>
<dir name="/">
Expand Down Expand Up @@ -215,7 +215,7 @@
<required>
<php>
<min>7.0.0</min>
<max>8.4.99</max>
<max>8.5.99</max>
</php>
<pearinstaller>
<min>1.10</min>
Expand Down
10 changes: 4 additions & 6 deletions parser/lemon.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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(/* */);
Expand Down Expand Up @@ -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)
*/
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
3 changes: 1 addition & 2 deletions tests/base/extension_info.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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
Expand Down