Commit f277888f authored by Jan Helke's avatar Jan Helke Committed by Christian Kuhn
Browse files

[TASK] Make sysext/backend/Tests/Unit/ notice free

Releases: master
Resolves: #84413
Change-Id: Iff7c9c3b205df958fa57f6325645730d97fceefb
Reviewed-on: https://review.typo3.org/56286


Tested-by: default avatarTYPO3com <no-reply@typo3.com>
Reviewed-by: Anja Leichsenring's avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring's avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
parent 0f894ddd
...@@ -175,7 +175,7 @@ class FormInlineAjaxController extends AbstractFormEngineAjaxController ...@@ -175,7 +175,7 @@ class FormInlineAjaxController extends AbstractFormEngineAjaxController
{ {
$ajaxArguments = $request->getParsedBody()['ajax'] ?? $request->getQueryParams()['ajax']; $ajaxArguments = $request->getParsedBody()['ajax'] ?? $request->getQueryParams()['ajax'];
$domObjectId = $ajaxArguments[0]; $domObjectId = $ajaxArguments[0] ?? null;
$inlineFirstPid = $this->getInlineFirstPidFromDomObjectId($domObjectId); $inlineFirstPid = $this->getInlineFirstPidFromDomObjectId($domObjectId);
$parentConfig = $this->extractSignedParentConfigFromRequest((string)$ajaxArguments['context']); $parentConfig = $this->extractSignedParentConfigFromRequest((string)$ajaxArguments['context']);
...@@ -256,8 +256,8 @@ class FormInlineAjaxController extends AbstractFormEngineAjaxController ...@@ -256,8 +256,8 @@ class FormInlineAjaxController extends AbstractFormEngineAjaxController
public function synchronizeLocalizeAction(ServerRequestInterface $request): ResponseInterface public function synchronizeLocalizeAction(ServerRequestInterface $request): ResponseInterface
{ {
$ajaxArguments = $request->getParsedBody()['ajax'] ?? $request->getQueryParams()['ajax']; $ajaxArguments = $request->getParsedBody()['ajax'] ?? $request->getQueryParams()['ajax'];
$domObjectId = $ajaxArguments[0]; $domObjectId = $ajaxArguments[0] ?? null;
$type = $ajaxArguments[1]; $type = $ajaxArguments[1] ?? null;
$parentConfig = $this->extractSignedParentConfigFromRequest((string)$ajaxArguments['context']); $parentConfig = $this->extractSignedParentConfigFromRequest((string)$ajaxArguments['context']);
/** @var InlineStackProcessor $inlineStackProcessor */ /** @var InlineStackProcessor $inlineStackProcessor */
......
...@@ -40,19 +40,19 @@ class SuggestWizardController ...@@ -40,19 +40,19 @@ class SuggestWizardController
{ {
$parsedBody = $request->getParsedBody(); $parsedBody = $request->getParsedBody();
$search = $parsedBody['value']; $search = $parsedBody['value'] ?? null;
$tableName = $parsedBody['tableName']; $tableName = $parsedBody['tableName'] ?? null;
$fieldName = $parsedBody['fieldName']; $fieldName = $parsedBody['fieldName'] ?? null;
$uid = $parsedBody['uid']; $uid = $parsedBody['uid'] ?? null;
$pid = (int)$parsedBody['pid']; $pid = isset($parsedBody['pid']) ? (int)$parsedBody['pid'] : 0;
$dataStructureIdentifier = ''; $dataStructureIdentifier = '' ?? null;
if (!empty($parsedBody['dataStructureIdentifier'])) { if (!empty($parsedBody['dataStructureIdentifier'])) {
$dataStructureIdentifier = json_encode($parsedBody['dataStructureIdentifier']); $dataStructureIdentifier = json_encode($parsedBody['dataStructureIdentifier']);
} }
$flexFormSheetName = $parsedBody['flexFormSheetName']; $flexFormSheetName = $parsedBody['flexFormSheetName'] ?? null;
$flexFormFieldName = $parsedBody['flexFormFieldName']; $flexFormFieldName = $parsedBody['flexFormFieldName'] ?? null;
$flexFormContainerName = $parsedBody['flexFormContainerName']; $flexFormContainerName = $parsedBody['flexFormContainerName'] ?? null;
$flexFormContainerFieldName = $parsedBody['flexFormContainerFieldName']; $flexFormContainerFieldName = $parsedBody['flexFormContainerFieldName'] ?? null;
// Determine TCA config of field // Determine TCA config of field
if (empty($dataStructureIdentifier)) { if (empty($dataStructureIdentifier)) {
......
<?php <?php
declare(strict_types = 1);
namespace TYPO3\CMS\Backend\Tests\Unit\Controller; namespace TYPO3\CMS\Backend\Tests\Unit\Controller;
/* /*
...@@ -17,21 +18,17 @@ namespace TYPO3\CMS\Backend\Tests\Unit\Controller; ...@@ -17,21 +18,17 @@ namespace TYPO3\CMS\Backend\Tests\Unit\Controller;
use Psr\Http\Message\ServerRequestInterface; use Psr\Http\Message\ServerRequestInterface;
use TYPO3\CMS\Backend\Controller\FormInlineAjaxController; use TYPO3\CMS\Backend\Controller\FormInlineAjaxController;
use TYPO3\CMS\Core\Authentication\BackendUserAuthentication; use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
/** /**
* Test case * Test case
*/ */
class FormInlineAjaxControllerTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase class FormInlineAjaxControllerTest extends UnitTestCase
{ {
/**
* Subject is not notice free, disable E_NOTICES
*/
protected static $suppressNotices = true;
/** /**
* @test * @test
*/ */
public function createActionThrowsExceptionIfContextIsEmpty() public function createActionThrowsExceptionIfContextIsEmpty(): void
{ {
$requestProphecy = $this->prophesize(ServerRequestInterface::class); $requestProphecy = $this->prophesize(ServerRequestInterface::class);
$requestProphecy->getParsedBody()->shouldBeCalled()->willReturn( $requestProphecy->getParsedBody()->shouldBeCalled()->willReturn(
...@@ -49,7 +46,7 @@ class FormInlineAjaxControllerTest extends \TYPO3\TestingFramework\Core\Unit\Uni ...@@ -49,7 +46,7 @@ class FormInlineAjaxControllerTest extends \TYPO3\TestingFramework\Core\Unit\Uni
/** /**
* @test * @test
*/ */
public function createActionThrowsExceptionIfContextConfigSectionIsEmpty() public function createActionThrowsExceptionIfContextConfigSectionIsEmpty(): void
{ {
$requestProphecy = $this->prophesize(ServerRequestInterface::class); $requestProphecy = $this->prophesize(ServerRequestInterface::class);
$requestProphecy->getParsedBody()->shouldBeCalled()->willReturn( $requestProphecy->getParsedBody()->shouldBeCalled()->willReturn(
...@@ -67,7 +64,7 @@ class FormInlineAjaxControllerTest extends \TYPO3\TestingFramework\Core\Unit\Uni ...@@ -67,7 +64,7 @@ class FormInlineAjaxControllerTest extends \TYPO3\TestingFramework\Core\Unit\Uni
/** /**
* @test * @test
*/ */
public function createActionThrowsExceptionIfContextConfigSectionDoesNotValidate() public function createActionThrowsExceptionIfContextConfigSectionDoesNotValidate(): void
{ {
$requestProphecy = $this->prophesize(ServerRequestInterface::class); $requestProphecy = $this->prophesize(ServerRequestInterface::class);
$requestProphecy->getParsedBody()->shouldBeCalled()->willReturn( $requestProphecy->getParsedBody()->shouldBeCalled()->willReturn(
...@@ -92,7 +89,7 @@ class FormInlineAjaxControllerTest extends \TYPO3\TestingFramework\Core\Unit\Uni ...@@ -92,7 +89,7 @@ class FormInlineAjaxControllerTest extends \TYPO3\TestingFramework\Core\Unit\Uni
/** /**
* @test * @test
*/ */
public function detailsActionThrowsExceptionIfContextIsEmpty() public function detailsActionThrowsExceptionIfContextIsEmpty(): void
{ {
$requestProphecy = $this->prophesize(ServerRequestInterface::class); $requestProphecy = $this->prophesize(ServerRequestInterface::class);
$requestProphecy->getParsedBody()->shouldBeCalled()->willReturn( $requestProphecy->getParsedBody()->shouldBeCalled()->willReturn(
...@@ -110,7 +107,7 @@ class FormInlineAjaxControllerTest extends \TYPO3\TestingFramework\Core\Unit\Uni ...@@ -110,7 +107,7 @@ class FormInlineAjaxControllerTest extends \TYPO3\TestingFramework\Core\Unit\Uni
/** /**
* @test * @test
*/ */
public function detailsActionThrowsExceptionIfContextConfigSectionIsEmpty() public function detailsActionThrowsExceptionIfContextConfigSectionIsEmpty(): void
{ {
$requestProphecy = $this->prophesize(ServerRequestInterface::class); $requestProphecy = $this->prophesize(ServerRequestInterface::class);
$requestProphecy->getParsedBody()->shouldBeCalled()->willReturn( $requestProphecy->getParsedBody()->shouldBeCalled()->willReturn(
...@@ -128,7 +125,7 @@ class FormInlineAjaxControllerTest extends \TYPO3\TestingFramework\Core\Unit\Uni ...@@ -128,7 +125,7 @@ class FormInlineAjaxControllerTest extends \TYPO3\TestingFramework\Core\Unit\Uni
/** /**
* @test * @test
*/ */
public function detailsActionThrowsExceptionIfContextConfigSectionDoesNotValidate() public function detailsActionThrowsExceptionIfContextConfigSectionDoesNotValidate(): void
{ {
$requestProphecy = $this->prophesize(ServerRequestInterface::class); $requestProphecy = $this->prophesize(ServerRequestInterface::class);
$requestProphecy->getParsedBody()->shouldBeCalled()->willReturn( $requestProphecy->getParsedBody()->shouldBeCalled()->willReturn(
...@@ -153,7 +150,7 @@ class FormInlineAjaxControllerTest extends \TYPO3\TestingFramework\Core\Unit\Uni ...@@ -153,7 +150,7 @@ class FormInlineAjaxControllerTest extends \TYPO3\TestingFramework\Core\Unit\Uni
/** /**
* @test * @test
*/ */
public function synchronizeLocalizeActionThrowsExceptionIfContextIsEmpty() public function synchronizeLocalizeActionThrowsExceptionIfContextIsEmpty(): void
{ {
$requestProphecy = $this->prophesize(ServerRequestInterface::class); $requestProphecy = $this->prophesize(ServerRequestInterface::class);
$requestProphecy->getParsedBody()->shouldBeCalled()->willReturn( $requestProphecy->getParsedBody()->shouldBeCalled()->willReturn(
...@@ -171,7 +168,7 @@ class FormInlineAjaxControllerTest extends \TYPO3\TestingFramework\Core\Unit\Uni ...@@ -171,7 +168,7 @@ class FormInlineAjaxControllerTest extends \TYPO3\TestingFramework\Core\Unit\Uni
/** /**
* @test * @test
*/ */
public function synchronizeLocalizeActionThrowsExceptionIfContextConfigSectionIsEmpty() public function synchronizeLocalizeActionThrowsExceptionIfContextConfigSectionIsEmpty(): void
{ {
$requestProphecy = $this->prophesize(ServerRequestInterface::class); $requestProphecy = $this->prophesize(ServerRequestInterface::class);
$requestProphecy->getParsedBody()->shouldBeCalled()->willReturn( $requestProphecy->getParsedBody()->shouldBeCalled()->willReturn(
...@@ -189,7 +186,7 @@ class FormInlineAjaxControllerTest extends \TYPO3\TestingFramework\Core\Unit\Uni ...@@ -189,7 +186,7 @@ class FormInlineAjaxControllerTest extends \TYPO3\TestingFramework\Core\Unit\Uni
/** /**
* @test * @test
*/ */
public function synchronizeLocalizeActionThrowsExceptionIfContextConfigSectionDoesNotValidate() public function synchronizeLocalizeActionThrowsExceptionIfContextConfigSectionDoesNotValidate(): void
{ {
$requestProphecy = $this->prophesize(ServerRequestInterface::class); $requestProphecy = $this->prophesize(ServerRequestInterface::class);
$requestProphecy->getParsedBody()->shouldBeCalled()->willReturn( $requestProphecy->getParsedBody()->shouldBeCalled()->willReturn(
...@@ -217,7 +214,7 @@ class FormInlineAjaxControllerTest extends \TYPO3\TestingFramework\Core\Unit\Uni ...@@ -217,7 +214,7 @@ class FormInlineAjaxControllerTest extends \TYPO3\TestingFramework\Core\Unit\Uni
* *
* @test * @test
*/ */
public function getInlineExpandCollapseStateArraySwitchesToFallbackIfTheBackendUserDoesNotHaveAnUCInlineViewProperty() public function getInlineExpandCollapseStateArraySwitchesToFallbackIfTheBackendUserDoesNotHaveAnUCInlineViewProperty(): void
{ {
$backendUserProphecy = $this->prophesize(BackendUserAuthentication::class); $backendUserProphecy = $this->prophesize(BackendUserAuthentication::class);
$backendUserProphecy->uc = []; $backendUserProphecy->uc = [];
...@@ -242,7 +239,7 @@ class FormInlineAjaxControllerTest extends \TYPO3\TestingFramework\Core\Unit\Uni ...@@ -242,7 +239,7 @@ class FormInlineAjaxControllerTest extends \TYPO3\TestingFramework\Core\Unit\Uni
* *
* @test * @test
*/ */
public function getInlineExpandCollapseStateArrayWillUnserializeUCInlineViewPropertyAsAnArrayWithData() public function getInlineExpandCollapseStateArrayWillUnserializeUCInlineViewPropertyAsAnArrayWithData(): void
{ {
$backendUserProphecy = $this->prophesize(BackendUserAuthentication::class); $backendUserProphecy = $this->prophesize(BackendUserAuthentication::class);
$backendUserProphecy->uc = ['inlineView' => serialize(['foo' => 'bar'])]; $backendUserProphecy->uc = ['inlineView' => serialize(['foo' => 'bar'])];
......
<?php <?php
declare(strict_types = 1);
namespace TYPO3\CMS\Backend\Tests\Unit\Controller\Wizard; namespace TYPO3\CMS\Backend\Tests\Unit\Controller\Wizard;
/* /*
...@@ -18,21 +19,17 @@ use Psr\Http\Message\ServerRequestInterface; ...@@ -18,21 +19,17 @@ use Psr\Http\Message\ServerRequestInterface;
use TYPO3\CMS\Backend\Controller\Wizard\SuggestWizardController; use TYPO3\CMS\Backend\Controller\Wizard\SuggestWizardController;
use TYPO3\CMS\Core\Configuration\FlexForm\FlexFormTools; use TYPO3\CMS\Core\Configuration\FlexForm\FlexFormTools;
use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
/** /**
* Test case * Test case
*/ */
class SuggestWizardControllerTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase class SuggestWizardControllerTest extends UnitTestCase
{ {
/**
* Subject is not notice free, disable E_NOTICES
*/
protected static $suppressNotices = true;
/** /**
* @test * @test
*/ */
public function getFlexFieldConfigurationThrowsExceptionIfSimpleFlexFieldIsNotFound() public function getFlexFieldConfigurationThrowsExceptionIfSimpleFlexFieldIsNotFound(): void
{ {
$serverRequestProphecy = $this->prophesize(ServerRequestInterface::class); $serverRequestProphecy = $this->prophesize(ServerRequestInterface::class);
$serverRequestProphecy->getParsedBody()->willReturn([ $serverRequestProphecy->getParsedBody()->willReturn([
...@@ -77,7 +74,7 @@ class SuggestWizardControllerTest extends \TYPO3\TestingFramework\Core\Unit\Unit ...@@ -77,7 +74,7 @@ class SuggestWizardControllerTest extends \TYPO3\TestingFramework\Core\Unit\Unit
/** /**
* @test * @test
*/ */
public function getFlexFieldConfigurationThrowsExceptionIfSectionContainerFlexFieldIsNotFound() public function getFlexFieldConfigurationThrowsExceptionIfSectionContainerFlexFieldIsNotFound(): void
{ {
$serverRequestProphecy = $this->prophesize(ServerRequestInterface::class); $serverRequestProphecy = $this->prophesize(ServerRequestInterface::class);
$serverRequestProphecy->getParsedBody()->willReturn([ $serverRequestProphecy->getParsedBody()->willReturn([
...@@ -122,14 +119,19 @@ class SuggestWizardControllerTest extends \TYPO3\TestingFramework\Core\Unit\Unit ...@@ -122,14 +119,19 @@ class SuggestWizardControllerTest extends \TYPO3\TestingFramework\Core\Unit\Unit
/** /**
* @test * @test
* @dataProvider isTableHiddenIsProperlyRetrievedDataProvider * @dataProvider isTableHiddenIsProperlyRetrievedDataProvider
* @param bool $expected
* @param array $array
*/ */
public function isTableHiddenIsProperlyRetrieved($expected, $array) public function isTableHiddenIsProperlyRetrieved(bool $expected, array $array): void
{ {
$subject = $this->getAccessibleMock(SuggestWizardController::class, ['dummy'], [], '', false); $subject = $this->getAccessibleMock(SuggestWizardController::class, ['dummy'], [], '', false);
$this->assertEquals($expected, $subject->_call('isTableHidden', $array)); $this->assertEquals($expected, $subject->_call('isTableHidden', $array));
} }
public function isTableHiddenIsProperlyRetrievedDataProvider() /**
* @return array
*/
public function isTableHiddenIsProperlyRetrievedDataProvider(): array
{ {
return [ return [
'notSetValue' => [false, ['ctrl' => ['hideTable' => null]]], 'notSetValue' => [false, ['ctrl' => ['hideTable' => null]]],
......
<?php <?php
declare(strict_types = 1);
namespace TYPO3\CMS\Backend\Tests\UnitDeprecated\Form\FormDataProvider; namespace TYPO3\CMS\Backend\Tests\UnitDeprecated\Form\FormDataProvider;
/* /*
...@@ -27,11 +28,6 @@ use TYPO3\CMS\Core\Utility\GeneralUtility; ...@@ -27,11 +28,6 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
*/ */
class TcaFlexPrepareTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase class TcaFlexPrepareTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
{ {
/**
* Subject is not notice free, disable E_NOTICES
*/
protected static $suppressNotices = true;
/** /**
* @var TcaFlexPrepare * @var TcaFlexPrepare
*/ */
......
...@@ -1121,7 +1121,7 @@ class TcaMigration ...@@ -1121,7 +1121,7 @@ class TcaMigration
continue; continue;
} }
foreach ($tableDefinition['columns'] as $fieldName => &$fieldConfig) { foreach ($tableDefinition['columns'] as $fieldName => &$fieldConfig) {
if ($fieldConfig['config']['type'] !== 'input') { if (isset($fieldConfig['config']['type']) && $fieldConfig['config']['type'] !== 'input') {
continue; continue;
} }
$eval = $fieldConfig['config']['eval'] ?? ''; $eval = $fieldConfig['config']['eval'] ?? '';
...@@ -1300,7 +1300,7 @@ class TcaMigration ...@@ -1300,7 +1300,7 @@ class TcaMigration
foreach ($tca as $table => &$tableDefinition) { foreach ($tca as $table => &$tableDefinition) {
if (isset($tableDefinition['columns']) && is_array($tableDefinition['columns'])) { if (isset($tableDefinition['columns']) && is_array($tableDefinition['columns'])) {
foreach ($tableDefinition['columns'] as $fieldName => &$fieldConfig) { foreach ($tableDefinition['columns'] as $fieldName => &$fieldConfig) {
if ($fieldConfig['config']['type'] === 'input' || $fieldConfig['config']['type'] === 'text') { if (isset($fieldConfig['config']['type']) && ($fieldConfig['config']['type'] === 'input' || $fieldConfig['config']['type'] === 'text')) {
if (isset($fieldConfig['config']['wizards']) && is_array($fieldConfig['config']['wizards'])) { if (isset($fieldConfig['config']['wizards']) && is_array($fieldConfig['config']['wizards'])) {
foreach ($fieldConfig['config']['wizards'] as $wizardName => $wizardConfig) { foreach ($fieldConfig['config']['wizards'] as $wizardName => $wizardConfig) {
if (isset($wizardConfig['type']) if (isset($wizardConfig['type'])
...@@ -1372,7 +1372,7 @@ class TcaMigration ...@@ -1372,7 +1372,7 @@ class TcaMigration
foreach ($tca as $table => &$tableDefinition) { foreach ($tca as $table => &$tableDefinition) {
if (isset($tableDefinition['columns']) && is_array($tableDefinition['columns'])) { if (isset($tableDefinition['columns']) && is_array($tableDefinition['columns'])) {
foreach ($tableDefinition['columns'] as $fieldName => &$fieldConfig) { foreach ($tableDefinition['columns'] as $fieldName => &$fieldConfig) {
if ($fieldConfig['config']['type'] === 'input') { if (isset($fieldConfig['config']['type']) && $fieldConfig['config']['type'] === 'input') {
if (isset($fieldConfig['config']['wizards']) if (isset($fieldConfig['config']['wizards'])
&& is_array($fieldConfig['config']['wizards'])) { && is_array($fieldConfig['config']['wizards'])) {
foreach ($fieldConfig['config']['wizards'] as $wizardName => $wizardConfig) { foreach ($fieldConfig['config']['wizards'] as $wizardName => $wizardConfig) {
...@@ -1437,7 +1437,7 @@ class TcaMigration ...@@ -1437,7 +1437,7 @@ class TcaMigration
foreach ($tca as $table => &$tableDefinition) { foreach ($tca as $table => &$tableDefinition) {
if (isset($tableDefinition['columns']) && is_array($tableDefinition['columns'])) { if (isset($tableDefinition['columns']) && is_array($tableDefinition['columns'])) {
foreach ($tableDefinition['columns'] as $fieldName => &$fieldConfig) { foreach ($tableDefinition['columns'] as $fieldName => &$fieldConfig) {
if ($fieldConfig['config']['type'] === 'input' if (isset($fieldConfig['config']['type']) && $fieldConfig['config']['type'] === 'input'
&& !isset($fieldConfig['config']['renderType']) && !isset($fieldConfig['config']['renderType'])
) { ) {
if (isset($fieldConfig['config']['wizards']) if (isset($fieldConfig['config']['wizards'])
...@@ -1544,8 +1544,8 @@ class TcaMigration ...@@ -1544,8 +1544,8 @@ class TcaMigration
foreach ($tca as $table => &$tableDefinition) { foreach ($tca as $table => &$tableDefinition) {
if (isset($tableDefinition['columns']) && is_array($tableDefinition['columns'])) { if (isset($tableDefinition['columns']) && is_array($tableDefinition['columns'])) {
foreach ($tableDefinition['columns'] as $fieldName => &$fieldConfig) { foreach ($tableDefinition['columns'] as $fieldName => &$fieldConfig) {
if ($fieldConfig['config']['type'] === 'group' if (isset($fieldConfig['config']['type']) && ($fieldConfig['config']['type'] === 'group'
|| $fieldConfig['config']['type'] === 'select' || $fieldConfig['config']['type'] === 'select')
) { ) {
if (isset($fieldConfig['config']['wizards']) if (isset($fieldConfig['config']['wizards'])
&& is_array($fieldConfig['config']['wizards']) && is_array($fieldConfig['config']['wizards'])
...@@ -1631,8 +1631,8 @@ class TcaMigration ...@@ -1631,8 +1631,8 @@ class TcaMigration
foreach ($tca as $table => &$tableDefinition) { foreach ($tca as $table => &$tableDefinition) {
if (isset($tableDefinition['columns']) && is_array($tableDefinition['columns'])) { if (isset($tableDefinition['columns']) && is_array($tableDefinition['columns'])) {
foreach ($tableDefinition['columns'] as $fieldName => &$fieldConfig) { foreach ($tableDefinition['columns'] as $fieldName => &$fieldConfig) {
if ($fieldConfig['config']['type'] === 'group' if (isset($fieldConfig['config']['type']) && ($fieldConfig['config']['type'] === 'group'
|| $fieldConfig['config']['type'] === 'select' || $fieldConfig['config']['type'] === 'select')
) { ) {
if (isset($fieldConfig['config']['wizards']) if (isset($fieldConfig['config']['wizards'])
&& is_array($fieldConfig['config']['wizards']) && is_array($fieldConfig['config']['wizards'])
...@@ -1734,8 +1734,8 @@ class TcaMigration ...@@ -1734,8 +1734,8 @@ class TcaMigration
foreach ($tca as $table => &$tableDefinition) { foreach ($tca as $table => &$tableDefinition) {
if (isset($tableDefinition['columns']) && is_array($tableDefinition['columns'])) { if (isset($tableDefinition['columns']) && is_array($tableDefinition['columns'])) {
foreach ($tableDefinition['columns'] as $fieldName => &$fieldConfig) { foreach ($tableDefinition['columns'] as $fieldName => &$fieldConfig) {
if ($fieldConfig['config']['type'] === 'group' if (isset($fieldConfig['config']['type']) && ($fieldConfig['config']['type'] === 'group'
|| $fieldConfig['config']['type'] === 'select' || $fieldConfig['config']['type'] === 'select')
) { ) {
if (isset($fieldConfig['config']['wizards']) if (isset($fieldConfig['config']['wizards'])
&& is_array($fieldConfig['config']['wizards']) && is_array($fieldConfig['config']['wizards'])
...@@ -1924,7 +1924,7 @@ class TcaMigration ...@@ -1924,7 +1924,7 @@ class TcaMigration
foreach ($tca as $table => &$tableDefinition) { foreach ($tca as $table => &$tableDefinition) {
if (isset($tableDefinition['columns']) && is_array($tableDefinition['columns'])) { if (isset($tableDefinition['columns']) && is_array($tableDefinition['columns'])) {
foreach ($tableDefinition['columns'] as $fieldName => &$fieldConfig) { foreach ($tableDefinition['columns'] as $fieldName => &$fieldConfig) {
if ($fieldConfig['config']['type'] === 'text') { if (isset($fieldConfig['config']['type']) && $fieldConfig['config']['type'] === 'text') {
if (isset($fieldConfig['config']['wizards']) if (isset($fieldConfig['config']['wizards'])
&& is_array($fieldConfig['config']['wizards']) && is_array($fieldConfig['config']['wizards'])
) { ) {
...@@ -2021,7 +2021,7 @@ class TcaMigration ...@@ -2021,7 +2021,7 @@ class TcaMigration
foreach ($tca as $table => &$tableDefinition) { foreach ($tca as $table => &$tableDefinition) {
if (isset($tableDefinition['columns']) && is_array($tableDefinition['columns'])) { if (isset($tableDefinition['columns']) && is_array($tableDefinition['columns'])) {
foreach ($tableDefinition['columns'] as $fieldName => &$fieldConfig) { foreach ($tableDefinition['columns'] as $fieldName => &$fieldConfig) {
if ($fieldConfig['config']['type'] === 'text') { if (isset($fieldConfig['config']['type']) && $fieldConfig['config']['type'] === 'text') {
if (isset($fieldConfig['config']['wizards']) if (isset($fieldConfig['config']['wizards'])
&& is_array($fieldConfig['config']['wizards']) && is_array($fieldConfig['config']['wizards'])
) { ) {
...@@ -2136,9 +2136,9 @@ class TcaMigration ...@@ -2136,9 +2136,9 @@ class TcaMigration
foreach ($tca as $table => &$tableDefinition) { foreach ($tca as $table => &$tableDefinition) {
if (isset($tableDefinition['columns']) && is_array($tableDefinition['columns'])) { if (isset($tableDefinition['columns']) && is_array($tableDefinition['columns'])) {
foreach ($tableDefinition['columns'] as $fieldName => &$fieldConfig) { foreach ($tableDefinition['columns'] as $fieldName => &$fieldConfig) {
if ($fieldConfig['config']['type'] === 'group' if (isset($fieldConfig['config']['type']) && ($fieldConfig['config']['type'] === 'group'
&& isset($fieldConfig['config']['internal_type']) && isset($fieldConfig['config']['internal_type'])
&& $fieldConfig['config']['internal_type'] === 'db' && $fieldConfig['config']['internal_type'] === 'db')
) { ) {
if (isset($fieldConfig['config']['hideSuggest'])) { if (isset($fieldConfig['config']['hideSuggest'])) {
continue; continue;
...@@ -2218,7 +2218,7 @@ class TcaMigration ...@@ -2218,7 +2218,7 @@ class TcaMigration
foreach ($tca as $table => &$tableDefinition) { foreach ($tca as $table => &$tableDefinition) {
if (isset($tableDefinition['columns']) && is_array($tableDefinition['columns'])) { if (isset($tableDefinition['columns']) && is_array($tableDefinition['columns'])) {
foreach ($tableDefinition['columns'] as $fieldName => &$fieldConfig) { foreach ($tableDefinition['columns'] as $fieldName => &$fieldConfig) {
if ($fieldConfig['config']['type'] === 'group') { if (isset($fieldConfig['config']['type']) && $fieldConfig['config']['type'] === 'group') {
if (isset($fieldConfig['config']['selectedListStyle'])) { if (isset($fieldConfig['config']['selectedListStyle'])) {
unset($fieldConfig['config']['selectedListStyle']); unset($fieldConfig['config']['selectedListStyle']);
$this->messages[] = 'The \'type\' = \'group\' option \'selectedListStyle\' is obsolete and has been dropped' $this->messages[] = 'The \'type\' = \'group\' option \'selectedListStyle\' is obsolete and has been dropped'
...@@ -2293,9 +2293,9 @@ class TcaMigration ...@@ -2293,9 +2293,9 @@ class TcaMigration
foreach ($tca as $table => &$tableDefinition) { foreach ($tca as $table => &$tableDefinition) {
if (isset($tableDefinition['columns']) && is_array($tableDefinition['columns'])) { if (isset($tableDefinition['columns']) && is_array($tableDefinition['columns'])) {
foreach ($tableDefinition['columns'] as $fieldName => &$fieldConfig) { foreach ($tableDefinition['columns'] as $fieldName => &$fieldConfig) {
if ($fieldConfig['config']['type'] === 'select' if (isset($fieldConfig['config']['type']) && ($fieldConfig['config']['type'] === 'select'
&& isset($fieldConfig['config']['renderType']) && isset($fieldConfig['config']['renderType'])
&& $fieldConfig['config']['renderType'] === 'selectSingle' && $fieldConfig['config']['renderType'] === 'selectSingle')
) { ) {
if (isset($fieldConfig['config']['showIconTable'])) { if (isset($fieldConfig['config']['showIconTable'])) {
if ((bool)$fieldConfig['config']['showIconTable'] === true) { if ((bool)$fieldConfig['config']['showIconTable'] === true) {
...@@ -2336,7 +2336,7 @@ class TcaMigration ...@@ -2336,7 +2336,7 @@ class TcaMigration
foreach ($tca as $table => &$tableDefinition) { foreach ($tca as $table => &$tableDefinition) {
if (isset($tableDefinition['columns']) && is_array($tableDefinition['columns'])) { if (isset($tableDefinition['columns']) && is_array($tableDefinition['columns'])) {
foreach ($tableDefinition['columns'] as $fieldName => &$fieldConfig) { foreach ($tableDefinition['columns'] as $fieldName => &$fieldConfig) {
if ($fieldConfig['config']['type'] === 'imageManipulation') { if (isset($fieldConfig['config']['type']) && $fieldConfig['config']['type'] === 'imageManipulation') {
if (isset($fieldConfig['config']['enableZoom'])) { if (isset($fieldConfig['config']['enableZoom'])) {
unset($fieldConfig['config']['enableZoom']); unset($fieldConfig['config']['enableZoom']);
$this->messages[] = sprintf( $this->messages[] = sprintf(
...@@ -2399,12 +2399,10 @@ class TcaMigration ...@@ -2399,12 +2399,10 @@ class TcaMigration
foreach ($tca as $table => &$tableDefinition) { foreach ($tca as $table => &$tableDefinition) {
if (isset($tableDefinition['columns']) && is_array($tableDefinition['columns'])) { if (isset($tableDefinition['columns']) && is_array($tableDefinition['columns'])) {
foreach ($tableDefinition['columns'] as $fieldName => &$fieldConfig) { foreach ($tableDefinition['columns'] as $fieldName => &$fieldConfig) {
if (isset($fieldConfig['config']['renderType']))