diff --git a/.gitignore b/.gitignore index 53c9624..ed85dbe 100644 --- a/.gitignore +++ b/.gitignore @@ -3,12 +3,8 @@ /.php_cs /.php_cs.cache /composer.lock -/Resources -/!Resources/Private/Templates/* -/TODO.md +/Resources/Private/Page.html +/Resources/Public +/Resources/Private/Php/Libraries/vendor /phpunit.xml -/build /var -/Libraries/* -!/Libraries/composer.json -!/Libraries/composer.lock diff --git a/.travis.yml b/.travis.yml index 9cc6b68..16b4ded 100644 --- a/.travis.yml +++ b/.travis.yml @@ -67,3 +67,25 @@ script: export typo3DatabaseUsername="root"; export typo3DatabasePassword=""; find 'Tests/Functional' -wholename '*Test.php' | parallel --gnu 'echo; echo "Running functional test suite {}"; .Build/bin/phpunit --colors -c .Build/vendor/nimut/testing-framework/res/Configuration/FunctionalTests.xml {}' + +jobs: + fast_finish: true + include: + - stage: 🚢 to TER + if: tag IS present + php: 7.2 + install: skip + before_script: skip + script: + - | + if [ -n "$TYPO3_ORG_USERNAME" ] && [ -n "$TYPO3_ORG_PASSWORD" ]; then + echo -e "Preparing upload of release ${TRAVIS_TAG} to TER\n"; + # Install ter client + composer global require helhum/ter-client + # Install dependencies + composer run-script extension-build + # Upload + TAG_MESSAGE=`git tag -n10 -l $TRAVIS_TAG | sed 's/^[0-9.]*[ ]*//g'` + echo "Uploading release ${TRAVIS_TAG} to TER" + $HOME/.composer/vendor/bin/ter-client upload typo3_encore . -u "$TYPO3_ORG_USERNAME" -p "$TYPO3_ORG_PASSWORD" -m "$TAG_MESSAGE" + fi; diff --git a/Resources/Private/Php/Libraries/composer.json b/Resources/Private/Php/Libraries/composer.json new file mode 100644 index 0000000..b87084f --- /dev/null +++ b/Resources/Private/Php/Libraries/composer.json @@ -0,0 +1,13 @@ +{ + "config": { + "platform": { + "php": "7.2.5" + }, + "classmap-authoritative": true, + "prepend-autoloader": false + }, + "require": { + "symfony/web-link": "^4.3", + "symfony/asset": "^5.0" + } +} diff --git a/Resources/Private/Php/Libraries/composer.lock b/Resources/Private/Php/Libraries/composer.lock new file mode 100644 index 0000000..727f1a0 --- /dev/null +++ b/Resources/Private/Php/Libraries/composer.lock @@ -0,0 +1,257 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "d3b311570a0602d0c42b441f5b86a632", + "packages": [ + { + "name": "psr/link", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/link.git", + "reference": "eea8e8662d5cd3ae4517c9b864493f59fca95562" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/link/zipball/eea8e8662d5cd3ae4517c9b864493f59fca95562", + "reference": "eea8e8662d5cd3ae4517c9b864493f59fca95562", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Link\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interfaces for HTTP links", + "keywords": [ + "http", + "http-link", + "link", + "psr", + "psr-13", + "rest" + ], + "time": "2016-10-28T16:06:13+00:00" + }, + { + "name": "symfony/asset", + "version": "v5.0.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/asset.git", + "reference": "447190a24309da88f816313824d85c303035f86b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/asset/zipball/447190a24309da88f816313824d85c303035f86b", + "reference": "447190a24309da88f816313824d85c303035f86b", + "shasum": "" + }, + "require": { + "php": "^7.2.5" + }, + "require-dev": { + "symfony/http-foundation": "^4.4|^5.0", + "symfony/http-kernel": "^4.4|^5.0" + }, + "suggest": { + "symfony/http-foundation": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Asset\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Asset Component", + "homepage": "https://symfony.com", + "time": "2020-01-04T14:08:26+00:00" + }, + { + "name": "symfony/polyfill-php72", + "version": "v1.14.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php72.git", + "reference": "46ecacf4751dd0dc81e4f6bf01dbf9da1dc1dadf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/46ecacf4751dd0dc81e4f6bf01dbf9da1dc1dadf", + "reference": "46ecacf4751dd0dc81e4f6bf01dbf9da1dc1dadf", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.14-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php72\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "time": "2020-01-13T11:15:53+00:00" + }, + { + "name": "symfony/web-link", + "version": "v4.4.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/web-link.git", + "reference": "dad60d94b2e7f16e1a7d0ebd0f1f460f45a51386" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/web-link/zipball/dad60d94b2e7f16e1a7d0ebd0f1f460f45a51386", + "reference": "dad60d94b2e7f16e1a7d0ebd0f1f460f45a51386", + "shasum": "" + }, + "require": { + "php": "^7.1.3", + "psr/link": "^1.0", + "symfony/polyfill-php72": "^1.5" + }, + "conflict": { + "symfony/http-kernel": "<4.3" + }, + "provide": { + "psr/link-implementation": "1.0" + }, + "require-dev": { + "symfony/http-foundation": "^4.4|^5.0", + "symfony/http-kernel": "^4.3|^5.0" + }, + "suggest": { + "symfony/http-kernel": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.4-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\WebLink\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Kévin Dunglas", + "email": "dunglas@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony WebLink Component", + "homepage": "https://symfony.com", + "keywords": [ + "dns-prefetch", + "http", + "http2", + "link", + "performance", + "prefetch", + "preload", + "prerender", + "psr13", + "push" + ], + "time": "2020-01-04T13:00:46+00:00" + } + ], + "packages-dev": [], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": [], + "platform-dev": [], + "platform-overrides": { + "php": "7.2.5" + } +} diff --git a/composer.json b/composer.json index 251fa8a..24d57da 100644 --- a/composer.json +++ b/composer.json @@ -55,6 +55,12 @@ "post-autoload-dump": [ "mkdir -p .Build/Web/typo3conf/ext/", "[ -L .Build/Web/typo3conf/ext/typo3_encore ] || ln -snvf ../../../../. .Build/Web/typo3conf/ext/typo3_encore" + ], + "extension-create-libs": [ + "@composer install -d Resources/Private/Php/Libraries" + ], + "extension-build": [ + "@extension-create-libs" ] }, "extra": { diff --git a/ext_localconf.php b/ext_localconf.php index 5d4ff65..8e63598 100644 --- a/ext_localconf.php +++ b/ext_localconf.php @@ -1,6 +1,5 @@ renderPreProcess'; }, 'typo3_encore'); + +if (!\TYPO3\CMS\Core\Core\Environment::isComposerMode()) { + require \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('typo3_encore') . '/Resources/Private/Php/Libraries/vendor/autoload.php'; +}