Skip to content

Commit

Permalink
Merge pull request #2408 from zephir-lang/#2407-php8.3
Browse files Browse the repository at this point in the history
#2407 - PHP 8.3 support
  • Loading branch information
Jeckerson authored Oct 29, 2023
2 parents 90fbe76 + 5b8e2b1 commit 6e15887
Show file tree
Hide file tree
Showing 431 changed files with 3,307 additions and 10,053 deletions.
File renamed without changes.
2 changes: 1 addition & 1 deletion docker/8.0/Dockerfile → .docker/8.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM composer:latest as composer
FROM composer:latest AS composer
FROM php:8.0-fpm

RUN CPU_CORES="$(getconf _NPROCESSORS_ONLN)";
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion docker/8.1/Dockerfile → .docker/8.1/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM composer:latest as composer
FROM composer:latest AS composer
FROM php:8.1-fpm

RUN CPU_CORES="$(getconf _NPROCESSORS_ONLN)";
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion docker/8.2/Dockerfile → .docker/8.2/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM composer:latest as composer
FROM composer:latest AS composer
FROM php:8.2-fpm

RUN CPU_CORES="$(getconf _NPROCESSORS_ONLN)";
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions docker/7.4/Dockerfile → .docker/8.3/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM composer:latest as composer
FROM php:7.4-fpm
FROM composer:latest AS composer
FROM php:8.3.0RC5-fpm

RUN CPU_CORES="$(getconf _NPROCESSORS_ONLN)";
ENV MAKEFLAGS="-j${CPU_CORES}"
Expand Down
12 changes: 5 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:

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

Expand All @@ -34,9 +34,9 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
env:
PHP_CS_FIXER_VERSION: 3.2.0
PHP_CS_FIXER_VERSION: 3.37.0
with:
php-version: '7.4'
php-version: '8.0'
coverage: none
tools: php-cs-fixer:${{ env.PHP_CS_FIXER_VERSION }}, phpcs

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

Expand All @@ -77,13 +77,11 @@ jobs:
# macOS
- { 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
# 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' }

Expand Down
2 changes: 1 addition & 1 deletion .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
'ext',
'ide',
'config/class-entries',
'templates/ZendEngine3',
'templates/engine',
'templates/Api',
'tests/ext-bootstrap',
'tests/fixtures',
Expand Down
4 changes: 1 addition & 3 deletions Library/AliasManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@

namespace Zephir;

use function in_array;

/**
* Manage aliases in a file
*/
Expand Down Expand Up @@ -117,7 +115,7 @@ public function isAliasPresentFor(string $className): bool
{
$extractAlias = $this->implicitAlias($className);

$isClassDeclared = in_array($className, $this->aliases);
$isClassDeclared = \in_array($className, $this->aliases);
$classAlias = array_flip($this->aliases)[$className] ?? null;

return $isClassDeclared && $classAlias !== $extractAlias;
Expand Down
Loading

0 comments on commit 6e15887

Please sign in to comment.