Skip to content

Commit

Permalink
[TASK] Add TYPO3 10.4 Compatibility
Browse files Browse the repository at this point in the history
Resolves: #6
  • Loading branch information
extcode committed Jun 4, 2021
1 parent 731c2bd commit b175bcf
Show file tree
Hide file tree
Showing 25 changed files with 854 additions and 387 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
.Build
.build
composer.lock

.php_cs.cache
.phplint.cache

.DS_Store
.idea
61 changes: 56 additions & 5 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ cache:

variables:
COMPOSER_CACHE_DIR: ".composer"
TYPO3_PATH_WEB: "$CI_PROJECT_DIR/.Build/Web"
TYPO3_PATH_WEB: "$CI_PROJECT_DIR/.build/public"
MYSQL_DATABASE: "typo3"
MYSQL_ROOT_PASSWORD: "joh316"
typo3DatabaseName: "typo3"
Expand All @@ -19,23 +19,27 @@ before_script:

stages:
- lint
- documentation
- analysis

lint:cgl:
image: composer:1.6
stage: lint
image: composer:2
before_script:
- composer config platform.php 7.4
- composer remove typo3/cms-core --no-update
- composer install --no-progress --no-ansi --no-interaction
script:
- .Build/bin/php-cs-fixer fix --config=Build/.php_cs.dist -v --dry-run --using-cache=no --path-mode=intersection ./
- .build/bin/php-cs-fixer fix --config=Build/.php-cs-fixer.dist.php -v --dry-run --using-cache=no --path-mode=intersection ./

lint:typoscriptcgl:
stage: lint
image: composer:1.6
image: composer:2
script:
- composer config platform.php 7.4
- composer remove typo3/cms-core --no-update
- composer install --no-progress --no-ansi --no-interaction
- .Build/bin/typoscript-lint -c tslint.yaml
- .build/bin/typoscript-lint -c tslint.yaml

lint:yaml:
stage: lint
Expand Down Expand Up @@ -63,3 +67,50 @@ lint:php74:
script:
- find . -name \*.php -exec php -l "{}" \;

documentation:
stage: documentation
image:
name: t3docs/render-documentation:v2.4.0
entrypoint: [""]
before_script:
- cp -a ${CI_PROJECT_DIR}/. /PROJECT
- mkdir -p ${CI_PROJECT_DIR}/Documentation-GENERATED-temp
script:
- cd /ALL/venv
- /ALL/Menu/mainmenu.sh makehtml-no-cache -c resultdir ${CI_PROJECT_DIR}/Documentation-GENERATED-temp
artifacts:
paths:
- ${CI_PROJECT_DIR}/Documentation-GENERATED-temp/Result/project/0.0.0
expire_in: 1 day
when: always

sonarqube:
stage: analysis
image: ciricihq/gitlab-sonar-scanner
variables:
SONAR_URL: "https://sonar.extco.de"
SONAR_PROJECT_NAME: "$CI_PROJECT_NAME"
SONAR_TOKEN: "$SONAR_TOKEN"
SONAR_PROJECT_VERSION: "$CI_JOB_ID"
SONAR_ANALYSIS_MODE: "issues"
SONAR_SOURCES: "./Classes"
SONAR_GITLAB_PROJECT_ID: "$CI_PROJECT_ID"
script:
- echo "sonar.projectKey=cart_payone-3.x" > sonar-project.properties
- gitlab-sonar-scanner -Dsonar.php.coverage.reportPath=phpunit.coverage.xml -Dsonar.php.tests.reportPath=phpunit.report.xml
allow_failure: true

sonarqube-reports:
stage: analysis
image: ciricihq/gitlab-sonar-scanner
variables:
SONAR_URL: "https://sonar.extco.de"
SONAR_PROJECT_NAME: "$CI_PROJECT_NAME"
SONAR_TOKEN: "$SONAR_TOKEN"
SONAR_PROJECT_VERSION: "$CI_JOB_ID"
SONAR_ANALYSIS_MODE: "publish"
SONAR_SOURCES: "./Classes"
SONAR_TESTS: "./Tests"
script:
- echo "sonar.projectKey=cart_payone-3.x" > sonar-project.properties
- gitlab-sonar-scanner -Dsonar.php.coverage.reportPath=phpunit.coverage.xml -Dsonar.php.tests.reportPath=phpunit.report.xml
34 changes: 0 additions & 34 deletions .styleci.yml

This file was deleted.

12 changes: 6 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ matrix:
fast_finish: true
include:
- php: 7.2
env: TYPO3_VERSION=^9.5
env: TYPO3_VERSION=^10.4
- php: 7.3
env: TYPO3_VERSION=^9.5
env: TYPO3_VERSION=^10.4
- php: 7.4
env: TYPO3_VERSION=^9.5
env: TYPO3_VERSION=^10.4

cache:
directories:
Expand All @@ -34,15 +34,15 @@ before_install:
before_script:
- composer require typo3/cms-core=$TYPO3_VERSION
- git checkout composer.json
- export TYPO3_PATH_WEB="$PWD/.Build/Web"
- export TYPO3_PATH_WEB="$PWD/.build/public"

script:
- >
echo;
echo "Running php lint";
find . -name \*.php ! -path "./.Build/*" | parallel --gnu php -d display_errors=stderr -l {} > /dev/null \;
find . -name \*.php ! -path "./.build/*" | parallel --gnu php -d display_errors=stderr -l {} > /dev/null \;
- >
echo;
echo "Running php-cs-fixer";
.Build/bin/php-cs-fixer fix --config=Build/.php_cs.dist -v --dry-run --using-cache=no --path-mode=intersection ./;
.build/bin/php-cs-fixer fix --config=Build/.php-cs-fixer.dist.php -v --dry-run --using-cache=no --path-mode=intersection ./;
5 changes: 2 additions & 3 deletions Build/.php_cs.dist → Build/.php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,14 @@
'ordered_imports' => true,
'single_quote' => true,
'no_empty_statement' => true,
'no_extra_consecutive_blank_lines' => true,
'phpdoc_no_package' => true,
'no_extra_blank_lines' => true,
'phpdoc_no_package' => true,
'phpdoc_scalar' => true,
'no_blank_lines_after_phpdoc' => true,
'array_syntax' => ['syntax' => 'short'],
'whitespace_after_comma_in_array' => true,
'function_typehint_space' => true,
'hash_to_slash_comment' => true,
'single_line_comment_style' => true,
'no_alias_functions' => true,
'lowercase_cast' => true,
'no_leading_namespace_whitespace' => true,
Expand Down
7 changes: 7 additions & 0 deletions Build/phplint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
path: ./../
jobs: 10
cache: .phplint.cache
extensions:
- php
exclude:
- .build
19 changes: 19 additions & 0 deletions Build/typoscriptlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
sniffs:
- class: Indentation
parameters:
useSpaces: true
indentPerLevel: 4
indentConditions: false
- class: DeadCode
- class: OperatorWhitespace
- class: RepeatingRValue
parameters:
allowedRightValues:
- "TYPO3\\CMS\\Frontend\\DataProcessing\\DatabaseQueryProcessor"
- class: DuplicateAssignment
- class: EmptySection
- class: NestingConsistency
parameters:
commonPathPrefixThreshold: 1
filePatterns:
- "*.typoscript"

0 comments on commit b175bcf

Please sign in to comment.