Skip to content

Commit

Permalink
[TASK] #23 - refactor extension manager warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Lorenz committed Aug 16, 2018
1 parent ce84886 commit 490d848
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 22 deletions.
6 changes: 6 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
3.0.2
2018-08-16
Daniel Lorenz <https://github.com/extcode>

* TASK #23: refactor extension manager warnings

3.0.1
2018-08-16
Daniel Lorenz <https://github.com/extcode>
Expand Down
2 changes: 1 addition & 1 deletion Classes/Controller/Backend/ContactController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
2 changes: 1 addition & 1 deletion Classes/Domain/Model/Address.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
4 changes: 2 additions & 2 deletions Classes/Domain/Model/Company.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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;

Expand Down
6 changes: 3 additions & 3 deletions Classes/Domain/Model/Contact.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ class Contact extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
* First Name
*
* @var string
* @validate NotEmpty
* @TYPO3\CMS\Extbase\Annotation\Validate NotEmpty
*/
protected $firstName;

/**
* Last Name
*
* @var string
* @validate NotEmpty
* @TYPO3\CMS\Extbase\Annotation\Validate NotEmpty
*/
protected $lastName;

Expand Down Expand Up @@ -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;

Expand Down
16 changes: 8 additions & 8 deletions Classes/Domain/Model/Country.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,23 +26,23 @@ class Country extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
* Iso2
*
* @var string
* @validate NotEmpty
* @TYPO3\CMS\Extbase\Annotation\Validate NotEmpty
*/
protected $iso2 = '';

/**
* Iso3
*
* @var string
* @validate NotEmpty
* @TYPO3\CMS\Extbase\Annotation\Validate NotEmpty
*/
protected $iso3 = '';

/**
* Name
*
* @var string
* @validate NotEmpty
* @TYPO3\CMS\Extbase\Annotation\Validate NotEmpty
*/
protected $name = '';

Expand All @@ -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
);
Expand All @@ -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
);
Expand Down
2 changes: 1 addition & 1 deletion Classes/Domain/Model/Phone.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 = '';

Expand Down
13 changes: 8 additions & 5 deletions Configuration/TCA/Overrides/tx_contacts_domain_model_address.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand All @@ -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',
'',
Expand Down
2 changes: 1 addition & 1 deletion ext_emconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 490d848

Please sign in to comment.