diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..9658489 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,76 @@ +# EditorConfig is awesome: http://EditorConfig.org + +# top-most EditorConfig file +root = true + +# Unix-style newlines with a newline ending every file +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true + +# CSS-Files +[*.css] +indent_style = space +indent_size = 4 + +# HTML-Files +[*.html] +indent_style = space +indent_size = 4 + +# TMPL-Files +[*.tmpl] +indent_style = space +indent_size = 4 + +# TSX-Files +[*.tsx] +indent_style = space +indent_size = 4 + +# LESS-Files +[*.less] +indent_style = space +indent_size = 4 + +# JS-Files +[*.js] +indent_style = space +indent_size = 4 + +# PHP-Files +[*.php] +indent_style = space +indent_size = 4 + +# MD-Files +[*.md] +indent_style = space +indent_size = 4 + +# ReST-Files +[*.rst] +indent_style = space +indent_size = 3 + +# TypoScript +[*.typoscript,*.ts] +indent_style = space +indent_size = 4 + +# YML-Files +[{*.yml,*.yaml}] +indent_style = space +indent_size = 2 + +# package.json, composer.json or .travis.yml +[{package.json,composer.json,.travis.yml}] +indent_style = space +indent_size = 2 + +# SCSS +[*.scss] +indent_style = tab +indent_size = 2 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6b8710a --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.git diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..90e897e --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,76 @@ +cache: + key: "$CI_COMMIT_REF_NAME-$CI_JOB_STAGE" + paths: + - .composer/ + +before_script: + - apk add git --update + +stages: + - php + - typoscript + - yaml + #- fluid + #- xliff + +.php: &phptesting + stage: php + image: php:$DOCKER_TAG + only: + - branches + before_script: + - export TYPO3_PATH_WEB="$PWD/.Build/Web" + - export COMPOSER_CACHE_DIR=.composer + - curl -OLs https://composer.github.io/installer.sig + - php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" + - 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;" + - php composer-setup.php --no-ansi --install-dir=/usr/bin --filename=composer + - php -r "unlink('composer-setup.php'); unlink('installer.sig');" + - composer require friendsofphp/php-cs-fixer + script: + - .Build/bin/php-cs-fixer fix --dry-run --config=.php_cs --diff + +# Tests in PHP 7.2 and TYPO3 9.5 version +php:testphp72:typo3_95: + <<: *phptesting + variables: + DOCKER_TAG: 7.2-alpine + # TYPO3_VERSION: ^9.5 + +typoscript:test: + image: composer:1.6 + stage: typoscript + before_script: + - export COMPOSER_CACHE_DIR=.composer + - composer require --dev helmich/typo3-typoscript-lint + script: + - .Build/bin/typoscript-lint -c tslint.yaml + +yaml:test: + image: python:alpine3.7 + stage: yaml + before_script: + - pip install yamllint==1.10.0 + script: + - yamllint -c .yamllint . + +#fluid:test: +# image: composer:1.6 +# stage: fluid +# before_script: +# - export COMPOSER_CACHE_DIR=.composer +# - composer require typo3fluid/fluid-lint:dev-master +# script: +# - .Build/bin/fluidlint Resources/Private/Templates/Default.html + +#xliff:test: +# image: composer:1.6 +# stage: xliff +# before_script: +# - export COMPOSER_CACHE_DIR=.composer +# #- apk --no-cache add libxml2-utils +# #- wget https://raw.githubusercontent.com/symfony/translation/v4.1.1/Resources/schemas/xliff-core-1.0-strict.xsd +# - composer require symfony/translation +# script: +# - .Build/bin/xlifflint /usr/local/bin/php lint:xliff /Resources/Private/Language +# #- xmllint --schema xliff-core-1.0-strict.xsd --noout $(find Resources -name '*.xlf') diff --git a/.php_cs b/.php_cs new file mode 100644 index 0000000..5968210 --- /dev/null +++ b/.php_cs @@ -0,0 +1,58 @@ +setRiskyAllowed(true) + ->setRules([ + '@PSR2' => true, + 'general_phpdoc_annotation_remove' => [ + 'author' + ], + 'no_leading_import_slash' => true, + 'no_trailing_comma_in_singleline_array' => true, + 'no_singleline_whitespace_before_semicolons' => true, + 'no_unused_imports' => true, + 'concat_space' => ['spacing' => 'one'], + 'no_whitespace_in_blank_line' => true, + 'ordered_imports' => true, + 'single_quote' => true, + 'no_empty_statement' => true, + 'no_extra_consecutive_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, + 'no_alias_functions' => true, + 'lowercase_cast' => true, + 'no_leading_namespace_whitespace' => true, + 'native_function_casing' => true, + 'self_accessor' => true, + 'no_short_bool_cast' => true, + 'no_unneeded_control_parentheses' => true + ]) + ->setFinder( + PhpCsFixer\Finder::create() + ->exclude('.build') + ->exclude('var') + //->exclude('public') + ->in(__DIR__) + ); diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..c43aa58 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,33 @@ +language: php + +php: + - 7.2 + +#env: +# - TYPO3_VERSON="9.5" + +sudo: false + +notifications: + email: false + +addons: + apt: + packages: + - parallel + +cache: + directories: + - $HOME/.composer/cache + +before_script: + #- composer require typo3/minimal ${TYPO3_VERSON} --update-with-dependencies + #- composer require nimut/testing-framework + - composer require friendsofphp/php-cs-fixer + - composer require --dev helmich/typo3-typoscript-lint + - pip install yamllint==1.10.0 + +script: + - .Build/bin/php-cs-fixer fix --dry-run --config=.php_cs --diff + - .Build/bin/typoscript-lint -c tslint.yaml + - yamllint -c .yamllint . diff --git a/.yamllint b/.yamllint new file mode 100644 index 0000000..ab9266f --- /dev/null +++ b/.yamllint @@ -0,0 +1,35 @@ +--- + +extends: default + +rules: + braces: + level: warning + max-spaces-inside: 1 + brackets: + level: warning + max-spaces-inside: 1 + colons: + level: warning + commas: + level: warning + comments: disable + comments-indentation: disable + document-start: disable + empty-lines: + level: warning + hyphens: + level: warning + indentation: + spaces: 2 + level: warning + indent-sequences: consistent + line-length: disable + line-length: + max: 999 + level: warning + allow-non-breakable-inline-mappings: true + truthy: disable + +ignore: | + /.ddev/ diff --git a/README.md b/README.md index a96db7f..2d045b2 100755 --- a/README.md +++ b/README.md @@ -1,2 +1,4 @@ -# [NITSAN] Guestbook -https://extensions.typo3.org/extension/ns_guestbook/ +# ns_guestbook + +- FREE version: You can download FREE version with basic-features at https://extensions.typo3.org/extension/ns_guestbook/ +- PRO version: You can download PRO version with more-features & free-support at https://t3terminal.com/typo3-guestbook-plugin-free/ \ No newline at end of file diff --git a/composer.json b/composer.json index 57db36a..2bcb4cc 100755 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "nitsan/ns-guestbook", "type": "typo3-cms-extension", - "description": "One of the only TYPO3 extension which provides to integrate all the features of Guestbook like review form with send mail, list of guest. Know more from extension manual.", + "description": "One of the only TYPO3 extension which provides to integrate all the features of Guestbook like review form with send mail, list of guest. Know more from extension manual. You can download PRO version for more-features & free-support at https://t3terminal.com/typo3-guestbook-plugin-free/", "homepage": "https://extensions.typo3.org/extension/ns_guestbook/", "license": "GPL-2.0+", "keywords": [ @@ -25,7 +25,6 @@ } }, "replace": { - "ns_guestbook": "self.version", "nitsan/ns-guestbook": "self.version" }, "extra": { diff --git a/ext_emconf.php b/ext_emconf.php index 00ff7bd..b16db35 100755 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -1,20 +1,10 @@ '[NITSAN] Guestbook', - 'description' => 'One of the only TYPO3 extension which provides to integrate all the features of Guestbook like review form with send mail, list of guest. Know more from extension manual.', + 'title' => '[NITSAN] Guestbook TYPO3 Plugin', + 'description' => 'One of the only TYPO3 extension which provides to integrate all the features of Guestbook like review form with send mail, list of guest. Demo: https://demo.t3terminal.com/t3t-extensions/guestbook/ You can download PRO version for more-features & free-support at https://t3terminal.com/typo3-guestbook-plugin-free/', 'category' => 'plugin', - 'author' => 'T3:Milan Rathod, T3:Keval Pandya, FE:Mehul Nimavat, QA:Siddharth Sheth ', + 'author' => 'T3:Milan Rathod, T3:Keval Pandya, FE:Mehul Nimavat, QA:Siddharth Sheth', 'author_email' => 'sanjay@nitsan.in', 'author_company' => 'NITSAN Technologies Pvt Ltd', 'state' => 'stable', @@ -22,7 +12,7 @@ 'uploadfolder' => '0', 'createDirs' => '', 'clearCacheOnLoad' => 0, - 'version' => '1.0.1', + 'version' => '1.1.0', 'constraints' => array( 'depends' => array( 'typo3' => '6.0.0-9.5.99', diff --git a/ext_icon.gif b/ext_icon.gif old mode 100755 new mode 100644 diff --git a/tslint.yaml b/tslint.yaml new file mode 100644 index 0000000..7029b2a --- /dev/null +++ b/tslint.yaml @@ -0,0 +1,14 @@ +paths: + - Configuration + +filePatterns: + - "*.ts" + +sniffs: + - class: Indentation + parameters: + indentConditions: true + - class: RepeatingRValue + disabled: true + - class: DeadCode + disabled: true