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

[BUGFIX] Remove non-existent UnsupportedRequestTypeException #44

Merged
merged 1 commit into from
Oct 8, 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
5 changes: 0 additions & 5 deletions Classes/Controller/AccessController.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
use Slub\DigasFeManagement\Domain\Repository\KitodoDocumentRepository;
use TYPO3\CMS\Core\Messaging\AbstractMessage;
use TYPO3\CMS\Extbase\Mvc\Exception\StopActionException;
use TYPO3\CMS\Extbase\Mvc\Exception\UnsupportedRequestTypeException;
use TYPO3\CMS\Extbase\Persistence\Exception\IllegalObjectTypeException;
use TYPO3\CMS\Extbase\Persistence\Exception\UnknownObjectException;
use TYPO3\CMS\Extbase\Utility\LocalizationUtility;
Expand Down Expand Up @@ -161,7 +160,6 @@
* @throws IllegalObjectTypeException
* @throws StopActionException
* @throws UnknownObjectException
* @throws UnsupportedRequestTypeException
*/
public function informUserAction(User $user)
{
Expand Down Expand Up @@ -208,7 +206,6 @@
* @return void
* @throws IllegalObjectTypeException
* @throws StopActionException
* @throws UnsupportedRequestTypeException
*/
public function createAction(User $user, Access $access)
{
Expand Down Expand Up @@ -236,7 +233,6 @@
* @param User $user
* @param Access $access
* @return void
* @throws UnsupportedRequestTypeException
* @throws IllegalObjectTypeException
* @throws UnknownObjectException
* @throws StopActionException
Expand Down Expand Up @@ -392,7 +388,6 @@
* @param User $user
* @return void
* @throws StopActionException
* @throws UnsupportedRequestTypeException
* @throws IllegalObjectTypeException
* @throws UnknownObjectException
*/
Expand Down Expand Up @@ -420,7 +415,7 @@

// add success message
$message = LocalizationUtility::translate($this->settings['languageFile'] . ':access.success.deleted');
$this->addFlashMessage(sprintf($message, $access->getDlfDocument()->getTitle()));

Check failure on line 418 in Classes/Controller/AccessController.php

View workflow job for this annotation

GitHub Actions / phpstan

Call to method getTitle() on an unknown class Slub\SlubWebDigas\Domain\Model\KitodoDocument.

// redirect to list view
$this->redirect('list', null, null, ['user' => $user]);
Expand Down
2 changes: 0 additions & 2 deletions Classes/Controller/AdministrationController.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
*/
public function showAction(User $user)
{
if (!empty($user) && !empty($user->getUid())) {

Check failure on line 86 in Classes/Controller/AdministrationController.php

View workflow job for this annotation

GitHub Actions / phpstan

Variable $user in empty() always exists and is not falsy.
$this->view->assign('user', $this->userRepository->findByUid($user->getUid()));
$this->assignForAll();
}
Expand All @@ -96,7 +96,7 @@
*/
public function editUserAction(User $user)
{
if (!empty($user) && !empty($user->getUid())) {

Check failure on line 99 in Classes/Controller/AdministrationController.php

View workflow job for this annotation

GitHub Actions / phpstan

Variable $user in empty() always exists and is not falsy.
$token = GeneralUtility::hmac((string)$user->getUid(), (string)$user->getCrdate()->getTimestamp());

/** @var UserGroup[] $feUserGroup */
Expand All @@ -121,7 +121,6 @@
* @param User $user
* @TYPO3\CMS\Extbase\Annotation\Validate("Slub\DigasFeManagement\Domain\Validator\ServersideValidator", param="user")
* @throws \TYPO3\CMS\Extbase\Mvc\Exception\StopActionException
* @throws \TYPO3\CMS\Extbase\Mvc\Exception\UnsupportedRequestTypeException
*/
public function updateUserAction(User $user)
{
Expand All @@ -129,7 +128,7 @@
if ($user->getDisable() === true) {
$user->setInactivemessageTstamp(new \DateTime());
} else {
$user->setInactivemessageTstamp(null);

Check failure on line 131 in Classes/Controller/AdministrationController.php

View workflow job for this annotation

GitHub Actions / phpstan

Parameter #1 $inactivemessageTstamp of method Slub\DigasFeManagement\Domain\Model\User::setInactivemessageTstamp() expects DateTime, null given.
}
$this->updateAllConfirmed($user);
$this->redirect('editUser', null, null, ['user' => $user]);
Expand All @@ -145,7 +144,7 @@
*/
public function deactivateUserAction(User $user, $setActiveState = false)
{
if (!empty($user)) {

Check failure on line 147 in Classes/Controller/AdministrationController.php

View workflow job for this annotation

GitHub Actions / phpstan

Variable $user in empty() always exists and is not falsy.
$this->signalSlotDispatcher->dispatch(__CLASS__, __FUNCTION__, [$user, $this]);
$logUtility = GeneralUtility::makeInstance(LogUtility::class);
$logUtility->log(Log::STATUS_ADMINISTRATION_PROFILE_DEACTIVATE, $user);
Expand Down Expand Up @@ -187,7 +186,6 @@
* @param User $user
* @return void
* @throws \TYPO3\CMS\Extbase\Mvc\Exception\StopActionException
* @throws \TYPO3\CMS\Extbase\Mvc\Exception\UnsupportedRequestTypeException
* @see \In2code\Femanager\Controller\EditController::redirectIfDirtyObject()
*
*/
Expand Down
5 changes: 0 additions & 5 deletions Classes/Controller/BasketController.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
use Slub\DigasFeManagement\Domain\Model\Access;
use Slub\SlubWebDigas\Domain\Model\KitodoDocument;
use TYPO3\CMS\Extbase\Mvc\Exception\StopActionException;
use TYPO3\CMS\Extbase\Mvc\Exception\UnsupportedRequestTypeException;
use TYPO3\CMS\Extbase\Persistence\Exception\IllegalObjectTypeException;
use TYPO3\CMS\Extbase\Persistence\Exception\UnknownObjectException;
use TYPO3\CMS\Extbase\Persistence\Generic\QueryResult;
Expand Down Expand Up @@ -81,7 +80,6 @@ public function injectAccessRepository(\Slub\DigasFeManagement\Domain\Repository

/**
* @throws StopActionException
* @throws UnsupportedRequestTypeException
*/
public function initializeAction()
{
Expand Down Expand Up @@ -156,7 +154,6 @@ public function initializeAction()
*
* @return void
* @throws StopActionException
* @throws UnsupportedRequestTypeException
*/
public function indexAction()
{
Expand Down Expand Up @@ -197,7 +194,6 @@ public function overviewAction()
*
* @return void
* @throws StopActionException
* @throws UnsupportedRequestTypeException
* @throws IllegalObjectTypeException
* @throws UnknownObjectException
*/
Expand Down Expand Up @@ -264,7 +260,6 @@ public function requestAction()
* test is user is logged in
*
* @throws StopActionException
* @throws UnsupportedRequestTypeException
*/
protected function checkUserLoggedIn()
{
Expand Down
8 changes: 3 additions & 5 deletions Classes/Controller/ExtendController.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
use TYPO3\CMS\Core\Page\PageRenderer;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Mvc\Exception\StopActionException;
use TYPO3\CMS\Extbase\Mvc\Exception\UnsupportedRequestTypeException;
use TYPO3\CMS\Core\Context\Exception\AspectNotFoundException;

/**
Expand Down Expand Up @@ -64,7 +63,7 @@ public function dialogAction()
$this->controllerContext->getFlashMessageQueue('extbase.flashmessages.tx_femanager_pi1')->getAllMessagesAndFlush();
//redirect
$this->redirectToKitodoView(['tx_dlf' => $kitodoParams]);
} catch (StopActionException | UnsupportedRequestTypeException $e) {
} catch (StopActionException $e) {
}
}
elseif ($femanagerParams['action'] === 'create') {
Expand All @@ -86,7 +85,7 @@ public function dialogAction()
$GLOBALS["TSFE"]->fe_user->setKey("ses", $this->settings['dialog']['cookieName'], true);
try {
$this->redirectToKitodoView(['tx_dlf' => $kitodoParams]);
} catch (StopActionException | UnsupportedRequestTypeException $e) {
} catch (StopActionException $e) {
}
}

Expand All @@ -98,7 +97,6 @@ public function dialogAction()
/**
* @param array $parameters
* @throws StopActionException
* @throws UnsupportedRequestTypeException
*/
protected function redirectToKitodoView(array $parameters)
{
Expand Down Expand Up @@ -184,7 +182,7 @@ public function disableAction()
->build();
try {
$this->redirectToUri($uri, null, 404);
} catch (StopActionException | UnsupportedRequestTypeException $e) {
} catch (StopActionException $e) {
}
}
}
Expand Down
2 changes: 0 additions & 2 deletions Classes/Controller/NewController.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
use Psr\Http\Message\ResponseInterface;
use Slub\DigasFeManagement\Domain\Model\User;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Mvc\Exception\UnsupportedRequestTypeException;

/**
* Class NewController
Expand Down Expand Up @@ -106,7 +105,6 @@ public function createAction(\In2code\Femanager\Domain\Model\User $user)
*
* @param User|\In2code\Femanager\Domain\Model\User $user
* @return void
* @throws UnsupportedRequestTypeException
*/
protected function createUserConfirmationRequest(\In2code\Femanager\Domain\Model\User $user)
{
Expand Down
Loading