diff --git a/typo3/sysext/core/Documentation/Changelog/12.0/Breaking-96107-DeprecatedFunctionalityRemoved.rst b/typo3/sysext/core/Documentation/Changelog/12.0/Breaking-96107-DeprecatedFunctionalityRemoved.rst index 25e196943948b70ae62d4ca1c5f2113d368ac5c6..8d12d73115d5f73be0b44e5ebbe39ef68996d8dc 100644 --- a/typo3/sysext/core/Documentation/Changelog/12.0/Breaking-96107-DeprecatedFunctionalityRemoved.rst +++ b/typo3/sysext/core/Documentation/Changelog/12.0/Breaking-96107-DeprecatedFunctionalityRemoved.rst @@ -15,6 +15,15 @@ The following PHP classes that have previously been marked as deprecated for v11 - :php:`\TYPO3\CMS\Core\Cache\Backend\WincacheBackend` - :php:`\TYPO3\CMS\Core\Database\QueryGenerator` - :php:`\TYPO3\CMS\Core\Database\QueryView` +- :php:`\TYPO3\CMS\Extbase\Domain\Model\BackendUser` +- :php:`\TYPO3\CMS\Extbase\Domain\Model\BackendUserGroup` +- :php:`\TYPO3\CMS\Extbase\Domain\Model\FrontendUser` +- :php:`\TYPO3\CMS\Extbase\Domain\Model\FrontendUserGroup` +- :php:`\TYPO3\CMS\Extbase\Domain\Repository\BackendUserGroupRepository` +- :php:`\TYPO3\CMS\Extbase\Domain\Repository\BackendUserRepository` +- :php:`\TYPO3\CMS\Extbase\Domain\Repository\CategoryRepository` +- :php:`\TYPO3\CMS\Extbase\Domain\Repository\FrontendUserGroupRepository` +- :php:`\TYPO3\CMS\Extbase\Domain\Repository\FrontendUserRepository` The following PHP interfaces that have previously been marked as deprecated for v11 and were now removed: diff --git a/typo3/sysext/extbase/Classes/Domain/Model/BackendUser.php b/typo3/sysext/extbase/Classes/Domain/Model/BackendUser.php deleted file mode 100644 index 8c9edd8fea8927aff5f16d03bb711d9a06e04cf4..0000000000000000000000000000000000000000 --- a/typo3/sysext/extbase/Classes/Domain/Model/BackendUser.php +++ /dev/null @@ -1,289 +0,0 @@ -<?php - -/* - * This file is part of the TYPO3 CMS project. - * - * It is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License, either version 2 - * of the License, or any later version. - * - * For the full copyright and license information, please read the - * LICENSE.txt file that was distributed with this source code. - * - * The TYPO3 project - inspiring people to share! - */ - -namespace TYPO3\CMS\Extbase\Domain\Model; - -use TYPO3\CMS\Extbase\Annotation as Extbase; -use TYPO3\CMS\Extbase\DomainObject\AbstractEntity; - -/** - * This model represents a back-end user. - * - * @deprecated since v11, will be removed in v12. Do not use or extend this model. - */ -class BackendUser extends AbstractEntity -{ - /** - * @var string - * @Extbase\Validate("NotEmpty") - */ - protected $userName = ''; - - /** - * @var string - */ - protected $description = ''; - - /** - * @var bool - */ - protected $isAdministrator = false; - - /** - * @var bool - */ - protected $isDisabled = false; - - /** - * @var \DateTime|null - */ - protected $startDateAndTime; - - /** - * @var \DateTime|null - */ - protected $endDateAndTime; - - /** - * @var string - */ - protected $email = ''; - - /** - * @var string - */ - protected $realName = ''; - - /** - * @var \DateTime|null - */ - protected $lastLoginDateAndTime; - - /** - * Gets the user name. - * - * @return string the user name, will not be empty - */ - public function getUserName() - { - return $this->userName; - } - - /** - * Sets the user name. - * - * @param string $userName the user name to set, must not be empty - */ - public function setUserName($userName) - { - $this->userName = $userName; - } - - /** - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * @param string $description - */ - public function setDescription($description) - { - $this->description = $description; - } - - /** - * Checks whether this user is an administrator. - * - * @return bool whether this user is an administrator - */ - public function getIsAdministrator() - { - return $this->isAdministrator; - } - - /** - * Sets whether this user should be an administrator. - * - * @param bool $isAdministrator whether this user should be an administrator - */ - public function setIsAdministrator($isAdministrator) - { - $this->isAdministrator = $isAdministrator; - } - - /** - * Checks whether this user is disabled. - * - * @return bool whether this user is disabled - */ - public function getIsDisabled() - { - return $this->isDisabled; - } - - /** - * Sets whether this user is disabled. - * - * @param bool $isDisabled whether this user is disabled - */ - public function setIsDisabled($isDisabled) - { - $this->isDisabled = $isDisabled; - } - - /** - * Returns the point in time from which this user is enabled. - * - * @return \DateTime|null the start date and time - */ - public function getStartDateAndTime() - { - return $this->startDateAndTime; - } - - /** - * Sets the point in time from which this user is enabled. - * - * @param \DateTime|null $dateAndTime the start date and time - */ - public function setStartDateAndTime(\DateTime $dateAndTime = null) - { - $this->startDateAndTime = $dateAndTime; - } - - /** - * Returns the point in time before which this user is enabled. - * - * @return \DateTime|null the end date and time - */ - public function getEndDateAndTime() - { - return $this->endDateAndTime; - } - - /** - * Sets the point in time before which this user is enabled. - * - * @param \DateTime|null $dateAndTime the end date and time - */ - public function setEndDateAndTime(\DateTime $dateAndTime = null) - { - $this->endDateAndTime = $dateAndTime; - } - - /** - * Gets the e-mail address of this user. - * - * @return string the e-mail address, might be empty - */ - public function getEmail() - { - return $this->email; - } - - /** - * Sets the e-mail address of this user. - * - * @param string $email the e-mail address, may be empty - */ - public function setEmail($email) - { - $this->email = $email; - } - - /** - * Returns this user's real name. - * - * @return string the real name. might be empty - */ - public function getRealName() - { - return $this->realName; - } - - /** - * Sets this user's real name. - * - * @param string $name the user's real name, may be empty. - */ - public function setRealName($name) - { - $this->realName = $name; - } - - /** - * Checks whether this user is currently activated. - * - * This function takes the "disabled" flag, the start date/time and the end date/time into account. - * - * @return bool whether this user is currently activated - */ - public function isActivated() - { - return !$this->getIsDisabled() && $this->isActivatedViaStartDateAndTime() && $this->isActivatedViaEndDateAndTime(); - } - - /** - * Checks whether this user is activated as far as the start date and time is concerned. - * - * @return bool whether this user is activated as far as the start date and time is concerned - */ - protected function isActivatedViaStartDateAndTime() - { - if ($this->getStartDateAndTime() === null) { - return true; - } - $now = new \DateTime('now'); - return $this->getStartDateAndTime() <= $now; - } - - /** - * Checks whether this user is activated as far as the end date and time is concerned. - * - * @return bool whether this user is activated as far as the end date and time is concerned - */ - protected function isActivatedViaEndDateAndTime() - { - if ($this->getEndDateAndTime() === null) { - return true; - } - $now = new \DateTime('now'); - return $now <= $this->getEndDateAndTime(); - } - - /** - * Gets this user's last login date and time. - * - * @return \DateTime|null this user's last login date and time, will be NULL if this user has never logged in before - */ - public function getLastLoginDateAndTime() - { - return $this->lastLoginDateAndTime; - } - - /** - * Sets this user's last login date and time. - * - * @param \DateTime|null $dateAndTime this user's last login date and time - */ - public function setLastLoginDateAndTime(\DateTime $dateAndTime = null) - { - $this->lastLoginDateAndTime = $dateAndTime; - } -} diff --git a/typo3/sysext/extbase/Classes/Domain/Model/BackendUserGroup.php b/typo3/sysext/extbase/Classes/Domain/Model/BackendUserGroup.php deleted file mode 100644 index cf7868e94ab02d670f161dceedeb1b5de7435bb4..0000000000000000000000000000000000000000 --- a/typo3/sysext/extbase/Classes/Domain/Model/BackendUserGroup.php +++ /dev/null @@ -1,528 +0,0 @@ -<?php - -/* - * This file is part of the TYPO3 CMS project. - * - * It is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License, either version 2 - * of the License, or any later version. - * - * For the full copyright and license information, please read the - * LICENSE.txt file that was distributed with this source code. - * - * The TYPO3 project - inspiring people to share! - */ - -namespace TYPO3\CMS\Extbase\Domain\Model; - -use TYPO3\CMS\Extbase\Annotation as Extbase; -use TYPO3\CMS\Extbase\DomainObject\AbstractEntity; -use TYPO3\CMS\Extbase\Persistence\ObjectStorage; - -/** - * This model represents a backend usergroup. - * - * @deprecated since v11, will be removed in v12. Do not use or extend this model. - */ -class BackendUserGroup extends AbstractEntity -{ - const FILE_OPPERATIONS = 1; - const DIRECTORY_OPPERATIONS = 4; - const DIRECTORY_COPY = 8; - const DIRECTORY_REMOVE_RECURSIVELY = 16; - - /** - * @var string - * @Extbase\Validate("NotEmpty") - */ - protected $title = ''; - - /** - * @var string - */ - protected $description = ''; - - /** - * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\BackendUserGroup> - */ - protected $subGroups; - - /** - * @var string - */ - protected $modules = ''; - - /** - * @var string - */ - protected $tablesListening = ''; - - /** - * @var string - */ - protected $tablesModify = ''; - - /** - * @var string - */ - protected $pageTypes = ''; - - /** - * @var string - */ - protected $allowedExcludeFields = ''; - - /** - * @var string - */ - protected $explicitlyAllowAndDeny = ''; - - /** - * @var string - */ - protected $allowedLanguages = ''; - - /** - * @var bool - */ - protected $workspacePermission = false; - - /** - * @var string - */ - protected $databaseMounts = ''; - - /** - * @var int - */ - protected $fileOperationPermissions = 0; - - /** - * @var string - */ - protected $tsConfig = ''; - - /** - * Constructs this backend usergroup - */ - public function __construct() - { - $this->subGroups = new ObjectStorage(); - } - - /** - * Setter for title - * - * @param string $title - */ - public function setTitle($title) - { - $this->title = $title; - } - - /** - * Getter for title - * - * @return string - */ - public function getTitle() - { - return $this->title; - } - - /** - * Setter for description - * - * @param string $description - */ - public function setDescription($description) - { - $this->description = $description; - } - - /** - * Getter for description - * - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Setter for the sub groups - * - * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $subGroups - */ - public function setSubGroups(ObjectStorage $subGroups) - { - $this->subGroups = $subGroups; - } - - /** - * Adds a sub group to this backend user group - * - * @param \TYPO3\CMS\Extbase\Domain\Model\BackendUserGroup $beGroup - */ - public function addSubGroup(\TYPO3\CMS\Extbase\Domain\Model\BackendUserGroup $beGroup) - { - $this->subGroups->attach($beGroup); - } - - /** - * Removes sub group from this backend user group - * - * @param \TYPO3\CMS\Extbase\Domain\Model\BackendUserGroup $groupToDelete - */ - public function removeSubGroup(\TYPO3\CMS\Extbase\Domain\Model\BackendUserGroup $groupToDelete) - { - $this->subGroups->detach($groupToDelete); - } - - /** - * Remove all sub groups from this backend user group - */ - public function removeAllSubGroups() - { - $subGroups = clone $this->subGroups; - $this->subGroups->removeAll($subGroups); - } - - /** - * Getter of sub groups - * - * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage - */ - public function getSubGroups() - { - return $this->subGroups; - } - - /** - * Setter for modules - * - * @param string $modules - */ - public function setModules($modules) - { - $this->modules = $modules; - } - - /** - * Getter for modules - * - * @return string - */ - public function getModules() - { - return $this->modules; - } - - /** - * Setter for tables listening - * - * @param string $tablesListening - */ - public function setTablesListening($tablesListening) - { - $this->tablesListening = $tablesListening; - } - - /** - * Getter for tables listening - * - * @return string - */ - public function getTablesListening() - { - return $this->tablesListening; - } - - /** - * Setter for tables modify - * - * @param string $tablesModify - */ - public function setTablesModify($tablesModify) - { - $this->tablesModify = $tablesModify; - } - - /** - * Getter for tables modify - * - * @return string - */ - public function getTablesModify() - { - return $this->tablesModify; - } - - /** - * Setter for page types - * - * @param string $pageTypes - */ - public function setPageTypes($pageTypes) - { - $this->pageTypes = $pageTypes; - } - - /** - * Getter for page types - * - * @return string - */ - public function getPageTypes() - { - return $this->pageTypes; - } - - /** - * Setter for allowed exclude fields - * - * @param string $allowedExcludeFields - */ - public function setAllowedExcludeFields($allowedExcludeFields) - { - $this->allowedExcludeFields = $allowedExcludeFields; - } - - /** - * Getter for allowed exclude fields - * - * @return string - */ - public function getAllowedExcludeFields() - { - return $this->allowedExcludeFields; - } - - /** - * Setter for explicitly allow and deny - * - * @param string $explicitlyAllowAndDeny - */ - public function setExplicitlyAllowAndDeny($explicitlyAllowAndDeny) - { - $this->explicitlyAllowAndDeny = $explicitlyAllowAndDeny; - } - - /** - * Getter for explicitly allow and deny - * - * @return string - */ - public function getExplicitlyAllowAndDeny() - { - return $this->explicitlyAllowAndDeny; - } - - /** - * Setter for allowed languages - * - * @param string $allowedLanguages - */ - public function setAllowedLanguages($allowedLanguages) - { - $this->allowedLanguages = $allowedLanguages; - } - - /** - * Getter for allowed languages - * - * @return string - */ - public function getAllowedLanguages() - { - return $this->allowedLanguages; - } - - /** - * Setter for workspace permission - * - * @param bool $workspacePermission - */ - public function setWorkspacePermissions($workspacePermission) - { - $this->workspacePermission = $workspacePermission; - } - - /** - * Getter for workspace permission - * - * @return bool - */ - public function getWorkspacePermission() - { - return $this->workspacePermission; - } - - /** - * Setter for database mounts - * - * @param string $databaseMounts - */ - public function setDatabaseMounts($databaseMounts) - { - $this->databaseMounts = $databaseMounts; - } - - /** - * Getter for database mounts - * - * @return string - */ - public function getDatabaseMounts() - { - return $this->databaseMounts; - } - - /** - * Getter for file operation permissions - * - * @param int $fileOperationPermissions - */ - public function setFileOperationPermissions($fileOperationPermissions) - { - $this->fileOperationPermissions = $fileOperationPermissions; - } - - /** - * Getter for file operation permissions - * - * @return int - */ - public function getFileOperationPermissions() - { - return $this->fileOperationPermissions; - } - - /** - * Check if file operations like upload, copy, move, delete, rename, new and - * edit files is allowed. - * - * @return bool - */ - public function isFileOperationAllowed() - { - return $this->isPermissionSet(self::FILE_OPPERATIONS); - } - - /** - * Set the the bit for file operations are allowed. - * - * @param bool $value - */ - public function setFileOperationAllowed($value) - { - $this->setPermission(self::FILE_OPPERATIONS, $value); - } - - /** - * Check if folder operations like move, delete, rename, and new are allowed. - * - * @return bool - */ - public function isDirectoryOperationAllowed() - { - return $this->isPermissionSet(self::DIRECTORY_OPPERATIONS); - } - - /** - * Set the the bit for directory operations are allowed. - * - * @param bool $value - */ - public function setDirectoryOperationAllowed($value) - { - $this->setPermission(self::DIRECTORY_OPPERATIONS, $value); - } - - /** - * Check if it is allowed to copy folders. - * - * @return bool - */ - public function isDirectoryCopyAllowed() - { - return $this->isPermissionSet(self::DIRECTORY_COPY); - } - - /** - * Set the the bit for copy directories. - * - * @param bool $value - */ - public function setDirectoryCopyAllowed($value) - { - $this->setPermission(self::DIRECTORY_COPY, $value); - } - - /** - * Check if it is allowed to remove folders recursively. - * - * @return bool - */ - public function isDirectoryRemoveRecursivelyAllowed() - { - return $this->isPermissionSet(self::DIRECTORY_REMOVE_RECURSIVELY); - } - - /** - * Set the the bit for remove directories recursively. - * - * @param bool $value - */ - public function setDirectoryRemoveRecursivelyAllowed($value) - { - $this->setPermission(self::DIRECTORY_REMOVE_RECURSIVELY, $value); - } - - /** - * Setter for ts config - * - * @param string $tsConfig - */ - public function setTsConfig($tsConfig) - { - $this->tsConfig = $tsConfig; - } - - /** - * Getter for ts config - * - * @return string - */ - public function getTsConfig() - { - return $this->tsConfig; - } - - /** - * Helper method for checking the permissions bitwise. - * - * @param int $permission - * @return bool - */ - protected function isPermissionSet($permission) - { - return ($this->fileOperationPermissions & $permission) == $permission; - } - - /** - * Helper method for setting permissions bitwise. - * - * @param int $permission - * @param bool $value - */ - protected function setPermission($permission, $value) - { - if ($value) { - $this->fileOperationPermissions |= $permission; - } else { - $this->fileOperationPermissions &= ~$permission; - } - } -} diff --git a/typo3/sysext/extbase/Classes/Domain/Model/FrontendUser.php b/typo3/sysext/extbase/Classes/Domain/Model/FrontendUser.php deleted file mode 100644 index 0854be0feb1566bdd47752134ce88a60921983ff..0000000000000000000000000000000000000000 --- a/typo3/sysext/extbase/Classes/Domain/Model/FrontendUser.php +++ /dev/null @@ -1,547 +0,0 @@ -<?php - -/* - * This file is part of the TYPO3 CMS project. - * - * It is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License, either version 2 - * of the License, or any later version. - * - * For the full copyright and license information, please read the - * LICENSE.txt file that was distributed with this source code. - * - * The TYPO3 project - inspiring people to share! - */ - -namespace TYPO3\CMS\Extbase\Domain\Model; - -use TYPO3\CMS\Extbase\DomainObject\AbstractEntity; -use TYPO3\CMS\Extbase\Persistence\ObjectStorage; - -/** - * A Frontend User - * - * @deprecated since v11, will be removed in v12. Do not use or extend this model. - */ -class FrontendUser extends AbstractEntity -{ - /** - * @var string - */ - protected $username = ''; - - /** - * @var string - */ - protected $password = ''; - - /** - * @var ObjectStorage<FrontendUserGroup> - */ - protected $usergroup; - - /** - * @var string - */ - protected $name = ''; - - /** - * @var string - */ - protected $firstName = ''; - - /** - * @var string - */ - protected $middleName = ''; - - /** - * @var string - */ - protected $lastName = ''; - - /** - * @var string - */ - protected $address = ''; - - /** - * @var string - */ - protected $telephone = ''; - - /** - * @var string - */ - protected $fax = ''; - - /** - * @var string - */ - protected $email = ''; - - /** - * @var string - */ - protected $title = ''; - - /** - * @var string - */ - protected $zip = ''; - - /** - * @var string - */ - protected $city = ''; - - /** - * @var string - */ - protected $country = ''; - - /** - * @var string - */ - protected $www = ''; - - /** - * @var string - */ - protected $company = ''; - - /** - * @var ObjectStorage<FileReference> - */ - protected $image; - - /** - * @var \DateTime|null - */ - protected $lastlogin; - - /** - * Constructs a new Front-End User - * - * @param string $username - * @param string $password - */ - public function __construct($username = '', $password = '') - { - $this->username = $username; - $this->password = $password; - $this->usergroup = new ObjectStorage(); - $this->image = new ObjectStorage(); - } - - /** - * Called again with initialize object, as fetching an entity from the DB does not use the constructor - */ - public function initializeObject() - { - $this->usergroup = $this->usergroup ?? new ObjectStorage(); - $this->image = $this->image ?? new ObjectStorage(); - } - - /** - * Sets the username value - * - * @param string $username - */ - public function setUsername($username) - { - $this->username = $username; - } - - /** - * Returns the username value - * - * @return string - */ - public function getUsername() - { - return $this->username; - } - - /** - * Sets the password value - * - * @param string $password - */ - public function setPassword($password) - { - $this->password = $password; - } - - /** - * Returns the password value - * - * @return string - */ - public function getPassword() - { - return $this->password; - } - - /** - * Sets the usergroups. Keep in mind that the property is called "usergroup" - * although it can hold several usergroups. - * - * @param ObjectStorage<FrontendUserGroup> $usergroup - */ - public function setUsergroup(ObjectStorage $usergroup) - { - $this->usergroup = $usergroup; - } - - /** - * Adds a usergroup to the frontend user - * - * @param FrontendUserGroup $usergroup - */ - public function addUsergroup(FrontendUserGroup $usergroup) - { - $this->usergroup->attach($usergroup); - } - - /** - * Removes a usergroup from the frontend user - * - * @param FrontendUserGroup $usergroup - */ - public function removeUsergroup(FrontendUserGroup $usergroup) - { - $this->usergroup->detach($usergroup); - } - - /** - * Returns the usergroups. Keep in mind that the property is called "usergroup" - * although it can hold several usergroups. - * - * @return ObjectStorage<FrontendUserGroup> An object storage containing the usergroup - */ - public function getUsergroup() - { - return $this->usergroup; - } - - /** - * Sets the name value - * - * @param string $name - */ - public function setName($name) - { - $this->name = $name; - } - - /** - * Returns the name value - * - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Sets the firstName value - * - * @param string $firstName - */ - public function setFirstName($firstName) - { - $this->firstName = $firstName; - } - - /** - * Returns the firstName value - * - * @return string - */ - public function getFirstName() - { - return $this->firstName; - } - - /** - * Sets the middleName value - * - * @param string $middleName - */ - public function setMiddleName($middleName) - { - $this->middleName = $middleName; - } - - /** - * Returns the middleName value - * - * @return string - */ - public function getMiddleName() - { - return $this->middleName; - } - - /** - * Sets the lastName value - * - * @param string $lastName - */ - public function setLastName($lastName) - { - $this->lastName = $lastName; - } - - /** - * Returns the lastName value - * - * @return string - */ - public function getLastName() - { - return $this->lastName; - } - - /** - * Sets the address value - * - * @param string $address - */ - public function setAddress($address) - { - $this->address = $address; - } - - /** - * Returns the address value - * - * @return string - */ - public function getAddress() - { - return $this->address; - } - - /** - * Sets the telephone value - * - * @param string $telephone - */ - public function setTelephone($telephone) - { - $this->telephone = $telephone; - } - - /** - * Returns the telephone value - * - * @return string - */ - public function getTelephone() - { - return $this->telephone; - } - - /** - * Sets the fax value - * - * @param string $fax - */ - public function setFax($fax) - { - $this->fax = $fax; - } - - /** - * Returns the fax value - * - * @return string - */ - public function getFax() - { - return $this->fax; - } - - /** - * Sets the email value - * - * @param string $email - */ - public function setEmail($email) - { - $this->email = $email; - } - - /** - * Returns the email value - * - * @return string - */ - public function getEmail() - { - return $this->email; - } - - /** - * Sets the title value - * - * @param string $title - */ - public function setTitle($title) - { - $this->title = $title; - } - - /** - * Returns the title value - * - * @return string - */ - public function getTitle() - { - return $this->title; - } - - /** - * Sets the zip value - * - * @param string $zip - */ - public function setZip($zip) - { - $this->zip = $zip; - } - - /** - * Returns the zip value - * - * @return string - */ - public function getZip() - { - return $this->zip; - } - - /** - * Sets the city value - * - * @param string $city - */ - public function setCity($city) - { - $this->city = $city; - } - - /** - * Returns the city value - * - * @return string - */ - public function getCity() - { - return $this->city; - } - - /** - * Sets the country value - * - * @param string $country - */ - public function setCountry($country) - { - $this->country = $country; - } - - /** - * Returns the country value - * - * @return string - */ - public function getCountry() - { - return $this->country; - } - - /** - * Sets the www value - * - * @param string $www - */ - public function setWww($www) - { - $this->www = $www; - } - - /** - * Returns the www value - * - * @return string - */ - public function getWww() - { - return $this->www; - } - - /** - * Sets the company value - * - * @param string $company - */ - public function setCompany($company) - { - $this->company = $company; - } - - /** - * Returns the company value - * - * @return string - */ - public function getCompany() - { - return $this->company; - } - - /** - * Sets the image value - * - * @param ObjectStorage<FileReference> $image - */ - public function setImage(ObjectStorage $image) - { - $this->image = $image; - } - - /** - * Gets the image value - * - * @return ObjectStorage<FileReference> - */ - public function getImage() - { - return $this->image; - } - - /** - * Sets the lastlogin value - * - * @param \DateTime $lastlogin - */ - public function setLastlogin(\DateTime $lastlogin) - { - $this->lastlogin = $lastlogin; - } - - /** - * Returns the lastlogin value - * - * @return \DateTime - */ - public function getLastlogin() - { - return $this->lastlogin; - } -} diff --git a/typo3/sysext/extbase/Classes/Domain/Model/FrontendUserGroup.php b/typo3/sysext/extbase/Classes/Domain/Model/FrontendUserGroup.php deleted file mode 100644 index 0ffa2c0fa6d768000a91b2405300a01c37e81eb0..0000000000000000000000000000000000000000 --- a/typo3/sysext/extbase/Classes/Domain/Model/FrontendUserGroup.php +++ /dev/null @@ -1,135 +0,0 @@ -<?php - -/* - * This file is part of the TYPO3 CMS project. - * - * It is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License, either version 2 - * of the License, or any later version. - * - * For the full copyright and license information, please read the - * LICENSE.txt file that was distributed with this source code. - * - * The TYPO3 project - inspiring people to share! - */ - -namespace TYPO3\CMS\Extbase\Domain\Model; - -use TYPO3\CMS\Extbase\DomainObject\AbstractEntity; -use TYPO3\CMS\Extbase\Persistence\ObjectStorage; - -/** - * A Frontend User Group - * - * @deprecated since v11, will be removed in v12. Do not use or extend this model. - */ -class FrontendUserGroup extends AbstractEntity -{ - /** - * @var string - */ - protected $title = ''; - - /** - * @var string - */ - protected $description = ''; - - /** - * @var ObjectStorage<FrontendUserGroup> - */ - protected $subgroup; - - /** - * Constructs a new Frontend User Group - * - * @param string $title - */ - public function __construct($title = '') - { - $this->setTitle($title); - $this->subgroup = new ObjectStorage(); - } - - /** - * Sets the title value - * - * @param string $title - */ - public function setTitle($title) - { - $this->title = $title; - } - - /** - * Returns the title value - * - * @return string - */ - public function getTitle() - { - return $this->title; - } - - /** - * Sets the description value - * - * @param string $description - */ - public function setDescription($description) - { - $this->description = $description; - } - - /** - * Returns the description value - * - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Sets the subgroups. Keep in mind that the property is called "subgroup" - * although it can hold several subgroups. - * - * @param ObjectStorage<FrontendUserGroup> $subgroup An object storage containing the subgroups to add - */ - public function setSubgroup(ObjectStorage $subgroup) - { - $this->subgroup = $subgroup; - } - - /** - * Adds a subgroup to the frontend user - * - * @param FrontendUserGroup $subgroup - */ - public function addSubgroup(FrontendUserGroup $subgroup) - { - $this->subgroup->attach($subgroup); - } - - /** - * Removes a subgroup from the frontend user group - * - * @param FrontendUserGroup $subgroup - */ - public function removeSubgroup(FrontendUserGroup $subgroup) - { - $this->subgroup->detach($subgroup); - } - - /** - * Returns the subgroups. Keep in mind that the property is called "subgroup" - * although it can hold several subgroups. - * - * @return ObjectStorage<FrontendUserGroup> An object storage containing the subgroups - */ - public function getSubgroup() - { - return $this->subgroup; - } -} diff --git a/typo3/sysext/extbase/Classes/Domain/Repository/BackendUserGroupRepository.php b/typo3/sysext/extbase/Classes/Domain/Repository/BackendUserGroupRepository.php deleted file mode 100644 index a5cdbea592eb9374e1855d349a205c37ac2e3998..0000000000000000000000000000000000000000 --- a/typo3/sysext/extbase/Classes/Domain/Repository/BackendUserGroupRepository.php +++ /dev/null @@ -1,37 +0,0 @@ -<?php - -declare(strict_types=1); - -/* - * This file is part of the TYPO3 CMS project. - * - * It is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License, either version 2 - * of the License, or any later version. - * - * For the full copyright and license information, please read the - * LICENSE.txt file that was distributed with this source code. - * - * The TYPO3 project - inspiring people to share! - */ - -namespace TYPO3\CMS\Extbase\Domain\Repository; - -use TYPO3\CMS\Core\Utility\GeneralUtility; -use TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings; -use TYPO3\CMS\Extbase\Persistence\Repository; - -/** - * Repository for \TYPO3\CMS\Extbase\Domain\Model\BackendUserGroup. - * - * @deprecated since v11, will be removed in v12. Do not use or extend this model. - */ -class BackendUserGroupRepository extends Repository -{ - public function initializeObject() - { - $querySettings = GeneralUtility::makeInstance(Typo3QuerySettings::class); - $querySettings->setRespectStoragePage(false); - $this->setDefaultQuerySettings($querySettings); - } -} diff --git a/typo3/sysext/extbase/Classes/Domain/Repository/BackendUserRepository.php b/typo3/sysext/extbase/Classes/Domain/Repository/BackendUserRepository.php deleted file mode 100644 index 0d71f9f6154c8f2b5d0ef8535a29a362af52fac0..0000000000000000000000000000000000000000 --- a/typo3/sysext/extbase/Classes/Domain/Repository/BackendUserRepository.php +++ /dev/null @@ -1,37 +0,0 @@ -<?php - -declare(strict_types=1); - -/* - * This file is part of the TYPO3 CMS project. - * - * It is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License, either version 2 - * of the License, or any later version. - * - * For the full copyright and license information, please read the - * LICENSE.txt file that was distributed with this source code. - * - * The TYPO3 project - inspiring people to share! - */ - -namespace TYPO3\CMS\Extbase\Domain\Repository; - -use TYPO3\CMS\Core\Utility\GeneralUtility; -use TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings; -use TYPO3\CMS\Extbase\Persistence\Repository; - -/** - * Repository for \TYPO3\CMS\Extbase\Domain\Model\BackendUser. - * - * @deprecated since v11, will be removed in v12. Do not use or extend this model. - */ -class BackendUserRepository extends Repository -{ - public function initializeObject() - { - $querySettings = GeneralUtility::makeInstance(Typo3QuerySettings::class); - $querySettings->setRespectStoragePage(false); - $this->setDefaultQuerySettings($querySettings); - } -} diff --git a/typo3/sysext/extbase/Classes/Domain/Repository/CategoryRepository.php b/typo3/sysext/extbase/Classes/Domain/Repository/CategoryRepository.php deleted file mode 100644 index 5e2bebd233ef430d0c4decb02928db1733b1de6a..0000000000000000000000000000000000000000 --- a/typo3/sysext/extbase/Classes/Domain/Repository/CategoryRepository.php +++ /dev/null @@ -1,37 +0,0 @@ -<?php - -declare(strict_types=1); - -/* - * This file is part of the TYPO3 CMS project. - * - * It is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License, either version 2 - * of the License, or any later version. - * - * For the full copyright and license information, please read the - * LICENSE.txt file that was distributed with this source code. - * - * The TYPO3 project - inspiring people to share! - */ - -namespace TYPO3\CMS\Extbase\Domain\Repository; - -use TYPO3\CMS\Core\Utility\GeneralUtility; -use TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings; -use TYPO3\CMS\Extbase\Persistence\Repository; - -/** - * Repository for Category models. - * - * @deprecated since v11, will be removed in v12. Do not use or extend this model. - */ -class CategoryRepository extends Repository -{ - public function initializeObject() - { - $querySettings = GeneralUtility::makeInstance(Typo3QuerySettings::class); - $querySettings->setRespectStoragePage(false); - $this->setDefaultQuerySettings($querySettings); - } -} diff --git a/typo3/sysext/extbase/Classes/Domain/Repository/FrontendUserGroupRepository.php b/typo3/sysext/extbase/Classes/Domain/Repository/FrontendUserGroupRepository.php deleted file mode 100644 index a291c737afdc91e2cef39bb73210ff9fb3f76613..0000000000000000000000000000000000000000 --- a/typo3/sysext/extbase/Classes/Domain/Repository/FrontendUserGroupRepository.php +++ /dev/null @@ -1,29 +0,0 @@ -<?php - -declare(strict_types=1); - -/* - * This file is part of the TYPO3 CMS project. - * - * It is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License, either version 2 - * of the License, or any later version. - * - * For the full copyright and license information, please read the - * LICENSE.txt file that was distributed with this source code. - * - * The TYPO3 project - inspiring people to share! - */ - -namespace TYPO3\CMS\Extbase\Domain\Repository; - -use TYPO3\CMS\Extbase\Persistence\Repository; - -/** - * A Frontend User Group Repository - * - * @deprecated since v11, will be removed in v12. Do not use or extend this model. - */ -class FrontendUserGroupRepository extends Repository -{ -} diff --git a/typo3/sysext/extbase/Classes/Domain/Repository/FrontendUserRepository.php b/typo3/sysext/extbase/Classes/Domain/Repository/FrontendUserRepository.php deleted file mode 100644 index 2ad7e679cc03060964197f0a67eca5209d2a37f6..0000000000000000000000000000000000000000 --- a/typo3/sysext/extbase/Classes/Domain/Repository/FrontendUserRepository.php +++ /dev/null @@ -1,29 +0,0 @@ -<?php - -declare(strict_types=1); - -/* - * This file is part of the TYPO3 CMS project. - * - * It is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License, either version 2 - * of the License, or any later version. - * - * For the full copyright and license information, please read the - * LICENSE.txt file that was distributed with this source code. - * - * The TYPO3 project - inspiring people to share! - */ - -namespace TYPO3\CMS\Extbase\Domain\Repository; - -use TYPO3\CMS\Extbase\Persistence\Repository; - -/** - * A Frontend User repository - * - * @deprecated since v11, will be removed in v12. Do not use or extend this model. - */ -class FrontendUserRepository extends Repository -{ -} diff --git a/typo3/sysext/extbase/Configuration/Extbase/Persistence/Classes.php b/typo3/sysext/extbase/Configuration/Extbase/Persistence/Classes.php index 166da673843834dadba0110227895e8d7e00d8d7..e085e2e4e3f5d879110b8f0f3aa7b1f2ebab048c 100644 --- a/typo3/sysext/extbase/Configuration/Extbase/Persistence/Classes.php +++ b/typo3/sysext/extbase/Configuration/Extbase/Persistence/Classes.php @@ -9,83 +9,6 @@ return [ \TYPO3\CMS\Extbase\Domain\Model\File::class => [ 'tableName' => 'sys_file', ], - // @deprecated since v11, will be removed in v12. - \TYPO3\CMS\Extbase\Domain\Model\BackendUser::class => [ - 'tableName' => 'be_users', - 'properties' => [ - 'userName' => [ - 'fieldName' => 'username', - ], - 'isAdministrator' => [ - 'fieldName' => 'admin', - ], - 'isDisabled' => [ - 'fieldName' => 'disable', - ], - 'realName' => [ - 'fieldName' => 'realName', - ], - 'startDateAndTime' => [ - 'fieldName' => 'starttime', - ], - 'endDateAndTime' => [ - 'fieldName' => 'endtime', - ], - 'lastLoginDateAndTime' => [ - 'fieldName' => 'lastlogin', - ], - ], - ], - // @deprecated since v11, will be removed in v12. - \TYPO3\CMS\Extbase\Domain\Model\BackendUserGroup::class => [ - 'tableName' => 'be_groups', - 'properties' => [ - 'subGroups' => [ - 'fieldName' => 'subgroup', - ], - 'modules' => [ - 'fieldName' => 'groupMods', - ], - 'tablesListening' => [ - 'fieldName' => 'tables_select', - ], - 'tablesModify' => [ - 'fieldName' => 'tables_modify', - ], - 'pageTypes' => [ - 'fieldName' => 'pagetypes_select', - ], - 'allowedExcludeFields' => [ - 'fieldName' => 'non_exclude_fields', - ], - 'explicitlyAllowAndDeny' => [ - 'fieldName' => 'explicit_allowdeny', - ], - 'allowedLanguages' => [ - 'fieldName' => 'allowed_languages', - ], - 'workspacePermission' => [ - 'fieldName' => 'workspace_perms', - ], - 'databaseMounts' => [ - 'fieldName' => 'db_mountpoints', - ], - 'fileOperationPermissions' => [ - 'fieldName' => 'file_permissions', - ], - 'tsConfig' => [ - 'fieldName' => 'TSconfig', - ], - ], - ], - // @deprecated since v11, will be removed in v12. - \TYPO3\CMS\Extbase\Domain\Model\FrontendUser::class => [ - 'tableName' => 'fe_users', - ], - // @deprecated since v11, will be removed in v12. - \TYPO3\CMS\Extbase\Domain\Model\FrontendUserGroup::class => [ - 'tableName' => 'fe_groups', - ], \TYPO3\CMS\Extbase\Domain\Model\Category::class => [ 'tableName' => 'sys_category', ], diff --git a/typo3/sysext/extbase/Tests/UnitDeprecated/Domain/Model/BackendUserGroupTest.php b/typo3/sysext/extbase/Tests/UnitDeprecated/Domain/Model/BackendUserGroupTest.php deleted file mode 100644 index 94def4a6233a9ed8368f7c78a2348229e421b007..0000000000000000000000000000000000000000 --- a/typo3/sysext/extbase/Tests/UnitDeprecated/Domain/Model/BackendUserGroupTest.php +++ /dev/null @@ -1,451 +0,0 @@ -<?php - -declare(strict_types=1); - -/* - * This file is part of the TYPO3 CMS project. - * - * It is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License, either version 2 - * of the License, or any later version. - * - * For the full copyright and license information, please read the - * LICENSE.txt file that was distributed with this source code. - * - * The TYPO3 project - inspiring people to share! - */ - -namespace TYPO3\CMS\Extbase\Tests\UnitDeprecated\Domain\Model; - -use TYPO3\CMS\Extbase\Domain\Model\BackendUserGroup; -use TYPO3\CMS\Extbase\Persistence\ObjectStorage; -use TYPO3\TestingFramework\Core\Unit\UnitTestCase; - -/** - * Test case - */ -class BackendUserGroupTest extends UnitTestCase -{ - /** - * @var \TYPO3\CMS\Extbase\Domain\Model\BackendUserGroup - */ - protected $subject; - - protected function setUp(): void - { - parent::setUp(); - $this->subject = new BackendUserGroup(); - } - - /** - * @test - */ - public function getTitleInitiallyReturnsEmptyString(): void - { - self::assertSame('', $this->subject->getTitle()); - } - - /** - * @test - */ - public function setTitleSetsTitle(): void - { - $title = 'foo bar'; - $this->subject->setTitle($title); - self::assertSame($title, $this->subject->getTitle()); - } - - /** - * @test - */ - public function getDescriptionInitiallyReturnsEmptyString(): void - { - self::assertSame('', $this->subject->getDescription()); - } - - /** - * @test - */ - public function setDescriptionSetsDescription(): void - { - $description = 'foo bar'; - $this->subject->setDescription($description); - self::assertSame($description, $this->subject->getDescription()); - } - - /** - * @test - */ - public function setSubGroupsSetsSubgroups(): void - { - $subGroups = new ObjectStorage(); - $this->subject->setSubGroups($subGroups); - self::assertSame($subGroups, $this->subject->getSubGroups()); - } - - /** - * @test - */ - public function anSubGroupCanBeRemoved(): void - { - $group1 = new BackendUserGroup(); - $group1->setTitle('foo'); - $group2 = new BackendUserGroup(); - $group2->setTitle('bar'); - $this->subject->addSubGroup($group1); - $this->subject->addSubGroup($group2); - self::assertCount(2, $this->subject->getSubGroups()); - $this->subject->removeSubGroup($group1); - self::assertCount(1, $this->subject->getSubGroups()); - $this->subject->removeSubGroup($group2); - self::assertCount(0, $this->subject->getSubGroups()); - } - - /** - * @test - */ - public function allSubGroupsCanBeRemoved(): void - { - $group1 = new BackendUserGroup(); - $group1->setTitle('foo'); - $group2 = new BackendUserGroup(); - $group2->setTitle('bar'); - $this->subject->addSubGroup($group1); - $this->subject->addSubGroup($group2); - $this->subject->removeAllSubGroups(); - self::assertCount(0, $this->subject->getSubGroups()); - } - - /** - * @test - */ - public function getModulesInitiallyReturnsEmptyString(): void - { - self::assertSame('', $this->subject->getModules()); - } - - /** - * @test - */ - public function setModulesSetsModules(): void - { - $modules = 'foo,bar'; - $this->subject->setModules($modules); - self::assertSame($modules, $this->subject->getModules()); - } - - /** - * @test - */ - public function getTablesListeningInitiallyReturnsEmptyString(): void - { - self::assertSame('', $this->subject->getTablesListening()); - } - - /** - * @test - */ - public function setTablesListeningSetsTablesListening(): void - { - $tablesListening = 'foo,bar'; - $this->subject->setTablesListening($tablesListening); - self::assertSame($tablesListening, $this->subject->getTablesListening()); - } - - /** - * @test - */ - public function getTablesModifyInitiallyReturnsEmptyString(): void - { - self::assertSame('', $this->subject->getTablesModify()); - } - - /** - * @test - */ - public function getPageTypesInitiallyReturnsEmptyString(): void - { - self::assertSame('', $this->subject->getPageTypes()); - } - - /** - * @test - */ - public function setPageTypesSetsPageTypes(): void - { - $pageTypes = 'foo,bar'; - $this->subject->setPageTypes($pageTypes); - self::assertSame($pageTypes, $this->subject->getPageTypes()); - } - - /** - * @test - */ - public function setTablesModifySetsTablesModify(): void - { - $tablesModify = 'foo,bar'; - $this->subject->setTablesModify($tablesModify); - self::assertSame($tablesModify, $this->subject->getTablesModify()); - } - - /** - * @test - */ - public function getAllowedExcludeFieldsInitiallyReturnsEmptyString(): void - { - self::assertSame('', $this->subject->getAllowedExcludeFields()); - } - - /** - * @test - */ - public function setAllowedExcludeFieldsSetsAllowedExcludeFields(): void - { - $allowedExcludeFields = 'foo,bar'; - $this->subject->setAllowedExcludeFields($allowedExcludeFields); - self::assertSame($allowedExcludeFields, $this->subject->getAllowedExcludeFields()); - } - - /** - * @test - */ - public function getExplicitlyAllowAndDenyInitiallyReturnsEmptyString(): void - { - self::assertSame('', $this->subject->getExplicitlyAllowAndDeny()); - } - - /** - * @test - */ - public function setExplicitlyAllowAndDenySetsExplicitlyAllowAndDeny(): void - { - $explicitlyAllowAndDeny = 'foo,bar'; - $this->subject->setExplicitlyAllowAndDeny($explicitlyAllowAndDeny); - self::assertSame($explicitlyAllowAndDeny, $this->subject->getExplicitlyAllowAndDeny()); - } - - /** - * @test - */ - public function getAllowedLanguagesInitiallyReturnsEmptyString(): void - { - self::assertSame('', $this->subject->getAllowedLanguages()); - } - - /** - * @test - */ - public function setAllowedLanguagesSetsAllowedLanguages(): void - { - $allowedLanguages = '1,0'; - $this->subject->setAllowedLanguages($allowedLanguages); - self::assertSame($allowedLanguages, $this->subject->getAllowedLanguages()); - } - - /** - * @test - */ - public function getWorkspacePermissionInitiallyReturnsFalse(): void - { - self::assertFalse($this->subject->getWorkspacePermission()); - } - - /** - * @test - */ - public function setWorkspacePermissionSetsWorkspacePermission(): void - { - $this->subject->setWorkspacePermissions(true); - self::assertTrue($this->subject->getWorkspacePermission()); - } - - /** - * @test - */ - public function getDatabaseMountsInitiallyReturnsEmptyString(): void - { - self::assertSame('', $this->subject->getDatabaseMounts()); - } - - /** - * @test - */ - public function setDatabaseMountsSetsDatabaseMounts(): void - { - $mounts = '1,42'; - $this->subject->setDatabaseMounts($mounts); - self::assertSame($mounts, $this->subject->getDatabaseMounts()); - } - - /** - * @test - */ - public function getFileOperationPermissionsInitiallyReturnsZero(): void - { - self::assertSame(0, $this->subject->getFileOperationPermissions()); - } - - /** - * @test - */ - public function setFileOperationPermissionsSetsFileOperationPermissions(): void - { - $permission = 7; - $this->subject->setFileOperationPermissions($permission); - self::assertSame($permission, $this->subject->getFileOperationPermissions()); - } - - /** - * @test - */ - public function getIsFileOperationAllowedReturnsFalse(): void - { - $this->subject->setFileOperationPermissions(0); - self::assertFalse($this->subject->isFileOperationAllowed()); - $this->subject->setFileOperationPermissions(2); - self::assertFalse($this->subject->isFileOperationAllowed()); - $this->subject->setFileOperationPermissions(6); - self::assertFalse($this->subject->isFileOperationAllowed()); - } - - /** - * @test - */ - public function getIsFileOperationAllowedReturnsTrue(): void - { - $this->subject->setFileOperationPermissions(1); - self::assertTrue($this->subject->isFileOperationAllowed()); - $this->subject->setFileOperationPermissions(3); - self::assertTrue($this->subject->isFileOperationAllowed()); - } - - /** - * @test - */ - public function setFileOperationAllowedSetsFileOperationAllowed(): void - { - $this->subject->setFileOperationPermissions(0); - $this->subject->setFileOperationAllowed(true); - self::assertTrue($this->subject->isFileOperationAllowed()); - } - - /** - * @test - */ - public function getIsDirectoryRemoveRecursivelyAllowedReturnsFalse(): void - { - $this->subject->setFileOperationPermissions(1); - self::assertFalse($this->subject->isDirectoryRemoveRecursivelyAllowed()); - $this->subject->setFileOperationPermissions(15); - self::assertFalse($this->subject->isDirectoryRemoveRecursivelyAllowed()); - $this->subject->setFileOperationPermissions(7); - self::assertFalse($this->subject->isDirectoryRemoveRecursivelyAllowed()); - } - - /** - * @test - */ - public function getIsDirectoryRemoveRecursivelyAllowedReturnsTrue(): void - { - $this->subject->setFileOperationPermissions(16); - self::assertTrue($this->subject->isDirectoryRemoveRecursivelyAllowed()); - $this->subject->setFileOperationPermissions(31); - self::assertTrue($this->subject->isDirectoryRemoveRecursivelyAllowed()); - } - - /** - * @test - */ - public function setDirectoryRemoveRecursivelyAllowedSetsDirectoryRemoveRecursivelyAllowed(): void - { - $this->subject->setFileOperationPermissions(0); - $this->subject->setDirectoryRemoveRecursivelyAllowed(true); - self::assertTrue($this->subject->isDirectoryRemoveRecursivelyAllowed()); - } - - /** - * @test - */ - public function getIsDirectoryCopyAllowedReturnsFalse(): void - { - $this->subject->setFileOperationPermissions(0); - self::assertFalse($this->subject->isDirectoryCopyAllowed()); - $this->subject->setFileOperationPermissions(7); - self::assertFalse($this->subject->isDirectoryCopyAllowed()); - $this->subject->setFileOperationPermissions(23); - self::assertFalse($this->subject->isDirectoryCopyAllowed()); - } - - /** - * @test - */ - public function getIsDirectoryCopyAllowedReturnsTrue(): void - { - $this->subject->setFileOperationPermissions(8); - self::assertTrue($this->subject->isDirectoryCopyAllowed()); - $this->subject->setFileOperationPermissions(15); - self::assertTrue($this->subject->isDirectoryCopyAllowed()); - } - - /** - * @test - */ - public function setDirectoryCopyAllowedSetsDirectoryCopyAllowed(): void - { - $this->subject->setFileOperationPermissions(0); - $this->subject->setDirectoryCopyAllowed(true); - self::assertTrue($this->subject->isDirectoryCopyAllowed()); - } - - /** - * @test - */ - public function getIsDirectoryOperationAllowedReturnsFalse(): void - { - $this->subject->setFileOperationPermissions(0); - self::assertFalse($this->subject->isDirectoryOperationAllowed()); - $this->subject->setFileOperationPermissions(3); - self::assertFalse($this->subject->isDirectoryOperationAllowed()); - $this->subject->setFileOperationPermissions(11); - self::assertFalse($this->subject->isDirectoryOperationAllowed()); - } - - /** - * @test - */ - public function getIsDirectoryOperationAllowedReturnsTrue(): void - { - $this->subject->setFileOperationPermissions(4); - self::assertTrue($this->subject->isDirectoryOperationAllowed()); - $this->subject->setFileOperationPermissions(7); - self::assertTrue($this->subject->isDirectoryOperationAllowed()); - } - - /** - * @test - */ - public function setDirectoryOperationAllowedSetsDirectoryOperationAllowed(): void - { - $this->subject->setFileOperationPermissions(0); - $this->subject->setDirectoryOperationAllowed(true); - self::assertTrue($this->subject->isDirectoryOperationAllowed()); - } - - /** - * @test - */ - public function getTsConfigInitiallyReturnsEmptyString(): void - { - self::assertSame('', $this->subject->getTsConfig()); - } - - /** - * @test - */ - public function setTsConfigSetsTsConfig(): void - { - $tsConfig = 'foo bar'; - $this->subject->setTsConfig($tsConfig); - self::assertSame($tsConfig, $this->subject->getTsConfig()); - } -} diff --git a/typo3/sysext/extbase/Tests/UnitDeprecated/Domain/Model/BackendUserTest.php b/typo3/sysext/extbase/Tests/UnitDeprecated/Domain/Model/BackendUserTest.php deleted file mode 100644 index b703f3639892008b3ff8dd9beeb240252136716e..0000000000000000000000000000000000000000 --- a/typo3/sysext/extbase/Tests/UnitDeprecated/Domain/Model/BackendUserTest.php +++ /dev/null @@ -1,271 +0,0 @@ -<?php - -declare(strict_types=1); - -/* - * This file is part of the TYPO3 CMS project. - * - * It is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License, either version 2 - * of the License, or any later version. - * - * For the full copyright and license information, please read the - * LICENSE.txt file that was distributed with this source code. - * - * The TYPO3 project - inspiring people to share! - */ - -namespace TYPO3\CMS\Extbase\Tests\UnitDeprecated\Domain\Model; - -use TYPO3\CMS\Extbase\Domain\Model\BackendUser; -use TYPO3\TestingFramework\Core\Unit\UnitTestCase; - -/** - * Test case - */ -class BackendUserTest extends UnitTestCase -{ - /** - * @var \TYPO3\CMS\Extbase\Domain\Model\BackendUser - */ - protected $subject; - - protected function setUp(): void - { - parent::setUp(); - $this->subject = new BackendUser(); - } - - /** - * @test - */ - public function getUserNameInitiallyReturnsEmptyString(): void - { - self::assertSame('', $this->subject->getUserName()); - } - - /** - * @test - */ - public function setUserNameSetsUserName(): void - { - $userName = 'don.juan'; - $this->subject->setUserName($userName); - self::assertSame($userName, $this->subject->getUserName()); - } - - /** - * @test - */ - public function getIsAdministratorInitiallyReturnsFalse(): void - { - self::assertFalse($this->subject->getIsAdministrator()); - } - - /** - * @test - */ - public function setIsAdministratorCanSetIsAdministratorToTrue(): void - { - $this->subject->setIsAdministrator(true); - self::assertTrue($this->subject->getIsAdministrator()); - } - - /** - * @test - */ - public function getIsDisabledInitiallyReturnsFalse(): void - { - self::assertFalse($this->subject->getIsDisabled()); - } - - /** - * @test - */ - public function setIsDisabledCanSetIsDisabledToTrue(): void - { - $this->subject->setIsDisabled(true); - self::assertTrue($this->subject->getIsDisabled()); - } - - /** - * @test - */ - public function getStartDateAndTimeInitiallyReturnsNull(): void - { - self::assertNull($this->subject->getStartDateAndTime()); - } - - /** - * @test - */ - public function setStartDateAndTimeSetsStartDateAndTime(): void - { - $date = new \DateTime(); - $this->subject->setStartDateAndTime($date); - self::assertSame($date, $this->subject->getStartDateAndTime()); - } - - /** - * @test - */ - public function getEndDateAndTimeInitiallyReturnsNull(): void - { - self::assertNull($this->subject->getEndDateAndTime()); - } - - /** - * @test - */ - public function setEndDateAndTimeSetsEndDateAndTime(): void - { - $date = new \DateTime(); - $this->subject->setEndDateAndTime($date); - self::assertSame($date, $this->subject->getEndDateAndTime()); - } - - /** - * @test - */ - public function isActivatedInitiallyReturnsTrue(): void - { - self::assertTrue($this->subject->isActivated()); - } - - /** - * @test - */ - public function isActivatedForDisabledReturnsFalse(): void - { - $this->subject->setIsDisabled(true); - self::assertFalse($this->subject->isActivated()); - } - - /** - * @test - */ - public function isActivatedForStartDateAndTimeInFutureReturnsFalse(): void - { - $tomorrow = new \DateTime('tomorrow'); - $this->subject->setStartDateAndTime($tomorrow); - self::assertFalse($this->subject->isActivated()); - } - - /** - * @test - */ - public function isActivatedForStartDateAndTimeInPastReturnsTrue(): void - { - $yesterday = new \DateTime('yesterday'); - $this->subject->setStartDateAndTime($yesterday); - self::assertTrue($this->subject->isActivated()); - } - - /** - * @test - */ - public function isActivatedForEndDateAndTimeInFutureReturnsTrue(): void - { - $tomorrow = new \DateTime('tomorrow'); - $this->subject->setEndDateAndTime($tomorrow); - self::assertTrue($this->subject->isActivated()); - } - - /** - * @test - */ - public function isActivatedForEndDateAndTimeInPastReturnsFalse(): void - { - $yesterday = new \DateTime('yesterday'); - $this->subject->setEndDateAndTime($yesterday); - self::assertFalse($this->subject->isActivated()); - } - - /** - * @test - */ - public function isActivatedForStartDateAndTimeInPastEndDateAndTimeInFutureReturnsTrue(): void - { - $yesterday = new \DateTime('yesterday'); - $this->subject->setStartDateAndTime($yesterday); - $tomorrow = new \DateTime('tomorrow'); - $this->subject->setEndDateAndTime($tomorrow); - self::assertTrue($this->subject->isActivated()); - } - - /** - * @test - */ - public function isActivatedForStartDateAndTimeInPastEndDateAndTimeInPastReturnsFalse(): void - { - $yesterday = new \DateTime('yesterday'); - $this->subject->setStartDateAndTime($yesterday); - $this->subject->setEndDateAndTime($yesterday); - self::assertFalse($this->subject->isActivated()); - } - - /** - * @test - */ - public function isActivatedForStartDateAndTimeInFutureEndDateAndTimeInFutureReturnsFalse(): void - { - $tomorrow = new \DateTime('tomorrow'); - $this->subject->setStartDateAndTime($tomorrow); - $this->subject->setEndDateAndTime($tomorrow); - self::assertFalse($this->subject->isActivated()); - } - - /** - * @test - */ - public function getEmailInitiallyReturnsEmptyString(): void - { - self::assertSame('', $this->subject->getEmail()); - } - - /** - * @test - */ - public function setEmailSetsEmail(): void - { - $email = 'don.juan@example.com'; - $this->subject->setEmail($email); - self::assertSame($email, $this->subject->getEmail()); - } - - /** - * @test - */ - public function getRealNameInitiallyReturnsEmptyString(): void - { - self::assertSame('', $this->subject->getRealName()); - } - - /** - * @test - */ - public function setRealNameSetsRealName(): void - { - $realName = 'Don Juan'; - $this->subject->setRealName($realName); - self::assertSame($realName, $this->subject->getRealName()); - } - - /** - * @test - */ - public function getLastLoginDateAndTimeInitiallyReturnsNull(): void - { - self::assertNull($this->subject->getLastLoginDateAndTime()); - } - - /** - * @test - */ - public function setLastLoginDateAndTimeSetsLastLoginDateAndTime(): void - { - $date = new \DateTime(); - $this->subject->setLastLoginDateAndTime($date); - self::assertSame($date, $this->subject->getLastLoginDateAndTime()); - } -} diff --git a/typo3/sysext/extbase/Tests/UnitDeprecated/Domain/Model/FrontendUserGroupTest.php b/typo3/sysext/extbase/Tests/UnitDeprecated/Domain/Model/FrontendUserGroupTest.php deleted file mode 100644 index a13715a02f4ad4f50ac9f58a866140e98e80fbd5..0000000000000000000000000000000000000000 --- a/typo3/sysext/extbase/Tests/UnitDeprecated/Domain/Model/FrontendUserGroupTest.php +++ /dev/null @@ -1,125 +0,0 @@ -<?php - -declare(strict_types=1); - -/* - * This file is part of the TYPO3 CMS project. - * - * It is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License, either version 2 - * of the License, or any later version. - * - * For the full copyright and license information, please read the - * LICENSE.txt file that was distributed with this source code. - * - * The TYPO3 project - inspiring people to share! - */ - -namespace TYPO3\CMS\Extbase\Tests\UnitDeprecated\Domain\Model; - -use TYPO3\CMS\Extbase\Domain\Model\FrontendUserGroup; -use TYPO3\CMS\Extbase\Persistence\ObjectStorage; -use TYPO3\TestingFramework\Core\Unit\UnitTestCase; - -/** - * Test case - */ -class FrontendUserGroupTest extends UnitTestCase -{ - /** - * @var FrontendUserGroup - */ - protected $subject; - - protected function setUp(): void - { - parent::setUp(); - $this->subject = new FrontendUserGroup(); - } - - /** - * @test - */ - public function getTitleInitiallyReturnsEmptyString(): void - { - $this->subject = new FrontendUserGroup(); - self::assertSame('', $this->subject->getTitle()); - } - - /** - * @test - */ - public function getTitleInitiallyReturnsGivenTitleFromConstruct(): void - { - $title = 'foo bar'; - $this->subject = new FrontendUserGroup($title); - self::assertSame($title, $this->subject->getTitle()); - } - - /** - * @test - */ - public function setTitleSetsTitle(): void - { - $title = 'foo bar'; - $this->subject->setTitle($title); - self::assertSame($title, $this->subject->getTitle()); - } - - /** - * @test - */ - public function getDescriptionInitiallyReturnsEmptyString(): void - { - self::assertSame('', $this->subject->getDescription()); - } - - /** - * @test - */ - public function setDescriptionSetsDescription(): void - { - $description = 'foo bar'; - $this->subject->setDescription($description); - self::assertSame($description, $this->subject->getDescription()); - } - - /** - * @test - */ - public function addSubgroupAddsSubgroup(): void - { - $group1 = new FrontendUserGroup('foo'); - self::assertCount(0, $this->subject->getSubgroup()); - $this->subject->addSubgroup($group1); - self::assertCount(1, $this->subject->getSubgroup()); - } - - /** - * @test - */ - public function removeSubgroupRemovesSubgroup(): void - { - $group1 = new FrontendUserGroup('foo'); - $group2 = new FrontendUserGroup('bar'); - $this->subject->addSubgroup($group1); - $this->subject->addSubgroup($group2); - self::assertCount(2, $this->subject->getSubgroup()); - $this->subject->removeSubgroup($group1); - self::assertCount(1, $this->subject->getSubgroup()); - $this->subject->removeSubgroup($group2); - self::assertCount(0, $this->subject->getSubgroup()); - } - - /** - * @test - */ - public function setSubgroupSetsSubgroups(): void - { - $subgroup = new ObjectStorage(); - $group = new FrontendUserGroup('foo'); - $subgroup->attach($group); - $this->subject->setSubgroup($subgroup); - self::assertSame($subgroup, $this->subject->getSubgroup()); - } -} diff --git a/typo3/sysext/extbase/Tests/UnitDeprecated/Domain/Model/FrontendUserTest.php b/typo3/sysext/extbase/Tests/UnitDeprecated/Domain/Model/FrontendUserTest.php deleted file mode 100644 index fb818cbadff59ffbaf8abce42796902e7bdf5f0c..0000000000000000000000000000000000000000 --- a/typo3/sysext/extbase/Tests/UnitDeprecated/Domain/Model/FrontendUserTest.php +++ /dev/null @@ -1,403 +0,0 @@ -<?php - -declare(strict_types=1); - -/* - * This file is part of the TYPO3 CMS project. - * - * It is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License, either version 2 - * of the License, or any later version. - * - * For the full copyright and license information, please read the - * LICENSE.txt file that was distributed with this source code. - * - * The TYPO3 project - inspiring people to share! - */ - -namespace TYPO3\CMS\Extbase\Tests\UnitDeprecated\Domain\Model; - -use TYPO3\CMS\Extbase\Domain\Model\FileReference; -use TYPO3\CMS\Extbase\Domain\Model\FrontendUser; -use TYPO3\CMS\Extbase\Domain\Model\FrontendUserGroup; -use TYPO3\CMS\Extbase\Persistence\ObjectStorage; -use TYPO3\TestingFramework\Core\Unit\UnitTestCase; - -/** - * Test case - */ -class FrontendUserTest extends UnitTestCase -{ - /** - * @var \TYPO3\CMS\Extbase\Domain\Model\FrontendUser - */ - protected $subject; - - protected function setUp(): void - { - parent::setUp(); - $this->subject = new FrontendUser(); - } - - /** - * @test - */ - public function getUsernameInitiallyReturnsEmptyString(): void - { - self::assertSame('', $this->subject->getUsername()); - } - - /** - * @test - */ - public function setUsernameSetsUsername(): void - { - $username = 'don.juan'; - $this->subject->setUsername($username); - self::assertSame($username, $this->subject->getUsername()); - } - - /** - * @test - */ - public function getPasswordInitiallyReturnsEmptyString(): void - { - self::assertSame('', $this->subject->getPassword()); - } - - /** - * @test - */ - public function setPasswordSetsPassword(): void - { - $password = 'f00Bar'; - $this->subject->setPassword($password); - self::assertSame($password, $this->subject->getPassword()); - } - - /** - * @test - */ - public function setUsergroupSetsUsergroup(): void - { - $usergroup = new ObjectStorage(); - $usergroup->attach(new FrontendUserGroup('foo')); - $this->subject->setUsergroup($usergroup); - self::assertSame($usergroup, $this->subject->getUsergroup()); - } - - /** - * @test - */ - public function addUsergroupAddsUserGroup(): void - { - $usergroup = new FrontendUserGroup('foo'); - self::assertCount(0, $this->subject->getUsergroup()); - $this->subject->addUsergroup($usergroup); - self::assertCount(1, $this->subject->getUsergroup()); - } - - /** - * @test - */ - public function removeUsergroupRemovesUsergroup(): void - { - $usergroup = new FrontendUserGroup('foo'); - $this->subject->addUsergroup($usergroup); - self::assertCount(1, $this->subject->getUsergroup()); - $this->subject->removeUsergroup($usergroup); - self::assertCount(0, $this->subject->getUsergroup()); - } - - /** - * @test - */ - public function getNameInitiallyReturnsEmptyString(): void - { - self::assertSame('', $this->subject->getName()); - } - - /** - * @test - */ - public function setNameSetsName(): void - { - $name = 'don juan'; - $this->subject->setName($name); - self::assertSame($name, $this->subject->getName()); - } - - /** - * @test - */ - public function getFirstNameInitiallyReturnsEmptyString(): void - { - self::assertSame('', $this->subject->getFirstName()); - } - - /** - * @test - */ - public function setFirstNameSetsFirstName(): void - { - $firstName = 'don'; - $this->subject->setFirstName($firstName); - self::assertSame($firstName, $this->subject->getFirstName()); - } - - /** - * @test - */ - public function getMiddleNameInitiallyReturnsEmptyString(): void - { - self::assertSame('', $this->subject->getMiddleName()); - } - - /** - * @test - */ - public function setMiddleNameSetsMiddleName(): void - { - $middleName = 'miguel'; - $this->subject->setMiddleName($middleName); - self::assertSame($middleName, $this->subject->getMiddleName()); - } - - /** - * @test - */ - public function getLastNameInitiallyReturnsEmptyString(): void - { - self::assertSame('', $this->subject->getLastName()); - } - - /** - * @test - */ - public function setLastNameSetsLastName(): void - { - $lastName = 'juan'; - $this->subject->setLastName($lastName); - self::assertSame($lastName, $this->subject->getLastName()); - } - - /** - * @test - */ - public function getAddressInitiallyReturnsEmptyString(): void - { - self::assertSame('', $this->subject->getAddress()); - } - - /** - * @test - */ - public function setAddressSetsAddress(): void - { - $address = 'foobar 42, foo'; - $this->subject->setAddress($address); - self::assertSame($address, $this->subject->getAddress()); - } - - /** - * @test - */ - public function getTelephoneInitiallyReturnsEmptyString(): void - { - self::assertSame('', $this->subject->getTelephone()); - } - - /** - * @test - */ - public function setTelephoneSetsTelephone(): void - { - $telephone = '42'; - $this->subject->setTelephone($telephone); - self::assertSame($telephone, $this->subject->getTelephone()); - } - - /** - * @test - */ - public function getFaxInitiallyReturnsEmptyString(): void - { - self::assertSame('', $this->subject->getFax()); - } - - /** - * @test - */ - public function setFaxSetsFax(): void - { - $fax = '42'; - $this->subject->setFax($fax); - self::assertSame($fax, $this->subject->getFax()); - } - - /** - * @test - */ - public function getEmailInitiallyReturnsEmptyString(): void - { - self::assertSame('', $this->subject->getEmail()); - } - - /** - * @test - */ - public function setEmailSetsEmail(): void - { - $email = 'don.juan@example.com'; - $this->subject->setEmail($email); - self::assertSame($email, $this->subject->getEmail()); - } - - /** - * @test - */ - public function getTitleInitiallyReturnsEmptyString(): void - { - self::assertSame('', $this->subject->getTitle()); - } - - /** - * @test - */ - public function setTitleSetsTitle(): void - { - $title = 'foobar'; - $this->subject->setTitle($title); - self::assertSame($title, $this->subject->getTitle()); - } - - /** - * @test - */ - public function getZipInitiallyReturnsEmptyString(): void - { - self::assertSame('', $this->subject->getZip()); - } - - /** - * @test - */ - public function setZipSetsZip(): void - { - $zip = '42'; - $this->subject->setZip($zip); - self::assertSame($zip, $this->subject->getZip()); - } - - /** - * @test - */ - public function getCityInitiallyReturnsEmptyString(): void - { - self::assertSame('', $this->subject->getCity()); - } - - /** - * @test - */ - public function setCitySetsCity(): void - { - $city = 'foo'; - $this->subject->setCity($city); - self::assertSame($city, $this->subject->getCity()); - } - - /** - * @test - */ - public function getCountryInitiallyReturnsEmptyString(): void - { - self::assertSame('', $this->subject->getCountry()); - } - - /** - * @test - */ - public function setCountrySetsCountry(): void - { - $country = 'foo'; - $this->subject->setCountry($country); - self::assertSame($country, $this->subject->getCountry()); - } - - /** - * @test - */ - public function getWwwInitiallyReturnsEmptyString(): void - { - self::assertSame('', $this->subject->getWww()); - } - - /** - * @test - */ - public function setWwwSetsWww(): void - { - $www = 'foo.bar'; - $this->subject->setWww($www); - self::assertSame($www, $this->subject->getWww()); - } - - /** - * @test - */ - public function getCompanyInitiallyReturnsEmptyString(): void - { - self::assertSame('', $this->subject->getCompany()); - } - - /** - * @test - */ - public function setCompanySetsCompany(): void - { - $company = 'foo bar'; - $this->subject->setCompany($company); - self::assertSame($company, $this->subject->getCompany()); - } - - /** - * @test - */ - public function getImageInitiallyReturnsObjectStorage(): void - { - self::assertInstanceOf(ObjectStorage::class, $this->subject->getImage()); - } - - /** - * @test - */ - public function setImageSetsImage(): void - { - $images = new ObjectStorage(); - $reference = new FileReference(); - $reference->setPid(123); - $images->attach($reference); - - $this->subject->setImage($images); - self::assertSame($images, $this->subject->getImage()); - } - - /** - * @test - */ - public function getLastloginInitiallyReturnsNull(): void - { - self::assertNull($this->subject->getLastlogin()); - } - - /** - * @test - */ - public function setLastloginSetsLastlogin(): void - { - $date = new \DateTime(); - $this->subject->setLastlogin($date); - self::assertSame($date, $this->subject->getLastlogin()); - } -} diff --git a/typo3/sysext/extbase/Tests/UnitDeprecated/Domain/Repository/BackendUserGroupRepositoryTest.php b/typo3/sysext/extbase/Tests/UnitDeprecated/Domain/Repository/BackendUserGroupRepositoryTest.php deleted file mode 100644 index 35744129684cc47a931d1f19a343fc01cd132e66..0000000000000000000000000000000000000000 --- a/typo3/sysext/extbase/Tests/UnitDeprecated/Domain/Repository/BackendUserGroupRepositoryTest.php +++ /dev/null @@ -1,60 +0,0 @@ -<?php - -declare(strict_types=1); - -/* - * This file is part of the TYPO3 CMS project. - * - * It is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License, either version 2 - * of the License, or any later version. - * - * For the full copyright and license information, please read the - * LICENSE.txt file that was distributed with this source code. - * - * The TYPO3 project - inspiring people to share! - */ - -namespace TYPO3\CMS\Extbase\Tests\UnitDeprecated\Domain\Repository; - -use TYPO3\CMS\Core\Utility\GeneralUtility; -use TYPO3\CMS\Extbase\Domain\Repository\BackendUserGroupRepository; -use TYPO3\CMS\Extbase\Object\ObjectManagerInterface; -use TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings; -use TYPO3\TestingFramework\Core\Unit\UnitTestCase; - -/** - * Test case - */ -class BackendUserGroupRepositoryTest extends UnitTestCase -{ - /** - * @test - */ - public function initializeObjectSetsRespectStoragePidToFalse(): void - { - $objectManager = $this->createMock(ObjectManagerInterface::class); - $subject = new BackendUserGroupRepository($objectManager); - $querySettings = $this->createMock(Typo3QuerySettings::class); - $querySettings->expects(self::once())->method('setRespectStoragePage')->with(false); - GeneralUtility::addInstance(Typo3QuerySettings::class, $querySettings); - $subject->initializeObject(); - } - - /** - * @test - */ - public function initializeObjectSetsDefaultQuerySettings(): void - { - $objectManager = $this->createMock(ObjectManagerInterface::class); - /** @var $subject BackendUserGroupRepository */ - $subject = $this->getMockBuilder(BackendUserGroupRepository::class) - ->onlyMethods(['setDefaultQuerySettings']) - ->setConstructorArgs([$objectManager]) - ->getMock(); - $querySettings = $this->createMock(Typo3QuerySettings::class); - GeneralUtility::addInstance(Typo3QuerySettings::class, $querySettings); - $subject->expects(self::once())->method('setDefaultQuerySettings')->with($querySettings); - $subject->initializeObject(); - } -} diff --git a/typo3/sysext/extbase/Tests/UnitDeprecated/Domain/Repository/BackendUserRepositoryTest.php b/typo3/sysext/extbase/Tests/UnitDeprecated/Domain/Repository/BackendUserRepositoryTest.php deleted file mode 100644 index b882b4c739d31bdc5d0121be4e60663c8f47ce4c..0000000000000000000000000000000000000000 --- a/typo3/sysext/extbase/Tests/UnitDeprecated/Domain/Repository/BackendUserRepositoryTest.php +++ /dev/null @@ -1,60 +0,0 @@ -<?php - -declare(strict_types=1); - -/* - * This file is part of the TYPO3 CMS project. - * - * It is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License, either version 2 - * of the License, or any later version. - * - * For the full copyright and license information, please read the - * LICENSE.txt file that was distributed with this source code. - * - * The TYPO3 project - inspiring people to share! - */ - -namespace TYPO3\CMS\Extbase\Tests\UnitDeprecated\Domain\Repository; - -use TYPO3\CMS\Core\Utility\GeneralUtility; -use TYPO3\CMS\Extbase\Domain\Repository\BackendUserRepository; -use TYPO3\CMS\Extbase\Object\ObjectManagerInterface; -use TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings; -use TYPO3\TestingFramework\Core\Unit\UnitTestCase; - -/** - * Test case - */ -class BackendUserRepositoryTest extends UnitTestCase -{ - /** - * @test - */ - public function initializeObjectSetsRespectStoragePidToFalse(): void - { - $objectManager = $this->createMock(ObjectManagerInterface::class); - $subject = new BackendUserRepository($objectManager); - $querySettings = $this->createMock(Typo3QuerySettings::class); - $querySettings->expects(self::once())->method('setRespectStoragePage')->with(false); - GeneralUtility::addInstance(Typo3QuerySettings::class, $querySettings); - $subject->initializeObject(); - } - - /** - * @test - */ - public function initializeObjectSetsDefaultQuerySettings(): void - { - $objectManager = $this->createMock(ObjectManagerInterface::class); - /** @var $subject BackendUserRepository */ - $subject = $this->getMockBuilder(BackendUserRepository::class) - ->onlyMethods(['setDefaultQuerySettings']) - ->setConstructorArgs([$objectManager]) - ->getMock(); - $querySettings = $this->createMock(Typo3QuerySettings::class); - GeneralUtility::addInstance(Typo3QuerySettings::class, $querySettings); - $subject->expects(self::once())->method('setDefaultQuerySettings')->with($querySettings); - $subject->initializeObject(); - } -} diff --git a/typo3/sysext/extbase/Tests/UnitDeprecated/Domain/Repository/CategoryRepositoryTest.php b/typo3/sysext/extbase/Tests/UnitDeprecated/Domain/Repository/CategoryRepositoryTest.php deleted file mode 100644 index 17fc0da702e59f6dd36e9147de06d17c4ea0873e..0000000000000000000000000000000000000000 --- a/typo3/sysext/extbase/Tests/UnitDeprecated/Domain/Repository/CategoryRepositoryTest.php +++ /dev/null @@ -1,44 +0,0 @@ -<?php - -declare(strict_types=1); - -/* - * This file is part of the TYPO3 CMS project. - * - * It is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License, either version 2 - * of the License, or any later version. - * - * For the full copyright and license information, please read the - * LICENSE.txt file that was distributed with this source code. - * - * The TYPO3 project - inspiring people to share! - */ - -namespace TYPO3\CMS\Extbase\Tests\UnitDeprecated\Domain\Repository; - -use TYPO3\CMS\Core\Utility\GeneralUtility; -use TYPO3\CMS\Extbase\Domain\Repository\CategoryRepository; -use TYPO3\CMS\Extbase\Object\ObjectManagerInterface; -use TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings; -use TYPO3\TestingFramework\Core\Unit\UnitTestCase; - -/** - * Test case - */ -class CategoryRepositoryTest extends UnitTestCase -{ - /** - * @test - */ - public function initializeObjectSetsRespectStoragePidToFalse(): void - { - /** @var $objectManager \TYPO3\CMS\Extbase\Object\ObjectManagerInterface */ - $objectManager = $this->createMock(ObjectManagerInterface::class); - $subject = new CategoryRepository($objectManager); - $querySettings = $this->createMock(Typo3QuerySettings::class); - $querySettings->expects(self::once())->method('setRespectStoragePage')->with(false); - GeneralUtility::addInstance(Typo3QuerySettings::class, $querySettings); - $subject->initializeObject(); - } -} diff --git a/typo3/sysext/install/Configuration/ExtensionScanner/Php/ClassNameMatcher.php b/typo3/sysext/install/Configuration/ExtensionScanner/Php/ClassNameMatcher.php index ebfb217418983f8e89488f031c5c3da60ed4121c..e2f426bc9c266d216f466843fbe239a3d4089cc1 100644 --- a/typo3/sysext/install/Configuration/ExtensionScanner/Php/ClassNameMatcher.php +++ b/typo3/sysext/install/Configuration/ExtensionScanner/Php/ClassNameMatcher.php @@ -1719,46 +1719,55 @@ return [ 'TYPO3\CMS\Extbase\Domain\Model\BackendUser' => [ 'restFiles' => [ 'Deprecation-94654-GenericExtbaseDomainClasses.rst', + 'Breaking-96107-DeprecatedFunctionalityRemoved.rst', ], ], 'TYPO3\CMS\Extbase\Domain\Model\BackendUserGroup' => [ 'restFiles' => [ 'Deprecation-94654-GenericExtbaseDomainClasses.rst', + 'Breaking-96107-DeprecatedFunctionalityRemoved.rst', ], ], 'TYPO3\CMS\Extbase\Domain\Model\FrontendUser' => [ 'restFiles' => [ 'Deprecation-94654-GenericExtbaseDomainClasses.rst', + 'Breaking-96107-DeprecatedFunctionalityRemoved.rst', ], ], 'TYPO3\CMS\Extbase\Domain\Model\FrontendUserGroup' => [ 'restFiles' => [ 'Deprecation-94654-GenericExtbaseDomainClasses.rst', + 'Breaking-96107-DeprecatedFunctionalityRemoved.rst', ], ], 'TYPO3\CMS\Extbase\Domain\Repository\BackendUserGroupRepository' => [ 'restFiles' => [ 'Deprecation-94654-GenericExtbaseDomainClasses.rst', + 'Breaking-96107-DeprecatedFunctionalityRemoved.rst', ], ], 'TYPO3\CMS\Extbase\Domain\Repository\BackendUserRepository' => [ 'restFiles' => [ 'Deprecation-94654-GenericExtbaseDomainClasses.rst', + 'Breaking-96107-DeprecatedFunctionalityRemoved.rst', ], ], 'TYPO3\CMS\Extbase\Domain\Repository\CategoryRepository' => [ 'restFiles' => [ 'Deprecation-94654-GenericExtbaseDomainClasses.rst', + 'Breaking-96107-DeprecatedFunctionalityRemoved.rst', ], ], 'TYPO3\CMS\Extbase\Domain\Repository\FrontendUserGroupRepository' => [ 'restFiles' => [ 'Deprecation-94654-GenericExtbaseDomainClasses.rst', + 'Breaking-96107-DeprecatedFunctionalityRemoved.rst', ], ], 'TYPO3\CMS\Extbase\Domain\Repository\FrontendUserRepository' => [ 'restFiles' => [ 'Deprecation-94654-GenericExtbaseDomainClasses.rst', + 'Breaking-96107-DeprecatedFunctionalityRemoved.rst', ], ], 'TYPO3\CMS\Core\Category\CategoryRegistry' => [