Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 6 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
run: composer install --prefer-dist --no-progress --no-suggest

- name: Coding Guideline
run: vendor/bin/php-cs-fixer fix --config=Build/.php-cs-fixer.dist.php -v --dry-run --using-cache=no --path-mode=intersection ./
run: ./.build/bin/php-cs-fixer fix --config=Build/.php-cs-fixer.dist.php -v --dry-run --using-cache=no --path-mode=intersection ./

code-quality:
runs-on: ubuntu-latest
Expand All @@ -74,12 +74,14 @@ jobs:
- name: Install dependencies with expected TYPO3 version
run: |-
composer remove --dev ssch/typo3-rector \
&& composer require typo3/cms-install "*" \
&& composer install --no-progress --no-ansi --no-interaction

- name: Code Quality (by PHPStan)
run: vendor/bin/phpstan analyse -c Build/phpstan.neon
- name: Build codeception tester
run: .build/bin/codecept build

- name: Code Quality (by PHPStan)
run: ./.build/bin/phpstan analyse -c Build/phpstan.neon

test-unit-and-functional:
runs-on: ubuntu-latest
needs:
Expand Down
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.build
composer.lock
var

.php-cs-fixer.cache
.phplint.cache
Expand All @@ -10,8 +11,5 @@ Documentation/_make
.DS_Store
.idea

var/
vendor/

phpunit.coverage.xml
phpunit.report.xml
5 changes: 5 additions & 0 deletions Build/.php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@
(new PhpCsFixer\Finder())
->ignoreVCSIgnored(true)
->in(__DIR__ . '/../')
->exclude(
[
'var/',
]
)
)
->setRiskyAllowed(true)
->setRules([
Expand Down
30 changes: 0 additions & 30 deletions Build/UnitTests.xml

This file was deleted.

40 changes: 0 additions & 40 deletions Build/phpmd-ruleset.xml

This file was deleted.

249 changes: 249 additions & 0 deletions Build/phpstan-baseline.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,249 @@
parameters:
ignoreErrors:
-
message: '#^Method Extcode\\CartBooks\\Domain\\Model\\Book\:\:getBestSpecialPrice\(\) has parameter \$frontendUserGroupIds with no value type specified in iterable type array\.$#'
identifier: missingType.iterableValue
count: 1
path: ../Classes/Domain/Model/Book.php

-
message: '#^Method Extcode\\CartBooks\\Domain\\Model\\Book\:\:getSpecialPrices\(\) return type with generic class TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage does not specify its types\: TEntity$#'
identifier: missingType.generics
count: 1
path: ../Classes/Domain/Model/Book.php

-
message: '#^Method Extcode\\CartBooks\\Domain\\Model\\Book\:\:setSpecialPrices\(\) has parameter \$specialPrices with generic class TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage but does not specify its types\: TEntity$#'
identifier: missingType.generics
count: 1
path: ../Classes/Domain/Model/Book.php

-
message: '#^Binary operation "\+\=" between mixed and int results in an error\.$#'
identifier: assignOp.invalid
count: 1
path: ../Classes/EventListener/CheckProductAvailability.php

-
message: '#^Cannot cast mixed to int\.$#'
identifier: cast.int
count: 4
path: ../Classes/EventListener/RetrieveProductsFromRequest.php

-
message: '#^Method Extcode\\CartBooks\\EventListener\\RetrieveProductsFromRequest\:\:checkRequestArguments\(\) has parameter \$requestArguments with no value type specified in iterable type array\.$#'
identifier: missingType.iterableValue
count: 1
path: ../Classes/EventListener/RetrieveProductsFromRequest.php

-
message: '#^Method Extcode\\CartBooks\\EventListener\\RetrieveProductsFromRequest\:\:checkRequestArguments\(\) return type has no value type specified in iterable type array\.$#'
identifier: missingType.iterableValue
count: 1
path: ../Classes/EventListener/RetrieveProductsFromRequest.php

-
message: '#^Method Extcode\\CartBooks\\EventListener\\RetrieveProductsFromRequest\:\:getCartProductFromBook\(\) has parameter \$taxClasses with no value type specified in iterable type array\.$#'
identifier: missingType.iterableValue
count: 1
path: ../Classes/EventListener/RetrieveProductsFromRequest.php

-
message: '#^Parameter \#1 \$book of method Extcode\\CartBooks\\EventListener\\RetrieveProductsFromRequest\:\:getCartProductFromBook\(\) expects Extcode\\CartBooks\\Domain\\Model\\Book, TYPO3\\CMS\\Extbase\\DomainObject\\DomainObjectInterface\|null given\.$#'
identifier: argument.type
count: 1
path: ../Classes/EventListener/RetrieveProductsFromRequest.php

-
message: '#^Parameter \#2 \$productId of class Extcode\\Cart\\Domain\\Model\\Cart\\Product constructor expects int, int\<1, max\>\|null given\.$#'
identifier: argument.type
count: 1
path: ../Classes/EventListener/RetrieveProductsFromRequest.php

-
message: '#^Parameter \#6 \$taxClass of class Extcode\\Cart\\Domain\\Model\\Cart\\Product constructor expects Extcode\\Cart\\Domain\\Model\\Cart\\TaxClass, mixed given\.$#'
identifier: argument.type
count: 1
path: ../Classes/EventListener/RetrieveProductsFromRequest.php

-
message: '#^Cannot access offset ''cart'' on mixed\.$#'
identifier: offsetAccess.nonOffsetAccessible
count: 2
path: ../Classes/EventListener/View/ModifyView.php

-
message: '#^Cannot access offset ''pid'' on mixed\.$#'
identifier: offsetAccess.nonOffsetAccessible
count: 2
path: ../Classes/EventListener/View/ModifyView.php

-
message: '#^Parameter \#1 \$key of method Extcode\\Cart\\Service\\SessionHandler\:\:restoreCart\(\) expects string, mixed given\.$#'
identifier: argument.type
count: 1
path: ../Classes/EventListener/View/ModifyView.php

-
message: '#^Parameter \#1 \$key of method Extcode\\Cart\\Service\\SessionHandler\:\:writeCart\(\) expects string, mixed given\.$#'
identifier: argument.type
count: 1
path: ../Classes/EventListener/View/ModifyView.php

-
message: '#^Property Extcode\\CartBooks\\EventListener\\View\\ModifyView\:\:\$cartConfiguration type has no value type specified in iterable type array\.$#'
identifier: missingType.iterableValue
count: 1
path: ../Classes/EventListener/View/ModifyView.php

-
message: '#^Cannot call method getAuthor\(\) on mixed\.$#'
identifier: method.nonObject
count: 1
path: ../Classes/ViewHelpers/SchemaViewHelper.php

-
message: '#^Cannot call method getPrice\(\) on mixed\.$#'
identifier: method.nonObject
count: 1
path: ../Classes/ViewHelpers/SchemaViewHelper.php

-
message: '#^Cannot call method getTitle\(\) on mixed\.$#'
identifier: method.nonObject
count: 1
path: ../Classes/ViewHelpers/SchemaViewHelper.php

-
message: '#^Method Extcode\\CartBooks\\ViewHelpers\\SchemaViewHelper\:\:render\(\) should return string but returns string\|false\.$#'
identifier: return.type
count: 1
path: ../Classes/ViewHelpers/SchemaViewHelper.php

-
message: '#^Cannot access an offset on mixed\.$#'
identifier: offsetAccess.nonOffsetAccessible
count: 1
path: ../Configuration/TCA/Overrides/tx_cart_domain_model_order_product.php

-
message: '#^Cannot access offset ''columns'' on mixed\.$#'
identifier: offsetAccess.nonOffsetAccessible
count: 1
path: ../Configuration/TCA/Overrides/tx_cart_domain_model_order_product.php

-
message: '#^Cannot access offset ''config'' on mixed\.$#'
identifier: offsetAccess.nonOffsetAccessible
count: 1
path: ../Configuration/TCA/Overrides/tx_cart_domain_model_order_product.php

-
message: '#^Cannot access offset ''items'' on mixed\.$#'
identifier: offsetAccess.nonOffsetAccessible
count: 1
path: ../Configuration/TCA/Overrides/tx_cart_domain_model_order_product.php

-
message: '#^Cannot access offset ''product_type'' on mixed\.$#'
identifier: offsetAccess.nonOffsetAccessible
count: 1
path: ../Configuration/TCA/Overrides/tx_cart_domain_model_order_product.php

-
message: '#^Cannot access offset ''tx_cart_domain_model_order_product'' on mixed\.$#'
identifier: offsetAccess.nonOffsetAccessible
count: 1
path: ../Configuration/TCA/Overrides/tx_cart_domain_model_order_product.php

-
message: '''
#^Access to property \$config of deprecated class TYPO3\\TestingFramework\\Core\\Acceptance\\Extension\\BackendEnvironment\:
\: TYPO3 core v14 and v15 switched from codeception to playwright\.
The testing\-framework codeception related scaffolding files and
helpers will be removed with testing\-framework v10\.$#
'''
identifier: property.deprecatedClass
count: 2
path: ../Tests/Acceptance/Support/Environment.php

-
message: '''
#^Call to method bootstrapTypo3Environment\(\) of deprecated class TYPO3\\TestingFramework\\Core\\Acceptance\\Extension\\BackendEnvironment\:
\: TYPO3 core v14 and v15 switched from codeception to playwright\.
The testing\-framework codeception related scaffolding files and
helpers will be removed with testing\-framework v10\.$#
'''
identifier: method.deprecatedClass
count: 1
path: ../Tests/Acceptance/Support/Environment.php

-
message: '''
#^Class Extcode\\CartBooks\\Tests\\Acceptance\\Support\\Environment extends deprecated class TYPO3\\TestingFramework\\Core\\Acceptance\\Extension\\BackendEnvironment\:
\: TYPO3 core v14 and v15 switched from codeception to playwright\.
The testing\-framework codeception related scaffolding files and
helpers will be removed with testing\-framework v10\.$#
'''
identifier: class.extendsDeprecatedClass
count: 1
path: ../Tests/Acceptance/Support/Environment.php

-
message: '#^Parameter \#1 \$dataSet of method Codappix\\Typo3PhpDatasets\\PhpDataSet\:\:import\(\) expects array\<string, array\<array\<string, string\>\>\>, mixed given\.$#'
identifier: argument.type
count: 1
path: ../Tests/Acceptance/Support/Environment.php

-
message: '#^Property Extcode\\CartBooks\\Tests\\Acceptance\\Support\\Environment\:\:\$localConfig type has no value type specified in iterable type array\.$#'
identifier: missingType.iterableValue
count: 1
path: ../Tests/Acceptance/Support/Environment.php

-
message: '''
#^Usage of deprecated trait TYPO3\\TestingFramework\\Core\\Acceptance\\Step\\FrameSteps in class Extcode\\CartBooks\\Tests\\Acceptance\\Support\\Tester\:
\: TYPO3 core v14 and v15 switched from codeception to playwright\.
The testing\-framework codeception related scaffolding files and
helpers will be removed with testing\-framework v10\.$#
'''
identifier: traitUse.deprecatedTrait
count: 1
path: ../Tests/Acceptance/Support/Tester.php

-
message: '#^Cannot access offset ''cart_books'' on mixed\.$#'
identifier: offsetAccess.nonOffsetAccessible
count: 1
path: ../ext_emconf.php

-
message: '#^Cannot access an offset on mixed\.$#'
identifier: offsetAccess.nonOffsetAccessible
count: 1
path: ../ext_localconf.php

-
message: '#^Cannot access offset ''SYS'' on mixed\.$#'
identifier: offsetAccess.nonOffsetAccessible
count: 1
path: ../ext_localconf.php

-
message: '#^Cannot access offset ''cartbooks'' on mixed\.$#'
identifier: offsetAccess.nonOffsetAccessible
count: 1
path: ../ext_localconf.php

-
message: '#^Cannot access offset ''fluid'' on mixed\.$#'
identifier: offsetAccess.nonOffsetAccessible
count: 1
path: ../ext_localconf.php

-
message: '#^Cannot access offset ''namespaces'' on mixed\.$#'
identifier: offsetAccess.nonOffsetAccessible
count: 1
path: ../ext_localconf.php
Loading
Loading