Compare commits

..

83 Commits

Author SHA1 Message Date
Andy Miller
d7aaef986e
updated version 2024-10-28 11:43:14 +00:00
Andy Miller
ab9363c478
Merge branch 'develop' into 1.8 2024-10-28 11:32:43 +00:00
Andy Miller
7f2da96c0b
update vendor libs 2024-10-28 11:31:20 +00:00
Andy Miller
b16db4b9c0
typo 2024-10-27 12:21:00 +00:00
Andy Miller
42c0682dd8
Merge branch '1.8' of github.com:getgrav/grav into 1.8 2024-10-26 15:25:11 +01:00
Andy Miller
1969ec1876
monolog2 support 2024-10-26 15:25:00 +01:00
Jeremy Gonyea
c30661736c
Fix for #3164. Adds aliases as possible commands during lookup (#3863) 2024-10-26 15:18:43 +01:00
Andy Miller
3d2dfa2faf
Updated changelog 2024-10-25 20:18:33 +01:00
Andy Miller
f06bbfc563
Missing RocketTheme\Toolbox\Event\EventSubscriberInterface 2024-10-25 20:17:41 +01:00
Andy Miller
37e5526a4f
updated changelog 2024-10-25 18:21:23 +01:00
Andy Miller
85c4b8279e
fixes for PHP 8.4 - Implicitly nullable parameter declarations deprecated 2024-10-25 18:20:41 +01:00
Andy Miller
46736ce256
upgrade to doctrine/collectons 2.2 2024-10-25 17:53:51 +01:00
Andy Miller
800b2e1ecb
updated changelog 2024-10-25 17:39:34 +01:00
Andy Miller
4f065b95a7
updated composer to latest version 2024-10-25 17:33:47 +01:00
Andy Miller
b59a3adc80
avif support via getgrav/image updates 2024-10-25 15:29:16 +01:00
Andy Miller
4ec9a3a489
Merge branch 'develop' into 1.8 2024-10-25 10:49:38 +01:00
Andy Miller
173d08243a
use dev-master of Clockwork to support Monolog2/3 2024-10-24 11:58:04 +01:00
Andy Miller
62c60b8ba1
Fixed a couple of monolog deprecations 2024-10-23 17:17:51 +01:00
Andy Miller
59031a8711
use BUILD_SCRIPT_URL_18 in build 2024-10-23 17:07:10 +01:00
Andy Miller
5cd859865f
use build-grav-18.sh build script 2024-10-23 16:44:49 +01:00
Andy Miller
16eafbbb04
udpate build.yaml 2024-10-23 14:37:45 +01:00
Andy Miller
3947bb03aa
set version properly 2024-10-23 13:14:26 +01:00
Andy Miller
ee55d097f2
set testing true 2024-10-23 13:08:34 +01:00
Andy Miller
ae567469b7
prepare for beta release 2024-10-23 13:08:06 +01:00
Andy Miller
f6decaab15
Merge branch 'develop' into 1.8 2024-10-23 13:04:01 +01:00
Andy Miller
10d36a10bc
updated composer.lock 2024-10-23 12:16:29 +01:00
Andy Miller
574a430a10
more composer updates 2024-10-23 12:14:45 +01:00
Andy Miller
302f02ca5d
revert schema 2024-10-22 18:01:41 +01:00
Andy Miller
c334479e4c
Merge branch 'develop' into feature/v1.8 2024-10-22 15:47:58 +01:00
Andy Miller
b96483c49a
Fix tests for latest Codeception version 2024-10-22 13:24:35 +01:00
Andy Miller
cccce836f6
Merge branch 'develop' into feature/v1.8 2024-10-22 12:09:26 +01:00
Andy Miller
bdcb77d429
Merge branch 'develop' into feature/v1.8 2024-10-21 14:20:23 +01:00
Andy Miller
e15cc86716
toAscii() should be static 2024-10-21 14:19:45 +01:00
Andy Miller
dcfbd73d43
twig compatibility stuff 2024-10-14 20:53:07 +01:00
Andy Miller
1967910789
upgrade to latest symfony 6.4 + PHP 8.2 2024-10-14 19:27:43 +01:00
Andy Miller
4f1f9a7755
Merge branch 'develop' into feature/v1.8
# Conflicts:
#	CHANGELOG.md
#	composer.lock
2024-10-14 19:25:17 +01:00
Andy Miller
e4f483998d
composer lock file 2023-05-12 13:50:50 -06:00
Andy Miller
7a393101ee
Merge branch 'develop' into feature/v1.8
# Conflicts:
#	CHANGELOG.md
#	composer.json
#	composer.lock
#	system/blueprints/config/system.yaml
#	system/src/Grav/Common/Twig/WriteCacheFileTrait.php
2023-05-12 13:44:07 -06:00
Matias Griese
10b15bedf2 Composer update 2022-08-18 13:27:58 +03:00
Matias Griese
8c14a9907e Merge branch 'develop' of github.com:getgrav/grav into feature/v1.8
 Conflicts:
	composer.lock
2022-08-18 13:27:06 +03:00
Matias Griese
f490d9a7e1 Fix phpstan error 2022-06-29 13:16:56 +03:00
Matias Griese
81ca0c2e25 Merge branch 'develop' of github.com:getgrav/grav into feature/v1.8
 Conflicts:
	CHANGELOG.md
	composer.json
	composer.lock
2022-06-29 13:14:06 +03:00
Matias Griese
fbfac9f8f4 Composer update 2022-06-29 13:12:11 +03:00
Matias Griese
d6e72708bf Composer update 2022-06-15 14:41:05 +03:00
Matias Griese
2aff274c31 Merge branch 'develop' of github.com:getgrav/grav into feature/v1.8
 Conflicts:
	composer.lock
	system/src/Grav/Common/GPM/Remote/AbstractPackageCollection.php
2022-06-15 14:39:38 +03:00
Matias Griese
74c1dfa433 Composer update 2022-05-20 16:48:41 +03:00
Matias Griese
f51a9d9d87 Merge branch 'develop' of github.com:getgrav/grav into feature/v1.8
 Conflicts:
	CHANGELOG.md
	composer.lock
2022-05-20 16:45:54 +03:00
Matias Griese
e5498f58e6 Composer update 2022-04-19 11:05:19 +03:00
Matias Griese
8f58a4494c Merge branch 'develop' of github.com:getgrav/grav into feature/v1.8
 Conflicts:
	composer.lock
2022-04-19 11:04:33 +03:00
Matias Griese
5bfd43256d Merge branch 'develop' of github.com:getgrav/grav into feature/v1.8 2022-03-31 11:31:04 +03:00
Matias Griese
69bc3f7f25 Composer update 2022-03-31 11:27:39 +03:00
Matias Griese
782ceada80 Merge branch 'develop' of github.com:getgrav/grav into feature/v1.8
 Conflicts:
	CHANGELOG.md
	composer.lock
2022-03-31 11:26:37 +03:00
Matias Griese
36392acbea Composer update 2022-03-23 13:00:19 +02:00
Matias Griese
4b564df38f Merge branch 'develop' of github.com:getgrav/grav into feature/v1.8
 Conflicts:
	CHANGELOG.md
2022-03-23 12:58:48 +02:00
Matias Griese
9d179e5b2a Composer update 2022-03-09 12:33:20 +02:00
Matias Griese
6032bd07dc Merge branch 'develop' of github.com:getgrav/grav into feature/v1.8
 Conflicts:
	composer.json
	composer.lock
2022-03-09 12:32:31 +02:00
Matias Griese
9a87a509b0 Merge branch 'develop' of github.com:getgrav/grav into feature/v1.8 2022-02-22 11:35:29 +02:00
Matias Griese
46f2a81b21 Phpstan fixes 2022-02-19 15:20:06 +02:00
Matias Griese
f5e21645f6 Support phpstan level 6 in Framework classes 2022-02-19 14:17:02 +02:00
Matias Griese
12c8cf9c40 Phpstan fixes 2022-02-19 13:47:29 +02:00
Matias Griese
93bb929b38 Phpstan updates 2022-02-19 13:17:34 +02:00
Matias Griese
85eaf308d5 Fixed FlexDirectory::getCache() after converting to Symfony Cache 2022-02-19 13:17:19 +02:00
Matias Griese
d9ede28b99 Composer update 2022-02-19 12:18:40 +02:00
Matias Griese
2e65b0eea4 Merge branch 'develop' of github.com:getgrav/grav into feature/v1.8
 Conflicts:
	composer.lock
2022-02-19 12:18:00 +02:00
Matias Griese
7660a80ef7 Use older monolog due to clockwork incompatibility 2022-02-16 09:51:09 +02:00
Matias Griese
6d0a436834 Changelog update (pt 2) 2022-02-12 16:58:07 +02:00
Matias Griese
176fd8f1d8 Changelog update 2022-02-12 16:52:25 +02:00
Matias Griese
2f85fe9c99 Move unmaintained/unused vendor dependencies to the end of the list 2022-02-12 16:49:09 +02:00
Matias Griese
d93d297dc4 Updated to **Monolog 2.3** 2022-02-12 16:36:58 +02:00
Matias Griese
fcd9093f84 Use **Symfony Cache** instead of unmaintaided **Doctrine Cache** (with backward compatibility layer) 2022-02-12 15:33:38 +02:00
Matias Griese
58b54a70bd Removed system.umask_fix setting for security reasons 2022-02-12 13:49:30 +02:00
Matias Griese
9daa0a9041 Merge branch 'develop' of github.com:getgrav/grav into feature/v1.8
 Conflicts:
	composer.lock
2022-02-12 13:08:23 +02:00
Matias Griese
965e03daf2 Update dependencies so that everything works again 2022-02-07 14:14:11 +02:00
Matias Griese
b6c3db082a Update composer dependencies 2022-02-07 14:03:05 +02:00
Matias Griese
26b68953c4 Composer update 2022-02-07 13:48:47 +02:00
Matias Griese
fba015c5d9 Merge branch 'develop' of github.com:getgrav/grav into feature/v1.8
 Conflicts:
	composer.json
	composer.lock
2022-02-07 13:47:41 +02:00
Matias Griese
7223c177c4 Merge branch 'develop' of github.com:getgrav/grav into feature/v1.8
 Conflicts:
	composer.json
	composer.lock
2021-12-08 10:08:34 +02:00
Matias Griese
a68bdd2b75 Fixed Toolbox Event 2021-11-25 14:17:13 +02:00
Matias Griese
38e4624506 Composer update 2021-11-25 11:51:40 +02:00
Matias Griese
ad9287ee0f Merge branch 'develop' of github.com:getgrav/grav into feature/v1.8
 Conflicts:
	composer.json
	composer.lock
2021-11-25 11:46:21 +02:00
Matias Griese
777ac119de Update all libraries (WIP) 2021-10-20 20:33:05 +03:00
Matias Griese
076c64841e Merge branch 'develop' of github.com:getgrav/grav into feature/v1.8 2021-10-20 20:28:50 +03:00
Matias Griese
62cb40fef5 Composer update 2021-10-20 20:28:24 +03:00
497 changed files with 5011 additions and 3721 deletions

View File

@ -11,7 +11,7 @@ jobs:
permissions: permissions:
contents: write # for release creation (svenstaro/upload-release-action) contents: write # for release creation (svenstaro/upload-release-action)
if: "!github.event.release.prerelease" #if: "!github.event.release.prerelease"
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
@ -23,7 +23,7 @@ jobs:
- name: Setup PHP - name: Setup PHP
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
php-version: 7.3 php-version: 8.2
extensions: opcache, gd extensions: opcache, gd
tools: composer:v2 tools: composer:v2
coverage: none coverage: none
@ -38,10 +38,10 @@ jobs:
- name: Retrieval of Builder Scripts - name: Retrieval of Builder Scripts
run: | run: |
# Real Grav URL # Real Grav URL
curl --silent -H "Authorization: token ${{ secrets.GLOBAL_TOKEN }}" -H "Accept: application/vnd.github.v3.raw" ${{ secrets.BUILD_SCRIPT_URL }} --output build-grav.sh curl --silent -H "Authorization: token ${{ secrets.GLOBAL_TOKEN }}" -H "Accept: application/vnd.github.v3.raw" ${{ secrets.BUILD_SCRIPT_URL_18 }} --output build-grav.sh
# Development Local URL # Development Local URL
# curl ${{ secrets.BUILD_SCRIPT_URL }} --output build-grav.sh # curl ${{ secrets.BUILD_SCRIPT_URL_18 }} --output build-grav.sh
- name: Grav Builder - name: Grav Builder
run: | run: |

View File

@ -10,18 +10,20 @@ permissions:
contents: read # to fetch code (actions/checkout) contents: read # to fetch code (actions/checkout)
jobs: jobs:
unit-tests: unit-tests:
strategy:
matrix:
php: ['8.3', '8.2', '8.1', '8.0', '7.4', '7.3']
os: [ubuntu-latest]
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: strategy:
- uses: actions/checkout@v4 matrix:
php: [8.3, 8.2, 8.1, 8.0, 7.4, 7.3]
os: [ubuntu-latest]
- name: Setup PHP ${{ matrix.php }} steps:
- uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
php-version: ${{ matrix.php }} php-version: ${{ matrix.php }}
@ -29,14 +31,20 @@ jobs:
tools: composer:v2 tools: composer:v2
coverage: none coverage: none
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# - name: Update composer
# run: composer update
#
# - name: Validate composer.json and composer.lock
# run: composer validate
- name: Get composer cache directory - name: Get composer cache directory
id: composer-cache id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache dependencies - name: Cache dependencies
uses: actions/cache@v4 uses: actions/cache@v2
with: with:
path: ${{ steps.composer-cache.outputs.dir }} path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}

View File

@ -1,3 +1,33 @@
# v1.8.0-beta.2
## 10/28/2024
1. [](#new)
* Use `dev-master` branch of Clockwork to support Monolog2 / Monolog3
* `AVIF` image support via updates to `getgrav/Image` library
* Upgraded to **Doctrine Collection 2.2**
1. [](#improved)
* Updated composer libraries
* Updated composer.php binary to `v2.8.1`
* Fixes for PHP 8.4 - Implicitly nullable parameter declarations deprecated
* Added back Missing `RocketTheme\Toolbox\Event\EventSubscriberInterface` for Gantry5
1. [](#bugfix)
* Various fixes to use `$log->debug()`, `$log->info()`, `$log->warning()` and `$log->error()` For Monolog2 support
# v1.8.0-beta.1
## 10/23/2024
1. [](#new)
* Set minimum requirements to **PHP 8.2**
* Updated to **Twig 2.14**
* Updated to **Symfony 6.4**
* Updated to **Monolog 2.3**
* Updated to **RocketTheme/Toolbox 2.0**
* Updated to **Composer/Semver 3.2**
* Use **Symfony Cache** instead of unmaintained **Doctrine Cache**
* Removed unsupported **APC**, **WinCache**, **XCache** and **Memcache**, use apcu or memcached instead
* Removed `system.umask_fix` setting for security reasons
* Support phpstan level 6 in Framework classes
# v1.7.48 # v1.7.48
## 10/28/2024 ## 10/28/2024
@ -12,18 +42,18 @@
## 10/23/2024 ## 10/23/2024
1. [](#new) 1. [](#new)
* New `Utils::toAscii()` method * New `Utils::toAscii()` method
* Added support for Clockwork Debugger to allow web UI (requires new `clockwork-web` plugin) * Added support for Clockwork Debugger to allow web UI (requires new `clockwork-web` plugin)
1. [](#improved) 1. [](#improved)
* Include modular sub-pages in last-modification date computation [#3562](https://github.com/getgrav/grav/pull/3562) * Include modular sub-pages in last-modification date computation [#3562](https://github.com/getgrav/grav/pull/3562)
* Updated vendor libs to latest versions * Updated vendor libs to latest versions
* Updated JQuery to `3.7.1` [#3787](https://github.com/getgrav/grav/pull/3827) * Updated JQuery to `3.7.1` [#3787](https://github.com/getgrav/grav/pull/3827)
* Updated vendor libraries to latest versions * Updated vendor libraries to latest versions
* Support for Fediverse Creator meta tag [#3844](https://github.com/getgrav/grav/pull/3844) * Support for Fediverse Creator meta tag [#3844](https://github.com/getgrav/grav/pull/3844)
1. [](#bugfix) 1. [](#bugfix)
* Fixes deprecated for return type in Filesystem with PHP 8.3.6 [#3831](https://github.com/getgrav/grav/issues/3831) * Fixes deprecated for return type in Filesystem with PHP 8.3.6 [#3831](https://github.com/getgrav/grav/issues/3831)
* Fix for `exif_imagtetype()` throwing an exception when file doesn't exist * Fix for `exif_imagtetype()` throwing an exception when file doesn't exist
* Fix JSON output comments check with content type [#3859](https://github.com/getgrav/grav/pull/3859) * Fix JSON output comments check with content type [#3859](https://github.com/getgrav/grav/pull/3859)
# v1.7.46 # v1.7.46
## 05/15/2024 ## 05/15/2024

View File

@ -39,22 +39,22 @@ You can download a **ready-built** package from the [Downloads page on https://g
You can create a new project with the latest **stable** Grav release with the following command: You can create a new project with the latest **stable** Grav release with the following command:
```bash ```
composer create-project getgrav/grav ~/webroot/grav $ composer create-project getgrav/grav ~/webroot/grav
``` ```
### From GitHub ### From GitHub
1. Clone the Grav repository from [https://github.com/getgrav/grav]() to a folder in the webroot of your server, e.g. `~/webroot/grav`. Launch a **terminal** or **console** and navigate to the webroot folder: 1. Clone the Grav repository from [https://github.com/getgrav/grav]() to a folder in the webroot of your server, e.g. `~/webroot/grav`. Launch a **terminal** or **console** and navigate to the webroot folder:
```bash ```
cd ~/webroot $ cd ~/webroot
git clone https://github.com/getgrav/grav.git $ git clone https://github.com/getgrav/grav.git
``` ```
2. Install the **plugin** and **theme dependencies** by using the [Grav CLI application](https://learn.getgrav.org/advanced/grav-cli) `bin/grav`: 2. Install the **plugin** and **theme dependencies** by using the [Grav CLI application](https://learn.getgrav.org/advanced/grav-cli) `bin/grav`:
```bash ```
cd ~/webroot/grav $ cd ~/webroot/grav
bin/grav install $ bin/grav install
``` ```
Check out the [install procedures](https://learn.getgrav.org/basics/installation) for more information. Check out the [install procedures](https://learn.getgrav.org/basics/installation) for more information.
@ -63,35 +63,36 @@ Check out the [install procedures](https://learn.getgrav.org/basics/installation
You can download [plugins](https://getgrav.org/downloads/plugins) or [themes](https://getgrav.org/downloads/themes) manually from the appropriate tab on the [Downloads page on https://getgrav.org](https://getgrav.org/downloads), but the preferred solution is to use the [Grav Package Manager](https://learn.getgrav.org/advanced/grav-gpm) or `GPM`: You can download [plugins](https://getgrav.org/downloads/plugins) or [themes](https://getgrav.org/downloads/themes) manually from the appropriate tab on the [Downloads page on https://getgrav.org](https://getgrav.org/downloads), but the preferred solution is to use the [Grav Package Manager](https://learn.getgrav.org/advanced/grav-gpm) or `GPM`:
```bash ```
bin/gpm index $ bin/gpm index
``` ```
This will display all the available plugins and then you can install one or more with: This will display all the available plugins and then you can install one or more with:
```bash ```
bin/gpm install <plugin/theme> $ bin/gpm install <plugin/theme>
``` ```
# Updating # Updating
To update Grav you should use the [Grav Package Manager](https://learn.getgrav.org/advanced/grav-gpm) or `GPM`: To update Grav you should use the [Grav Package Manager](https://learn.getgrav.org/advanced/grav-gpm) or `GPM`:
```bash ```
bin/gpm selfupgrade $ bin/gpm selfupgrade
``` ```
To update plugins and themes: To update plugins and themes:
```bash ```
bin/gpm update $ bin/gpm update
``` ```
## Upgrading from older version ## Upgrading from older version
* [Upgrading to Grav 1.8](https://learn.getgrav.org/16/advanced/grav-development/grav-18-upgrade-guide)
* [Upgrading to Grav 1.7](https://learn.getgrav.org/16/advanced/grav-development/grav-17-upgrade-guide) * [Upgrading to Grav 1.7](https://learn.getgrav.org/16/advanced/grav-development/grav-17-upgrade-guide)
* [Upgrading to Grav 1.6](https://learn.getgrav.org/16/advanced/grav-development/grav-16-upgrade-guide) * [Upgrading to Grav 1.6](https://learn.getgrav.org/16/advanced/grav-development/grav-16-upgrade-guide)
* [Upgrading from Grav <1.6](https://learn.getgrav.org/16/advanced/grav-development/grav-15-upgrade-guide) * [Upgrading from Grav before 1.6](https://learn.getgrav.org/16/advanced/grav-development/grav-15-upgrade-guide)
# Contributing # Contributing
We appreciate any contribution to Grav, whether it is related to bugs, grammar, or simply a suggestion or improvement! Please refer to the [Contributing guide](CONTRIBUTING.md) for more guidance on this topic. We appreciate any contribution to Grav, whether it is related to bugs, grammar, or simply a suggestion or improvement! Please refer to the [Contributing guide](CONTRIBUTING.md) for more guidance on this topic.

View File

@ -12,7 +12,7 @@ We are focusing our security updates on the following versions
## :pushpin: Note on Security Severity ## :pushpin: Note on Security Severity
> NOTE: Please use the following guidelines when selecting a **Severity**. Submitted advisories that are marked **High** or **Critical** that don't meet the guidelines below will be closed. > NOTE: Please use the following guidlines when selecting a **Severity**. Submitted advisories that are marked **High** or **Critical** that don't meet the guidelines below will be cliosed.
* **CRITICAL** - no account required, can modify content, or run malicious code or nefarious activity without any access. * **CRITICAL** - no account required, can modify content, or run malicious code or nefarious activity without any access.
* **HIGH** - publisher level account able to run malicious code or nefarious activity, or other high level security things. * **HIGH** - publisher level account able to run malicious code or nefarious activity, or other high level security things.

Binary file not shown.

View File

@ -2,7 +2,7 @@
<?php <?php
/** /**
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@ -2,7 +2,7 @@
<?php <?php
/** /**
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@ -2,7 +2,7 @@
<?php <?php
/** /**
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@ -2,7 +2,7 @@ actor: Tester
bootstrap: _bootstrap.php bootstrap: _bootstrap.php
paths: paths:
tests: tests tests: tests
log: tests/_output output: tests/_output
data: tests/_data data: tests/_data
support: tests/_support support: tests/_support
envs: tests/_envs envs: tests/_envs

View File

@ -12,7 +12,7 @@
"homepage": "https://getgrav.org", "homepage": "https://getgrav.org",
"license": "MIT", "license": "MIT",
"require": { "require": {
"php": "^7.3.6 || ^8.0", "php": "^8.2",
"ext-json": "*", "ext-json": "*",
"ext-openssl": "*", "ext-openssl": "*",
"ext-curl": "*", "ext-curl": "*",
@ -20,61 +20,71 @@
"ext-dom": "*", "ext-dom": "*",
"ext-libxml": "*", "ext-libxml": "*",
"ext-gd": "*", "ext-gd": "*",
"symfony/polyfill-mbstring": "~1.23", "symfony/polyfill-mbstring": "^1.24",
"symfony/polyfill-iconv": "^1.23", "symfony/polyfill-iconv": "^1.24",
"symfony/polyfill-php74": "^1.23", "symfony/polyfill-php80": "^1.24",
"symfony/polyfill-php80": "^1.23", "symfony/polyfill-php81": "^1.24",
"symfony/polyfill-php81": "^1.23",
"psr/simple-cache": "^1.0", "psr/simple-cache": "^1.0",
"psr/http-message": "^1.0", "psr/http-message": "^1.1",
"psr/http-server-middleware": "^1.0", "psr/http-server-middleware": "^1.0",
"psr/container": "~1.1.0", "psr/container": "^1.1",
"nyholm/psr7-server": "^1.0", "psr/log": "^1.1",
"nyholm/psr7": "^1.3", "symfony/cache": "^6.4",
"twig/twig": "~v1.44", "symfony/yaml": "^6.4",
"symfony/console": "^6.4",
"symfony/event-dispatcher": "^6.4",
"symfony/var-exporter": "^6.4",
"symfony/var-dumper": "^6.4",
"symfony/process": "^6.4",
"symfony/http-client": "^6.4",
"twig/twig": "^2.1",
"monolog/monolog": "^2.0",
"doctrine/cache": "^2.2",
"doctrine/collections": "^2.2",
"pimple/pimple": "~3.5.0",
"nyholm/psr7-server": "^1.1",
"nyholm/psr7": "^1.8",
"erusev/parsedown": "^1.7", "erusev/parsedown": "^1.7",
"erusev/parsedown-extra": "~0.8", "erusev/parsedown-extra": "~0.8",
"symfony/contracts": "~1.1", "rockettheme/toolbox": "v2.x-dev",
"symfony/yaml": "~4.4", "composer/ca-bundle": "^1.5",
"symfony/console": "~4.4", "composer/semver": "^3.4",
"symfony/event-dispatcher": "~4.4", "dragonmantank/cron-expression": "^3.0",
"symfony/var-dumper": "~4.4", "willdurand/negotiation": "^3.1",
"symfony/process": "~4.4",
"doctrine/cache": "^1.10",
"doctrine/collections": "^1.6",
"guzzlehttp/psr7": "^1.7",
"filp/whoops": "~2.9",
"matthiasmullie/minify": "^1.3",
"monolog/monolog": "~1.25",
"getgrav/image": "^3.0",
"getgrav/cache": "^2.0",
"donatj/phpuseragentparser": "~1.1",
"pimple/pimple": "~3.5.0",
"rockettheme/toolbox": "~1.5",
"maximebf/debugbar": "~1.16",
"league/climate": "^3.6",
"miljar/php-exif": "^0.6",
"composer/ca-bundle": "^1.2",
"dragonmantank/cron-expression": "^1.2",
"willdurand/negotiation": "^3.0",
"itsgoingd/clockwork": "^5.0",
"symfony/http-client": "^4.4",
"composer/semver": "^1.4",
"rhukster/dom-sanitizer": "^1.0", "rhukster/dom-sanitizer": "^1.0",
"matthiasmullie/minify": "^1.3",
"donatj/phpuseragentparser": "~1.9",
"guzzlehttp/psr7": "^2.7",
"filp/whoops": "~2.16",
"itsgoingd/clockwork": "dev-master",
"maximebf/debugbar": "~1.23",
"getgrav/image": "^4.0",
"getgrav/cache": "^2.0",
"antoligy/dom-string-iterators": "^1.0",
"miljar/php-exif": "^0.6",
"league/climate": "^3.8",
"multiavatar/multiavatar-php": "^1.0" "multiavatar/multiavatar-php": "^1.0"
}, },
"require-dev": { "require-dev": {
"codeception/codeception": "^4.1", "codeception/codeception": "^5.1",
"phpstan/phpstan": "^1.8", "phpstan/phpstan": "^1.12",
"phpstan/phpstan-deprecation-rules": "^1.0", "phpstan/phpstan-deprecation-rules": "^1.2",
"phpunit/php-code-coverage": "~9.2", "phpunit/php-code-coverage": "~9.2",
"getgrav/markdowndocs": "^2.0", "getgrav/markdowndocs": "^2.0",
"codeception/module-asserts": "^1.3", "codeception/module-asserts": "*",
"codeception/module-phpbrowser": "^1.0" "codeception/module-phpbrowser": "*",
"rector/rector": "^1.2"
}, },
"repositories": [
{
"type": "vcs",
"url": "https://github.com/rockettheme/toolbox"
}
],
"replace": { "replace": {
"symfony/polyfill-php72": "*", "symfony/polyfill-php72": "*",
"symfony/polyfill-php73": "*" "symfony/polyfill-php73": "*",
"symfony/polyfill-php74": "*"
}, },
"suggest": { "suggest": {
"ext-mbstring": "Recommended for better performance", "ext-mbstring": "Recommended for better performance",
@ -89,12 +99,14 @@
"config": { "config": {
"apcu-autoloader": true, "apcu-autoloader": true,
"platform": { "platform": {
"php": "7.3.6" "php": "8.2"
} }
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {
"Grav\\": "system/src/Grav", "Grav\\": "system/src/Grav",
"Doctrine\\": "system/src/Doctrine",
"RocketTheme\\": "system/src/RocketTheme",
"Twig\\": "system/src/Twig" "Twig\\": "system/src/Twig"
}, },
"files": [ "files": [
@ -117,7 +129,7 @@
"api-17": "vendor/bin/phpdoc-md generate system/src > user/pages/14.api/default.17.md", "api-17": "vendor/bin/phpdoc-md generate system/src > user/pages/14.api/default.17.md",
"post-create-project-cmd": "bin/grav install", "post-create-project-cmd": "bin/grav install",
"phpstan": "vendor/bin/phpstan analyse -l 2 -c ./tests/phpstan/phpstan.neon --memory-limit=720M system/src", "phpstan": "vendor/bin/phpstan analyse -l 2 -c ./tests/phpstan/phpstan.neon --memory-limit=720M system/src",
"phpstan-framework": "vendor/bin/phpstan analyse -l 5 -c ./tests/phpstan/phpstan.neon --memory-limit=480M system/src/Grav/Framework system/src/Grav/Events system/src/Grav/Installer", "phpstan-framework": "vendor/bin/phpstan analyse -l 6 -c ./tests/phpstan/phpstan.neon --memory-limit=480M system/src/Grav/Framework system/src/Grav/Events system/src/Grav/Installer",
"phpstan-plugins": "vendor/bin/phpstan analyse -l 1 -c ./tests/phpstan/plugins.neon --memory-limit=400M user/plugins", "phpstan-plugins": "vendor/bin/phpstan analyse -l 1 -c ./tests/phpstan/plugins.neon --memory-limit=400M user/plugins",
"test": "vendor/bin/codecept run unit", "test": "vendor/bin/codecept run unit",
"test-windows": "vendor\\bin\\codecept run unit" "test-windows": "vendor\\bin\\codecept run unit"

2437
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -10,7 +10,7 @@
namespace Grav; namespace Grav;
\define('GRAV_REQUEST_TIME', microtime(true)); \define('GRAV_REQUEST_TIME', microtime(true));
\define('GRAV_PHP_MIN', '7.3.6'); \define('GRAV_PHP_MIN', '8.2.0');
if (PHP_SAPI === 'cli-server') { if (PHP_SAPI === 'cli-server') {
$symfony_server = stripos(getenv('_'), 'symfony') !== false || stripos($_SERVER['SERVER_SOFTWARE'] ?? '', 'symfony') !== false || stripos($_ENV['SERVER_SOFTWARE'] ?? '', 'symfony') !== false; $symfony_server = stripos(getenv('_'), 'symfony') !== false || stripos($_SERVER['SERVER_SOFTWARE'] ?? '', 'symfony') !== false || stripos($_ENV['SERVER_SOFTWARE'] ?? '', 'symfony') !== false;

View File

@ -619,11 +619,9 @@ form:
options: options:
auto: Auto detect auto: Auto detect
file: File file: File
apc: APC
apcu: APCu apcu: APCu
memcache: Memcache memcache: Memcache
memcached: Memcached memcached: Memcached
wincache: WinCache
redis: Redis redis: Redis
cache.prefix: cache.prefix:
@ -707,20 +705,6 @@ form:
validate: validate:
type: bool type: bool
cache.memcache.server:
type: text
size: medium
label: PLUGIN_ADMIN.MEMCACHE_SERVER
help: PLUGIN_ADMIN.MEMCACHE_SERVER_HELP
placeholder: "localhost"
cache.memcache.port:
type: text
size: small
label: PLUGIN_ADMIN.MEMCACHE_PORT
help: PLUGIN_ADMIN.MEMCACHE_PORT_HELP
placeholder: "11211"
cache.memcached.server: cache.memcached.server:
type: text type: text
size: medium size: medium
@ -884,17 +868,6 @@ form:
validate: validate:
type: bool type: bool
twig.umask_fix:
type: toggle
label: PLUGIN_ADMIN.TWIG_UMASK_FIX
help: PLUGIN_ADMIN.TWIG_UMASK_FIX_HELP
highlight: 0
options:
1: PLUGIN_ADMIN.YES
0: PLUGIN_ADMIN.NO
validate:
type: bool
assets: assets:
type: tab type: tab
title: PLUGIN_ADMIN.ASSETS title: PLUGIN_ADMIN.ASSETS

File diff suppressed because it is too large Load Diff

View File

@ -93,13 +93,13 @@ cache:
enabled: true # Set to true to enable caching enabled: true # Set to true to enable caching
check: check:
method: file # Method to check for updates in pages: file|folder|hash|none method: file # Method to check for updates in pages: file|folder|hash|none
driver: auto # One of: auto|file|apcu|memcache|wincache driver: auto # One of: auto|file|apcu|memcached|redis
prefix: 'g' # Cache prefix string (prevents cache conflicts) prefix: 'g' # Cache prefix string (prevents cache conflicts)
purge_at: '0 4 * * *' # How often to purge old file cache (using new scheduler) purge_at: '0 4 * * *' # How often to purge old file cache (using new scheduler)
clear_at: '0 3 * * *' # How often to clear cache (using new scheduler) clear_at: '0 3 * * *' # How often to clear cache (using new scheduler)
clear_job_type: 'standard' # Type to clear when processing the scheduled clear job `standard`|`all` clear_job_type: 'standard' # Type to clear when processing the scheduled clear job `standard`|`all`
clear_images_by_default: false # By default grav does not include processed images in cache clear, this can be enabled clear_images_by_default: false # By default grav does not include processed images in cache clear, this can be enabled
cli_compatibility: false # Ensures only non-volatile drivers are used (file, redis, memcache, etc.) cli_compatibility: false # Ensures only non-volatile drivers are used (file, redis, memcached, etc.)
lifetime: 604800 # Lifetime of cached data in seconds (0 = infinite) lifetime: 604800 # Lifetime of cached data in seconds (0 = infinite)
gzip: false # GZip compress the page output gzip: false # GZip compress the page output
allow_webserver_gzip: false # If true, `content-encoding: identity` but connection isn't closed before `onShutDown()` event allow_webserver_gzip: false # If true, `content-encoding: identity` but connection isn't closed before `onShutDown()` event
@ -117,7 +117,6 @@ twig:
undefined_filters: true # Allow undefined filters undefined_filters: true # Allow undefined filters
safe_functions: [] # List of PHP functions which are allowed to be used as Twig functions safe_functions: [] # List of PHP functions which are allowed to be used as Twig functions
safe_filters: [] # List of PHP functions which are allowed to be used as Twig filters safe_filters: [] # List of PHP functions which are allowed to be used as Twig filters
umask_fix: false # By default Twig creates cached files as 755, fix switches this to 775
assets: # Configuration for Assets Manager (JS, CSS) assets: # Configuration for Assets Manager (JS, CSS)
css_pipeline: false # The CSS pipeline is the unification of multiple CSS resources into one file css_pipeline: false # The CSS pipeline is the unification of multiple CSS resources into one file

View File

@ -3,19 +3,19 @@
/** /**
* @package Grav\Core * @package Grav\Core
* *
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */
// Some standard defines // Some standard defines
define('GRAV', true); define('GRAV', true);
define('GRAV_VERSION', '1.7.48'); define('GRAV_VERSION', '1.8.0-beta.2');
define('GRAV_SCHEMA', '1.7.0_2020-11-20_1'); define('GRAV_SCHEMA', '1.7.0_2020-11-20_1');
define('GRAV_TESTING', false); define('GRAV_TESTING', true);
// PHP minimum requirement // PHP minimum requirement
if (!defined('GRAV_PHP_MIN')) { if (!defined('GRAV_PHP_MIN')) {
define('GRAV_PHP_MIN', '7.3.6'); define('GRAV_PHP_MIN', '8.2.0');
} }
// Directory separator // Directory separator

View File

@ -2,7 +2,7 @@
/** /**
* @package Grav\Core * @package Grav\Core
* *
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@ -3,7 +3,7 @@
/** /**
* @package Grav\Core * @package Grav\Core
* *
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@ -0,0 +1,93 @@
<?php
namespace Doctrine\Common\Cache;
use Symfony\Component\Cache\Adapter\FilesystemAdapter;
/**
* Filesystem cache driver (backwards compatibility).
*/
class FilesystemCache extends CacheProvider
{
public const EXTENSION = '.doctrinecache.data';
/** @var FilesystemAdapter */
private $pool;
/**
* {@inheritdoc}
*/
public function __construct($directory, $extension = self::EXTENSION, $umask = 0002)
{
user_error(__CLASS__ . ' is deprecated since Grav 1.8, use Symfony cache instead', E_USER_DEPRECATED);
$this->pool = new FilesystemAdapter('', 0, $directory);
}
/**
* {@inheritdoc}
*/
protected function doFetch($id)
{
$item = $this->pool->getItem(rawurlencode($id));
return $item->isHit() ? $item->get() : false;
}
/**
* {@inheritdoc}
*
* @return bool
*/
protected function doContains($id)
{
return $this->pool->hasItem(rawurlencode($id));
}
/**
* {@inheritdoc}
*
* @return bool
*/
protected function doSave($id, $data, $lifeTime = 0)
{
$item = $this->pool->getItem(rawurlencode($id));
if (0 < $lifeTime) {
$item->expiresAfter($lifeTime);
}
return $this->pool->save($item->set($data));
}
/**
* {@inheritdoc}
*
* @return bool
*/
protected function doDelete($id)
{
return $this->pool->deleteItem(rawurlencode($id));
}
/**
* {@inheritdoc}
*
* @return bool
*/
protected function doFlush()
{
return $this->pool->clear();
}
/**
* {@inheritdoc}
*
* @return array|null
*/
protected function doGetStats()
{
return null;
}
}

View File

@ -3,7 +3,7 @@
/** /**
* @package Grav\Common * @package Grav\Common
* *
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\Assets * @package Grav\Common\Assets
* *
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\Assets * @package Grav\Common\Assets
* *
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\Assets * @package Grav\Common\Assets
* *
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\Assets * @package Grav\Common\Assets
* *
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\Assets * @package Grav\Common\Assets
* *
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\Assets * @package Grav\Common\Assets
* *
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\Assets * @package Grav\Common\Assets
* *
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\Assets * @package Grav\Common\Assets
* *
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\Assets * @package Grav\Common\Assets
* *
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\Assets * @package Grav\Common\Assets
* *
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\Assets\Traits * @package Grav\Common\Assets\Traits
* *
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\Assets\Traits * @package Grav\Common\Assets\Traits
* *
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\Assets\Traits * @package Grav\Common\Assets\Traits
* *
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\Backup * @package Grav\Common\Backup
* *
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */
@ -194,7 +194,7 @@ class Backups
* @param callable|null $status * @param callable|null $status
* @return string|null * @return string|null
*/ */
public static function backup($id = 0, callable $status = null) public static function backup($id = 0, ?callable $status = null)
{ {
$grav = Grav::instance(); $grav = Grav::instance();

View File

@ -3,7 +3,7 @@
/** /**
* @package Grav\Common * @package Grav\Common
* *
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@ -3,14 +3,15 @@
/** /**
* @package Grav\Common * @package Grav\Common
* *
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */
namespace Grav\Common; namespace Grav\Common;
use DirectoryIterator; use DirectoryIterator;
use \Doctrine\Common\Cache as DoctrineCache; use Doctrine\Common\Cache\CacheProvider;
use Doctrine\Common\Cache\Psr6\DoctrineProvider;
use Exception; use Exception;
use Grav\Common\Config\Config; use Grav\Common\Config\Config;
use Grav\Common\Filesystem\Folder; use Grav\Common\Filesystem\Folder;
@ -18,6 +19,12 @@ use Grav\Common\Scheduler\Scheduler;
use LogicException; use LogicException;
use Psr\SimpleCache\CacheInterface; use Psr\SimpleCache\CacheInterface;
use RocketTheme\Toolbox\Event\Event; use RocketTheme\Toolbox\Event\Event;
use Symfony\Component\Cache\Adapter\AdapterInterface;
use Symfony\Component\Cache\Adapter\ApcuAdapter;
use Symfony\Component\Cache\Adapter\FilesystemAdapter;
use Symfony\Component\Cache\Adapter\MemcachedAdapter;
use Symfony\Component\Cache\Adapter\RedisAdapter;
use Symfony\Component\Cache\Psr16Cache;
use Symfony\Component\EventDispatcher\EventDispatcher; use Symfony\Component\EventDispatcher\EventDispatcher;
use function dirname; use function dirname;
use function extension_loaded; use function extension_loaded;
@ -27,12 +34,11 @@ use function is_array;
/** /**
* The GravCache object is used throughout Grav to store and retrieve cached data. * The GravCache object is used throughout Grav to store and retrieve cached data.
* It uses DoctrineCache library and supports a variety of caching mechanisms. Those include: * It uses Symfony library (adding backward compatibility to Doctrine Cache) and supports a variety of caching mechanisms. Those include:
* *
* APCu * APCu
* RedisCache * RedisCache
* MemCache * MemCached
* MemCacheD
* FileSystem * FileSystem
*/ */
class Cache extends Getters class Cache extends Getters
@ -49,7 +55,10 @@ class Cache extends Getters
/** @var Config $config */ /** @var Config $config */
protected $config; protected $config;
/** @var DoctrineCache\CacheProvider */ /** @var AdapterInterface */
protected $adapter;
/** @var CacheProvider */
protected $driver; protected $driver;
/** @var CacheInterface */ /** @var CacheInterface */
@ -70,6 +79,7 @@ class Cache extends Getters
protected static $standard_remove = [ protected static $standard_remove = [
'cache://twig/', 'cache://twig/',
'cache://doctrine/', 'cache://doctrine/',
'cache://grav/',
'cache://compiled/', 'cache://compiled/',
'cache://clockwork/', 'cache://clockwork/',
'cache://validated-', 'cache://validated-',
@ -80,6 +90,7 @@ class Cache extends Getters
protected static $standard_remove_no_images = [ protected static $standard_remove_no_images = [
'cache://twig/', 'cache://twig/',
'cache://doctrine/', 'cache://doctrine/',
'cache://grav/',
'cache://compiled/', 'cache://compiled/',
'cache://clockwork/', 'cache://clockwork/',
'cache://validated-', 'cache://validated-',
@ -142,10 +153,10 @@ class Cache extends Getters
// Cache key allows us to invalidate all cache on configuration changes. // Cache key allows us to invalidate all cache on configuration changes.
$this->key = ($prefix ?: 'g') . '-' . $uniqueness; $this->key = ($prefix ?: 'g') . '-' . $uniqueness;
$this->cache_dir = $grav['locator']->findResource('cache://doctrine/' . $uniqueness, true, true); $this->cache_dir = $grav['locator']->findResource('cache://grav/' . $uniqueness, true, true);
$this->driver_setting = $this->config->get('system.cache.driver'); $this->driver_setting = $this->config->get('system.cache.driver');
$this->driver = $this->getCacheDriver(); $this->adapter = $this->getCacheAdapter();
$this->driver->setNamespace($this->key); $this->driver = $this->getCacheDriver($this->adapter);
/** @var EventDispatcher $dispatcher */ /** @var EventDispatcher $dispatcher */
$dispatcher = Grav::instance()['events']; $dispatcher = Grav::instance()['events'];
@ -158,12 +169,7 @@ class Cache extends Getters
public function getSimpleCache() public function getSimpleCache()
{ {
if (null === $this->simpleCache) { if (null === $this->simpleCache) {
$cache = new \Grav\Framework\Cache\Adapter\DoctrineCache($this->driver, '', $this->getLifetime()); $this->simpleCache = new Psr16Cache($this->adapter);
// Disable cache key validation.
$cache->setValidation(false);
$this->simpleCache = $cache;
} }
return $this->simpleCache; return $this->simpleCache;
@ -229,53 +235,42 @@ class Cache extends Getters
* If there is no config option for $driver in the config, or it's set to 'auto', it will * If there is no config option for $driver in the config, or it's set to 'auto', it will
* pick the best option based on which cache extensions are installed. * pick the best option based on which cache extensions are installed.
* *
* @return DoctrineCache\CacheProvider The cache driver to use * @param string|null $namespace
* @param int|null $defaultLifetime
* @return AdapterInterface The cache driver to use
* @throws \RedisException
* @throws \Symfony\Component\Cache\Exception\CacheException
*/ */
public function getCacheDriver() public function getCacheAdapter(?string $namespace = null, ?int $defaultLifetime = null): AdapterInterface
{ {
$setting = $this->driver_setting; $setting = $this->driver_setting ?? 'auto';
$driver_name = 'file'; $driver_name = 'file';
if (in_array($setting, ['apc', 'xcache', 'wincache', 'memcache'], true)) {
throw new LogicException(sprintf('Cache driver for %s has been removed, use auto, file, apcu or memcached instead!', $setting));
}
// CLI compatibility requires a non-volatile cache driver // CLI compatibility requires a non-volatile cache driver
if ($this->config->get('system.cache.cli_compatibility') && ( if ($this->config->get('system.cache.cli_compatibility') && ($setting === 'auto' || $this->isVolatileDriver($setting))) {
$setting === 'auto' || $this->isVolatileDriver($setting))) {
$setting = $driver_name; $setting = $driver_name;
} }
if (!$setting || $setting === 'auto') { if ($setting === 'auto' || $this->isVolatileDriver($setting)) {
if (extension_loaded('apcu')) { if (extension_loaded('apcu')) {
$driver_name = 'apcu'; $driver_name = 'apcu';
} elseif (extension_loaded('wincache')) {
$driver_name = 'wincache';
} }
} else { } else {
$driver_name = $setting; $driver_name = $setting;
} }
$this->driver_name = $driver_name; $this->driver_name = $driver_name;
$namespace = $namespace ?? $this->key;
$defaultLifetime = $defaultLifetime ?? 0;
switch ($driver_name) { switch ($driver_name) {
case 'apc': case 'apc':
case 'apcu': case 'apcu':
$driver = new DoctrineCache\ApcuCache(); $adapter = new ApcuAdapter($namespace, $defaultLifetime);
break;
case 'wincache':
$driver = new DoctrineCache\WinCacheCache();
break;
case 'memcache':
if (extension_loaded('memcache')) {
$memcache = new \Memcache();
$memcache->connect(
$this->config->get('system.cache.memcache.server', 'localhost'),
$this->config->get('system.cache.memcache.port', 11211)
);
$driver = new DoctrineCache\MemcacheCache();
$driver->setMemcache($memcache);
} else {
throw new LogicException('Memcache PHP extension has not been installed');
}
break; break;
case 'memcached': case 'memcached':
@ -285,8 +280,7 @@ class Cache extends Getters
$this->config->get('system.cache.memcached.server', 'localhost'), $this->config->get('system.cache.memcached.server', 'localhost'),
$this->config->get('system.cache.memcached.port', 11211) $this->config->get('system.cache.memcached.port', 11211)
); );
$driver = new DoctrineCache\MemcachedCache(); $adapter = new MemcachedAdapter($memcached, $namespace, $defaultLifetime);
$driver->setMemcached($memcached);
} else { } else {
throw new LogicException('Memcached PHP extension has not been installed'); throw new LogicException('Memcached PHP extension has not been installed');
} }
@ -318,19 +312,39 @@ class Cache extends Getters
throw new \RedisException('Could not select alternate Redis database ID'); throw new \RedisException('Could not select alternate Redis database ID');
} }
$driver = new DoctrineCache\RedisCache(); $adapter = new RedisAdapter($redis, $namespace, $defaultLifetime);
$driver->setRedis($redis);
} else { } else {
throw new LogicException('Redis PHP extension has not been installed'); throw new LogicException('Redis PHP extension has not been installed');
} }
break; break;
default: default:
$driver = new DoctrineCache\FilesystemCache($this->cache_dir); $adapter = new FilesystemAdapter($namespace, $defaultLifetime, $this->cache_dir);
break; break;
} }
return $driver; return $adapter;
}
/**
* Automatically picks the cache mechanism to use. If you pick one manually it will use that
* If there is no config option for $driver in the config, or it's set to 'auto', it will
* pick the best option based on which cache extensions are installed.
*
* @return CacheProvider The cache driver to use
*/
public function getCacheDriver(?AdapterInterface $adapter = null)
{
if (null === $adapter) {
$adapter = $this->getCacheAdapter();
}
$cache = DoctrineProvider::wrap($adapter);
if (!$cache instanceof CacheProvider) {
throw new \RuntimeException('Internal error');
}
return $cache;
} }
/** /**
@ -618,7 +632,7 @@ class Cache extends Getters
*/ */
public function isVolatileDriver($setting) public function isVolatileDriver($setting)
{ {
return in_array($setting, ['apc', 'apcu', 'xcache', 'wincache'], true); return $setting === 'apcu';
} }
/** /**

View File

@ -3,7 +3,7 @@
/** /**
* @package Grav\Common * @package Grav\Common
* *
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\Config * @package Grav\Common\Config
* *
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\Config * @package Grav\Common\Config
* *
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\Config * @package Grav\Common\Config
* *
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\Config * @package Grav\Common\Config
* *
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\Config * @package Grav\Common\Config
* *
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\Config * @package Grav\Common\Config
* *
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\Config * @package Grav\Common\Config
* *
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\Config * @package Grav\Common\Config
* *
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\Data * @package Grav\Common\Data
* *
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\Data * @package Grav\Common\Data
* *
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\Data * @package Grav\Common\Data
* *
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\Data * @package Grav\Common\Data
* *
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */
@ -323,7 +323,7 @@ class Data implements DataInterface, ArrayAccess, \Countable, JsonSerializable,
* @param FileInterface|null $storage Optionally enter a new storage. * @param FileInterface|null $storage Optionally enter a new storage.
* @return FileInterface|null * @return FileInterface|null
*/ */
public function file(FileInterface $storage = null) public function file(?FileInterface $storage = null)
{ {
if ($storage) { if ($storage) {
$this->storage = $storage; $this->storage = $storage;

View File

@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\Data * @package Grav\Common\Data
* *
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */
@ -80,5 +80,5 @@ interface DataInterface
* @param FileInterface|null $storage Optionally enter a new storage. * @param FileInterface|null $storage Optionally enter a new storage.
* @return FileInterface * @return FileInterface
*/ */
public function file(FileInterface $storage = null); public function file(?FileInterface $storage = null);
} }

View File

@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\Data * @package Grav\Common\Data
* *
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */
@ -162,7 +162,7 @@ class Validation
* @param UserInterface|null $user * @param UserInterface|null $user
* @return bool * @return bool
*/ */
public static function authorize($action, UserInterface $user = null) public static function authorize($action, ?UserInterface $user = null)
{ {
if (!$user) { if (!$user) {
return false; return false;

View File

@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\Data * @package Grav\Common\Data
* *
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@ -3,7 +3,7 @@
/** /**
* @package Grav\Common * @package Grav\Common
* *
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */
@ -544,7 +544,7 @@ class Debugger
* @param string|null $message * @param string|null $message
* @return mixed * @return mixed
*/ */
public function profile(callable $callable, string $message = null) public function profile(callable $callable, ?string $message = null)
{ {
$this->startProfiling(); $this->startProfiling();
$response = $callable(); $response = $callable();
@ -585,7 +585,7 @@ class Debugger
* @param string|null $message * @param string|null $message
* @return array|null * @return array|null
*/ */
public function stopProfiling(string $message = null): ?array public function stopProfiling(?string $message = null): ?array
{ {
$timings = null; $timings = null;
if ($this->enabled && extension_loaded('tideways_xhprof')) { if ($this->enabled && extension_loaded('tideways_xhprof')) {
@ -776,7 +776,7 @@ class Debugger
* @param float|null $time * @param float|null $time
* @return $this * @return $this
*/ */
public function addEvent(string $name, $event, EventDispatcherInterface $dispatcher, float $time = null) public function addEvent(string $name, $event, EventDispatcherInterface $dispatcher, ?float $time = null)
{ {
if ($this->enabled && $this->clockwork) { if ($this->enabled && $this->clockwork) {
$time = $time ?? microtime(true); $time = $time ?? microtime(true);

View File

@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\Errors * @package Grav\Common\Errors
* *
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\Errors * @package Grav\Common\Errors
* *
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */
@ -70,7 +70,7 @@ class Errors
$logger = $grav['log']; $logger = $grav['log'];
$whoops->pushHandler(function ($exception, $inspector, $run) use ($logger) { $whoops->pushHandler(function ($exception, $inspector, $run) use ($logger) {
try { try {
$logger->addCritical($exception->getMessage() . ' - Trace: ' . $exception->getTraceAsString()); $logger->critical($exception->getMessage() . ' - Trace: ' . $exception->getTraceAsString());
} catch (Exception $e) { } catch (Exception $e) {
echo $e; echo $e;
} }

View File

@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\Errors * @package Grav\Common\Errors
* *
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\Errors * @package Grav\Common\Errors
* *
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\File * @package Grav\Common\File
* *
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\File * @package Grav\Common\File
* *
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\File * @package Grav\Common\File
* *
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\File * @package Grav\Common\File
* *
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\Filesystem * @package Grav\Common\Filesystem
* *
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */
@ -75,21 +75,21 @@ abstract class Archiver
* @param callable|null $status * @param callable|null $status
* @return $this * @return $this
*/ */
abstract public function compress($folder, callable $status = null); abstract public function compress($folder, ?callable $status = null);
/** /**
* @param string $destination * @param string $destination
* @param callable|null $status * @param callable|null $status
* @return $this * @return $this
*/ */
abstract public function extract($destination, callable $status = null); abstract public function extract($destination, ?callable $status = null);
/** /**
* @param array $folders * @param array $folders
* @param callable|null $status * @param callable|null $status
* @return $this * @return $this
*/ */
abstract public function addEmptyFolders($folders, callable $status = null); abstract public function addEmptyFolders($folders, ?callable $status = null);
/** /**
* @param string $rootPath * @param string $rootPath

View File

@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\Filesystem * @package Grav\Common\Filesystem
* *
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\Filesystem * @package Grav\Common\Filesystem
* *
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\Filesystem * @package Grav\Common\Filesystem
* *
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\Filesystem * @package Grav\Common\Filesystem
* *
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */
@ -26,7 +26,7 @@ class ZipArchiver extends Archiver
* @param callable|null $status * @param callable|null $status
* @return $this * @return $this
*/ */
public function extract($destination, callable $status = null) public function extract($destination, ?callable $status = null)
{ {
$zip = new ZipArchive(); $zip = new ZipArchive();
$archive = $zip->open($this->archive_file); $archive = $zip->open($this->archive_file);
@ -51,7 +51,7 @@ class ZipArchiver extends Archiver
* @param callable|null $status * @param callable|null $status
* @return $this * @return $this
*/ */
public function compress($source, callable $status = null) public function compress($source, ?callable $status = null)
{ {
if (!extension_loaded('zip')) { if (!extension_loaded('zip')) {
throw new InvalidArgumentException('ZipArchiver: Zip PHP module not installed...'); throw new InvalidArgumentException('ZipArchiver: Zip PHP module not installed...');
@ -105,7 +105,7 @@ class ZipArchiver extends Archiver
* @param callable|null $status * @param callable|null $status
* @return $this * @return $this
*/ */
public function addEmptyFolders($folders, callable $status = null) public function addEmptyFolders($folders, ?callable $status = null)
{ {
if (!extension_loaded('zip')) { if (!extension_loaded('zip')) {
throw new InvalidArgumentException('ZipArchiver: Zip PHP module not installed...'); throw new InvalidArgumentException('ZipArchiver: Zip PHP module not installed...');

View File

@ -5,7 +5,7 @@ declare(strict_types=1);
/** /**
* @package Grav\Common\Flex * @package Grav\Common\Flex
* *
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@ -5,7 +5,7 @@ declare(strict_types=1);
/** /**
* @package Grav\Common\Flex * @package Grav\Common\Flex
* *
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@ -5,7 +5,7 @@ declare(strict_types=1);
/** /**
* @package Grav\Common\Flex * @package Grav\Common\Flex
* *
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */
@ -32,7 +32,7 @@ abstract class FlexObject extends \Grav\Framework\Flex\FlexObject implements Med
* {@inheritdoc} * {@inheritdoc}
* @see FlexObjectInterface::getFormValue() * @see FlexObjectInterface::getFormValue()
*/ */
public function getFormValue(string $name, $default = null, string $separator = null) public function getFormValue(string $name, $default = null, ?string $separator = null)
{ {
$value = $this->getNestedProperty($name, null, $separator); $value = $this->getNestedProperty($name, null, $separator);

View File

@ -5,7 +5,7 @@ declare(strict_types=1);
/** /**
* @package Grav\Common\Flex * @package Grav\Common\Flex
* *
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@ -5,7 +5,7 @@ declare(strict_types=1);
/** /**
* @package Grav\Common\Flex * @package Grav\Common\Flex
* *
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@ -5,7 +5,7 @@ declare(strict_types=1);
/** /**
* @package Grav\Common\Flex * @package Grav\Common\Flex
* *
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@ -5,7 +5,7 @@ declare(strict_types=1);
/** /**
* @package Grav\Common\Flex * @package Grav\Common\Flex
* *
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@ -5,7 +5,7 @@ declare(strict_types=1);
/** /**
* @package Grav\Common\Flex * @package Grav\Common\Flex
* *
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@ -5,7 +5,7 @@ declare(strict_types=1);
/** /**
* @package Grav\Common\Flex * @package Grav\Common\Flex
* *
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@ -5,7 +5,7 @@ declare(strict_types=1);
/** /**
* @package Grav\Common\Flex * @package Grav\Common\Flex
* *
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@ -5,7 +5,7 @@ declare(strict_types=1);
/** /**
* @package Grav\Common\Flex * @package Grav\Common\Flex
* *
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@ -5,7 +5,7 @@ declare(strict_types=1);
/** /**
* @package Grav\Common\Flex * @package Grav\Common\Flex
* *
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */
@ -766,7 +766,7 @@ class PageCollection extends FlexPageCollection implements PageCollectionInterfa
* @return static * @return static
* @phpstan-return static<T> * @phpstan-return static<T>
*/ */
public function withTranslation(bool $bool = true, string $languageCode = null, bool $fallback = null) public function withTranslation(bool $bool = true, ?string $languageCode = null, ?bool $fallback = null)
{ {
$list = array_keys(array_filter($this->call('hasTranslation', [$languageCode, $fallback]))); $list = array_keys(array_filter($this->call('hasTranslation', [$languageCode, $fallback])));
@ -778,7 +778,7 @@ class PageCollection extends FlexPageCollection implements PageCollectionInterfa
* @param bool|null $fallback * @param bool|null $fallback
* @return PageIndex * @return PageIndex
*/ */
public function withTranslated(string $languageCode = null, bool $fallback = null) public function withTranslated(?string $languageCode = null, ?bool $fallback = null)
{ {
return $this->getIndex()->withTranslated($languageCode, $fallback); return $this->getIndex()->withTranslated($languageCode, $fallback);
} }

View File

@ -5,7 +5,7 @@ declare(strict_types=1);
/** /**
* @package Grav\Common\Flex * @package Grav\Common\Flex
* *
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */
@ -57,7 +57,7 @@ class PageIndex extends FlexPageIndex implements PageCollectionInterface
public const ORDER_LIST_REGEX = '/(\/\d+)\.[^\/]+/u'; public const ORDER_LIST_REGEX = '/(\/\d+)\.[^\/]+/u';
public const PAGE_ROUTE_REGEX = '/\/\d+\./u'; public const PAGE_ROUTE_REGEX = '/\/\d+\./u';
/** @var PageObject|array */ /** @var T|array */
protected $_root; protected $_root;
/** @var array|null */ /** @var array|null */
protected $_params; protected $_params;
@ -66,7 +66,7 @@ class PageIndex extends FlexPageIndex implements PageCollectionInterface
* @param array $entries * @param array $entries
* @param FlexDirectory|null $directory * @param FlexDirectory|null $directory
*/ */
public function __construct(array $entries = [], FlexDirectory $directory = null) public function __construct(array $entries = [], ?FlexDirectory $directory = null)
{ {
// Remove root if it's taken. // Remove root if it's taken.
if (isset($entries[''])) { if (isset($entries[''])) {
@ -181,7 +181,7 @@ class PageIndex extends FlexPageIndex implements PageCollectionInterface
* @return static * @return static
* @phpstan-return static<T,C> * @phpstan-return static<T,C>
*/ */
public function withTranslated(string $languageCode = null, bool $fallback = null) public function withTranslated(?string $languageCode = null, ?bool $fallback = null)
{ {
if (null === $languageCode) { if (null === $languageCode) {
return $this; return $this;
@ -413,7 +413,7 @@ class PageIndex extends FlexPageIndex implements PageCollectionInterface
* @return static * @return static
* @phpstan-return static<T,C> * @phpstan-return static<T,C>
*/ */
protected function createFrom(array $entries, string $keyField = null) protected function createFrom(array $entries, ?string $keyField = null)
{ {
/** @var static $index */ /** @var static $index */
$index = parent::createFrom($entries, $keyField); $index = parent::createFrom($entries, $keyField);
@ -428,7 +428,7 @@ class PageIndex extends FlexPageIndex implements PageCollectionInterface
* @param bool|null $fallback * @param bool|null $fallback
* @return array * @return array
*/ */
protected function translateEntries(array $entries, string $lang, bool $fallback = null): array protected function translateEntries(array $entries, string $lang, ?bool $fallback = null): array
{ {
$languages = $this->getFallbackLanguages($lang, $fallback); $languages = $this->getFallbackLanguages($lang, $fallback);
foreach ($entries as $key => &$entry) { foreach ($entries as $key => &$entry) {
@ -493,7 +493,7 @@ class PageIndex extends FlexPageIndex implements PageCollectionInterface
* @param bool|null $fallback * @param bool|null $fallback
* @return array * @return array
*/ */
protected function getFallbackLanguages(string $languageCode = null, bool $fallback = null): array protected function getFallbackLanguages(?string $languageCode = null, ?bool $fallback = null): array
{ {
$fallback = $fallback ?? true; $fallback = $fallback ?? true;
if (!$fallback && null !== $languageCode) { if (!$fallback && null !== $languageCode) {
@ -781,7 +781,7 @@ class PageIndex extends FlexPageIndex implements PageCollectionInterface
* @param int|null $timestamp * @param int|null $timestamp
* @return string|null * @return string|null
*/ */
private function jsDate(int $timestamp = null): ?string private function jsDate(?int $timestamp = null): ?string
{ {
if (!$timestamp) { if (!$timestamp) {
return null; return null;

View File

@ -5,7 +5,7 @@ declare(strict_types=1);
/** /**
* @package Grav\Common\Flex * @package Grav\Common\Flex
* *
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */
@ -129,7 +129,7 @@ class PageObject extends FlexPageObject
/** /**
* @inheritdoc PageInterface * @inheritdoc PageInterface
*/ */
public function getFormValue(string $name, $default = null, string $separator = null) public function getFormValue(string $name, $default = null, ?string $separator = null)
{ {
$test = new stdClass(); $test = new stdClass();
@ -261,7 +261,7 @@ class PageObject extends FlexPageObject
/** /**
* @param UserInterface|null $user * @param UserInterface|null $user
*/ */
public function check(UserInterface $user = null): void public function check(?UserInterface $user = null): void
{ {
parent::check($user); parent::check($user);

View File

@ -5,7 +5,7 @@ declare(strict_types=1);
/** /**
* @package Grav\Common\Flex * @package Grav\Common\Flex
* *
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@ -5,7 +5,7 @@ declare(strict_types=1);
/** /**
* @package Grav\Common\Flex * @package Grav\Common\Flex
* *
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@ -5,7 +5,7 @@ declare(strict_types=1);
/** /**
* @package Grav\Common\Flex * @package Grav\Common\Flex
* *
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@ -5,7 +5,7 @@ declare(strict_types=1);
/** /**
* @package Grav\Common\Flex * @package Grav\Common\Flex
* *
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */
@ -32,7 +32,7 @@ trait PageRoutableTrait
* @return PageInterface|null the parent page object if it exists. * @return PageInterface|null the parent page object if it exists.
*/ */
public function parent(PageInterface $var = null) public function parent(?PageInterface $var = null)
{ {
if (Utils::isAdminPlugin()) { if (Utils::isAdminPlugin()) {
return parent::parent(); return parent::parent();

View File

@ -5,7 +5,7 @@ declare(strict_types=1);
/** /**
* @package Grav\Common\Flex * @package Grav\Common\Flex
* *
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@ -5,7 +5,7 @@ declare(strict_types=1);
/** /**
* @package Grav\Common\Flex * @package Grav\Common\Flex
* *
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */
@ -38,7 +38,7 @@ class UserGroupCollection extends FlexCollection
* @param string|null $scope * @param string|null $scope
* @return bool|null * @return bool|null
*/ */
public function authorize(string $action, string $scope = null): ?bool public function authorize(string $action, ?string $scope = null): ?bool
{ {
$authorized = null; $authorized = null;
/** @var UserGroupObject $object */ /** @var UserGroupObject $object */

View File

@ -5,7 +5,7 @@ declare(strict_types=1);
/** /**
* @package Grav\Common\Flex * @package Grav\Common\Flex
* *
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@ -5,7 +5,7 @@ declare(strict_types=1);
/** /**
* @package Grav\Common\Flex * @package Grav\Common\Flex
* *
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */
@ -57,7 +57,7 @@ class UserGroupObject extends FlexObject implements UserGroupInterface
* @param string|null $scope * @param string|null $scope
* @return bool|null * @return bool|null
*/ */
public function authorize(string $action, string $scope = null): ?bool public function authorize(string $action, ?string $scope = null): ?bool
{ {
if ($scope === 'test') { if ($scope === 'test') {
$scope = null; $scope = null;

View File

@ -5,7 +5,7 @@ declare(strict_types=1);
/** /**
* @package Grav\Common\Flex * @package Grav\Common\Flex
* *
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */
@ -23,7 +23,7 @@ class UserFileStorage extends FileStorage
* {@inheritdoc} * {@inheritdoc}
* @see FlexStorageInterface::getMediaPath() * @see FlexStorageInterface::getMediaPath()
*/ */
public function getMediaPath(string $key = null): ?string public function getMediaPath(?string $key = null): ?string
{ {
// There is no media support for file storage (fallback to common location). // There is no media support for file storage (fallback to common location).
return null; return null;

View File

@ -5,7 +5,7 @@ declare(strict_types=1);
/** /**
* @package Grav\Common\Flex * @package Grav\Common\Flex
* *
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@ -5,7 +5,7 @@ declare(strict_types=1);
/** /**
* @package Grav\Common\Flex * @package Grav\Common\Flex
* *
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@ -5,7 +5,7 @@ declare(strict_types=1);
/** /**
* @package Grav\Common\Flex * @package Grav\Common\Flex
* *
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@ -5,7 +5,7 @@ declare(strict_types=1);
/** /**
* @package Grav\Common\Flex * @package Grav\Common\Flex
* *
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */
@ -197,7 +197,7 @@ class UserIndex extends FlexIndex implements UserCollectionInterface
/** @var Logger $logger */ /** @var Logger $logger */
$logger = $grav['log']; $logger = $grav['log'];
$logger->addDebug($message); $logger->debug($message);
/** @var Debugger $debugger */ /** @var Debugger $debugger */
$debugger = $grav['debugger']; $debugger = $grav['debugger'];

View File

@ -5,7 +5,7 @@ declare(strict_types=1);
/** /**
* @package Grav\Common\Flex * @package Grav\Common\Flex
* *
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */
@ -92,9 +92,9 @@ class UserObject extends FlexObject implements UserInterface, Countable
protected $_uploads_original; protected $_uploads_original;
/** @var FileInterface|null */ /** @var FileInterface|null */
protected $_storage; protected $_storage;
/** @var UserGroupIndex */ /** @var UserGroupIndex|null */
protected $_groups; protected $_groups;
/** @var Access */ /** @var Access|null */
protected $_access; protected $_access;
/** @var array|null */ /** @var array|null */
protected $access; protected $access;
@ -270,7 +270,7 @@ class UserObject extends FlexObject implements UserInterface, Countable
* @param string|null $scope * @param string|null $scope
* @return bool|null * @return bool|null
*/ */
public function authorize(string $action, string $scope = null): ?bool public function authorize(string $action, ?string $scope = null): ?bool
{ {
if ($scope === 'test') { if ($scope === 'test') {
// Special scope to test user permissions. // Special scope to test user permissions.
@ -557,7 +557,7 @@ class UserObject extends FlexObject implements UserInterface, Countable
* @param FileInterface|null $storage Optionally enter a new storage. * @param FileInterface|null $storage Optionally enter a new storage.
* @return FileInterface|null * @return FileInterface|null
*/ */
public function file(FileInterface $storage = null) public function file(?FileInterface $storage = null)
{ {
if (null !== $storage) { if (null !== $storage) {
$this->_storage = $storage; $this->_storage = $storage;

View File

@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\Form * @package Grav\Common\Form
* *
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\GPM * @package Grav\Common\GPM
* *
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\GPM * @package Grav\Common\GPM
* *
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\GPM * @package Grav\Common\GPM
* *
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

View File

@ -3,7 +3,7 @@
/** /**
* @package Grav\Common\GPM * @package Grav\Common\GPM
* *
* @copyright Copyright (c) 2015 - 2025 Trilby Media, LLC. All rights reserved. * @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details. * @license MIT License; see LICENSE file for details.
*/ */

Some files were not shown because too many files have changed in this diff Show More