Skip to content

Commit

Permalink
[TASK] Make extension compatible to cart v5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
extcode committed Nov 4, 2019
1 parent 5524562 commit 754b8eb
Show file tree
Hide file tree
Showing 38 changed files with 905 additions and 596 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,5 @@ composer.lock

.php_cs.cache

Documentation/_make

.DS_Store
.idea
82 changes: 53 additions & 29 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,43 +4,67 @@ cache:
- .composer/
- .php_cs.cache

variables:
COMPOSER_CACHE_DIR: ".composer"
TYPO3_PATH_WEB: "$CI_PROJECT_DIR/.Build/Web"
MYSQL_DATABASE: "typo3"
MYSQL_ROOT_PASSWORD: "joh316"
typo3DatabaseName: "typo3"
typo3DatabaseHost: "mysql"
typo3DatabaseUsername: "root"
typo3DatabasePassword: "joh316"

before_script:
- apk add git --update

stages:
- test
- upload
- lint

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

ter-upload:
image: php:7.1-alpine
stage: upload
only:
- tags
lint:typoscriptcgl:
stage: lint
image: composer:1.6
script:
- composer remove typo3/cms-core --no-update
- composer install --no-progress --no-ansi --no-interaction
- .Build/bin/typoscript-lint -c tslint.yaml

lint:yaml:
stage: lint
image: python:alpine3.7
before_script:
- apk --no-cache add git zlib-dev libxml2-dev
- docker-php-ext-install mbstring zip soap
- curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
- export COMPOSER_CACHE_DIR=.composer
- pip install yamllint==1.10.0
script:
- yamllint -c Build/yamllint.yaml Configuration/ Resources/ .travis.yml

lint:php70:
stage: lint
image: php:7.0-alpine
script:
- find . -name \*.php -exec php -l "{}" \;

lint:php71:
stage: lint
image: php:7.1-alpine
script:
- find . -name \*.php -exec php -l "{}" \;

lint:php72:
stage: lint
image: php:7.2-alpine
script:
- find . -name \*.php -exec php -l "{}" \;

lint:php73:
stage: lint
image: php:7.3-alpine
script:
- composer install
- composer require namelesscoder/typo3-repository-client
- export TYPO3_PATH_WEB="$PWD/.Build/Web"
- >
if [ -n "$CI_COMMIT_TAG" ] && [ -n "$T3O_USERNAME" ] && [ -n "$T3O_PASSWORD" ]; then
echo -e "Preparing upload of release ${CI_COMMIT_TAG} to TER\n"
# Cleanup before we upload
git reset --hard HEAD && git clean -fx
# Upload
TAG_MESSAGE=`git tag -n10 -l $CI_COMMIT_TAG | sed 's/^[0-9.]*[ ]*//g'`
echo "Uploading release ${CI_COMMIT_TAG} to TER"
.Build/bin/upload . "$T3O_USERNAME" "$T3O_PASSWORD" "$TAG_MESSAGE"
fi;
- find . -name \*.php -exec php -l "{}" \;
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ sudo: false
matrix:
fast_finish: true
include:
- php: 7.0
- php: 7.2
env: TYPO3_VERSION=^8.7

cache:
Expand Down Expand Up @@ -41,4 +41,4 @@ script:
- >
echo;
echo "Running php-cs-fixer";
.Build/bin/php-cs-fixer fix --config=.php_cs.dist -v --dry-run --using-cache=no --path-mode=intersection ./;
.Build/bin/php-cs-fixer fix --config=Build/.php_cs.dist -v --dry-run --using-cache=no --path-mode=intersection ./;
15 changes: 12 additions & 3 deletions .php_cs.dist → Build/.php_cs.dist
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
if (PHP_SAPI !== 'cli') {
die('This script supports command line usage only. Please check your command.');
}
$finder = PhpCsFixer\Finder::create()
->in(__DIR__ . '/../');

return PhpCsFixer\Config::create()
->setRiskyAllowed(true)
->setRules([
Expand All @@ -20,6 +19,7 @@ return PhpCsFixer\Config::create()
'no_empty_statement' => true,
'no_extra_consecutive_blank_lines' => true,
'phpdoc_no_package' => true,
'phpdoc_no_package' => true,
'phpdoc_scalar' => true,
'no_blank_lines_after_phpdoc' => true,
'array_syntax' => ['syntax' => 'short'],
Expand All @@ -36,4 +36,13 @@ return PhpCsFixer\Config::create()
'phpdoc_no_empty_return' => true,
'phpdoc_trim' => true
])
->setFinder($finder);
->setFinder(
PhpCsFixer\Finder::create()
->in(__DIR__ . '/../')
->exclude('.Build')
->exclude('Documentation')
->exclude('Resources')
->notName('ext_emconf.php')
->notName('ext_localconf.php')
->notName('ext_tables.php')
);
23 changes: 23 additions & 0 deletions Build/yamllint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
extends: default

rules:
line-length: disable
document-start: disable
braces:
min-spaces-inside-empty: 1
max-spaces-inside-empty: 1
brackets:
min-spaces-inside-empty: 1
max-spaces-inside-empty: 1
comments:
level: error
min-spaces-from-content: 1
comments-indentation:
level: error
empty-lines:
max: 1
empty-values:
forbid-in-block-mappings: true
forbid-in-flow-mappings: true
indentation:
spaces: 2
5 changes: 0 additions & 5 deletions ChangeLog

This file was deleted.

0 comments on commit 754b8eb

Please sign in to comment.