Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add php8.3 support #926

Merged
merged 2 commits into from
Jan 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
- "8.0"
- "8.1"
- "8.2"
- "8.3"

compiler:
- default
Expand All @@ -45,6 +46,9 @@ jobs:
- os: ubuntu-latest
php-version: "8.2"
compiler: jit
- os: ubuntu-latest
php-version: "8.3"
compiler: jit

steps:
- name: Checkout
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added
- PHP8.3 support [#925](https://github.com/smarty-php/smarty/issues/925)

### Fixed
- The {debug} tag was broken in v5 [#922](https://github.com/smarty-php/smarty/issues/922)

Expand Down
6 changes: 5 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@ services:
service: base
build:
dockerfile: ./utilities/testrunners/php82/Dockerfile

php83:
extends:
service: base
build:
dockerfile: ./utilities/testrunners/php83/Dockerfile
volumes:
smarty-code:

Expand Down
1 change: 1 addition & 0 deletions run-tests-for-all-php-versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ $COMPOSE_CMD run --rm php74 ./run-tests.sh $@ && \
$COMPOSE_CMD run --rm php80 ./run-tests.sh $@ && \
$COMPOSE_CMD run --rm php81 ./run-tests.sh $@ && \
$COMPOSE_CMD run --rm php82 ./run-tests.sh $@
$COMPOSE_CMD run --rm php83 ./run-tests.sh $@
2 changes: 1 addition & 1 deletion src/ErrorHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public function handleError($errno, $errstr, $errfile, $errline, $errcontext = [
}

if ($this->allowUndefinedArrayKeys && preg_match(
'/^(Undefined index|Undefined array key|Trying to access array offset on value of type)/',
'/^(Undefined index|Undefined array key|Trying to access array offset on)/',
$errstr
)) {
return; // suppresses this error
Expand Down
10 changes: 10 additions & 0 deletions utilities/testrunners/php83/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM php:8.3-cli

## Basic utilities
RUN apt-get update -yqq && apt-get install -y curl apt-utils git zip unzip

## Composer
COPY ./utilities/testrunners/shared/install-composer.sh /root/install-composer.sh
WORKDIR /root
RUN sh ./install-composer.sh
RUN mv ./composer.phar /usr/local/bin/composer