Skip to content

Commit 1c4d380

Browse files
authored
Merge pull request #2437 from zephir-lang/development
0.18.0
2 parents 9f99da6 + b50a053 commit 1c4d380

File tree

953 files changed

+148320
-49423
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

953 files changed

+148320
-49423
lines changed

Diff for: .ci/memcheck.sh

-43
This file was deleted.

Diff for: docker/7.4/.bashrc renamed to .docker/8.0/.bashrc

File renamed without changes.

Diff for: docker/8.0/Dockerfile renamed to .docker/8.0/Dockerfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM composer:latest as composer
1+
FROM composer:latest AS composer
22
FROM php:8.0-fpm
33

44
RUN CPU_CORES="$(getconf _NPROCESSORS_ONLN)";
@@ -13,10 +13,10 @@ RUN apt update -y && apt install -y \
1313
libicu-dev \
1414
libgmp-dev \
1515
libzip-dev && \
16-
pecl install psr zephir_parser
16+
pecl install psr xdebug zephir_parser
1717

1818
RUN docker-php-ext-install zip gmp intl mysqli && \
19-
docker-php-ext-enable psr zephir_parser
19+
docker-php-ext-enable psr zephir_parser xdebug
2020

2121
COPY --from=composer /usr/bin/composer /usr/local/bin/composer
2222
# Bash script with helper aliases

Diff for: docker/8.0/.bashrc renamed to .docker/8.1/.bashrc

File renamed without changes.

Diff for: docker/8.1/Dockerfile renamed to .docker/8.1/Dockerfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM composer:latest as composer
1+
FROM composer:latest AS composer
22
FROM php:8.1-fpm
33

44
RUN CPU_CORES="$(getconf _NPROCESSORS_ONLN)";
@@ -13,10 +13,10 @@ RUN apt update -y && apt install -y \
1313
libicu-dev \
1414
libgmp-dev \
1515
libzip-dev && \
16-
pecl install psr zephir_parser
16+
pecl install psr xdebug zephir_parser
1717

1818
RUN docker-php-ext-install zip gmp intl mysqli && \
19-
docker-php-ext-enable psr zephir_parser
19+
docker-php-ext-enable psr zephir_parser xdebug
2020

2121
COPY --from=composer /usr/bin/composer /usr/local/bin/composer
2222
# Bash script with helper aliases

Diff for: docker/8.1/.bashrc renamed to .docker/8.2/.bashrc

File renamed without changes.

Diff for: docker/8.2/Dockerfile renamed to .docker/8.2/Dockerfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM composer:latest as composer
1+
FROM composer:latest AS composer
22
FROM php:8.2-fpm
33

44
RUN CPU_CORES="$(getconf _NPROCESSORS_ONLN)";
@@ -13,10 +13,10 @@ RUN apt update -y && apt install -y \
1313
libicu-dev \
1414
libgmp-dev \
1515
libzip-dev && \
16-
pecl install psr zephir_parser
16+
pecl install psr xdebug zephir_parser
1717

1818
RUN docker-php-ext-install zip gmp intl mysqli && \
19-
docker-php-ext-enable psr zephir_parser
19+
docker-php-ext-enable psr zephir_parser xdebug
2020

2121
COPY --from=composer /usr/bin/composer /usr/local/bin/composer
2222
# Bash script with helper aliases

Diff for: docker/8.2/.bashrc renamed to .docker/8.3/.bashrc

File renamed without changes.

Diff for: docker/7.4/Dockerfile renamed to .docker/8.3/Dockerfile

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
FROM composer:latest as composer
2-
FROM php:7.4-fpm
1+
FROM composer:latest AS composer
2+
FROM php:8.3-fpm
33

44
RUN CPU_CORES="$(getconf _NPROCESSORS_ONLN)";
55
ENV MAKEFLAGS="-j${CPU_CORES}"
@@ -13,10 +13,10 @@ RUN apt update -y && apt install -y \
1313
libicu-dev \
1414
libgmp-dev \
1515
libzip-dev && \
16-
pecl install psr zephir_parser
16+
pecl install psr zephir_parser xdebug
1717

1818
RUN docker-php-ext-install zip gmp intl mysqli && \
19-
docker-php-ext-enable psr zephir_parser
19+
docker-php-ext-enable psr zephir_parser xdebug
2020

2121
COPY --from=composer /usr/bin/composer /usr/local/bin/composer
2222
# Bash script with helper aliases

Diff for: .github/workflows/build-macos-ext/action.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,8 @@ runs:
5656
shell: bash
5757
run: |
5858
cp ./ext/modules/stub.so "$(php -r 'echo ini_get("extension_dir");')/stub.so"
59-
echo "extension=stub.so" > /usr/local/etc/php/${{ matrix.php }}/conf.d/99-stub.ini
59+
if [ "${{ matrix.ts }}" = "ts" ]; then
60+
echo "extension=stub.so" > /usr/local/etc/php/${{ matrix.php }}-zts/conf.d/99-stub.ini
61+
else
62+
echo "extension=stub.so" > /usr/local/etc/php/${{ matrix.php }}/conf.d/99-stub.ini
63+
fi

Diff for: .github/workflows/build-win-ext/action.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ runs:
3333
using: 'composite'
3434
steps:
3535
- name: Setup Downloads Cache
36-
uses: actions/cache@v2
36+
uses: actions/cache@v3
3737
with:
3838
path: ${{ env.CACHE_DIR }}
3939
key: ${{ runner.os }}-downloads-${{ hashFiles('**/.github/workflows/build-win-ext/actions.yml') }}
@@ -46,7 +46,6 @@ runs:
4646
shell: powershell
4747
run: |
4848
Write-Output "::group::Install dependencies"
49-
mkdir ${{ env.CACHE_DIR }}\Choco
5049
choco install --no-progress -y --cache-location=${{ env.CACHE_DIR }}\Choco re2c
5150
Write-Output "::endgroup::"
5251

Diff for: .github/workflows/main.yml

+80-36
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ on:
1717

1818
env:
1919
RE2C_VERSION: 2.2
20-
ZEPHIR_PARSER_VERSION: 1.5.3
20+
ZEPHIR_PARSER_VERSION: 1.6.1
2121
PSR_VERSION: 1.2.0
2222
CACHE_DIR: .cache
2323

@@ -26,17 +26,16 @@ jobs:
2626
name: Static Code Analysis
2727
runs-on: ubuntu-latest
2828
steps:
29-
- name: Checkout Code
30-
uses: actions/checkout@v3
29+
- uses: actions/checkout@v4
3130
with:
3231
fetch-depth: 1
3332

3433
- name: Setup PHP
3534
uses: shivammathur/setup-php@v2
3635
env:
37-
PHP_CS_FIXER_VERSION: 3.2.0
36+
PHP_CS_FIXER_VERSION: 3.37.0
3837
with:
39-
php-version: '7.4'
38+
php-version: '8.0'
4039
coverage: none
4140
tools: php-cs-fixer:${{ env.PHP_CS_FIXER_VERSION }}, phpcs
4241

@@ -45,10 +44,11 @@ jobs:
4544
phpcs --version
4645
phpcs --runtime-set ignore_warnings_on_exit true
4746
48-
- name: Run PHP CS Fixer
49-
if: always()
50-
run: |
51-
php-cs-fixer fix --diff --dry-run -v --using-cache=no
47+
# Disabling for now until I figure out the rules
48+
# - name: Run PHP CS Fixer
49+
# if: always()
50+
# run: |
51+
# php-cs-fixer fix --diff --dry-run -v --using-cache=no
5252

5353
- name: Run Shell Check
5454
if: always()
@@ -61,7 +61,7 @@ jobs:
6161
strategy:
6262
fail-fast: false
6363
matrix:
64-
php: [ '7.4', '8.0' , '8.1', '8.2' ]
64+
php: [ '8.0', '8.1', '8.2', '8.3' ]
6565
ts: [ 'ts', 'nts' ]
6666
arch: [ 'x64' ]
6767

@@ -77,23 +77,21 @@ jobs:
7777
# macOS
7878
- { name: macos-clang, os: macos-12, compiler: clang }
7979
# Windows
80-
- { php: '7.4', ts: 'ts', arch: 'x64', name: 'windows2019-vc15', os: 'windows-2019', compiler: 'vc15' }
81-
- { php: '7.4', ts: 'nts', arch: 'x64', name: 'windows2019-vc15', os: 'windows-2019', compiler: 'vc15' }
8280
- { php: '8.0', ts: 'ts', arch: 'x64', name: 'windows2019-vs16', os: 'windows-2019', compiler: 'vs16' }
8381
- { php: '8.0', ts: 'nts', arch: 'x64', name: 'windows2019-vs16', os: 'windows-2019', compiler: 'vs16' }
8482
- { php: '8.1', ts: 'ts', arch: 'x64', name: 'windows2019-vs16', os: 'windows-2019', compiler: 'vs16' }
8583
- { php: '8.1', ts: 'nts', arch: 'x64', name: 'windows2019-vs16', os: 'windows-2019', compiler: 'vs16' }
86-
# Disabled due PSR extension wasn't complied for 8.2
84+
# Disabled due PSR extension wasn't complied for >=8.2
8785
#- { php: '8.2', ts: 'ts', arch: 'x64', name: 'windows2019-vs16', os: 'windows-2019', compiler: 'vs16' }
8886
#- { php: '8.2', ts: 'nts', arch: 'x64', name: 'windows2019-vs16', os: 'windows-2019', compiler: 'vs16' }
8987

9088
steps:
91-
- uses: actions/checkout@v3
89+
- uses: actions/checkout@v4
9290
with:
9391
fetch-depth: 5
9492

9593
- name: Install PHP ${{ matrix.php }}
96-
uses: shivammathur/setup-php@develop
94+
uses: shivammathur/setup-php@v2
9795
with:
9896
php-version: '${{ matrix.php }}'
9997
extensions: mbstring, fileinfo, gmp, sqlite, pdo_sqlite, psr-${{ env.PSR_VERSION }}, zip, mysqli, zephir_parser-${{ env.ZEPHIR_PARSER_VERSION }}
@@ -115,22 +113,8 @@ jobs:
115113
phpts: ${{ matrix.ts }}
116114
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
117115

118-
# - name: Get composer cache directory
119-
# id: composer-cache
120-
# run: echo "::set-output name=dir::$(composer config cache-files-dir)"
121-
122-
# - name: Set Up Composer Cache
123-
# uses: actions/cache@v2
124-
# with:
125-
# path: ${{ steps.composer-cache.outputs.dir }}
126-
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
127-
# restore-keys: ${{ runner.os }}-composer-
128-
129116
- name: Install Project Dependencies
130-
run: |
131-
echo "::group::Install composer dependencies"
132-
composer install --prefer-dist --no-interaction --no-ansi --no-progress
133-
echo "::endgroup::"
117+
run: composer install --prefer-dist --no-interaction --no-ansi --no-progress
134118

135119
- name: Fast Commands Test
136120
run: php zephir --help
@@ -177,31 +161,91 @@ jobs:
177161
shell: pwsh
178162
run: |
179163
php vendor/bin/phpunit -c phpunit.ext.xml
164+
env:
165+
XDEBUG_MODE: coverage
180166

181167
- name: Unit Tests (Zephir)
182168
if: always()
183-
run: php vendor/bin/phpunit --testsuite Zephir
169+
run: php vendor/bin/phpunit --testsuite Zephir --coverage-php ./tests/output/clover.xml
184170
env:
185171
XDEBUG_MODE: coverage
186172

173+
- name: "Upload coverage file artifact"
174+
uses: "actions/upload-artifact@v3"
175+
with:
176+
name: "unit-${{ matrix.php }}-${{ matrix.ts }}-${{ matrix.name }}.coverage"
177+
path: "tests/output/clover.xml"
178+
187179
- name: Black-box Testing
188180
if: always() && runner.os != 'Windows'
189181
shell: bash
190182
working-directory: tests/sharness
191183
run: |
192184
make -j$(getconf _NPROCESSORS_ONLN)
193185
194-
- name: Upload Code Coverage Report
195-
uses: codecov/codecov-action@v2
186+
upload-coverage:
187+
permissions:
188+
contents: read
189+
190+
name: "Upload coverage"
191+
runs-on: "ubuntu-22.04"
192+
needs:
193+
- "build-and-test"
194+
195+
steps:
196+
- uses: actions/checkout@v4
197+
with:
198+
fetch-depth: 2
199+
200+
# - name: 'Qodana Scan'
201+
# uses: JetBrains/[email protected]
202+
# env:
203+
# QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}
204+
# with:
205+
# args: --baseline,./qodana.sarif.json
206+
207+
# - name: 'Qodana Scan'
208+
# run: |
209+
# docker run \
210+
# -v $(pwd):/data/project/ \
211+
# -v $(pwd):/data/base/ \
212+
# -e QODANA_TOKEN="${{ secrets.CODECOV_TOKEN }}" \
213+
# jetbrains/qodana-php \
214+
# --baseline /data/base/qodana.sarif.json
215+
216+
- name: "Create download folder"
217+
run: |
218+
mkdir -p reports
219+
220+
- name: "Download coverage files"
221+
uses: "actions/[email protected]"
222+
with:
223+
path: "reports"
224+
225+
- name: "Display structure of downloaded files"
226+
run: ls -R
227+
working-directory: reports
228+
229+
- name: "Upload to Codecov"
230+
uses: "codecov/codecov-action@v3"
196231
with:
197232
token: ${{ secrets.CODECOV_TOKEN }}
198-
files: ./tests/output/clover.xml
199-
flags: unittests,${{ runner.os }},php-${{ matrix.php }}
233+
directory: reports
234+
fail_ci_if_error: true
235+
verbose: true
200236
name: codecov-umbrella
201237

238+
- name: "Upload to Qodana"
239+
run: |
240+
docker run \
241+
-v $(pwd):/data/project/ \
242+
-v ./reports/:/data/coverage \
243+
-e QODANA_TOKEN="${{ secrets.QODANA_TOKEN }}" \
244+
jetbrains/qodana-php
245+
202246
- name: Upload build artifacts after Failure
203247
if: failure()
204-
uses: actions/upload-artifact@v2
248+
uses: actions/upload-artifact@v3
205249
with:
206250
name: debug-PHP-${{ matrix.php }}-${{ matrix.ts }}-${{ matrix.name }}-${{ matrix.arch }}
207251
path: |

Diff for: .github/workflows/release.yml

+2-3
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ jobs:
1414
BOX_VERSION: 4.2.0
1515

1616
steps:
17-
- name: Checkout Code
18-
uses: actions/checkout@v3
17+
- uses: actions/checkout@v4
1918
with:
2019
fetch-depth: 5
2120

@@ -32,7 +31,7 @@ jobs:
3231
run: echo ::set-output name=dir::$(composer config cache-files-dir)
3332

3433
- name: Setup Composer Cache
35-
uses: actions/cache@v2
34+
uses: actions/cache@v3
3635
with:
3736
path: ${{ steps.composer-cache.outputs.dir }}
3837
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}

0 commit comments

Comments
 (0)