Skip to content

Commit

Permalink
Bump smarty/smarty from 5.0.2 to 5.1.0 #55
Browse files Browse the repository at this point in the history
  • Loading branch information
Nightprince committed Apr 24, 2024
1 parent 0125ad1 commit ce0fad4
Show file tree
Hide file tree
Showing 658 changed files with 24,593 additions and 1,207 deletions.
16 changes: 8 additions & 8 deletions vendor/composer/installed.json
Original file line number Diff line number Diff line change
Expand Up @@ -963,17 +963,17 @@
},
{
"name": "smarty/smarty",
"version": "v5.0.2",
"version_normalized": "5.0.2.0",
"version": "v5.1.0",
"version_normalized": "5.1.0.0",
"source": {
"type": "git",
"url": "https://github.com/smarty-php/smarty.git",
"reference": "bbd09c7bfaa6c2c091adc4568a944f765bb4f1d9"
"reference": "8d53d3cbf2a986f392d680349be0fc22661bf16c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/smarty-php/smarty/zipball/bbd09c7bfaa6c2c091adc4568a944f765bb4f1d9",
"reference": "bbd09c7bfaa6c2c091adc4568a944f765bb4f1d9",
"url": "https://api.github.com/repos/smarty-php/smarty/zipball/8d53d3cbf2a986f392d680349be0fc22661bf16c",
"reference": "8d53d3cbf2a986f392d680349be0fc22661bf16c",
"shasum": ""
},
"require": {
Expand All @@ -984,14 +984,14 @@
"phpunit/phpunit": "^8.5 || ^7.5",
"smarty/smarty-lexer": "^4.0.2"
},
"time": "2024-03-28T10:23:18+00:00",
"time": "2024-04-22T22:22:15+00:00",
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "5.0.x-dev"
}
},
"installation-source": "dist",
"installation-source": "source",
"autoload": {
"files": [
"src/functions.php"
Expand Down Expand Up @@ -1030,7 +1030,7 @@
"support": {
"forum": "https://github.com/smarty-php/smarty/discussions",
"issues": "https://github.com/smarty-php/smarty/issues",
"source": "https://github.com/smarty-php/smarty/tree/v5.0.2"
"source": "https://github.com/smarty-php/smarty/tree/v5.1.0"
},
"install-path": "../smarty/smarty"
},
Expand Down
10 changes: 5 additions & 5 deletions vendor/composer/installed.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
'name' => 'fusionwowcms/fusioncms',
'pretty_version' => 'dev-main',
'version' => 'dev-main',
'reference' => '2ac36a3d17f121e7362bc438eff06c2df7331aa7',
'reference' => 'b6b4216806ea9d5f0ad7171df43df5d1810e8008',
'type' => 'project',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
Expand Down Expand Up @@ -85,7 +85,7 @@
'fusionwowcms/fusioncms' => array(
'pretty_version' => 'dev-main',
'version' => 'dev-main',
'reference' => '2ac36a3d17f121e7362bc438eff06c2df7331aa7',
'reference' => 'b6b4216806ea9d5f0ad7171df43df5d1810e8008',
'type' => 'project',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
Expand Down Expand Up @@ -158,9 +158,9 @@
),
),
'smarty/smarty' => array(
'pretty_version' => 'v5.0.2',
'version' => '5.0.2.0',
'reference' => 'bbd09c7bfaa6c2c091adc4568a944f765bb4f1d9',
'pretty_version' => 'v5.1.0',
'version' => '5.1.0.0',
'reference' => '8d53d3cbf2a986f392d680349be0fc22661bf16c',
'type' => 'library',
'install_path' => __DIR__ . '/../smarty/smarty',
'aliases' => array(),
Expand Down
19 changes: 19 additions & 0 deletions vendor/smarty/smarty/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Auto detect text files and perform LF normalization
* text=auto

*.php text eol=lf
*.y text eol=lf
*.lex text eol=lf

# exclude from git export
/tests export-ignore
/utilities export-ignore
/docker-compose.yml export-ignore
/.github export-ignore
/run_tests_for_all_php_versions.sh export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/make-release.sh export-ignore
/phpunit.sh export-ignore
/phpunit.xml export-ignore
/TODO.md export-ignore
85 changes: 85 additions & 0 deletions vendor/smarty/smarty/.github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions

on:
pull_request:
push:
branches:
- 'master'

name: CI

jobs:
tests:
name: Tests

runs-on: ${{ matrix.os }}

env:
PHP_EXTENSIONS: dom, json, libxml, mbstring, pdo_sqlite, soap, xml, xmlwriter
PHP_INI_VALUES: assert.exception=1, zend.assertions=1

strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest

php-version:
- "7.2"
- "7.3"
- "7.4"
- "8.0"
- "8.1"
- "8.2"
- "8.3"

compiler:
- default

include:
- os: ubuntu-latest
php-version: "8.0"
compiler: jit
- os: ubuntu-latest
php-version: "8.1"
compiler: jit
- os: ubuntu-latest
php-version: "8.2"
compiler: jit
- os: ubuntu-latest
php-version: "8.3"
compiler: jit

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Override PHP ini values for JIT compiler
if: matrix.compiler == 'jit'
run: echo "PHP_INI_VALUES::assert.exception=1, zend.assertions=1, opcache.enable=1, opcache.enable_cli=1, opcache.optimization_level=-1, opcache.jit=1255, opcache.jit_buffer_size=32M" >> $GITHUB_ENV

- name: Install PHP with extensions
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
coverage: pcov
extensions: ${{ env.PHP_EXTENSIONS }}
ini-values: ${{ env.PHP_INI_VALUES }}

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v3
with:
path: vendor
key: v5r2-${{ runner.os }}-php-${{ matrix.php-version }}-${{ hashFiles('**/composer.lock') }}
restore-keys: |
v5r1-${{ runner.os }}-php-${{ matrix.php-version }}-
- name: Install dependencies
uses: php-actions/composer@v6

- name: Run make
run: make -B

- name: Run tests with phpunit
run: php ./vendor/phpunit/phpunit/phpunit
9 changes: 9 additions & 0 deletions vendor/smarty/smarty/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

.idea/

/site

phpunit*
.phpunit.result.cache
vendor/*
composer.lock
9 changes: 8 additions & 1 deletion vendor/smarty/smarty/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [5.0.2] - 2024-03-28
## [5.1.0] - 2024-04-22
- Prevent deprecation notices during compilation in PHP8.3 [#996](https://github.com/smarty-php/smarty/issues/996)
- Fix that getTemplateVars would return an array of objects instead of the assigned variables values [#994](https://github.com/smarty-php/smarty/issues/994)
- Fix Smarty::assign() not returning $this when called with an array as first parameter [#972](https://github.com/smarty-php/smarty/pull/972)
- Documented support for `{if $element is in $array}` syntax [#937](https://github.com/smarty-php/smarty/issues/937)
- Added support for `{if $element is not in $array}` syntax [#937](https://github.com/smarty-php/smarty/issues/937)
- Using stream variables in templates now throws a deprecation notice [#933](https://github.com/smarty-php/smarty/pull/933)
- Internal compiler classes always return a string (the internal has_code flag has been removed for simplicity) [#918](https://github.com/smarty-php/smarty/pull/918)
- Fix invalid classnames in Runtime code for foreach [#1000](https://github.com/smarty-php/smarty/issues/1000)


## [5.0.1] - 2024-03-27
Expand Down
1 change: 0 additions & 1 deletion vendor/smarty/smarty/TODO.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,4 @@

## Unrelated / other
- review (and avoid) use of 'clone' keyword
- compiler->has_code seems silly. Why not have proper return values?
- what is 'user literal support', why are unit tests skipped?
75 changes: 75 additions & 0 deletions vendor/smarty/smarty/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
version: "2"
services:
base:
build:
context: .
dockerfile: ./utilities/testrunners/php72/Dockerfile
volumes:
- smarty-code:/app
working_dir: /app
php72:
extends:
service: base
build:
dockerfile: ./utilities/testrunners/php72/Dockerfile
php73:
extends:
service: base
build:
dockerfile: ./utilities/testrunners/php73/Dockerfile
php74:
extends:
service: base
build:
dockerfile: ./utilities/testrunners/php74/Dockerfile
php80:
extends:
service: base
build:
dockerfile: ./utilities/testrunners/php80/Dockerfile
php81:
extends:
service: base
build:
dockerfile: ./utilities/testrunners/php81/Dockerfile
php82:
extends:
service: base
build:
dockerfile: ./utilities/testrunners/php82/Dockerfile
php83:
extends:
service: base
build:
dockerfile: ./utilities/testrunners/php83/Dockerfile
volumes:
smarty-code:

x-mutagen:
sync:
defaults:
symlink:
mode: "posix-raw"
ignore:
vcs: true
paths:
- ".docker"
- ".env.docker"
- ".bundles"
- "docker-compose.yml"
- ".idea"
- ".DS_Store"
mode: "two-way-resolved"
configurationBeta:
permissions:
defaultOwner: "id:${APP_USER_ID}"
defaultGroup: "id:${APP_GROUP_ID}"
defaultFileMode: 0666
defaultDirectoryMode: 0755
permissions:
defaultOwner: "id:${APP_USER_ID}"
defaultGroup: "id:${APP_GROUP_ID}"
smarty-code:
alpha: "."
beta: "volume://smarty-code"

3 changes: 3 additions & 0 deletions vendor/smarty/smarty/docs/api/variables/streams.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,7 @@ template.
{$foo:bar}
```

NB. Support for using streams to call variables is deprecated since Smarty v5.1 and will be removed
in a future version.

See also [`Template Resources`](../resources.md)
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,30 @@ Various basic operators can be applied directly to variable values.
> complex, it may be a good idea to move the bits that do not deal
> explicitly with presentation to PHP by way of plugins or modifiers.
## List
The following is a list of recognized operators, which must be
separated from surrounding elements by spaces. Note that items listed in
\[brackets\] are optional. PHP equivalents are shown where applicable.

| Operator | Alternates | Syntax Example | Meaning | PHP Equivalent |
|--------------------|------------|----------------------|--------------------------------|--------------------|
| == | eq | $a eq $b | equals | == |
| != | ne, neq | $a neq $b | not equals | != |
| > | gt | $a gt $b | greater than | > |
| < | lt | $a lt $b | less than | < |
| >= | gte, ge | $a ge $b | greater than or equal | >= |
| <= | lte, le | $a le $b | less than or equal | <= |
| === | | $a === 0 | check for identity | === |
| ! | not | not $a | negation (unary) | ! |
| % | mod | $a mod $b | modulo | % |
| is \[not\] div by | | $a is not div by 4 | divisible by | $a % $b == 0 |
| is \[not\] even | | $a is not even | \[not\] an even number (unary) | $a % 2 == 0 |
| is \[not\] even by | | $a is not even by $b | grouping level \[not\] even | ($a / $b) % 2 == 0 |
| is \[not\] odd | | $a is not odd | \[not\] an odd number (unary) | $a % 2 != 0 |
| is \[not\] odd by | | $a is not odd by $b | \[not\] an odd grouping | ($a / $b) % 2 != 0 |
| is in | | $a is in $b | exists in array | in_array($a, $b) |
| is \[not\] in | | $a is not in $b | does not exist in array | !in_array($a, $b) |

## Ternary
You can use the `?:` (or ternary) operator to test one expression and present the value
of the second or third expression, based on the result of the test.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,8 @@
`{if}` statements in Smarty have much the same flexibility as PHP
[if](https://www.php.net/if) statements, with a few added features for the
template engine. Every `{if}` must be paired with a matching `{/if}`.
`{else}` and `{elseif}` are also permitted. All PHP conditionals and
functions are recognized, such as *\|\|*, *or*, *&&*, *and*,
*is_array()*, etc.

The following is a list of recognized qualifiers, which must be
separated from surrounding elements by spaces. Note that items listed in
\[brackets\] are optional. PHP equivalents are shown where applicable.

## Qualifiers

| Qualifier | Alternates | Syntax Example | Meaning | PHP Equivalent |
|--------------------|------------|----------------------|--------------------------------|--------------------|
| == | eq | $a eq $b | equals | == |
| != | ne, neq | $a neq $b | not equals | != |
| > | gt | $a gt $b | greater than | > |
| < | lt | $a lt $b | less than | < |
| >= | gte, ge | $a ge $b | greater than or equal | >= |
| <= | lte, le | $a le $b | less than or equal | <= |
| === | | $a === 0 | check for identity | === |
| ! | not | not $a | negation (unary) | ! |
| % | mod | $a mod $b | modulo | % |
| is \[not\] div by | | $a is not div by 4 | divisible by | $a % $b == 0 |
| is \[not\] even | | $a is not even | \[not\] an even number (unary) | $a % 2 == 0 |
| is \[not\] even by | | $a is not even by $b | grouping level \[not\] even | ($a / $b) % 2 == 0 |
| is \[not\] odd | | $a is not odd | \[not\] an odd number (unary) | $a % 2 != 0 |
| is \[not\] odd by | | $a is not odd by $b | \[not\] an odd grouping | ($a / $b) % 2 != 0 |
`{else}` and `{elseif}` are also permitted. All [operators](../language-basic-syntax/language-syntax-operators.md) are recognized, such as *==*,
*\|\|*, *or*, *&&*, *and*, etc and you can use modifiers as functions, such as *is_array()*.

## Examples
```smarty
Expand Down
Loading

0 comments on commit ce0fad4

Please sign in to comment.