Skip to content

Commit 8d3097b

Browse files
- [TODO] Adding Gitlab-CI & Travis with PHP, TypoScript, YAML lints
- [TODO] Updating documentation - [TODO] Added demo link - [TODO] Releasing pro-version of the extenion at https://t3terminal.com/
1 parent d1b6632 commit 8d3097b

File tree

9 files changed

+262
-8
lines changed

9 files changed

+262
-8
lines changed

.editorconfig

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# EditorConfig is awesome: http://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
# Unix-style newlines with a newline ending every file
7+
[*]
8+
charset = utf-8
9+
end_of_line = lf
10+
insert_final_newline = true
11+
trim_trailing_whitespace = true
12+
13+
# CSS-Files
14+
[*.css]
15+
indent_style = space
16+
indent_size = 4
17+
18+
# HTML-Files
19+
[*.html]
20+
indent_style = space
21+
indent_size = 4
22+
23+
# TMPL-Files
24+
[*.tmpl]
25+
indent_style = space
26+
indent_size = 4
27+
28+
# TSX-Files
29+
[*.tsx]
30+
indent_style = space
31+
indent_size = 4
32+
33+
# LESS-Files
34+
[*.less]
35+
indent_style = space
36+
indent_size = 4
37+
38+
# JS-Files
39+
[*.js]
40+
indent_style = space
41+
indent_size = 4
42+
43+
# PHP-Files
44+
[*.php]
45+
indent_style = space
46+
indent_size = 4
47+
48+
# MD-Files
49+
[*.md]
50+
indent_style = space
51+
indent_size = 4
52+
53+
# ReST-Files
54+
[*.rst]
55+
indent_style = space
56+
indent_size = 3
57+
58+
# TypoScript
59+
[*.typoscript,*.ts]
60+
indent_style = space
61+
indent_size = 4
62+
63+
# YML-Files
64+
[{*.yml,*.yaml}]
65+
indent_style = space
66+
indent_size = 2
67+
68+
# package.json, composer.json or .travis.yml
69+
[{package.json,composer.json,.travis.yml}]
70+
indent_style = space
71+
indent_size = 2
72+
73+
# SCSS
74+
[*.scss]
75+
indent_style = tab
76+
indent_size = 2

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.git

.gitlab-ci.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
cache:
2+
key: "$CI_COMMIT_REF_NAME-$CI_JOB_STAGE"
3+
paths:
4+
- .composer/
5+
6+
before_script:
7+
- apk add git --update
8+
9+
stages:
10+
- php
11+
- typoscript
12+
- yaml
13+
#- fluid
14+
#- xliff
15+
16+
.php: &phptesting
17+
stage: php
18+
image: php:$DOCKER_TAG
19+
only:
20+
- branches
21+
before_script:
22+
- export TYPO3_PATH_WEB="$PWD/.Build/Web"
23+
- export COMPOSER_CACHE_DIR=.composer
24+
- curl -OLs https://composer.github.io/installer.sig
25+
- php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
26+
- php -r "if (hash_file('SHA384', 'composer-setup.php') === trim(file_get_contents('installer.sig'))) { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
27+
- php composer-setup.php --no-ansi --install-dir=/usr/bin --filename=composer
28+
- php -r "unlink('composer-setup.php'); unlink('installer.sig');"
29+
- composer require friendsofphp/php-cs-fixer
30+
script:
31+
- .Build/bin/php-cs-fixer fix --dry-run --config=.php_cs --diff
32+
33+
# Tests in PHP 7.2 and TYPO3 9.5 version
34+
php:testphp72:typo3_95:
35+
<<: *phptesting
36+
variables:
37+
DOCKER_TAG: 7.2-alpine
38+
# TYPO3_VERSION: ^9.5
39+
40+
typoscript:test:
41+
image: composer:1.6
42+
stage: typoscript
43+
before_script:
44+
- export COMPOSER_CACHE_DIR=.composer
45+
- composer require --dev helmich/typo3-typoscript-lint
46+
script:
47+
- .Build/bin/typoscript-lint -c tslint.yaml
48+
49+
yaml:test:
50+
image: python:alpine3.7
51+
stage: yaml
52+
before_script:
53+
- pip install yamllint==1.10.0
54+
script:
55+
- yamllint -c .yamllint .
56+
57+
#fluid:test:
58+
# image: composer:1.6
59+
# stage: fluid
60+
# before_script:
61+
# - export COMPOSER_CACHE_DIR=.composer
62+
# - composer require typo3fluid/fluid-lint:dev-master
63+
# script:
64+
# - .Build/bin/fluidlint Resources/Private/Templates/Default.html
65+
66+
#xliff:test:
67+
# image: composer:1.6
68+
# stage: xliff
69+
# before_script:
70+
# - export COMPOSER_CACHE_DIR=.composer
71+
# #- apk --no-cache add libxml2-utils
72+
# #- wget https://raw.githubusercontent.com/symfony/translation/v4.1.1/Resources/schemas/xliff-core-1.0-strict.xsd
73+
# - composer require symfony/translation
74+
# script:
75+
# - .Build/bin/xlifflint /usr/local/bin/php lint:xliff /Resources/Private/Language
76+
# #- xmllint --schema xliff-core-1.0-strict.xsd --noout $(find Resources -name '*.xlf')

.php_cs

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
<?php
2+
/**
3+
* This file represents the configuration for Code Sniffing PSR-2-related
4+
* automatic checks of coding guidelines
5+
* Install @fabpot's great php-cs-fixer tool via
6+
*
7+
* $ composer global require friendsofphp/php-cs-fixer
8+
*
9+
* And then simply run
10+
*
11+
* $ php-cs-fixer fix
12+
*
13+
* For more information read:
14+
* http://www.php-fig.org/psr/psr-2/
15+
* http://cs.sensiolabs.org
16+
*/
17+
if (PHP_SAPI !== 'cli') {
18+
die('This script supports command line usage only. Please check your command.');
19+
}
20+
return PhpCsFixer\Config::create()
21+
->setRiskyAllowed(true)
22+
->setRules([
23+
'@PSR2' => true,
24+
'general_phpdoc_annotation_remove' => [
25+
'author'
26+
],
27+
'no_leading_import_slash' => true,
28+
'no_trailing_comma_in_singleline_array' => true,
29+
'no_singleline_whitespace_before_semicolons' => true,
30+
'no_unused_imports' => true,
31+
'concat_space' => ['spacing' => 'one'],
32+
'no_whitespace_in_blank_line' => true,
33+
'ordered_imports' => true,
34+
'single_quote' => true,
35+
'no_empty_statement' => true,
36+
'no_extra_consecutive_blank_lines' => true,
37+
'phpdoc_no_package' => true,
38+
'phpdoc_scalar' => true,
39+
'no_blank_lines_after_phpdoc' => true,
40+
'array_syntax' => ['syntax' => 'short'],
41+
'whitespace_after_comma_in_array' => true,
42+
'function_typehint_space' => true,
43+
'hash_to_slash_comment' => true,
44+
'no_alias_functions' => true,
45+
'lowercase_cast' => true,
46+
'no_leading_namespace_whitespace' => true,
47+
'native_function_casing' => true,
48+
'self_accessor' => true,
49+
'no_short_bool_cast' => true,
50+
'no_unneeded_control_parentheses' => true
51+
])
52+
->setFinder(
53+
PhpCsFixer\Finder::create()
54+
->exclude('.build')
55+
->exclude('var')
56+
//->exclude('public')
57+
->in(__DIR__)
58+
);

.travis.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,11 @@ cache:
2323
before_script:
2424
#- composer require typo3/minimal ${TYPO3_VERSON} --update-with-dependencies
2525
#- composer require nimut/testing-framework
26-
- composer require squizlabs/php_codesniffer
26+
- composer require friendsofphp/php-cs-fixer
2727
- composer require --dev helmich/typo3-typoscript-lint
28+
- pip install yamllint==1.10.0
2829

2930
script:
30-
- .Build/bin/phpcs --standard=PSR2 --warning-severity=0 --extensions=php *
31+
- .Build/bin/php-cs-fixer fix --dry-run --config=.php_cs --diff
3132
- .Build/bin/typoscript-lint -c tslint.yaml
33+
- yamllint -c .yamllint .

.yamllint

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
3+
extends: default
4+
5+
rules:
6+
braces:
7+
level: warning
8+
max-spaces-inside: 1
9+
brackets:
10+
level: warning
11+
max-spaces-inside: 1
12+
colons:
13+
level: warning
14+
commas:
15+
level: warning
16+
comments: disable
17+
comments-indentation: disable
18+
document-start: disable
19+
empty-lines:
20+
level: warning
21+
hyphens:
22+
level: warning
23+
indentation:
24+
spaces: 2
25+
level: warning
26+
indent-sequences: consistent
27+
line-length: disable
28+
line-length:
29+
max: 999
30+
level: warning
31+
allow-non-breakable-inline-mappings: true
32+
truthy: disable
33+
34+
ignore: |
35+
/.ddev/

composer.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
{
22
"name": "nitsan/ns_ext_compatibility",
33
"type": "typo3-cms-extension",
4-
"description": "One of the only TYPO3 extension which provides all the features like TYPO3 Extensions Compatibility Report, Notification of new update via Email, System overview report, Compatible with all major version of TYPO3 from 4.x to 9.x. This extension will help you to check TYPO3 upgrade technical feasibility & complexity. You can download PRO version for more-features & free-support at https://t3terminal.com/typo3-extensions-compatibility-report-pro/",
5-
"homepage": "https://extensions.typo3.org/extension/ns_ext_compatibility/",
4+
"description": "One of the only TYPO3 extension which provides all the features like TYPO3 Extensions Compatibility Report, Notification of new update via Email, System overview report, Compatible with all major version of TYPO3 from 4.x to 9.x. This extension will help you to check TYPO3 upgrade technical feasibility & complexity. Demo: https://demo.t3terminal.com/t3t-extensions/extension-compatibility/ You can download PRO version for more-features & free-support at https://t3terminal.com/typo3-extensions-compatibility-report-pro/",
5+
"homepage": "https://t3terminal.com/typo3-extensions-compatibility-report-free/",
66
"license": "GPL-2.0+",
77
"keywords": [
88
"TYPO3",
99
"extension",
1010
"compatibility",
11-
"upgrade"
11+
"upgrade",
12+
"report",
13+
"backend",
14+
"version"
1215
],
1316
"authors": [
1417
{

ext_emconf.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
$EM_CONF[$_EXTKEY] = array(
44
'title' => '[NITSAN] TYPO3 Extensions Compatibility Report',
5-
'description' => 'One of the only TYPO3 extension which provides all the features like TYPO3 Extensions Compatibility Report, Notification of new update via Email, System overview report, Compatible with all major version of TYPO3 from 4.x to 9.x. This extension will help you to check TYPO3 upgrade technical feasibility & complexity. You can download PRO version for more-features & free-support at https://t3terminal.com/typo3-extensions-compatibility-report-pro/',
5+
'description' => 'One of the only TYPO3 extension which provides all the features like TYPO3 Extensions Compatibility Report, Notification of new update via Email, System overview report, Compatible with all major version of TYPO3 from 4.x to 9.x. This extension will help you to check TYPO3 upgrade technical feasibility & complexity. Demo: https://demo.t3terminal.com/t3t-extensions/extension-compatibility/ You can download PRO version for more-features & free-support at https://t3terminal.com/typo3-extensions-compatibility-report-pro/',
66
'category' => 'module',
77
'author' => 'T3:Keval Pandya, T3:Bhavin Barad, QA:Siddharth Sheth, QA:Vandna Kalivada',
88
'author_email' => 'sanjay@nitsan.in',
@@ -17,7 +17,7 @@
1717
'modify_tables' => '',
1818
'clearCacheOnLoad' => 0,
1919
'lockType' => '',
20-
'version' => '4.0.1',
20+
'version' => '4.0.2',
2121
'constraints' => array(
2222
'depends' => array(
2323
'typo3' => '4.5.0-9.5.99',

tslint.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
paths:
2-
- Configuration/TypoScript
2+
- Configuration
3+
4+
filePatterns:
5+
- "*.ts"
36

47
sniffs:
58
- class: Indentation

0 commit comments

Comments
 (0)