diff --git a/Resources/Build/.editorconfig b/.editorconfig similarity index 100% rename from Resources/Build/.editorconfig rename to .editorconfig diff --git a/.php_cs.dist b/.php_cs.dist new file mode 100644 index 0000000..c90af31 --- /dev/null +++ b/.php_cs.dist @@ -0,0 +1,67 @@ +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('Contrib') + ->in(__DIR__) + ); diff --git a/Classes/ViewHelpers/Format/DateViewHelper.php b/Classes/ViewHelpers/Format/DateViewHelper.php index 30ec6f7..4b8d90b 100644 --- a/Classes/ViewHelpers/Format/DateViewHelper.php +++ b/Classes/ViewHelpers/Format/DateViewHelper.php @@ -14,7 +14,7 @@ * With Type Config * {dateObject -> s:format.date(type:'medium')} * - * {dateObject} + * {dateObject} * * * = Required TypoScript-Configuration = @@ -28,13 +28,11 @@ * } * } */ - use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper; /** * Class DateViewHelper * - * @package Vendor\Yourext\ViewHelpers\Format */ class DateViewHelper extends AbstractViewHelper { @@ -78,11 +76,12 @@ public function render($date = null, $type = null) if (!$date instanceof \DateTime) { try { - $date = is_integer($date) ? new \DateTime('@' . $date) : new \DateTime($date); + $date = is_int($date) ? new \DateTime('@' . $date) : new \DateTime($date); $date->setTimezone(new \DateTimeZone(date_default_timezone_get())); } catch (\Exception $exception) { throw new \Exception( - '"' . $date . '" could not be parsed by \DateTime constructor.', 1241722579 + '"' . $date . '" could not be parsed by \DateTime constructor.', + 1241722579 ); } } diff --git a/Configuration/TCA/tt_content.php b/Configuration/TCA/tt_content.php index c516477..25bf031 100644 --- a/Configuration/TCA/tt_content.php +++ b/Configuration/TCA/tt_content.php @@ -13,7 +13,7 @@ 'before' ); -$global_fields = array(); +$global_fields = []; ExtensionManagementUtility::addTCAcolumns('tt_content', $global_fields); diff --git a/Configuration/TCA/tt_content_textimage.php b/Configuration/TCA/tt_content_textimage.php index eba6b8d..d6e1a7a 100644 --- a/Configuration/TCA/tt_content_textimage.php +++ b/Configuration/TCA/tt_content_textimage.php @@ -2,7 +2,6 @@ /** * Startpilot Content Element | startpilot_textimage */ - use TYPO3\CMS\Core\Utility\ExtensionManagementUtility; /*************** diff --git a/Configuration/TypoScript/constants.txt b/Configuration/TypoScript/constants.txt index 41ba502..aa47071 100755 --- a/Configuration/TypoScript/constants.txt +++ b/Configuration/TypoScript/constants.txt @@ -30,7 +30,7 @@ googleanalytics = # customsubcategory=300=Meta page.meta { # cat=startpilot: Meta/400/100; type=string; label=viewport - viewport = user-scalable=yes, width=device-width, initial-scale=1 + viewport = width=device-width, initial-scale=1, shrink-to-fit=no # cat=startpilot: Meta/400/110; type=string; label=robots robots = index,follow # cat=startpilot: Meta/400/120; type=string; label=apple-mobile-web-app-capable diff --git a/Resources/Build/Assets/JavaScript/main.js b/Resources/Build/Assets/JavaScript/main.js index b1b0841..c17dcd9 100755 --- a/Resources/Build/Assets/JavaScript/main.js +++ b/Resources/Build/Assets/JavaScript/main.js @@ -2,18 +2,10 @@ * Load jQuery into global `$` for plugin usage * @type {jQuery} */ -window.$ = window.jQuery = require('jquery/dist/jquery'); +window.$ = window.jQuery = require('jquery'); +window.Popper = require('popper.js'); // Bootstrap 4-beta.2 dependencies -/** - * Load Popper into global for plugin usage - * @type {Popper} - */ -window.Popper = require('popper.js'); - -/** - * Load Bootstrap - */ -require('bootstrap'); +require('bootstrap'); // Bootstrap /** * Say hello diff --git a/Resources/Build/Assets/Scss/base/_b-bootstrap-variables.scss b/Resources/Build/Assets/Scss/base/_b-bootstrap-variables.scss index 62035aa..a56db37 100644 --- a/Resources/Build/Assets/Scss/base/_b-bootstrap-variables.scss +++ b/Resources/Build/Assets/Scss/base/_b-bootstrap-variables.scss @@ -2,5 +2,5 @@ // // Colors // -$white: $color-white; -$black: $color-black; +$white: $color-white; +$black: $color-black; diff --git a/Resources/Build/Assets/Scss/main.scss b/Resources/Build/Assets/Scss/main.scss index f8fb6d6..3af1d8c 100644 --- a/Resources/Build/Assets/Scss/main.scss +++ b/Resources/Build/Assets/Scss/main.scss @@ -23,6 +23,7 @@ @import "../../node_modules/bootstrap/scss/buttons"; @import "../../node_modules/bootstrap/scss/nav"; @import "../../node_modules/bootstrap/scss/navbar"; +@import "../../node_modules/bootstrap/scss/transitions"; // utilities //@import "../../node_modules/bootstrap/scss/utilities/flex"; diff --git a/Resources/Build/gulpfile.js b/Resources/Build/gulpfile.js index 2d2a2b7..61e68e5 100644 --- a/Resources/Build/gulpfile.js +++ b/Resources/Build/gulpfile.js @@ -30,7 +30,7 @@ gulp.task('watch', function () { log('blue', 'File ' + destFilePath + ' deleted.'); del.sync(destFilePath, { force: true }); } - } + }; const syncDel = function(src) { if(path.basename(src) != '.DS_Store') { @@ -42,7 +42,7 @@ gulp.task('watch', function () { log('blue', 'File ' + destFilePath + ' deleted.'); del.sync(destFilePath, { force: true }); } - } + }; // watch styles @@ -84,5 +84,5 @@ gulp.task('watch', function () { gulp.task('build', gulp.series('clean', 'css', 'fonts', 'misc', 'ckeditor', 'image', 'javascript')); -gulp.task('ci', gulp.series('css:lint', 'javascript:lint')); +gulp.task('ci', gulp.series('css:format', 'css:lint', 'javascript:lint')); gulp.task('default', gulp.series('build', gulp.parallel('watch'))); diff --git a/Resources/Build/package-lock.json b/Resources/Build/package-lock.json index 9f01178..57398d6 100644 --- a/Resources/Build/package-lock.json +++ b/Resources/Build/package-lock.json @@ -1249,9 +1249,9 @@ } }, "bootstrap": { - "version": "4.0.0-beta", - "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-4.0.0-beta.tgz", - "integrity": "sha512-I/r3fYtUZr+rUNkh8HI+twxZ56p6ehNn27eA1XSebLVQKAJ2xZHnEvZrSR+UR2A/bONcd9gHC3xatVhQlH6R6w==" + "version": "4.0.0-beta.2", + "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-4.0.0-beta.2.tgz", + "integrity": "sha512-DzGtdTlKbrMoGMpz0LigKSqJ+MgtFKxA791PU/q062OlRG0HybNZcTLH7rpDAmLS66Y3esN9yzKHLLbqa5UR3w==" }, "brace-expansion": { "version": "1.1.8", @@ -8671,6 +8671,11 @@ "integrity": "sha1-0aIUg/0iu0HlihL6NCGCMUCJfEU=", "dev": true }, + "popper.js": { + "version": "1.12.9", + "resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.12.9.tgz", + "integrity": "sha1-DfvC3/lsRRuzMu3Pz6r1ZtMx1bM=" + }, "portscanner": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/portscanner/-/portscanner-2.1.1.tgz", diff --git a/Resources/Build/package.json b/Resources/Build/package.json index 992581a..321ebb9 100644 --- a/Resources/Build/package.json +++ b/Resources/Build/package.json @@ -1,10 +1,10 @@ { "name": "startpilot", - "version": "0.0.1", + "version": "1.0.3", "private": true, "main": "Gulpfile.js", "dependencies": { - "bootstrap": "^4.0.0-beta", + "bootstrap": "^4.0.0-beta.2", "jquery": "^3.2.1", "popper.js": "^1.12.0" }, @@ -36,7 +36,7 @@ "gutil-color-log": "^1.0.2", "path": "^0.12.7", "vinyl-buffer": "^1.0.0", - "vinyl-source-stream": "^1.1.0" + "vinyl-source-stream": "^2.0.0" }, "config": { "path": { diff --git a/Resources/Private/ContentElements/Partials/ImageRender.html b/Resources/Private/ContentElements/Partials/ImageRender.html index ed28fbc..4ffc4fd 100644 --- a/Resources/Private/ContentElements/Partials/ImageRender.html +++ b/Resources/Private/ContentElements/Partials/ImageRender.html @@ -56,7 +56,7 @@ - + - - \ No newline at end of file + + diff --git a/composer.json b/composer.json index c0e3307..5d28f43 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "Vendor/Yourext", "description": "TYPO3 Provider Extension", "type": "typo3-cms-extension", - "version": "1.0.2", + "version": "1.0.3", "require": { "typo3/cms": "^8.7.7" }, diff --git a/ext_emconf.php b/ext_emconf.php index 9136908..b11d7ec 100755 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -1,24 +1,24 @@ 'TYPO3 Provider Extension', 'description' => '', 'category' => 'templates', - 'version' => '1.0.0', + 'version' => '1.0.3', 'state' => 'stable', 'clearcacheonload' => 1, 'author' => 'Boris Schauer, Analog, Medienagenten', 'author_email' => 'me@bschauer.de, info@analog.de, info@medienagenten.de', 'author_company' => '', 'generator' => 'startpilot', - 'constraints' => array( - 'depends' => array( + 'constraints' => [ + 'depends' => [ 'typo3' => '8.7.*', 'rte_ckeditor' => '8.7.*' - ), - 'conflicts' => array( + ], + 'conflicts' => [ 'fluidpages' => '*', 'themes' => '*', - ), - ), -); + ], + ], +]; diff --git a/ext_localconf.php b/ext_localconf.php index 272d879..844092c 100755 --- a/ext_localconf.php +++ b/ext_localconf.php @@ -7,7 +7,6 @@ use TYPO3\CMS\Core\Utility\ExtensionManagementUtility; if (TYPO3_MODE === 'BE') { - $iconRegistry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance( \TYPO3\CMS\Core\Imaging\IconRegistry::class ); @@ -125,10 +124,8 @@ if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf'][$_EXTKEY])) { $GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf'][$_EXTKEY] = serialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf'][$_EXTKEY]); } - } - /*************** * Install Tool Settings */ diff --git a/readme.md b/readme.md index 6032516..fce2f58 100644 --- a/readme.md +++ b/readme.md @@ -1,4 +1,4 @@ -# Startpilot - Typo3 provider extension with some basics +# Startpilot - TYPO3 provider extension with some basics ## How to use: