diff --git a/ChangeLog b/ChangeLog index 7948a86..c63171b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +3.0.2 + 2018-08-16 + Daniel Lorenz + + * TASK #23: refactor extension manager warnings + 3.0.1 2018-08-16 Daniel Lorenz diff --git a/Classes/Controller/Backend/ContactController.php b/Classes/Controller/Backend/ContactController.php index bc3b8b3..cc9ad01 100755 --- a/Classes/Controller/Backend/ContactController.php +++ b/Classes/Controller/Backend/ContactController.php @@ -86,7 +86,7 @@ public function listAction() * * @param \Extcode\Contacts\Domain\Model\Contact $contact * - * @ignorevalidation $contact + * @TYPO3\CMS\Extbase\Annotation\IgnoreValidation $contact */ public function showAction(\Extcode\Contacts\Domain\Model\Contact $contact = null) { diff --git a/Classes/Domain/Model/Address.php b/Classes/Domain/Model/Address.php index 3309777..9602ebb 100755 --- a/Classes/Domain/Model/Address.php +++ b/Classes/Domain/Model/Address.php @@ -116,8 +116,8 @@ class Address extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity /** * TT Content * + * @TYPO3\CMS\Extbase\Annotation\ORM\Lazy * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\Extcode\Contacts\Domain\Model\TtContent> - * @lazy */ protected $ttContent; diff --git a/Classes/Domain/Model/Company.php b/Classes/Domain/Model/Company.php index 95244dc..a7ee5a0 100755 --- a/Classes/Domain/Model/Company.php +++ b/Classes/Domain/Model/Company.php @@ -26,7 +26,7 @@ class Company extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity * Name * * @var string - * @validate NotEmpty + * @TYPO3\CMS\Extbase\Annotation\Validate NotEmpty */ protected $name; @@ -124,8 +124,8 @@ class Company extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity /** * TT Content * + * @TYPO3\CMS\Extbase\Annotation\ORM\Lazy * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\Extcode\Contacts\Domain\Model\TtContent> - * @lazy */ protected $ttContent; diff --git a/Classes/Domain/Model/Contact.php b/Classes/Domain/Model/Contact.php index 47a9218..e16a3c7 100755 --- a/Classes/Domain/Model/Contact.php +++ b/Classes/Domain/Model/Contact.php @@ -40,7 +40,7 @@ class Contact extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity * First Name * * @var string - * @validate NotEmpty + * @TYPO3\CMS\Extbase\Annotation\Validate NotEmpty */ protected $firstName; @@ -48,7 +48,7 @@ class Contact extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity * Last Name * * @var string - * @validate NotEmpty + * @TYPO3\CMS\Extbase\Annotation\Validate NotEmpty */ protected $lastName; @@ -104,8 +104,8 @@ class Contact extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity /** * TT Content * + * @TYPO3\CMS\Extbase\Annotation\ORM\Lazy * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\Extcode\Contacts\Domain\Model\TtContent> - * @lazy */ protected $ttContent; diff --git a/Classes/Domain/Model/Country.php b/Classes/Domain/Model/Country.php index 7b9da93..f554fd9 100755 --- a/Classes/Domain/Model/Country.php +++ b/Classes/Domain/Model/Country.php @@ -26,7 +26,7 @@ class Country extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity * Iso2 * * @var string - * @validate NotEmpty + * @TYPO3\CMS\Extbase\Annotation\Validate NotEmpty */ protected $iso2 = ''; @@ -34,7 +34,7 @@ class Country extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity * Iso3 * * @var string - * @validate NotEmpty + * @TYPO3\CMS\Extbase\Annotation\Validate NotEmpty */ protected $iso3 = ''; @@ -42,7 +42,7 @@ class Country extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity * Name * * @var string - * @validate NotEmpty + * @TYPO3\CMS\Extbase\Annotation\Validate NotEmpty */ protected $name = ''; @@ -57,19 +57,19 @@ class Country extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity * PhoneCountryCode * * @var string - * @validate NotEmpty + * @TYPO3\CMS\Extbase\Annotation\Validate NotEmpty */ protected $phoneCountryCode = ''; /** * @param string $iso2 * - * @throws \TYPO3\CMS\Extbase\Property\Exception\InvalidPropertyException + * @throws \TYPO3\CMS\Extbase\Property\Exception */ public function setIso2($iso2) { if (strlen($iso2) != 2) { - throw new \TYPO3\CMS\Extbase\Property\Exception\InvalidPropertyException( + throw new \TYPO3\CMS\Extbase\Property\Exception( 'The iso2 code has to have two chars.', 1395925918 ); @@ -89,12 +89,12 @@ public function getIso2() /** * @param string $iso3 * - * @throws \TYPO3\CMS\Extbase\Property\Exception\InvalidPropertyException + * @throws \TYPO3\CMS\Extbase\Property\Exception */ public function setIso3($iso3) { if ((strlen($iso3) != 0) and (strlen($iso3) != 3)) { - throw new \TYPO3\CMS\Extbase\Property\Exception\InvalidPropertyException( + throw new \TYPO3\CMS\Extbase\Property\Exception( 'The iso3 code has to have three chars.', 1395925960 ); diff --git a/Classes/Domain/Model/Phone.php b/Classes/Domain/Model/Phone.php index 51f7d32..a2c74dd 100755 --- a/Classes/Domain/Model/Phone.php +++ b/Classes/Domain/Model/Phone.php @@ -33,7 +33,7 @@ class Phone extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity * Number * * @var string - * @validate NotEmpty + * @TYPO3\CMS\Extbase\Annotation\Validate NotEmpty */ protected $number = ''; diff --git a/Configuration/TCA/Overrides/tx_contacts_domain_model_address.php b/Configuration/TCA/Overrides/tx_contacts_domain_model_address.php index 0b0d106..240eab8 100755 --- a/Configuration/TCA/Overrides/tx_contacts_domain_model_address.php +++ b/Configuration/TCA/Overrides/tx_contacts_domain_model_address.php @@ -2,11 +2,14 @@ defined('TYPO3_MODE') or die(); +use TYPO3\CMS\Core\Configuration\ExtensionConfiguration; +use TYPO3\CMS\Core\Utility\ExtensionManagementUtility; +use TYPO3\CMS\Core\Utility\GeneralUtility; + $_LLL = 'LLL:EXT:contacts/Resources/Private/Language/locallang_db.xlf'; -$extensionConfArr = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['contacts']); -$googleMapsLibrary = $extensionConfArr['googleMapsLibrary']; -$googleMapsApiKey = $extensionConfArr['googleMapsApiKey']; +$googleMapsLibrary = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get('contacts', 'googleMapsLibrary'); +$googleMapsApiKey = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get('contacts', 'googleMapsApiKey'); if (!empty($googleMapsLibrary) && !empty($googleMapsApiKey)) { $googleMapsField = [ @@ -20,11 +23,11 @@ ], ]; - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns( + ExtensionManagementUtility::addTCAcolumns( 'tx_contacts_domain_model_address', $googleMapsField ); - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes( + ExtensionManagementUtility::addToAllTCAtypes( 'tx_contacts_domain_model_address', '--linebreak, coords', '', diff --git a/ext_emconf.php b/ext_emconf.php index 52b9a3d..a259f44 100755 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -17,7 +17,7 @@ 'modify_tables' => '', 'clearCacheOnLoad' => 0, 'lockType' => '', - 'version' => '3.0.1', + 'version' => '3.0.2', 'constraints' => [ 'depends' => [ 'typo3' => '9.3.0-9.3.99',