diff --git a/.gitignore b/.gitignore index 42666dcee..0ce0c0baf 100644 --- a/.gitignore +++ b/.gitignore @@ -127,3 +127,4 @@ deployment_identifier # Ignore phpunit.xml, only phpunit.xml.dist should be committed. phpunit.xml +symfony.lock diff --git a/.travis.yml b/.travis.yml index c110d5656..cb268c8c6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -45,14 +45,19 @@ before_install: # Exit build early if only documentation was changed in a Pull Request. - source ${BLT_DIR}/scripts/travis/exit_early # Decrypt private SSH key id_rsa_blt.enc, save as ~/.ssh/id_rsa_blt. - - if [[ "$TRAVIS_PULL_REQUEST" == "false" ]]; then openssl aes-256-cbc -K $encrypted_c0b166e924da_key -iv $encrypted_c0b166e924da_iv -in id_rsa_blt.enc -out ~/.ssh/id_rsa -d; chmod 600 ~/.ssh/id_rsa; ls -lash ~/.ssh; eval "$(ssh-agent -s)"; ssh-add ~/.ssh/id_rsa; fi + #- if [[ "$TRAVIS_PULL_REQUEST" == "false" ]]; then openssl aes-256-cbc -K $encrypted_c0b166e924da_key -iv $encrypted_c0b166e924da_iv -in id_rsa_blt.enc -out ~/.ssh/id_rsa -d; chmod 600 ~/.ssh/id_rsa; ls -lash ~/.ssh; eval "$(ssh-agent -s)"; ssh-add ~/.ssh/id_rsa; fi - echo "extension = memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini - sudo service memcached status - phpenv config-rm xdebug.ini - phpenv config-add travis.php.ini - - composer self-update + - composer self-update 1.7.2 + - composer -V + - composer clear-cache + - export COMPOSER_PROCESS_TIMEOUT=2000 + - ls -la $HOME - composer validate --no-check-all --ansi - - composer install + - composer install -vvv + - composer -n info install: - source ${BLT_DIR}/scripts/travis/setup_environment @@ -82,12 +87,4 @@ before_deploy: after_success: # - ./vendor/bin/coveralls -vvv -deploy: - - provider: script - # Deploys build artifact's source branch to acquia-pso/blted8 on GitHub. - script: ${BLT_DIR}/scripts/blt/ci/internal/deploy_blted8.sh - skip_cleanup: true - on: - branch: $DEPLOY_SOURCE_BRANCH - php: 5.6 - condition: $DRUPAL_CORE_VERSION = default + diff --git a/composer.json b/composer.json index d6ec99bcb..5fffa5b6c 100644 --- a/composer.json +++ b/composer.json @@ -26,7 +26,7 @@ "doctrine/common": "^2.5", "doctrine/inflector": "~1.1.0", "drupal/coder": "^8.3.1", - "drush/drush": "^9.4.0", + "drush/drush": "9.5.2", "grasmash/drupal-security-warning": "^1.0.0", "grasmash/yaml-cli": "^1.0.0", "grasmash/yaml-expander": "^1.2.0", @@ -38,7 +38,8 @@ "symfony/yaml": "^3.2.8", "tivie/php-os-detector": "^1.0", "typhonius/acquia-php-sdk-v2": "^1.0.3", - "wikimedia/composer-merge-plugin": "^1.4.1" + "wikimedia/composer-merge-plugin": "^1.4.1", + "consolidation/site-alias": "^1.1.11|^2" }, "autoload": { "psr-4": { @@ -69,6 +70,14 @@ "typhonius/acquia_cli": "^1.0", "davereid/drush-acquia-hook-invoke": "dev-master" }, + "scripts": { + "pre-install-cmd": [ + "composer dump-autoload --optimize --classmap-authoritative" + ], + "pre-update-cmd": [ + "composer dump-autoload --optimize --classmap-authoritative" + ] + }, "minimum-stability": "dev", "prefer-stable": true, "require-dev": { diff --git a/composer.required.json b/composer.required.json index 6e8dc4892..30cdc800a 100644 --- a/composer.required.json +++ b/composer.required.json @@ -1,3 +1,4 @@ + { "repositories": { "drupal": { @@ -6,20 +7,23 @@ } }, "require": { - "drupal/core": "^8.6.0", - "drupal/config_split": "^1.0.0" + "drupal/config_split": "^1.0.0", + "drupal/core": "^8.6.0" }, "require-dev": { "behat/behat": ">=3.1 <3.4", + "behat/mink": "^1.7", + "behat/mink-extension": "^2.2", "bex/behat-screenshot": "^1.2", "drupal/drupal-extension": "~3.2", + "composer/installers": "^1.2.0", "drupal-composer/drupal-scaffold": "^2.1.0", "jarnaiz/behat-junit-formatter": "^1.3.2", "se/selenium-server-standalone": "^2.53", "jakoch/phantomjs-installer": "2.1.1-p07", "dmore/behat-chrome-extension": "^1.0.0", "sensiolabs-de/deprecation-detector": "dev-master", - "webflo/drupal-core-require-dev": "^8.6.0" + "webflo/drupal-core-require-dev": "8.6.3" }, "autoload-dev": { "psr-4": { diff --git a/phpcs.xml.dist b/phpcs.xml.dist index b15937b0b..1f537177e 100644 --- a/phpcs.xml.dist +++ b/phpcs.xml.dist @@ -28,11 +28,11 @@ scripts/blt/examples src/Robo settings - tests template/blt */node_modules */vendor + tests */default.local.settings.php diff --git a/settings/blt.settings.php b/settings/blt.settings.php index 1b5dee291..3bad845c6 100644 --- a/settings/blt.settings.php +++ b/settings/blt.settings.php @@ -151,7 +151,7 @@ $name = array_slice($domain_fragments, 1); $acsf_sites = $blt_config->get('multisites'); if (in_array($name, $acsf_sites)) { - $acsf_site_name = $name; + $_acsf_site_name = $name; } } } diff --git a/template/.gitattributes b/template/.gitattributes index 58251f6f4..a0bc17b3a 100644 --- a/template/.gitattributes +++ b/template/.gitattributes @@ -79,3 +79,9 @@ *.PDF -text diff *.jar -text diff *.JAR -text diff + + + +/.gitattributes export-ignore +/symfony.lock export-ignore +/composer.lock export-ignore \ No newline at end of file diff --git a/template/composer.json b/template/composer.json index a925cd7aa..537e2324a 100644 --- a/template/composer.json +++ b/template/composer.json @@ -2,9 +2,22 @@ "license": "proprietary", "type": "project", "config": { - "sort-packages": true + "sort-packages": true, + "optimize-autoloader": true }, - "require": {}, + "repositories": { + "drupal": { + "type": "composer", + "url": "https://packages.drupal.org/8" + }, + "asset-packagist": { + "type": "composer", + "url": "https://asset-packagist.org" + } + }, + "require": { + "zaporylie/composer-drupal-optimizations": "^1.0" + }, "require-dev": {}, "extra": { "enable-patching": true, @@ -32,6 +45,14 @@ "ignore-duplicates": true } }, + "scripts": { + "pre-install-cmd": [ + "composer dump-autoload --optimize --classmap-authoritative" + ], + "pre-update-cmd": [ + "composer dump-autoload --optimize --classmap-authoritative" + ] + }, "minimum-stability": "dev", "prefer-stable": true } diff --git a/tests/phpunit/bootstrap.php b/tests/phpunit/bootstrap.php index 075596e39..176840de3 100644 --- a/tests/phpunit/bootstrap.php +++ b/tests/phpunit/bootstrap.php @@ -7,4 +7,5 @@ use Acquia\Blt\Tests\SandboxManager; $sandbox_manager = new SandboxManager(); + $sandbox_manager->bootstrap(); diff --git a/tests/phpunit/src/SandboxManager.php b/tests/phpunit/src/SandboxManager.php index e27788bae..be5b7a13f 100644 --- a/tests/phpunit/src/SandboxManager.php +++ b/tests/phpunit/src/SandboxManager.php @@ -158,9 +158,11 @@ protected function installSandboxMasterDependencies() { $command = ''; $drupal_core_version = getenv('DRUPAL_CORE_VERSION'); if ($drupal_core_version && $drupal_core_version != 'default') { - $command .= 'composer require "drupal/core:' . $drupal_core_version . '" --no-update --no-interaction && '; + $command .= 'composer require "drupal/core:' . $drupal_core_version . '" --no-update --no-interaction "' + && '"composer require --dev --no-update webflo/drupal-core-require-dev:~"' . $drupal_core_version; } - $command .= 'composer install --prefer-dist --no-progress --no-suggest'; + + $command .= 'composer install --prefer-dist --no-progress --no-suggest -vvv'; $process = new Process($command, $this->sandboxMaster); $process->setTimeout(60 * 60); diff --git a/travis.php.ini b/travis.php.ini index 7999e9615..49791ca2c 100644 --- a/travis.php.ini +++ b/travis.php.ini @@ -1 +1,16 @@ memory_limit = -1 + +opcache.interned_strings_buffer=16 +opcache.log_verbosity_level=2 +opcache.max_accelerated_files=10000 +opcache.memory_consumption=96 +opcache.optimization_level=0 +opcache.revalidate_freq=0 +opcache.validate_timestamps=1 +opcache.revalidate_path=0 +opcache.max_file_size=0 +opcache.use_cwd=1 +opcache.load_comments=1 +opcache.save_comments=1 +opcache.fast_shutdown=1 +opcache.max_file_size=0 \ No newline at end of file