Skip to content
This repository was archived by the owner on Oct 21, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
a7ba151
Add PHP 7.1 and TYPO3 master to travis
pschriner Feb 10, 2018
51b5316
Prepare for master support
pschriner Feb 10, 2018
55bbe2a
Minor refactoring and switch to BackendTemplateview
pschriner Feb 10, 2018
ffb8cc8
Add initial LogWriter. Lot's of duplicate code, sad.
pschriner Feb 10, 2018
374104f
Raise supported TYPO3 version, update license
pschriner Feb 12, 2018
ea5f394
php-cs-fixer run
pschriner Feb 12, 2018
9b54efc
Add logWriter documentation
pschriner Feb 12, 2018
fb9c4b3
Update README
pschriner Feb 12, 2018
4df5a5f
Add @ichhabrecht travis config
pschriner Jun 24, 2018
b2d7ba4
Workaround getRequestId currently being inaccessible
pschriner Jun 24, 2018
6d6b313
Fix namespace error
pschriner Jun 24, 2018
2fd7ecf
I need to learn reflection #not
pschriner Jun 24, 2018
d91ea0e
Adapt composer.json and add PHP 5.5 to travis stages
pschriner Jun 24, 2018
acf3978
Add travis-ci workaround for 6.2
pschriner Jun 24, 2018
7f7f87f
Fix multiline command in travis.ci
pschriner Jun 24, 2018
4bfedaa
Add a 'thank you' to @ichhabrecht
pschriner Jun 24, 2018
a556723
Update copyright header
pschriner Jul 19, 2018
a2031ba
[BUGFIX] Fix headline display
pschriner Feb 5, 2019
86ba9c6
[TASK] Raise version to 1.0, change composer requirements
pschriner Feb 5, 2019
8a020c7
[TASK] Introduce tstamp field to enable standard garbage collection task
pschriner Feb 5, 2019
d5d8257
[BUGFIX] Raise maximum version
pschriner Feb 13, 2019
63c20b8
[BUGFIX][WIP] Add TYPO3Fluid specific viewhelpers and change argument…
pschriner Feb 13, 2019
37aa922
[BUGFIX] Add tstamp field to data
pschriner Feb 13, 2019
5212422
[TASK] Update travis.yml and composer.json to care less about TYPO3 6
pschriner Feb 13, 2019
9e614f0
Fix label error
pschriner Feb 13, 2019
74b4ba0
Remove ll key lookup
pschriner Feb 13, 2019
fe19975
unserialize again
pschriner Feb 13, 2019
b2b8843
Try to get around compatibility restrictions
pschriner Feb 13, 2019
8f6eb83
[WIP] Try to migrate to partialsrootpaths
pschriner Feb 14, 2019
fcfeddf
Another go add fluid compatibility
pschriner Feb 14, 2019
4b24564
php cs fixer
pschriner Feb 14, 2019
c32e13f
Fix viewhelpers
pschriner Feb 14, 2019
2a46e47
Fix arguments
pschriner Feb 14, 2019
3213662
Fix zeroPadding styling
pschriner Feb 14, 2019
46ec24e
Add requirement for typo3/cms-core and raise php version requirement
pschriner Jun 11, 2019
92e56de
my_skeleton -> dm_developerlog
pschriner Jun 11, 2019
7c0ba9e
Drop support for TYPO3 < 8 LTS
pschriner Dec 20, 2019
b8140cf
Merge branch 'pre-merge' of github.com:pschriner/dm_developerlog into…
pschriner Dec 20, 2019
fa75958
Drop TYPO3 7.6 in travis
pschriner Dec 20, 2019
8bb3996
Update documentation
pschriner Dec 20, 2019
3b53c50
Use version ^5.0 of nimut testing fw
pschriner Dec 20, 2019
4918e93
Allow TYPO3 10.2
pschriner Dec 20, 2019
295ab0d
Fixes
pschriner Dec 20, 2019
bd10434
No sane way to check for existing configuration
pschriner Dec 20, 2019
f42fa90
Move LocalConfiguration.php creation to setupBeforeClass method
pschriner Dec 20, 2019
97c6262
Fix wrong debug_backtrace usage
pschriner Dec 20, 2019
a774ab6
Find a way around getInstance not being available
pschriner Dec 20, 2019
d64bac1
WIP
pschriner Oct 16, 2020
8570e8b
Update doc and minor changes
pschriner Oct 16, 2020
68ff189
Switch to cms-core dependency
pschriner Oct 16, 2020
e043803
Change documentation
pschriner Oct 16, 2020
273b9de
Remove code, adapt composer.json
pschriner May 10, 2021
0bd3f7f
Dependabot update
pschriner May 10, 2021
b58c2c5
Revert 8.7.40 requirement
pschriner May 10, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions .php_cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

return PhpCsFixer\Config::create()
->setRiskyAllowed(true)
->setRules([
Expand All @@ -7,9 +8,11 @@ return PhpCsFixer\Config::create()
'syntax' => 'short',
],
'binary_operator_spaces' => true,
'blank_line_before_return' => true,
'concat_space' => [
'spacing' => 'one',
],
'declare_strict_types' => true,
'function_typehint_space' => true,
'hash_to_slash_comment' => true,
'linebreak_after_opening_tag' => true,
Expand Down Expand Up @@ -55,13 +58,19 @@ return PhpCsFixer\Config::create()
'no_whitespace_before_comma_in_array' => true,
'no_whitespace_in_blank_line' => true,
'normalize_index_brace' => true,
'object_operator_without_whitespace' => true,
'ordered_imports' => true,
'phpdoc_add_missing_param_annotation' => true,
'phpdoc_annotation_without_dot' => true,
'phpdoc_indent' => true,
'phpdoc_no_access' => true,
'phpdoc_no_package' => true,
'phpdoc_order' => true,
'phpdoc_scalar' => true,
'phpdoc_single_line_var_spacing' => true,
'phpdoc_trim' => true,
'phpdoc_types' => true,
'self_accessor' => true,
'phpdoc_var_without_name' => true,
'short_scalar_cast' => true,
'single_quote' => true,
'standardize_not_equals' => true,
Expand All @@ -74,6 +83,6 @@ return PhpCsFixer\Config::create()
->in(__DIR__)
->exclude('.Build')
->exclude('Documentation')
->exclude('Libraries')
->exclude('Resources/Private')
->notName('ext_emconf.php')
);
);
181 changes: 150 additions & 31 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,7 @@ language: php
branches:
only:
- master

php:
- 5.5
- 5.6
- 7

env:
- TYPO3_VERSION="^6.2.0"
- TYPO3_VERSION="^7.6.0"
- TYPO3_VERSION="^8.7.0"

matrix:
exclude:
- php: 7
env: TYPO3_VERSION="^6.2.0"
- php: 5.5
env: TYPO3_VERSION="^8.7.0"
- php: 5.6
env: TYPO3_VERSION="^8.7.0"
- pre-merge

sudo: false
cache:
Expand All @@ -39,22 +21,159 @@ notifications:

before_install:
- if php -i | grep -q xdebug; then phpenv config-rm xdebug.ini; fi
- composer self-update
- composer --version
- if [ "$GITHUB_COMPOSER_AUTH" ]; then composer config -g github-oauth.github.com $GITHUB_COMPOSER_AUTH; fi

before_script:
- git clean -dffx
- composer require typo3/cms="$TYPO3_VERSION"
- git checkout composer.json
- export TYPO3_PATH_WEB="$PWD/.Build/Web"
install:
- >
if [[ "$TYPO3" = *"dev"* ]]; then
composer config minimum-stability dev;
composer config prefer-stable true;
composer require typo3/cms-core="@dev" --no-update;
fi
- >
composer require nimut/typo3-complete:$TYPO3
- mkdir -p .Build/public/typo3conf/ext/
- if [ ! -L .Build/public/typo3conf/ext/dm_developerlog ]; then ln -snvf ../../../../. .Build/public/typo3conf/ext/dm_developerlog; fi
- export TYPO3_PATH_ROOT=$PWD/.Build/public
- export typo3DatabaseName=typo3
- export typo3DatabaseHost=localhost
- export typo3DatabaseUsername=root
- export typo3DatabasePassword=

script:
- >
echo;
echo "Running unit tests";
.Build/bin/phpunit -c .Build/vendor/nimut/testing-framework/res/Configuration/UnitTests.xml Tests/Unit
if [ -d "Tests/Unit" ]; then
echo;
echo "Running unit tests";
echo;
echo;
.Build/bin/phpunit --bootstrap .Build/vendor/nimut/testing-framework/res/Configuration/UnitTestsBootstrap.php Tests/Unit/;
fi

- >
if [ -d "Tests/Functional" ]; then
echo;
echo "Running functional tests";
echo;
echo;
find 'Tests/Functional' -wholename '*Test.php' | parallel --gnu 'echo; echo "Running functional test suite {}"; .Build/bin/phpunit --bootstrap .Build/vendor/nimut/testing-framework/res/Configuration/FunctionalTestsBootstrap.php {}';
fi

- >
echo;
echo "Running php lint";
find . -name \*.php ! -path "./.Build/*" | parallel --gnu php -d display_errors=stderr -l {} > /dev/null \;
echo;
echo;
find . -name \*.php ! -path "./.Build/*" | parallel --gnu php -d display_errors=stderr -l {} > /dev/null \;;

jobs:
fast_finish: true
include:
- stage: test
php: 7.4
env: TYPO3=dev-master
- stage: test
php: 7.3
env: TYPO3=^10.4
- stage: test
php: 7.2
env: TYPO3=^9.5
- stage: test
php: 7.2
env: TYPO3=^8.7
- stage: test
php: 7.1
env: TYPO3=^8.7
- stage: test
php: 7.0
env: TYPO3=^8.7

- stage: 🚢 to ter
if: tag IS present AND env(TYPO3_ORG_USERNAME) IS present AND env(TYPO3_ORG_PASSWORD) IS present
php: 7.0
env: TYPO3=^8.7
before_install: skip
install: skip
before_script: skip
script:
- >
echo;
echo "Preparing upload of release ${TRAVIS_TAG} to TER";
echo;
echo;
composer require --dev nimut/typo3-complete:$TYPO3;
composer require --update-no-dev helhum/ter-client:dev-master;

# Cleanup before we upload
git reset --hard HEAD && git clean -fx;

# Upload
TAG_MESSAGE=`git tag -n10 -l $TRAVIS_TAG | sed 's/^[0-9.]*[ ]*//g'`;
echo;
echo "Uploading release ${TRAVIS_TAG} to TER";
echo;
echo;
.Build/bin/ter-client upload dm_developerlog . -u "$TYPO3_ORG_USERNAME" -p "$TYPO3_ORG_PASSWORD" -m "$TAG_MESSAGE";

- stage: ✔ with sonarqube scanner
if: type = push AND branch IN (master, pre-merge) AND env(SONAR_TOKEN) IS present AND fork = false
php: 7.2
before_install: skip
install:
- mkdir -p .Log/coverage/ .Log/junit/
- export TYPO3_PATH_WEB=$PWD/.Build/public
- export typo3DatabaseName=typo3
- export typo3DatabaseHost=localhost
- export typo3DatabaseUsername=root
- export typo3DatabasePassword=
script:
- >
if [ -d "Tests" ]; then
for TYPO3 in "^8.7" "^9.5" "^10.4" "dev-master"; do

echo;
echo "Running TYPO3 version $TYPO3";
echo;
echo;
git clean -Xdf;
composer require --dev nimut/typo3-complete:$TYPO3;
git checkout composer.json;
VERSION=${TYPO3//[!0-9]/};

mkdir -p .Build/public/typo3conf/ext/
if [ ! -L .Build/public/typo3conf/ext/dm_developerlog ]; then ln -snvf ../../../../. .Build/public/typo3conf/ext/dm_developerlog; fi

if [ -d "Tests/Unit" ]; then
echo;
echo "Running unit tests";
echo;
echo;
.Build/bin/phpunit --bootstrap .Build/vendor/nimut/testing-framework/res/Configuration/UnitTestsBootstrap.php --log-junit .Log/junit/unit_$VERSION.xml --coverage-php .Log/coverage/unit_$VERSION.cov Tests/Unit/;
fi

if [ -d "Tests/Functional" ]; then
echo;
echo "Running functional tests";
echo;
echo;
.Build/bin/phpunit --bootstrap .Build/vendor/nimut/testing-framework/res/Configuration/FunctionalTestsBootstrap.php --log-junit .Log/junit/functional_$VERSION.xml --coverage-php .Log/coverage/functional_$VERSION.cov Tests/Functional/;
fi
done

echo;
echo "Merging log and coverage files";
echo;
echo;
composer require --update-with-all-dependencies nimut/phpunit-merger;
.Build/bin/phpunit-merger coverage .Log/coverage/ .Log/coverage.xml;
.Build/bin/phpunit-merger log .Log/junit/ .Log/junit.xml;
fi

- git fetch --unshallow || true

- >
echo;
echo "Running SonarQube Scanner";
echo;
echo;
sonar-scanner;

31 changes: 0 additions & 31 deletions Classes/Controller/Devlog62Controller.php

This file was deleted.

57 changes: 46 additions & 11 deletions Classes/Controller/DevlogController.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<?php
declare(strict_types=1);
namespace DieMedialen\DmDeveloperlog\Controller;

/**
* This file is part of the TYPO3 CMS project.
* This file is part of the dm_developerlog 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
Expand All @@ -13,7 +14,9 @@
*
* The TYPO3 project - inspiring people to share!
*/
use DieMedialen\DmDeveloperlog\Domain\Repository\LogentryRepository;
use TYPO3\CMS\Core\Messaging\FlashMessage;
use TYPO3\CMS\Extbase\Mvc\View\ViewInterface;

class DevlogController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionController
{
Expand All @@ -28,18 +31,52 @@ class DevlogController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionControlle
protected $extkeyOptions = [];

/**
* @var \DieMedialen\DmDeveloperlog\Domain\Repository\LogentryRepository
* @var LogentryRepository
*/
protected $logEntryRepository;

/**
* @param \DieMedialen\DmDeveloperlog\Domain\Repository\LogentryRepository $logEntryRepository
* @param LogentryRepository $logEntryRepository
*/
public function injectLogentryRepository(\DieMedialen\DmDeveloperlog\Domain\Repository\LogentryRepository $logEntryRepository)
public function injectLogentryRepository(LogentryRepository $logEntryRepository)
{
$this->logEntryRepository = $logEntryRepository;
}

/**
* Backend Template Container
*
* @var string
*/
protected $defaultViewObjectName = \TYPO3\CMS\Backend\View\BackendTemplateView::class;

/**
* Set up the doc header properly here
*
* @param ViewInterface $view
*/
protected function initializeView(ViewInterface $view)
{
/** @var BackendTemplateView $view */
parent::initializeView($view);
if ($this->actionMethodName == 'indexAction') {
//$this->generateMenu();
//$this->registerDocheaderButtons();
$this->view->getModuleTemplate()->setFlashMessageQueue($this->controllerContext->getFlashMessageQueue());
}
if ($view instanceof \TYPO3\CMS\Backend\View\BackendTemplateView) {
$pageRenderer = $view->getModuleTemplate()->getPageRenderer();
$pageRenderer->loadJquery();
$pageRenderer->loadRequireJsModule('bootstrap');
$pageRenderer->loadRequireJsModule('TYPO3/CMS/Backend/ContextHelp');
$pageRenderer->loadRequireJsModule('TYPO3/CMS/Backend/DocumentHeader');
$pageRenderer->loadRequireJsModule('TYPO3/CMS/Backend/SplitButtons');
$pageRenderer->loadRequireJsModule('TYPO3/CMS/Backend/Modal');
$pageRenderer->loadRequireJsModule('TYPO3/CMS/Lang/Lang');
$pageRenderer->addCssFile('EXT:dm_developerlog/Resources/Public/Css/Developerlog.css');
}
}

public function initializeIndexAction()
{
$this->extkeyOptions = $this->logEntryRepository->getExtensionKeys();
Expand All @@ -53,8 +90,6 @@ public function initializeIndexAction()
* @param \DieMedialen\DmDeveloperlog\Domain\Model\Constraint $constraint
*
* @ignorevalidation $constraint
*
* @return void
*/
public function indexAction(\DieMedialen\DmDeveloperlog\Domain\Model\Constraint $constraint = null)
{
Expand All @@ -68,7 +103,6 @@ public function indexAction(\DieMedialen\DmDeveloperlog\Domain\Model\Constraint

/**
* Delete all log entries
* @return void
*/
public function flushAction()
{
Expand All @@ -94,10 +128,10 @@ protected function getFlushFlashMessage()
{
return $this->objectManager->get(
FlashMessage::class,
$this->translate('controller.log.flushed'),
$this->translate('controller.log.flushed.title'),
FlashMessage::OK,
true
$this->translate('controller.log.flushed'),
$this->translate('controller.log.flushed.title'),
FlashMessage::OK,
true
);
}

Expand All @@ -117,6 +151,7 @@ protected function translate($key, $vprintfParmeters = '')
if ($vprintfParmeters != '' && !is_array($vprintfParmeters)) {
$vprintfParmeters = [$vprintfParmeters];
}

return \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate($key, 'dm_developerlog', $vprintfParmeters);
}
}
Loading