Skip to content

Commit 9f99da6

Browse files
authored
Merge pull request #2400 from zephir-lang/development
0.17.0
2 parents 5099f34 + 11ed29f commit 9f99da6

Some content is hidden

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

76 files changed

+482
-573
lines changed

.github/workflows/main.yml

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,17 @@ on:
1717

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

2424
jobs:
2525
analyze:
2626
name: Static Code Analysis
27-
runs-on: ubuntu-18.04
27+
runs-on: ubuntu-latest
2828
steps:
2929
- name: Checkout Code
30-
uses: actions/checkout@v2
30+
uses: actions/checkout@v3
3131
with:
3232
fetch-depth: 1
3333

@@ -61,7 +61,7 @@ jobs:
6161
strategy:
6262
fail-fast: false
6363
matrix:
64-
php: [ '7.4', '8.0' , '8.1' ]
64+
php: [ '7.4', '8.0' , '8.1', '8.2' ]
6565
ts: [ 'ts', 'nts' ]
6666
arch: [ 'x64' ]
6767

@@ -73,24 +73,27 @@ jobs:
7373
# {php}-{ts}-{os.name}-{compiler}-{arch}
7474
include:
7575
# Linux
76-
- { name: ubuntu-gcc, os: ubuntu-18.04, compiler: gcc }
76+
- { name: ubuntu-gcc, os: ubuntu-latest, compiler: gcc }
7777
# macOS
78-
- { name: macos-clang, os: macos-10.15, compiler: clang }
78+
- { name: macos-clang, os: macos-12, compiler: clang }
7979
# Windows
8080
- { php: '7.4', ts: 'ts', arch: 'x64', name: 'windows2019-vc15', os: 'windows-2019', compiler: 'vc15' }
8181
- { php: '7.4', ts: 'nts', arch: 'x64', name: 'windows2019-vc15', os: 'windows-2019', compiler: 'vc15' }
8282
- { php: '8.0', ts: 'ts', arch: 'x64', name: 'windows2019-vs16', os: 'windows-2019', compiler: 'vs16' }
8383
- { php: '8.0', ts: 'nts', arch: 'x64', name: 'windows2019-vs16', os: 'windows-2019', compiler: 'vs16' }
8484
- { php: '8.1', ts: 'ts', arch: 'x64', name: 'windows2019-vs16', os: 'windows-2019', compiler: 'vs16' }
8585
- { 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
87+
#- { php: '8.2', ts: 'ts', arch: 'x64', name: 'windows2019-vs16', os: 'windows-2019', compiler: 'vs16' }
88+
#- { php: '8.2', ts: 'nts', arch: 'x64', name: 'windows2019-vs16', os: 'windows-2019', compiler: 'vs16' }
8689

8790
steps:
88-
- uses: actions/checkout@v2
91+
- uses: actions/checkout@v3
8992
with:
9093
fetch-depth: 5
9194

9295
- name: Install PHP ${{ matrix.php }}
93-
uses: shivammathur/setup-php@v2
96+
uses: shivammathur/setup-php@develop
9497
with:
9598
php-version: '${{ matrix.php }}'
9699
extensions: mbstring, fileinfo, gmp, sqlite, pdo_sqlite, psr-${{ env.PSR_VERSION }}, zip, mysqli, zephir_parser-${{ env.ZEPHIR_PARSER_VERSION }}
@@ -109,19 +112,19 @@ jobs:
109112
date.timezone=UTC,
110113
xdebug.max_nesting_level=256
111114
env:
112-
PHPTS: ${{ matrix.ts }}
115+
phpts: ${{ matrix.ts }}
113116
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
114117

115-
- name: Get composer cache directory
116-
id: composer-cache
117-
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
118+
# - name: Get composer cache directory
119+
# id: composer-cache
120+
# run: echo "::set-output name=dir::$(composer config cache-files-dir)"
118121

119-
- name: Set Up Composer Cache
120-
uses: actions/cache@v2
121-
with:
122-
path: ${{ steps.composer-cache.outputs.dir }}
123-
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
124-
restore-keys: ${{ runner.os }}-composer-
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-
125128

126129
- name: Install Project Dependencies
127130
run: |

.github/workflows/nightly.yml

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

.github/workflows/release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,21 @@ on:
88
jobs:
99
release:
1010
name: Create Release
11-
runs-on: ubuntu-20.04
11+
runs-on: ubuntu-latest
1212

1313
env:
14-
BOX_VERSION: 3.15.0
14+
BOX_VERSION: 4.2.0
1515

1616
steps:
1717
- name: Checkout Code
18-
uses: actions/checkout@v2
18+
uses: actions/checkout@v3
1919
with:
2020
fetch-depth: 5
2121

2222
- name: Setup PHP
2323
uses: shivammathur/setup-php@v2
2424
with:
25-
php-version: '7.4'
25+
php-version: '8.2'
2626
extensions: intl, zip, zlib
2727
coverage: none
2828
ini-values: memory_limit=1G, phar.readonly=0

CHANGELOG.md

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

77
## [Unreleased]
88

9+
## [0.17.0] - 2023-02-11
10+
### Added
11+
- Added support of PHP `8.2` [#2255](https://github.com/zephir-lang/zephir/issues/2370)
12+
13+
### Fixed
14+
- Fixed backtrace on alpine [#2397](https://github.com/zephir-lang/zephir/issues/2397)
15+
916
## [0.16.3] - 2022-09-17
1017
### Fixed
1118
- Fixed segmentation fault on `mixed` return type and PHP 7.4 [#2387](https://github.com/zephir-lang/zephir/issues/2387)
@@ -587,7 +594,9 @@ and this project adheres to [Semantic Versioning](https://semver.org).
587594
[#1524](https://github.com/zephir-lang/zephir/issues/1524)
588595

589596

590-
[Unreleased]: https://github.com/zephir-lang/zephir/compare/0.16.2...HEAD
597+
[Unreleased]: https://github.com/zephir-lang/zephir/compare/0.17.0...HEAD
598+
[0.17.0]: https://github.com/zephir-lang/zephir/compare/0.16.3...0.17.0
599+
[0.16.3]: https://github.com/zephir-lang/zephir/compare/0.16.2...0.16.3
591600
[0.16.2]: https://github.com/zephir-lang/zephir/compare/0.16.1...0.16.2
592601
[0.16.1]: https://github.com/zephir-lang/zephir/compare/0.16.0...0.16.1
593602
[0.16.0]: https://github.com/zephir-lang/zephir/compare/0.15.2...0.16.0

Library/BranchGraphNode.php

Lines changed: 25 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,34 @@
99
* the LICENSE file that was distributed with this source code.
1010
*/
1111

12+
declare(strict_types=1);
13+
1214
namespace Zephir;
1315

16+
use function count;
17+
use function in_array;
18+
1419
/**
15-
* Branch\BranchGraphNode.
16-
*
17-
* Allows to visualize assignments for a specific variable in every branch used
20+
* Allows visualizing assignments for a specific variable in every branch used.
1821
*/
1922
class BranchGraphNode
2023
{
21-
/** @var int */
22-
protected $increase = 0;
24+
/**
25+
* @var int
26+
*/
27+
protected int $increase = 0;
2328

24-
/** @var Branch[] */
25-
protected $branches = [];
29+
/**
30+
* @var Branch[]
31+
*/
32+
protected array $branches = [];
2633

27-
/** @var Branch */
28-
protected $branch;
34+
/**
35+
* @var Branch
36+
*/
37+
protected Branch $branch;
2938

3039
/**
31-
* BranchGraphNode.
32-
*
3340
* @param Branch $branch
3441
*/
3542
public function __construct(Branch $branch)
@@ -42,17 +49,17 @@ public function __construct(Branch $branch)
4249
*
4350
* @param BranchGraphNode $branch
4451
*/
45-
public function insert(self $branch)
52+
public function insert(self $branch): void
4653
{
47-
if (!\in_array($branch, $this->branches)) {
54+
if (!in_array($branch, $this->branches)) {
4855
$this->branches[] = $branch;
4956
}
5057
}
5158

5259
/**
5360
* Increases the branch graph level.
5461
*/
55-
public function increase()
62+
public function increase(): void
5663
{
5764
++$this->increase;
5865
}
@@ -62,11 +69,13 @@ public function increase()
6269
*
6370
* @param int $padding
6471
*/
65-
public function show($padding = 0)
72+
public function show(int $padding = 0): void
6673
{
6774
echo str_repeat(' ', $padding), $this->branch->getUniqueId(), ':' , $this->increase;
68-
if (\count($this->branches)) {
75+
76+
if (count($this->branches) > 0) {
6977
echo ':', PHP_EOL;
78+
/** @var BranchGraphNode $node */
7079
foreach ($this->branches as $node) {
7180
$node->show($padding + 1);
7281
}

Library/Call.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
use Zephir\Exception\CompilerException;
1818

1919
/**
20-
* Zephir\Call.
21-
*
2220
* Base class for common functionality in functions/calls
2321
*/
2422
class Call

Library/ClassDefinitionRuntime.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
namespace Zephir;
1515

1616
/**
17-
* Class Definition in Runtime
18-
*
1917
* Represents a class/interface that only exists in runtime.
2018
*/
2119
final class ClassDefinitionRuntime extends AbstractClassDefinition

Library/ClassMethod.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@
2727
use function is_array;
2828

2929
/**
30-
* ClassMethod.
31-
*
3230
* Represents a class method
3331
*/
3432
class ClassMethod

Library/ClassProperty.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,14 @@
1717
use Zephir\Expression\Builder\Statements\LetStatement as ExpressionLetStatement;
1818

1919
/**
20-
* ClassProperty.
21-
*
2220
* Represents a property class
2321
*/
2422
class ClassProperty
2523
{
2624
/**
2725
* @var ClassDefinition
2826
*/
29-
protected $classDefinition;
27+
protected ClassDefinition $classDefinition;
3028

3129
protected $visibility;
3230

0 commit comments

Comments
 (0)