Skip to content

Commit

Permalink
[TASK] Fix some php 8 issues and prepare for v11 release
Browse files Browse the repository at this point in the history
  • Loading branch information
Lacr1ma committed Nov 19, 2021
1 parent 2c06ebc commit f112931
Show file tree
Hide file tree
Showing 8 changed files with 3,191 additions and 1,132 deletions.
8 changes: 2 additions & 6 deletions .github/workflows/main.yml
Expand Up @@ -34,12 +34,8 @@ jobs:
run: ddev exec bin/phpunit -c public/typo3conf/ext/flogin/Tests/Build/FunctionalTests.xml

- name: Acceptance General
run: ddev exec bin/codecept run acceptance -f -c public/typo3conf/ext/flogin/Tests/codeception.yml --env github

- name: Acceptance API
run: ddev exec bin/codecept run acceptance -f -c public/typo3conf/ext/flogin/Tests/api.suite.yml --env github
if: ${{ false }}
run: ddev exec bin/codecept run acceptance -f -vvv -c public/typo3conf/ext/flogin/Tests/codeception.yml --env github

- name: Acceptance Backend
run: ddev exec bin/codecept run acceptance -f -c public/typo3conf/ext/flogin/Tests/Backend.suite.yml --env github
run: ddev exec bin/codecept run acceptance -f -vvv -c public/typo3conf/ext/flogin/Tests/Backend.suite.yml --env github
if: ${{ false }}
8 changes: 4 additions & 4 deletions Classes/Controller/UserApiController.php
Expand Up @@ -48,11 +48,11 @@ public function currentAction(): ResponseInterface
{
$authUid = (int)$this->context->getPropertyFromAspect('frontend.user', 'id');

$user = $this->userRepository->findByUid($authUid);

$json = json_encode($user->_getProperties());
if ($user = $this->userRepository->findByUid($authUid)) {
$json = (string)json_encode($user->_getProperties());
}

return $this->jsonResponse($json);
return $this->jsonResponse($json ?? '');
}

/**
Expand Down
4 changes: 2 additions & 2 deletions Classes/Support/TypoScript.php
Expand Up @@ -45,7 +45,7 @@ public static function getView(): array
{
$ts = self::retrieveFullTypoScriptConfigurationFor('tx_flogin');

return (array)$ts['view.'] ?: [];
return (array)$ts['view.'];
}

public static function getSettings(): array
Expand All @@ -69,7 +69,7 @@ public static function retrieveFullTypoScriptConfigurationFor(string $extensionK
return [];
}

return $ts['plugin.'][$extensionKey . '.'] ?: [];
return $ts['plugin.'][$extensionKey . '.'] ?? [];
}

/**
Expand Down

0 comments on commit f112931

Please sign in to comment.