diff --git a/.travis.yml b/.travis.yml
index 887ee83ca..e5f7b83f4 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -10,6 +10,7 @@ cache:
directories:
- "$HOME/.composer/cache"
- "$HOME/.drush/cache"
+ - "$HOME/.rvm"
- "${TMPDIR:-/tmp}/phpstan/cache"
branches:
diff --git a/bin/orca.php b/bin/orca.php
index 3fa5079db..81313d44c 100644
--- a/bin/orca.php
+++ b/bin/orca.php
@@ -18,6 +18,7 @@
}
require __DIR__ . '/../vendor/autoload.php';
+ini_set('memory_limit', -1);
set_time_limit(0);
$input = new ArgvInput();
@@ -40,7 +41,11 @@
// command because a stale or corrupted cache would render it unusable--
// precisely when it is needed.
if (in_array($input->getFirstArgument(), ['cache:clear', 'cc'])) {
- (new Filesystem())->remove($kernel->getCacheDir());
+ $filesystem = new Filesystem();
+ $cache_dir = $kernel->getCacheDir();
+ $filesystem->remove($cache_dir);
+ $filesystem->mkdir($cache_dir);
+ $filesystem->touch("{$cache_dir}/.gitkeep");
exit;
}
diff --git a/bin/travis/after_script.sh b/bin/travis/after_script.sh
index 151353e42..0242cac78 100755
--- a/bin/travis/after_script.sh
+++ b/bin/travis/after_script.sh
@@ -7,10 +7,16 @@
# after_script.sh
#
# DESCRIPTION
-# Logs the job on cron if telemetry is enabled.
+# Conditionally logs the job and displays upstream ORCA status.
cd "$(dirname "$0")" || exit; source _includes.sh
+# Log the job on cron if telemetry is enabled.
if [[ "$TRAVIS_EVENT_TYPE" = "cron" && "$ORCA_TELEMETRY_ENABLE" && "$ORCA_AMPLITUDE_API_KEY" && "$ORCA_AMPLITUDE_USER_ID" ]]; then
orca internal:log-job
fi
+
+# Show ORCA's own current build status. A failure may signify an upstream issue
+# or service level outage that could have affected this build.
+# @see https://travis-ci.org/acquia/orca/branches
+travis history --no-interactive --repo=acquia/orca --branch=master --limit=1 --date
diff --git a/bin/travis/before_install.sh b/bin/travis/before_install.sh
index ff57a4c08..c71db9611 100755
--- a/bin/travis/before_install.sh
+++ b/bin/travis/before_install.sh
@@ -40,6 +40,9 @@ composer global require \
hirak/prestissimo \
zaporylie/composer-drupal-optimizations
+# Install Travis command line client.
+gem install travis
+
# Install ORCA.
composer -d"$ORCA_ROOT" install
diff --git a/bin/travis/script.sh b/bin/travis/script.sh
index 73a8d1633..2b2e2a836 100755
--- a/bin/travis/script.sh
+++ b/bin/travis/script.sh
@@ -25,10 +25,22 @@ case "$ORCA_JOB" in
"DEPRECATED_CODE_SCAN") eval "orca qa:deprecated-code-scan --sut=$ORCA_SUT_NAME" ;;
"DEPRECATED_CODE_SCAN_CONTRIB") eval "orca qa:deprecated-code-scan --contrib" ;;
"ISOLATED_RECOMMENDED") eval "orca qa:automated-tests --sut=$ORCA_SUT_NAME --sut-only" ;;
- "INTEGRATED_RECOMMENDED") eval "orca qa:automated-tests --sut=$ORCA_SUT_NAME $SUT_ONLY" ;;
- "CORE_PREVIOUS") eval "orca qa:automated-tests --sut=$ORCA_SUT_NAME $SUT_ONLY" ;;
+ "INTEGRATED_RECOMMENDED")
+ eval "orca qa:automated-tests --sut=$ORCA_SUT_NAME $SUT_ONLY --phpunit"
+ eval "orca qa:automated-tests --sut=$ORCA_SUT_NAME --sut-only --behat"
+ ;;
+ "CORE_PREVIOUS")
+ eval "orca qa:automated-tests --sut=$ORCA_SUT_NAME $SUT_ONLY --phpunit"
+ eval "orca qa:automated-tests --sut=$ORCA_SUT_NAME --sut-only --behat"
+ ;;
"ISOLATED_DEV") eval "orca qa:automated-tests --sut=$ORCA_SUT_NAME --sut-only" ;;
- "INTEGRATED_DEV") eval "orca qa:automated-tests --sut=$ORCA_SUT_NAME $SUT_ONLY" ;;
- "CORE_NEXT") eval "orca qa:automated-tests --sut=$ORCA_SUT_NAME $SUT_ONLY" ;;
+ "INTEGRATED_DEV")
+ eval "orca qa:automated-tests --sut=$ORCA_SUT_NAME $SUT_ONLY --phpunit"
+ eval "orca qa:automated-tests --sut=$ORCA_SUT_NAME --sut-only --behat"
+ ;;
+ "CORE_NEXT")
+ eval "orca qa:automated-tests --sut=$ORCA_SUT_NAME $SUT_ONLY --phpunit"
+ eval "orca qa:automated-tests --sut=$ORCA_SUT_NAME --sut-only --behat"
+ ;;
"CUSTOM") eval "orca qa:automated-tests --sut=$ORCA_SUT_NAME ${ORCA_CUSTOM_TESTS_RUN_ARGS:=}" ;;
esac
diff --git a/composer.json b/composer.json
index 5679044c0..a25d01c1e 100644
--- a/composer.json
+++ b/composer.json
@@ -10,7 +10,7 @@
}
],
"require": {
- "php": ">=7.1",
+ "php": ">=7.2",
"ext-dom": "*",
"ext-json": "*",
"ext-sqlite3": "*",
@@ -62,7 +62,7 @@
"pre-commit": [
"set -e",
"vendor/bin/parallel-lint --exclude vendor --no-progress .",
- "vendor/bin/phpcs --cache=var/.phpcs-cache"
+ "vendor/bin/phpcs --cache=var/cache/phpcs.json"
],
"pre-push": "vendor/bin/phpcs",
"post-install-cmd": "vendor/bin/cghooks add --ignore-lock",
@@ -88,7 +88,7 @@
],
"cghooks": "cghooks --ansi",
"phpcbf": "phpcbf",
- "phpcs": "phpcs -s --cache=var/.phpcs-cache",
+ "phpcs": "phpcs -s --cache=var/cache/phpcs.json",
"phplint": "parallel-lint --exclude vendor --ignore-fails .",
"phpmd": "phpmd . text phpmd.xml.dist --ignore-violations-on-exit",
"phpunit": "phpunit"
diff --git a/composer.lock b/composer.lock
index 8ff5e0399..8215789df 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "d68590d14e045343a7af5c02238212da",
+ "content-hash": "27053cd38b037f1804344109ede26597",
"packages": [
{
"name": "acquia/coding-standards",
@@ -6076,7 +6076,7 @@
"prefer-stable": true,
"prefer-lowest": false,
"platform": {
- "php": ">=7.1",
+ "php": ">=7.2",
"ext-dom": "*",
"ext-json": "*",
"ext-sqlite3": "*"
diff --git a/config/VERSION b/config/VERSION
index 0ec25f750..795460fce 100644
--- a/config/VERSION
+++ b/config/VERSION
@@ -1 +1 @@
-v1.0.0
+v1.1.0
diff --git a/config/packages.yml b/config/packages.yml
index d65ad4112..96339fb3d 100644
--- a/config/packages.yml
+++ b/config/packages.yml
@@ -74,9 +74,6 @@ drupal/cog:
acquia/drupal-spec-tool:
type: behat-extension
-#drupal/lightning:
-# type: drupal-profile
-
drupal/lightning_api:
core_matrix:
8.7.x:
@@ -95,9 +92,6 @@ drupal/lightning_api:
version: ~
version_dev: ~
-#acquia/lightning_commerce:
-# type: drupal-profile
-
drupal/lightning_core:
core_matrix:
8.7.x:
diff --git a/docs/getting-started.md b/docs/getting-started.md
index 8389e52de..cd907b7a7 100644
--- a/docs/getting-started.md
+++ b/docs/getting-started.md
@@ -98,7 +98,7 @@ For more information on using Behat with Drupal, see [the Behat website](http://
### Tagging/grouping
-ORCA uses tags (for Behat) and groups (for PHPUnit) to determine which tests to run when, as depicted in the table below, where black indicates a test's being included and white indicates its being ignored:
+ORCA uses tags (for Behat) and groups (for PHPUnit) to determine which tests to run when, as depicted in the table below:
@@ -110,7 +110,7 @@ ORCA uses tags (for Behat) and groups (for PHPUnit) to determine which tests to
The default behavior is to run a test only when the package providing it is the SUT--not when it is merely included in another package's test fixture. Any test not designated public or ignored is so treated. Such tests are referred to as "private tests". This should be considered the correct choice for most tests--particularly for features that involve little or no risk of conflict with other Acquia packages, including [isolated unit tests](http://wiki.c2.com/?UnitTestIsolation) by definition.
-Public tests (`orca_public`) are _always_ run, including when testing packages other than the one providing them. For example, a public test provided by Lightning API will also be run during tests of Acquia Commerce Manager, Acquia Lift, and the rest. Public tests thus lengthen builds for _all Acquia packages_ and should be used judiciously. Reserve them for high value features with meaningful risk of being broken by other packages, and make them as fast as possible.
+Public PHPUnit tests (`orca_public`) are _always_ run, including when testing packages other than the one providing them. (Behat has proved a source of too much instability to inflict across the board, so the default Travis CI jobs _never_ run non-SUT Behat tests.) For example, a public PHPUnit test provided by Lightning API will also be run during tests of Acquia Commerce Manager, Acquia Lift, and the rest. Public tests thus lengthen builds for _all Acquia packages_ and should be used judiciously. Reserve them for high value features with meaningful risk of being broken by other packages, and make them as fast as possible.
Ignored tests (`orca_ignore`) are "ignored" and _never_ run by ORCA. Tests should be ignored when they depend upon setup or preconditions that ORCA doesn't provide, such as a fixture with unique dependencies or a database populated by SQL dump. Once ignored, such tests can be scripted to run apart from ORCA after custom setup. In practice, it should rarely be necessary to ignore a test, as most setup and teardown can be accomplished through [Behat hooks](http://behat.org/en/latest/user_guide/context/hooks.html) and [PHPUnit template methods](https://phpunit.de/manual/6.5/en/fixtures.html).
diff --git a/example/.travis.yml b/example/.travis.yml
index f3e62ef25..83d5f34c4 100644
--- a/example/.travis.yml
+++ b/example/.travis.yml
@@ -32,6 +32,7 @@ cache:
directories:
- "$HOME/.composer/cache"
- "$HOME/.drush/cache"
+ - "$HOME/.rvm"
- "${TMPDIR:-/tmp}/phpstan/cache"
env:
diff --git a/phpcs.xml.dist b/phpcs.xml.dist
index 05f6ede67..911991f79 100644
--- a/phpcs.xml.dist
+++ b/phpcs.xml.dist
@@ -8,7 +8,7 @@
PHP CodeSniffer configuration for analyzing packages with ORCA.
-
+
.
diff --git a/src/Fixture/FixtureInspector.php b/src/Fixture/FixtureInspector.php
index b72ba8931..de1311b06 100644
--- a/src/Fixture/FixtureInspector.php
+++ b/src/Fixture/FixtureInspector.php
@@ -6,6 +6,7 @@
use Noodlehaus\Config;
use Noodlehaus\Parser\Json;
use Symfony\Component\Console\Helper\TableSeparator;
+use Symfony\Component\Console\Style\SymfonyStyle;
/**
* Creates a fixture.
@@ -40,6 +41,13 @@ class FixtureInspector {
*/
private $fixture;
+ /**
+ * The output decorator.
+ *
+ * @var \Symfony\Component\Console\Style\SymfonyStyle
+ */
+ private $output;
+
/**
* The package manager.
*
@@ -66,6 +74,8 @@ class FixtureInspector {
*
* @param \Acquia\Orca\Fixture\Fixture $fixture
* The fixture.
+ * @param \Symfony\Component\Console\Style\SymfonyStyle $output
+ * The output decorator.
* @param \Acquia\Orca\Fixture\PackageManager $package_manager
* The package manager.
* @param \Acquia\Orca\Utility\ProcessRunner $process_runner
@@ -73,8 +83,9 @@ class FixtureInspector {
* @param \Acquia\Orca\Fixture\SubextensionManager $subextension_manager
* The subextension manager.
*/
- public function __construct(Fixture $fixture, PackageManager $package_manager, ProcessRunner $process_runner, SubextensionManager $subextension_manager) {
+ public function __construct(Fixture $fixture, SymfonyStyle $output, PackageManager $package_manager, ProcessRunner $process_runner, SubextensionManager $subextension_manager) {
$this->fixture = $fixture;
+ $this->output = $output;
$this->packageManager = $package_manager;
$this->processRunner = $process_runner;
$this->subextensionManager = $subextension_manager;
@@ -213,12 +224,12 @@ private function getPackageStabilitySetting(): string {
* The field name.
*
* @return string
- * The field value.
+ * The field value if available or an exclamation mark (!) if not.
*/
private function getDrushStatusField(string $field): string {
$json = $this->getDrushStatusJson();
if (!array_key_exists($field, $json) || !is_string($json[$field])) {
- return '~';
+ return '!';
}
return $json[$field];
}
@@ -248,6 +259,11 @@ private function getDrushStatusJson(): array {
$this->drushStatus = $data;
+ if (!is_array($this->drushStatus)) {
+ $this->output->warning('Could not retrieve Drush status info. Some fixture details, denoted with an exclamation mark (!), are unavailable.');
+ $this->drushStatus = [];
+ }
+
return $this->drushStatus;
}
diff --git a/src/Task/DeprecatedCodeScanner/PhpStanTask.php b/src/Task/DeprecatedCodeScanner/PhpStanTask.php
index 641782654..e3adcc987 100644
--- a/src/Task/DeprecatedCodeScanner/PhpStanTask.php
+++ b/src/Task/DeprecatedCodeScanner/PhpStanTask.php
@@ -19,7 +19,7 @@ class PhpStanTask {
use SutSettingsTrait;
- public const JSON_LOG_PATH = 'var/phpstan.json';
+ public const JSON_LOG_PATH = 'var/log/phpstan.json';
/**
* The command array.
diff --git a/src/Task/StaticAnalysisTool/PhpCodeSnifferTask.php b/src/Task/StaticAnalysisTool/PhpCodeSnifferTask.php
index bb664fa50..8509fac81 100644
--- a/src/Task/StaticAnalysisTool/PhpCodeSnifferTask.php
+++ b/src/Task/StaticAnalysisTool/PhpCodeSnifferTask.php
@@ -12,7 +12,7 @@
*/
class PhpCodeSnifferTask extends TaskBase {
- public const JSON_LOG_PATH = 'var/phpcs.json';
+ public const JSON_LOG_PATH = 'var/log/phpcs.json';
/**
* The status code.
diff --git a/src/Task/StaticAnalysisTool/PhpLocTask.php b/src/Task/StaticAnalysisTool/PhpLocTask.php
index 0b3b9a04d..6f33a3630 100644
--- a/src/Task/StaticAnalysisTool/PhpLocTask.php
+++ b/src/Task/StaticAnalysisTool/PhpLocTask.php
@@ -9,7 +9,7 @@
*/
class PhpLocTask extends TaskBase {
- public const JSON_LOG_PATH = 'var/phploc.json';
+ public const JSON_LOG_PATH = 'var/log/phploc.json';
/**
* {@inheritdoc}
diff --git a/var/.gitkeep b/var/backup/.gitkeep
similarity index 100%
rename from var/.gitkeep
rename to var/backup/.gitkeep
diff --git a/var/cache/.gitkeep b/var/cache/.gitkeep
new file mode 100644
index 000000000..e69de29bb
diff --git a/var/log/.gitkeep b/var/log/.gitkeep
new file mode 100644
index 000000000..e69de29bb