Compare commits

...

2 Commits

Author SHA1 Message Date
Simon Wisselink 56cf94dacd changelog / docs 2026-05-03 22:32:41 +02:00
Simon Wisselink a0e2b022a9 add support for testing smarty v4 on php8.5 2026-05-03 22:31:13 +02:00
10 changed files with 27 additions and 9 deletions
+1
View File
@@ -34,6 +34,7 @@ jobs:
- "8.2"
- "8.3"
- "8.4"
- "8.5"
compiler:
- default
+1 -1
View File
@@ -7,7 +7,7 @@ Smarty is a template engine for PHP, facilitating the separation of presentation
Read the [documentation](https://smarty-php.github.io/smarty/) to find out how to use it.
## Requirements
Smarty can be run with PHP 7.1 to PHP 8.4.
Smarty can be run with PHP 7.1 to PHP 8.5.
## Installation
Smarty versions 3.1.11 or later can be installed with [Composer](https://getcomposer.org/).
+1
View File
@@ -0,0 +1 @@
- PHP8.5 support [#1184](https://github.com/smarty-php/smarty/issues/1184)
+5
View File
@@ -52,3 +52,8 @@ services:
service: base
build:
dockerfile: ./utilities/testrunners/php84/Dockerfile
php85:
extends:
service: base
build:
dockerfile: ./utilities/testrunners/php85/Dockerfile
+1 -1
View File
@@ -1,7 +1,7 @@
# Getting started
## Requirements
Smarty can be run with PHP 7.1 to PHP 8.4.
Smarty can be run with PHP 7.1 to PHP 8.5.
## Installation
Smarty can be installed with [Composer](https://getcomposer.org/).
+3 -2
View File
@@ -5,7 +5,7 @@
# - ./run-tests-for-all-php-versions.sh --group 20221124
# - ./run-tests-for-all-php-versions.sh --exclude-group slow
COMPOSE_CMD="mutagen-compose"
COMPOSE_CMD="docker-compose"
$COMPOSE_CMD run --rm php71 ./run-tests.sh $@ && \
$COMPOSE_CMD run --rm php72 ./run-tests.sh $@ && \
@@ -15,4 +15,5 @@ $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 $@ && \
$COMPOSE_CMD run --rm php84 ./run-tests.sh $@
$COMPOSE_CMD run --rm php84 ./run-tests.sh $@ && \
$COMPOSE_CMD run --rm php85 ./run-tests.sh $@
@@ -1381,7 +1381,7 @@ class CompileBlockExtendsTest extends PHPUnit_Smarty
public function testEscaping()
{
$this->expectException(SmartyException::class);
$this->expectExceptionMessageRegExp('/Unable to load.*/');
$this->expectExceptionMessageMatches('/Unable to load.*/');
$this->assertEquals('hello world', $this->smarty->fetch('escaping.tpl'));
}
@@ -1391,7 +1391,7 @@ class CompileBlockExtendsTest extends PHPUnit_Smarty
public function testEscaping2()
{
$this->expectException(SmartyException::class);
$this->expectExceptionMessageRegExp('/Unable to load.*/');
$this->expectExceptionMessageMatches('/Unable to load.*/');
$this->assertEquals('hello world', $this->smarty->fetch('escaping2.tpl'));
}
@@ -1401,7 +1401,7 @@ class CompileBlockExtendsTest extends PHPUnit_Smarty
public function testEscaping3()
{
$this->expectException(SmartyException::class);
$this->expectExceptionMessageRegExp('/Unable to load.*/');
$this->expectExceptionMessageMatches('/Unable to load.*/');
$this->assertEquals('hello world', $this->smarty->fetch('escaping3.tpl'));
}
@@ -88,7 +88,7 @@ class CompileIncludeTest extends PHPUnit_Smarty
public function testIncludeFilenameEscaping()
{
$this->expectException(SmartyException::class);
$this->expectExceptionMessageRegExp('/Unable to load.*/');
$this->expectExceptionMessageMatches('/Unable to load.*/');
$tpl = $this->smarty->createTemplate('test_include_security.tpl');
$content = $this->smarty->fetch($tpl);
$this->assertEquals("hello world", $content);
@@ -35,7 +35,7 @@ class ExtendsIssue419Test extends PHPUnit_Smarty
public function testextendsSecurity()
{
$this->expectException(SmartyException::class);
$this->expectExceptionMessageRegExp('/Unable to load.*/');
$this->expectExceptionMessageMatches('/Unable to load.*/');
$this->assertEquals('child', $this->smarty->fetch('string:{include "001_parent.tpl\', var_dump(shell_exec(\'ls\')), 1, 2, 3, 4, 5, 6);}}?>"}'));
}
+10
View File
@@ -0,0 +1,10 @@
FROM php:8.5-rc-cli-bullseye
## 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