Skip to content

Commit

Permalink
Fix dynamic property deprecations / Upgrade php min versions
Browse files Browse the repository at this point in the history
  • Loading branch information
ragboyjr committed Nov 2, 2024
1 parent fadf8aa commit ed72c54
Show file tree
Hide file tree
Showing 5 changed files with 76 additions and 85 deletions.
42 changes: 21 additions & 21 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,29 @@ on: [push]

jobs:
run:
runs-on: 'ubuntu-latest'
runs-on: "ubuntu-latest"
strategy:
matrix:
php-versions: ['7.4', '8.0', '8.1', '8.2']
phpunit-versions: ['9.5']
php-versions: ["8.2", "8.3", "8.4"]
phpunit-versions: ["11.4"]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring, intl
ini-values: post_max_size=256M, max_execution_time=180
coverage: xdebug
tools: php-cs-fixer, phpunit:${{ matrix.phpunit-versions }}
env:
GITHUB_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring, intl
ini-values: post_max_size=256M, max_execution_time=180
coverage: xdebug
tools: php-cs-fixer, phpunit:${{ matrix.phpunit-versions }}
env:
GITHUB_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}

- name: Validate Composer
run: composer validate
- name: Install Composer Deps
run: composer install
- name: Run Tests
run: phpunit --testdox --coverage-text --coverage-clover=coverage.clover
- name: Validate Composer
run: composer validate
- name: Install Composer Deps
run: composer install
- name: Run Tests
run: phpunit --testdox --coverage-text --coverage-clover=coverage.clover
96 changes: 48 additions & 48 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,52 +1,52 @@
{
"name": "league/plates",
"description": "Plates, the native PHP template system that's fast, easy to use and easy to extend.",
"keywords": [
"league",
"package",
"templating",
"templates",
"views"
],
"homepage": "https://platesphp.com",
"license": "MIT",
"authors" : [
{
"name": "Jonathan Reinink",
"email": "[email protected]",
"role": "Developer"
},
{
"name": "RJ Garcia",
"email": "[email protected]",
"role": "Developer"
}
],
"require" : {
"php": "^7.1|^8.0"
"name": "league/plates",
"description": "Plates, the native PHP template system that's fast, easy to use and easy to extend.",
"keywords": [
"league",
"package",
"templating",
"templates",
"views"
],
"homepage": "https://platesphp.com",
"license": "MIT",
"authors": [
{
"name": "Jonathan Reinink",
"email": "[email protected]",
"role": "Developer"
},
"require-dev": {
"mikey179/vfsstream": "^1.6",
"phpunit/phpunit": "^9.5",
"squizlabs/php_codesniffer": "^3.5"
},
"autoload": {
"psr-4": {
"League\\Plates\\": "src"
}
},
"autoload-dev": {
"psr-4": {
"League\\Plates\\Tests\\": "tests"
}
},
"extra": {
"branch-alias": {
"dev-master": "3.0-dev"
}
},
"scripts": {
"test": "phpunit --testdox --colors=always",
"docs": "hugo -s doc server"
{
"name": "RJ Garcia",
"email": "[email protected]",
"role": "Developer"
}
],
"require": {
"php": "^8.0"
},
"require-dev": {
"mikey179/vfsstream": "^1.6",
"phpunit/phpunit": "^11.4",
"squizlabs/php_codesniffer": "^3.5"
},
"autoload": {
"psr-4": {
"League\\Plates\\": "src"
}
},
"autoload-dev": {
"psr-4": {
"League\\Plates\\Tests\\": "tests"
}
},
"extra": {
"branch-alias": {
"dev-master": "3.0-dev"
}
},
"scripts": {
"test": "phpunit --testdox --colors=always",
"docs": "hugo -s doc server"
}
}
1 change: 1 addition & 0 deletions doc/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.hugo_build.lock
14 changes: 1 addition & 13 deletions doc/layouts/_default/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -103,17 +103,5 @@ <h2>{{ .Name }}</h2>
window.location.href = pathParts.join("/");
});
</script>

{{ if .Site.GoogleAnalytics }}
<script>
(function(b,o,i,l,e,r){b.GoogleAnalyticsObject=l;b[l]||(b[l]=
function(){(b[l].q=b[l].q||[]).push(arguments)});b[l].l=+new Date;
e=o.createElement(i);r=o.getElementsByTagName(i)[0];
e.src='//www.google-analytics.com/analytics.js';
r.parentNode.insertBefore(e,r)}(window,document,'script','ga'));
ga('create','{{ .Site.GoogleAnalytics }}');ga('send','pageview');
</script>
{{ end }}

</body>
</html>
</html>
8 changes: 5 additions & 3 deletions src/Template/Func.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,11 @@ public function getCallback()
*/
public function call(?Template $template = null, $arguments = array())
{
if (is_array($this->callback) and
isset($this->callback[0]) and
$this->callback[0] instanceof ExtensionInterface
if (
is_array($this->callback) &&
isset($this->callback[0]) &&
$this->callback[0] instanceof ExtensionInterface &&
property_exists($this->callback[0], 'template')
) {
$this->callback[0]->template = $template;
}
Expand Down

0 comments on commit ed72c54

Please sign in to comment.