Skip to content

Commit ace6fa3

Browse files
committed
support for PHP 8.0, updated readme a bit, require smpl 1.0+
1 parent b1158a2 commit ace6fa3

File tree

4 files changed

+15
-9
lines changed

4 files changed

+15
-9
lines changed

.github/workflows/run-tests.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ jobs:
1414
fail-fast: false
1515
matrix:
1616
os: [ ubuntu-latest, windows-latest, macos-latest ]
17-
php: [ 8.1 ]
17+
php: [ 8.0, 8.1 ]
1818
dependency-version: [ prefer-lowest, prefer-stable ]
1919

20-
name: ${{ matrix.dependency-version }} on ${{ matrix.os }}
20+
name: PHP${{ matrix.php }} with ${{ matrix.dependency-version }} on ${{ matrix.os }}
2121

2222
steps:
2323
- name: Checkout code
@@ -37,6 +37,6 @@ jobs:
3737
run: |
3838
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
3939
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
40-
40+
4141
- name: Execute tests
42-
run: vendor/bin/pest
42+
run: vendor/bin/pest

composer.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
"license": "MIT",
66
"homepage": "https://github.com/leongrdic/php-dataplater",
77
"require": {
8-
"php": ">=8.1",
8+
"php": ">=8.0",
99
"ext-dom": "*",
1010
"ext-libxml": "*",
11-
"leongrdic/smplang": "dev-master"
11+
"leongrdic/smplang": "^1.0"
1212
},
1313
"require-dev": {
1414
"pestphp/pest": "^1.21",

readme.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
# Dataplater
22

3+
[![release](http://poser.pugx.org/leongrdic/dataplater/v)](https://packagist.org/packages/leongrdic/dataplater)
4+
[![php-version](http://poser.pugx.org/leongrdic/dataplater/require/php)](https://packagist.org/packages/leongrdic/dataplater)
5+
[![license](http://poser.pugx.org/leongrdic/dataplater/license)](https://packagist.org/packages/leongrdic/dataplater)
6+
37
[![run-tests](https://github.com/leongrdic/php-dataplater/actions/workflows/run-tests.yml/badge.svg)](https://github.com/leongrdic/php-dataplater/actions/workflows/run-tests.yml)
48

59
Dataplater is a templating engine written in PHP that uses HTML data-attributes and keeps templates valid and clean.
6-
This makes Dataplater perfect for creating document templates like invoices, contracts, emails, etc. which can be previewed in the browser before rendering.
10+
This makes Dataplater perfect for creating document templates like invoices, contracts, emails, etc. which can be **previewed in the browser before rendering**.
711

812
## Features
913
- 💻 make HTML templates that look great even before rendering
@@ -37,7 +41,7 @@ composer require leongrdic/dataplater
3741

3842
### Requirements
3943

40-
- PHP 8.1+
44+
- PHP 8.0+
4145
- DOM & XML extensions
4246

4347
## Usage

src/PhpProxy.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@
22

33
namespace Le\Dataplater;
44

5+
use Closure;
6+
57
class PhpProxy
68
{
79
public function __get(string $name)
810
{
9-
return $name(...);
11+
return Closure::fromCallable($name);
1012
}
1113
}

0 commit comments

Comments
 (0)