Skip to content

Commit

Permalink
Merge pull request #15 from Kanti/bugfix/phpstan
Browse files Browse the repository at this point in the history
  • Loading branch information
Kanti authored Dec 12, 2022
2 parents cf0f64f + 26631e6 commit 2d682e5
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 138 deletions.
17 changes: 7 additions & 10 deletions .github/workflows/tasks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,15 @@ jobs:
strategy:
fail-fast: false
matrix:
php: [ '7.4', '8.0', '8.1' ]
typo3: [ '9', '10', '11' ]
php: [ '7.4', '8.0', '8.1', '8.2' ]
typo3: [ '10', '11' ]
exclude:
- php: '8.0'
typo3: '10'
- php: '8.1'
typo3: '10'

- php: '8.0'
typo3: '9'
- php: '8.1'
typo3: '9'
- php: '8.2'
typo3: '10'
steps:
- name: Setup PHP with PECL extension
uses: shivammathur/setup-php@v2
Expand All @@ -38,8 +35,8 @@ jobs:
key: ${{ runner.os }}-${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-${{ matrix.php }}-composer-
- run: composer require typo3/minimal="^${{ matrix.typo3 }}" --dev
- run: composer install --no-interaction --no-progress
- run: composer require typo3/minimal="^${{ matrix.typo3 }}" --dev --ignore-platform-req=php+
- run: composer install --no-interaction --no-progress --ignore-platform-req=php+
- run: ./vendor/bin/grumphp run --ansi
- run: composer test
- run: jq 'del(.logs.html)' infection.json > infection.json.new && mv infection.json.new infection.json
Expand Down Expand Up @@ -77,7 +74,7 @@ jobs:

- name: Upload EXT:server_timing to TER
run: |
sed -i 's/\\Kanti\\ServerTiming\\Utility\\VersionUtility::getVersion()/'\''${{ steps.get_version.outputs.VERSION }}'\''/g' ext_emconf.php \
sed -i 's/\\Composer\\InstalledVersions::getPrettyVersion('\''kanti\/server-timing'\'')/'\''${{ steps.get_version.outputs.VERSION }}'\''/g' ext_emconf.php \
&& git config --global user.email "no@one" \
&& git config --global user.name "No One" \
&& git add ext_emconf.php \
Expand Down
25 changes: 0 additions & 25 deletions Classes/Utility/VersionUtility.php

This file was deleted.

35 changes: 0 additions & 35 deletions Classes/XClass/CoreRequestFactory.php

This file was deleted.

1 change: 1 addition & 0 deletions Configuration/RequestMiddlewares.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
'typo3/cms-backend/site-resolver',
'typo3/cms-backend/legacy-document-template',
'typo3/cms-extbase/signal-slot-deprecator',
'typo3/cms-core/response-propagation',
],
],
],
Expand Down
55 changes: 0 additions & 55 deletions Tests/CoreRequestFactoryTest.php

This file was deleted.

13 changes: 7 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description" : "Show timings of Database and HTTP Calls",
"type" : "typo3-cms-extension",
"minimum-stability" : "stable",
"license" : "GPL-2.0+",
"license" : "GPL-2.0-or-later",
"authors" : [
{
"name" : "Matthias Vogel",
Expand Down Expand Up @@ -46,14 +46,15 @@
"infection" : "infection --only-covered"
},
"require" : {
"php" : "^7.3 || ~8.0 || ~8.1",
"typo3/cms-core" : "9.* || 10.* || 11.*",
"typo3/cms-extbase" : "9.* || 10.* || 11.*",
"ocramius/package-versions": "^2.1"
"php" : "~7.4 || ~8.0 || ~8.1 || ~8.2",
"typo3/cms-core" : "10.* || 11.*",
"typo3/cms-extbase" : "10.* || 11.*",
"ocramius/package-versions": "^2.1",
"composer-runtime-api": "^2.0.0"
},
"require-dev" : {
"pluswerk/grumphp-config" : "^4.0 || ^5.0",
"typo3/cms-adminpanel" : "9.* || 10.* || 11.*",
"typo3/cms-adminpanel" : "10.* || 11.*",
"phpunit/phpunit" : "^9.5",
"infection/infection" : "^0.18.2 || ^0.26.13",
"saschaegerer/phpstan-typo3": "^1.1",
Expand Down
4 changes: 2 additions & 2 deletions ext_emconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
'uploadfolder' => '0',
'createDirs' => '',
'clearCacheOnLoad' => 0,
'version' => \Kanti\ServerTiming\Utility\VersionUtility::getVersion(),
'version' => \Composer\InstalledVersions::getPrettyVersion('kanti/server-timing'),
'constraints' => [
'depends' => [
'typo3' => '9.0.0-11.999.999',
'typo3' => '10.0.0-11.999.999',
],
'conflicts' => [],
'suggests' => [],
Expand Down
5 changes: 0 additions & 5 deletions ext_localconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,4 @@
'className' => AdminpanelSqlLoggingMiddleware::class,
];

if (version_compare((new Typo3Version())->getBranch(), '10.0', '<')) {
$GLOBALS['TYPO3_CONF_VARS']['SYS']['Objects'][RequestFactory::class] = [
'className' => CoreRequestFactory::class,
];
}
$GLOBALS['TYPO3_CONF_VARS']['HTTP']['handler']['server_timing'] = GuzzleUtility::getHandler();
3 changes: 3 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ parameters:
excludePaths:
- Classes/XClass/ExtbaseDispatcherLegacy.php
- Classes/XClass/ExtbaseDispatcherV11.php
typo3:
requestGetAttributeMapping:
server-timing:middleware:inward: Kanti\ServerTiming\Dto\StopWatch|null

0 comments on commit 2d682e5

Please sign in to comment.