-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from andersundsehr/feature/php8.3
Support PHP 8.3, drops < PHP 8.1 support
- Loading branch information
Showing
15 changed files
with
180 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
composer.lock | ||
public/ | ||
vendor/ | ||
var/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace AUS\SsiInclude\Cache; | ||
|
||
use AUS\SsiInclude\ViewHelpers\RenderIncludeViewHelper; | ||
use TYPO3\CMS\Core\Core\Environment; | ||
|
||
class ClearCache | ||
{ | ||
/** @param array<mixed> $parameters */ | ||
public function clearCache(array $parameters): void | ||
{ | ||
if (isset($parameters['cacheCmd']) && ($parameters['cacheCmd'] === 'pages' || $parameters['cacheCmd'] === 'all')) { | ||
$path = Environment::getPublicPath() . RenderIncludeViewHelper::SSI_INCLUDE_DIR; | ||
$this->removeFiles($path); | ||
} | ||
} | ||
|
||
protected function removeFiles(string $dir): void | ||
{ | ||
if (is_dir($dir)) { | ||
$objects = scandir($dir); | ||
if (!$objects) { | ||
return; | ||
} | ||
|
||
foreach ($objects as $object) { | ||
if ($object !== '.' && $object !== '..') { | ||
$filePath = $dir . DIRECTORY_SEPARATOR . $object; | ||
if (is_file($filePath) && is_writable($filePath)) { | ||
unlink($filePath); | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,57 +1,53 @@ | ||
{ | ||
"name": "andersundsehr/ssi-include", | ||
"description": "Allows to periodically create ssi includes from anders und sehr GmbH", | ||
"type": "typo3-cms-extension", | ||
"license": "GPL-3.0-or-later", | ||
"type": "typo3-cms-extension", | ||
"authors": [ | ||
{ | ||
"name": "Matthias Vogel", | ||
"email": "[email protected]", | ||
"homepage": "https://andersundsehr.com" | ||
} | ||
], | ||
"require": { | ||
"php": "~8.1.0 || ~8.2.0 || ~8.3.0", | ||
"ocramius/package-versions": "^2.1.0", | ||
"typo3/cms-fluid": "^10.4.0 || ^11.5.0 || ^12.4.0", | ||
"typo3/cms-frontend": "^10.4.0 || ^11.5.0 || ^12.4.0", | ||
"webimpress/safe-writer": "^2.2.0" | ||
}, | ||
"require-dev": { | ||
"composer/composer": "^2.5.5", | ||
"pluswerk/grumphp-config": "^7.0", | ||
"saschaegerer/phpstan-typo3": "^1.10.0", | ||
"ssch/typo3-rector": "^2.5.0" | ||
}, | ||
"replace": { | ||
"typo3-ter/ssi-include": "self.version" | ||
}, | ||
"extra": { | ||
"typo3/cms": { | ||
"extension-key": "ssi_include" | ||
}, | ||
"pluswerk/grumphp-config": { | ||
"auto-setting": true | ||
}, | ||
"grumphp": { | ||
"config-default-path": "vendor/pluswerk/grumphp-config/grumphp.yml" | ||
"autoload": { | ||
"psr-4": { | ||
"AUS\\SsiInclude\\": "Classes/" | ||
} | ||
}, | ||
"config": { | ||
"sort-packages": true, | ||
"allow-plugins": { | ||
"ergebnis/composer-normalize": true, | ||
"phpro/grumphp": true, | ||
"typo3/class-alias-loader": true, | ||
"typo3/cms-composer-installers": true, | ||
"phpstan/extension-installer": true, | ||
"pluswerk/grumphp-config": true, | ||
"phpstan/extension-installer": true | ||
} | ||
"typo3/class-alias-loader": true, | ||
"typo3/cms-composer-installers": true | ||
}, | ||
"sort-packages": true | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"AUS\\SsiInclude\\": "Classes/" | ||
"extra": { | ||
"typo3/cms": { | ||
"extension-key": "ssi_include" | ||
} | ||
}, | ||
"ter-require": { | ||
"webimpress/safe-writer": "^2.2.0" | ||
}, | ||
"require": { | ||
"php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0", | ||
"ocramius/package-versions": "^2.1.0", | ||
"typo3/cms-fluid": "^10.4.0 || ^11.5.0 || ^12.4.0", | ||
"typo3/cms-frontend": "^10.4.0 || ^11.5.0 || ^12.4.0", | ||
"webimpress/safe-writer": "^2.2.0" | ||
}, | ||
"require-dev": { | ||
"phpstan/extension-installer": "^1.1.0", | ||
"pluswerk/grumphp-config": "^5.0", | ||
"saschaegerer/phpstan-typo3": "^0.13.3" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
<?php | ||
|
||
use AUS\SsiInclude\Cache\ClearCache; | ||
|
||
if (!defined('TYPO3_COMPOSER_MODE')) { | ||
// include autoload if this is the TER version | ||
require __DIR__ . '/vendor/autoload.php'; | ||
} | ||
|
||
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearCachePostProc'][] = ClearCache::class . '->clearCache'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
imports: | ||
- { resource: vendor/pluswerk/grumphp-config/grumphp.yml } | ||
parameters: | ||
convention.process_timeout: 240 | ||
convention.security_checker_blocking: true | ||
convention.jsonlint_ignore_pattern: { } | ||
convention.xmllint_ignore_pattern: { } | ||
convention.yamllint_ignore_pattern: { } | ||
convention.phpcslint_ignore_pattern: { } | ||
convention.phpcslint_exclude: { } | ||
convention.xlifflint_ignore_pattern: { } | ||
convention.rector_ignore_pattern: { } | ||
convention.rector_enabled: true | ||
convention.rector_config: rector.php | ||
convention.rector_clear-cache: false | ||
convention.phpstan_level: null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
parameters: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
includes: | ||
- phpstan-baseline.neon | ||
- vendor/andersundsehr/phpstan-git-files/extension.php | ||
|
||
parameters: | ||
level: 8 | ||
reportUnmatchedIgnoredErrors: false |
Oops, something went wrong.