Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop support for PHP 8.0 #120

Merged
merged 3 commits into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ jobs:
strategy:
matrix:
php:
- '8.0'
- '8.1'
typo3:
- '^11.5'
Expand Down
4 changes: 2 additions & 2 deletions Classes/Controller/BackendController.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class BackendController extends ActionController
* @var IndexerFactory $indexerFactory
*/
protected $indexerFactory;
public function __construct(private ModuleTemplateFactory $moduleTemplateFactory)
public function __construct(private readonly ModuleTemplateFactory $moduleTemplateFactory)
{
}

Expand Down Expand Up @@ -104,7 +104,7 @@ public function requestAction($url = '', $body = ''): ResponseInterface
if ($url != '') {
$result = $this->request($url, $body);

$this->view->assign('response', json_decode($result['body'], true));
$this->view->assign('response', json_decode((string) $result['body'], true));

$resultColor = match ($result['status']) {
'200' => 'success',
Expand Down
4 changes: 2 additions & 2 deletions Classes/DataCollector/TCA/PlainValueProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function processCheckboxField($value, $fieldTca)
foreach ($activeItemKeys as $key) {
$label = $fieldTca['items'][$key][0];

if (str_starts_with($label, 'LLL:')) {
if (str_starts_with((string) $label, 'LLL:')) {
$label = $this->getLanguageService()->sL($label);
}

Expand Down Expand Up @@ -71,7 +71,7 @@ public function processRadioField($value, $fieldTca)
}
}

if (str_starts_with($label, 'LLL:')) {
if (str_starts_with((string) $label, 'LLL:')) {
$label = $this->getLanguageService()->sL($label);
}

Expand Down
2 changes: 1 addition & 1 deletion Classes/Events/AfterIndexRunEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

final class AfterIndexRunEvent
{
public function __construct(private bool $fullIndexing, private int $elapsedTime)
public function __construct(private readonly bool $fullIndexing, private readonly int $elapsedTime)
{
}

Expand Down
2 changes: 1 addition & 1 deletion Classes/Feature/CompletionSuggestFeature.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ protected function splitFields($fields = [])
$splittedContent = [];
if (!empty($fields)) {
foreach ($fields as $field) {
$split = preg_split($this->config['splitRegex'], $field);
$split = preg_split($this->config['splitRegex'], (string) $field);
$splittedContent = array_merge($splittedContent, $split);
}
}
Expand Down
2 changes: 1 addition & 1 deletion Classes/Hook/DynamicFlexFormHook.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class DynamicFlexFormHook
public function parseDataStructureByIdentifierPostProcess($dataStructure, $identifier)
{
if ($identifier['tableName'] == 'tt_content' && $identifier['fieldName'] == 'pi_flexform' && in_array($identifier['dataStructureKey'], $this->allowedIdentifiers)) {
[$pluginKey, $listType] = explode(",", $identifier['dataStructureKey']);
[$pluginKey, $listType] = explode(",", (string) $identifier['dataStructureKey']);
$dataStructure['sheets']['features'] = $this->buildFlexSettingsFromTSSettings($pluginKey);
}
return $dataStructure;
Expand Down
2 changes: 1 addition & 1 deletion Classes/Preview/SimplePreviewRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function render($record)
{
$rawfield = $record[$this->config['field']];

$processedField = substr($rawfield, 0, 200) . "...";
$processedField = substr((string) $rawfield, 0, 200) . "...";

return $processedField;
}
Expand Down
2 changes: 1 addition & 1 deletion Classes/Service/ExtconfService.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ public function getUpdateIndex()
*/
public function getHostsSettings()
{
$hosts = explode(",", $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['searchable']['extensionManagement']['connection']['hosts']);
$hosts = explode(",", (string) $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['searchable']['extensionManagement']['connection']['hosts']);

return $hosts;
}
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
}
],
"require": {
"php": "^8.0",
"php": "^8.1",
"elasticsearch/elasticsearch": "^5.0 || ^7.0",
"symfony/polyfill-php80": "^1.26",
"typo3/cms-backend": "^11.5",
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: '3'

services:
app:
image: thecodingmachine/php:${PHP_VERSION:-8.0}-v4-cli
image: thecodingmachine/php:${PHP_VERSION:-8.1}-v4-cli
environment:
TYPO3_VERSION: ${TYPO3_VERSION:-^11.5}
typo3DatabaseHost: mysql
Expand Down