Skip to content

Commit

Permalink
Merge pull request #2400 from zephir-lang/development
Browse files Browse the repository at this point in the history
0.17.0
  • Loading branch information
Jeckerson authored Feb 11, 2023
2 parents 5099f34 + 11ed29f commit 9f99da6
Show file tree
Hide file tree
Showing 76 changed files with 482 additions and 573 deletions.
39 changes: 21 additions & 18 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@ on:

env:
RE2C_VERSION: 2.2
ZEPHIR_PARSER_VERSION: 1.5.0
ZEPHIR_PARSER_VERSION: 1.5.3
PSR_VERSION: 1.2.0
CACHE_DIR: .cache

jobs:
analyze:
name: Static Code Analysis
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 1

Expand Down Expand Up @@ -61,7 +61,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php: [ '7.4', '8.0' , '8.1' ]
php: [ '7.4', '8.0' , '8.1', '8.2' ]
ts: [ 'ts', 'nts' ]
arch: [ 'x64' ]

Expand All @@ -73,24 +73,27 @@ jobs:
# {php}-{ts}-{os.name}-{compiler}-{arch}
include:
# Linux
- { name: ubuntu-gcc, os: ubuntu-18.04, compiler: gcc }
- { name: ubuntu-gcc, os: ubuntu-latest, compiler: gcc }
# macOS
- { name: macos-clang, os: macos-10.15, compiler: clang }
- { name: macos-clang, os: macos-12, compiler: clang }
# Windows
- { php: '7.4', ts: 'ts', arch: 'x64', name: 'windows2019-vc15', os: 'windows-2019', compiler: 'vc15' }
- { php: '7.4', ts: 'nts', arch: 'x64', name: 'windows2019-vc15', os: 'windows-2019', compiler: 'vc15' }
- { php: '8.0', ts: 'ts', arch: 'x64', name: 'windows2019-vs16', os: 'windows-2019', compiler: 'vs16' }
- { php: '8.0', ts: 'nts', arch: 'x64', name: 'windows2019-vs16', os: 'windows-2019', compiler: 'vs16' }
- { php: '8.1', ts: 'ts', arch: 'x64', name: 'windows2019-vs16', os: 'windows-2019', compiler: 'vs16' }
- { php: '8.1', ts: 'nts', arch: 'x64', name: 'windows2019-vs16', os: 'windows-2019', compiler: 'vs16' }
# Disabled due PSR extension wasn't complied for 8.2
#- { php: '8.2', ts: 'ts', arch: 'x64', name: 'windows2019-vs16', os: 'windows-2019', compiler: 'vs16' }
#- { php: '8.2', ts: 'nts', arch: 'x64', name: 'windows2019-vs16', os: 'windows-2019', compiler: 'vs16' }

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 5

- name: Install PHP ${{ matrix.php }}
uses: shivammathur/setup-php@v2
uses: shivammathur/setup-php@develop
with:
php-version: '${{ matrix.php }}'
extensions: mbstring, fileinfo, gmp, sqlite, pdo_sqlite, psr-${{ env.PSR_VERSION }}, zip, mysqli, zephir_parser-${{ env.ZEPHIR_PARSER_VERSION }}
Expand All @@ -109,19 +112,19 @@ jobs:
date.timezone=UTC,
xdebug.max_nesting_level=256
env:
PHPTS: ${{ matrix.ts }}
phpts: ${{ matrix.ts }}
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
# - name: Get composer cache directory
# id: composer-cache
# run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Set Up Composer Cache
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
# - name: Set Up Composer Cache
# uses: actions/cache@v2
# with:
# path: ${{ steps.composer-cache.outputs.dir }}
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
# restore-keys: ${{ runner.os }}-composer-

- name: Install Project Dependencies
run: |
Expand Down
122 changes: 0 additions & 122 deletions .github/workflows/nightly.yml

This file was deleted.

8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@ on:
jobs:
release:
name: Create Release
runs-on: ubuntu-20.04
runs-on: ubuntu-latest

env:
BOX_VERSION: 3.15.0
BOX_VERSION: 4.2.0

steps:
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 5

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
php-version: '8.2'
extensions: intl, zip, zlib
coverage: none
ini-values: memory_limit=1G, phar.readonly=0
Expand Down
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ and this project adheres to [Semantic Versioning](https://semver.org).

## [Unreleased]

## [0.17.0] - 2023-02-11
### Added
- Added support of PHP `8.2` [#2255](https://github.com/zephir-lang/zephir/issues/2370)

### Fixed
- Fixed backtrace on alpine [#2397](https://github.com/zephir-lang/zephir/issues/2397)

## [0.16.3] - 2022-09-17
### Fixed
- Fixed segmentation fault on `mixed` return type and PHP 7.4 [#2387](https://github.com/zephir-lang/zephir/issues/2387)
Expand Down Expand Up @@ -587,7 +594,9 @@ and this project adheres to [Semantic Versioning](https://semver.org).
[#1524](https://github.com/zephir-lang/zephir/issues/1524)


[Unreleased]: https://github.com/zephir-lang/zephir/compare/0.16.2...HEAD
[Unreleased]: https://github.com/zephir-lang/zephir/compare/0.17.0...HEAD
[0.17.0]: https://github.com/zephir-lang/zephir/compare/0.16.3...0.17.0
[0.16.3]: https://github.com/zephir-lang/zephir/compare/0.16.2...0.16.3
[0.16.2]: https://github.com/zephir-lang/zephir/compare/0.16.1...0.16.2
[0.16.1]: https://github.com/zephir-lang/zephir/compare/0.16.0...0.16.1
[0.16.0]: https://github.com/zephir-lang/zephir/compare/0.15.2...0.16.0
Expand Down
41 changes: 25 additions & 16 deletions Library/BranchGraphNode.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,34 @@
* the LICENSE file that was distributed with this source code.
*/

declare(strict_types=1);

namespace Zephir;

use function count;
use function in_array;

/**
* Branch\BranchGraphNode.
*
* Allows to visualize assignments for a specific variable in every branch used
* Allows visualizing assignments for a specific variable in every branch used.
*/
class BranchGraphNode
{
/** @var int */
protected $increase = 0;
/**
* @var int
*/
protected int $increase = 0;

/** @var Branch[] */
protected $branches = [];
/**
* @var Branch[]
*/
protected array $branches = [];

/** @var Branch */
protected $branch;
/**
* @var Branch
*/
protected Branch $branch;

/**
* BranchGraphNode.
*
* @param Branch $branch
*/
public function __construct(Branch $branch)
Expand All @@ -42,17 +49,17 @@ public function __construct(Branch $branch)
*
* @param BranchGraphNode $branch
*/
public function insert(self $branch)
public function insert(self $branch): void
{
if (!\in_array($branch, $this->branches)) {
if (!in_array($branch, $this->branches)) {
$this->branches[] = $branch;
}
}

/**
* Increases the branch graph level.
*/
public function increase()
public function increase(): void
{
++$this->increase;
}
Expand All @@ -62,11 +69,13 @@ public function increase()
*
* @param int $padding
*/
public function show($padding = 0)
public function show(int $padding = 0): void
{
echo str_repeat(' ', $padding), $this->branch->getUniqueId(), ':' , $this->increase;
if (\count($this->branches)) {

if (count($this->branches) > 0) {
echo ':', PHP_EOL;
/** @var BranchGraphNode $node */
foreach ($this->branches as $node) {
$node->show($padding + 1);
}
Expand Down
2 changes: 0 additions & 2 deletions Library/Call.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
use Zephir\Exception\CompilerException;

/**
* Zephir\Call.
*
* Base class for common functionality in functions/calls
*/
class Call
Expand Down
2 changes: 0 additions & 2 deletions Library/ClassDefinitionRuntime.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
namespace Zephir;

/**
* Class Definition in Runtime
*
* Represents a class/interface that only exists in runtime.
*/
final class ClassDefinitionRuntime extends AbstractClassDefinition
Expand Down
2 changes: 0 additions & 2 deletions Library/ClassMethod.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@
use function is_array;

/**
* ClassMethod.
*
* Represents a class method
*/
class ClassMethod
Expand Down
4 changes: 1 addition & 3 deletions Library/ClassProperty.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,14 @@
use Zephir\Expression\Builder\Statements\LetStatement as ExpressionLetStatement;

/**
* ClassProperty.
*
* Represents a property class
*/
class ClassProperty
{
/**
* @var ClassDefinition
*/
protected $classDefinition;
protected ClassDefinition $classDefinition;

protected $visibility;

Expand Down
Loading

0 comments on commit 9f99da6

Please sign in to comment.