Skip to content

Commit

Permalink
Merge branch 'release/0.41.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
dwenzel committed Nov 22, 2018
2 parents e6b07a0 + e7eefc2 commit 3d5d427
Show file tree
Hide file tree
Showing 79 changed files with 2,870 additions and 2,969 deletions.
55 changes: 55 additions & 0 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
version: "2" # required to adjust maintainability checks
checks:
argument-count:
config:
threshold: 4
complex-logic:
config:
threshold: 4
file-lines:
config:
threshold: 250
method-complexity:
config:
threshold: 5
method-count:
config:
threshold: 20
method-lines:
config:
threshold: 25
nested-control-flow:
config:
threshold: 4
return-statements:
config:
threshold: 4
similar-code:
config:
threshold: # language-specific defaults. an override will affect all languages.
identical-code:
config:
threshold: # language-specific defaults. an override will affect all languages.
fixme:
enabled: true
phpcodesniffer:
enabled: true
config:
standard: "PSR1,PSR2"
ignore_warnings: true
phpmd:
enabled: true
config:
file_extensions: "php"
sonar-php:
enabled: true
config:
tests_patterns:
- Tests/**
exclude_patterns:
- "Config/"
- "**/node_modules/"
- "script/"
- "**/spec/"
- "**/Test/"
- "**/vendor/"
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
*.iml
Documentation/_build/
.scannerwork
.scannerwork
.Build/
7 changes: 6 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ matrix:
env: TYPO3_VERSION=^8
env:
global:
secure: S8QheEMVpSRsPPIhYQZ4tUCTbxpM7csZ0GydJaPY8p/FAEnZLiH6xcsiTGKOljva5HDelCdBvunaWtUO/+CdKIgsdbQGbqc1aWmG6gr+ShQk4X3KzeAA91AFmkJOR6Jv69lUTm6Uo9AKs1JtuVZsOa1aoOmfApohqFuXsRBNXlg=
- CC_TEST_REPORTER_ID: d3719b289927b05bd9152291beb62d8e25d9e66f347011cbe9d7922885f29b60
- CODECLIMATE_REPO_TOKEN: d3719b289927b05bd9152291beb62d8e25d9e66f347011cbe9d7922885f29b60
- secure: S8QheEMVpSRsPPIhYQZ4tUCTbxpM7csZ0GydJaPY8p/FAEnZLiH6xcsiTGKOljva5HDelCdBvunaWtUO/+CdKIgsdbQGbqc1aWmG6gr+ShQk4X3KzeAA91AFmkJOR6Jv69lUTm6Uo9AKs1JtuVZsOa1aoOmfApohqFuXsRBNXlg=
jdk:
- oraclejdk8

Expand Down Expand Up @@ -44,6 +46,7 @@ script:
.Build/bin/phpunit --colors -c Tests/Build/UnitTests.xml Tests/Unit/ \
--coverage-clover .Build/log/coverage/clover.xml \
--log-junit .Build/log/junit.xml
.Build/bin/test-reporter --coverage-report=.Build/log/coverage/clover.xml --stdout > codeclimate.json
rm -rf .Build/vendor/ .Build/Web/ .Build/bin/
sonar-scanner -Dproject.settings=.sonar-project.properties
fi
Expand All @@ -52,4 +55,6 @@ after_success:
- >
if [[ "$COVERAGE" == "1" ]]; then
bash <(curl -s https://codecov.io/bash) -B $TRAVIS_BRANCH
curl -X POST -d @codeclimate.json -H 'Content-Type: application/json' -H 'User-Agent: Code Climate (PHP Test Reporter v0.1.1)' https://codeclimate.com/test_reports
fi
24 changes: 24 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
2018-11-22 [RELEASE] Release of t3events 0.41.0 (Dirk Wenzel)
2018-11-21 c781c64 [TASK] Performances are now displayed in Backend with a label build from their localized date and the event title. (Dirk Wenzel)
2018-11-20 d8e4701 [TASK] domain model Event extended by field relatedSchedules (Dirk Wenzel)
2018-09-28 34e76fd [TASK] - new application icons (Timo Gockel)
2018-09-27 48dcbb2 [BUGFIX] Add missing header schedules label (Steffen Mevius)
2018-09-21 675e0a2 [BUGFIX] CI: redirect output of test-reporter to file (Dirk Wenzel)
2018-09-20 fe84be5 [BUGFIX] CI: enable standard output for test-reporter (Dirk Wenzel)
2018-09-20 f812e3c [BUGFIX] CI: add env variable (Dirk Wenzel)
2018-09-20 2844899 [BUGFIX] CI: remove .Build directories after test-reporter script call (Dirk Wenzel)
2018-09-20 89384c4 [BUGFIX] CI: enable output of test-reporter script (Dirk Wenzel)
2018-09-20 5805a87 [BUGFIX] CI: path to coverage result added, ignore .Build directory (Dirk Wenzel)
2018-09-20 4bfd7e2 [BUGFIX] CI: path to test-reporter script corrected (Dirk Wenzel)
2018-09-20 dc59492 [TASK] CI: config for codeclimate added (Dirk Wenzel)
2018-09-20 6c7c435 [BUGFIX] invalid return values fixed (Dirk Wenzel)
2018-09-20 8578909 [TASK] CI: fix error in travis configuration (Dirk Wenzel)
2018-09-20 1672a14 [TASK] CI: configuration for codeclimate added (Dirk Wenzel)
2018-09-16 3484bb3 [TASK] coding guidelines - more strings replaced by constants from SettingsInterface - immediately return value in BackendViewTrait->getPageRendererConfiguration (Dirk Wenzel)
2018-09-15 e435fbf [BUGFIX] fixed error caused by missing SettingsInterface in PeriodConstraintRepositoryTrait (Dirk Wenzel)
2018-09-15 4be1953 [TASK] coding guidelines: use constants from SettingsInterface. (Dirk Wenzel)
2018-09-15 e2404bc [TASK] constructor refactored. (Dirk Wenzel)
2018-09-15 05f15d9 [BUGFIX] fixed error caused by invalid use statement (Dirk Wenzel)
2018-09-15 f28a1ee [TASK] coding guidelines - use string constant from SettingsInterface - obsolete updater MigrateTaskRecords removed (Dirk Wenzel)
2018-09-15 a9af078 [TASK] code quality: - obsolete CSS file removed - apply coding guidelines to CSS (Dirk Wenzel)

2018-09-11 [RELEASE] Release of t3events 0.40.1 (Dirk Wenzel)
2018-09-11 6be021a [BUGFIX] fixed error in PeriodAwareDemandFactoryTrait caused by invalid argument for DateTime constructor (Dirk Wenzel)

Expand Down
7 changes: 4 additions & 3 deletions Classes/Command/CleanUpCommandController.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use DWenzel\T3events\Controller\PerformanceDemandFactoryTrait;
use DWenzel\T3events\Controller\PerformanceRepositoryTrait;
use DWenzel\T3events\Domain\Model\Event;
use DWenzel\T3events\Utility\SettingsInterface as SI;

/***************************************************************
* Copyright notice
Expand Down Expand Up @@ -48,7 +49,7 @@ class CleanUpCommandController extends CommandController
*/
public function deleteEventsCommand(
$dryRun = true,
$period = 'pastOnly',
$period = SI::PAST_ONLY,
$date = '',
$storagePageIds = '',
$limit = 1000
Expand Down Expand Up @@ -102,7 +103,7 @@ public function deleteEventsCommand(
*/
public function deletePerformancesCommand(
$dryRun = true,
$period = 'pastOnly',
$period = SI::PAST_ONLY,
$date = '',
$storagePageIds = '',
$limit = 1000
Expand Down Expand Up @@ -144,7 +145,7 @@ protected function createSettings($period, $date, $storagePageIds, $limit)
'limit' => $limit
];

if (!empty($date) && $period === 'specific') {
if (!empty($date) && $period === SI::SPECIFIC) {
$settings['periodType'] = 'byDate';
$settings['periodEndDate'] = $date;
$settings['periodStartDate'] = '01-01-1970';
Expand Down
3 changes: 1 addition & 2 deletions Classes/Controller/Backend/BackendViewTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@ protected function getPageRendererConfiguration()
$extbaseFrameworkConfiguration = $this->getConfigurationManager()->getConfiguration(
ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK
);
$rendererConfiguration = $this->getViewProperty($extbaseFrameworkConfiguration, SettingsInterface::PAGE_RENDERER);
return $rendererConfiguration;
return $this->getViewProperty($extbaseFrameworkConfiguration, SettingsInterface::PAGE_RENDERER);
}
}
22 changes: 11 additions & 11 deletions Classes/Controller/Backend/EventController.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
use DWenzel\T3events\Controller\TranslateTrait;
use DWenzel\T3events\Controller\VenueRepositoryTrait;
use DWenzel\T3events\Domain\Model\Dto\ButtonDemand;
use DWenzel\T3events\Utility\SettingsInterface as S;
use DWenzel\T3events\Utility\SettingsInterface as SI;
use TYPO3\CMS\Backend\View\BackendTemplateView;
use TYPO3\CMS\Core\Imaging\Icon;
use TYPO3\CMS\Core\Messaging\FlashMessage;
Expand All @@ -63,7 +63,7 @@ class EventController extends AbstractBackendController implements FilterableCon

protected $buttonConfiguration = [
[
ButtonDemand::TABLE_KEY => S::TABLE_EVENTS,
ButtonDemand::TABLE_KEY => SI::TABLE_EVENTS,
ButtonDemand::LABEL_KEY => 'button.newAction.event',
ButtonDemand::ACTION_KEY => 'new',
ButtonDemand::ICON_KEY => 'ext-t3events-event',
Expand All @@ -83,8 +83,8 @@ public function initializeNewAction()
$configuration = $this->configurationManager->getConfiguration(
ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK
);
if (!empty($configuration[S::PERSISTENCE][S::STORAGE_PID])) {
$this->pageUid = $configuration[S::PERSISTENCE][S::STORAGE_PID];
if (!empty($configuration[SI::PERSISTENCE][SI::STORAGE_PID])) {
$this->pageUid = $configuration[SI::PERSISTENCE][SI::STORAGE_PID];
}
}

Expand Down Expand Up @@ -124,12 +124,12 @@ public function listAction($overwriteDemand = null)
ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK
);
$templateVariables = [
S::EVENTS => $events,
S::DEMAND => $demand,
S::OVERWRITE_DEMAND => $overwriteDemand,
'filterOptions' => $this->getFilterOptions($this->settings[S::FILTER]),
S::STORAGE_PID => $configuration[S::PERSISTENCE][S::STORAGE_PID],
S::SETTINGS => $this->settings
SI::EVENTS => $events,
SI::DEMAND => $demand,
SI::OVERWRITE_DEMAND => $overwriteDemand,
'filterOptions' => $this->getFilterOptions($this->settings[SI::FILTER]),
SI::STORAGE_PID => $configuration[SI::PERSISTENCE][SI::STORAGE_PID],
SI::SETTINGS => $this->settings
];

$this->emitSignal(__CLASS__, self::LIST_ACTION, $templateVariables);
Expand All @@ -141,7 +141,7 @@ public function listAction($overwriteDemand = null)
*/
public function newAction()
{
$this->redirectToCreateNewRecord(S::TABLE_EVENTS);
$this->redirectToCreateNewRecord(SI::TABLE_EVENTS);
}

/**
Expand Down
3 changes: 2 additions & 1 deletion Classes/Controller/Backend/FormTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
use TYPO3\CMS\Backend\Utility\BackendUtility;
use TYPO3\CMS\Core\FormProtection\FormProtectionFactory;
use TYPO3\CMS\Core\Utility\HttpUtility;
use DWenzel\T3events\Utility\SettingsInterface as SI;

/**
* Trait FormTrait
Expand Down Expand Up @@ -56,7 +57,7 @@ protected function redirectToCreateNewRecord($table)
'edit[' . $table . '][' . $this->pageUid . ']' => 'new',
'returnUrl' => $returnUrl
]);
$this->callStatic(HttpUtility::class, 'redirect', $url);
$this->callStatic(HttpUtility::class, SI::REDIRECT, $url);
}

/**
Expand Down
5 changes: 3 additions & 2 deletions Classes/Controller/Backend/ScheduleController.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use DWenzel\T3events\Controller\ModuleDataTrait;
use DWenzel\T3events\Controller\PerformanceController;
use DWenzel\T3events\Controller\SettingsUtilityTrait;
use DWenzel\T3events\Utility\SettingsInterface as SI;
use TYPO3\CMS\Extbase\Mvc\RequestInterface;
use TYPO3\CMS\Extbase\Mvc\ResponseInterface;
use TYPO3\CMS\Extbase\SignalSlot\Exception\InvalidSlotException;
Expand Down Expand Up @@ -58,9 +59,9 @@ public function listAction(array $overwriteDemand = null)

$templateVariables = [
'performances' => $this->performanceRepository->findDemanded($demand),
'overwriteDemand' => $overwriteDemand,
SI::OVERWRITE_DEMAND => $overwriteDemand,
'demand' => $demand,
'settings' => $this->settings,
SI::SETTINGS => $this->settings,
'filterOptions' => $filterOptions
];

Expand Down
Loading

0 comments on commit 3d5d427

Please sign in to comment.