diff --git a/core/drupalci.yml b/core/drupalci.yml index 66a3b12..bd26f81 100644 --- a/core/drupalci.yml +++ b/core/drupalci.yml @@ -4,52 +4,15 @@ build: assessment: validate_codebase: - phplint: - # Re-run composer install to ensure the dependencies resolve for the - # containerized PHP version. - container_composer: - options: ' install --prefer-dist --no-suggest --no-progress --no-interaction' - halt-on-fail: true - csslint: - halt-on-fail: false - eslint: - # A test must pass eslinting standards check in order to continue processing. - halt-on-fail: false - phpcs: - # phpcs will use core's specified version of Coder. - sniff-all-files: false - halt-on-fail: false + container_command.disableopcache: + halt-on-fail: FALSE + commands: + - sed -i 's/opcache.enable=1/opcache.enable=1\nopcache.optimization_level=0/' /usr/local/etc/php/php.ini + - sed -i 's/opcache.enable_cli=1/opcache.enable_cli=1\nopcache.optimization_level=0/' /usr/local/etc/php/php-cli.ini testing: - # run_tests task is executed several times in order of performance speeds. - # halt-on-fail can be set on the run_tests tasks in order to fail fast. - # suppress-deprecations is false in order to be alerted to usages of - # deprecated code. - run_tests.phpunit: - types: 'PHPUnit-Unit' - testgroups: '--all' - suppress-deprecations: false - halt-on-fail: false - run_tests.kernel: - types: 'PHPUnit-Kernel' - testgroups: '--all' - suppress-deprecations: false - halt-on-fail: false - run_tests.simpletest: - types: 'Simpletest' - testgroups: '--all' - suppress-deprecations: false - halt-on-fail: false run_tests.functional: types: 'PHPUnit-Functional' - testgroups: '--all' - suppress-deprecations: false - halt-on-fail: false - run_tests.javascript: - concurrency: 15 - types: 'PHPUnit-FunctionalJavascript' - testgroups: '--all' + testgroups: '--class "Drupal\Tests\comment\Functional\CommentCSSTest,Drupal\Tests\migrate_drupal_ui\Functional\d6\MigrateUpgrade6Test,Drupal\Tests\migrate_drupal_ui\Functional\d7\MigrateUpgrade7Test"' + repeat: 10 suppress-deprecations: false halt-on-fail: false - # Run nightwatch testing. - # @see https://www.drupal.org/project/drupal/issues/2869825 - nightwatchjs: diff --git a/core/lib/Drupal/Core/Session/SessionManager.php b/core/lib/Drupal/Core/Session/SessionManager.php index 6071031..252b01d 100644 --- a/core/lib/Drupal/Core/Session/SessionManager.php +++ b/core/lib/Drupal/Core/Session/SessionManager.php @@ -218,8 +218,8 @@ public function regenerate($destroy = FALSE, $lifetime = NULL) { if ($this->isStarted()) { $old_session_id = $this->getId(); + session_regenerate_id($destroy); } - session_id(Crypt::randomBytesBase64()); $this->getMetadataBag()->clearCsrfTokenSeed(); diff --git a/core/lib/Drupal/Core/TempStore/PrivateTempStore.php b/core/lib/Drupal/Core/TempStore/PrivateTempStore.php index c0003b3..4565088 100644 --- a/core/modules/file/file.module +++ b/core/modules/file/file.module @@ -895,13 +895,13 @@ function file_save_upload($form_field_name, $validators = [], $destination = FAL case UPLOAD_ERR_FORM_SIZE: \Drupal::messenger()->addError(t('The file %file could not be saved because it exceeds %maxsize, the maximum allowed size for uploads.', ['%file' => $file_info->getFilename(), '%maxsize' => format_size(file_upload_max_size())])); $files[$i] = FALSE; - continue; + continue 2; case UPLOAD_ERR_PARTIAL: case UPLOAD_ERR_NO_FILE: \Drupal::messenger()->addError(t('The file %file could not be saved because the upload did not complete.', ['%file' => $file_info->getFilename()])); $files[$i] = FALSE; - continue; + continue 2; case UPLOAD_ERR_OK: // Final check that this is a valid upload, if it isn't, use the @@ -914,7 +914,7 @@ function file_save_upload($form_field_name, $validators = [], $destination = FAL default: \Drupal::messenger()->addError(t('The file %file could not be saved. An unknown error has occurred.', ['%file' => $file_info->getFilename()])); $files[$i] = FALSE; - continue; + continue 2; } // Begin building file entity. diff --git a/core/modules/simpletest/simpletest.module b/core/modules/simpletest/simpletest.module index 0a9c8e5..1d21118 100644 --- a/core/modules/simpletest/simpletest.module +++ b/core/modules/simpletest/simpletest.module @@ -855,6 +855,7 @@ function simpletest_phpunit_testcase_to_row($test_id, \SimpleXMLElement $testcas $attributes = $testcase->attributes(); + $function = $attributes->class . '->' . $attributes->name . '()'; $record = [ 'test_id' => $test_id, 'test_class' => (string) $attributes->class, @@ -862,9 +863,11 @@ function simpletest_phpunit_testcase_to_row($test_id, \SimpleXMLElement $testcas 'message' => $message, // @todo: Check on the proper values for this. 'message_group' => 'Other', - 'function' => $attributes->class . '->' . $attributes->name . '()', + 'function' => $function, 'line' => $attributes->line ?: 0, - 'file' => $attributes->file, + // There are situations when the file will not be present because a PHPUnit + // @requires has caused a test to be skipped. + 'file' => $attributes->file ?: $function, ]; return $record; } diff --git a/core/tests/Drupal/KernelTests/AssertConfigTrait.php b/core/tests/Drupal/KernelTests/AssertConfigTrait.php index eb1588f..7acab53 100644 --- a/core/tests/Drupal/KernelTests/AssertConfigTrait.php +++ b/core/tests/Drupal/KernelTests/AssertConfigTrait.php @@ -40,7 +40,7 @@ protected function assertConfigDiff(Diff $result, $config_name, array $skipped_c // Allow to skip entire config files. if ($skipped_config[$config_name] === TRUE) { - continue; + break; } // Allow to skip some specific lines of imported config files. @@ -71,12 +71,12 @@ protected function assertConfigDiff(Diff $result, $config_name, array $skipped_c case 'Drupal\Component\Diff\Engine\DiffOpAdd': // The _core property does not exist in the default config. if ($op->closing[0] === '_core:') { - continue; + break; } foreach ($op->closing as $closing) { // The UUIDs don't exist in the default config. if (strpos($closing, 'uuid: ') === 0) { - continue; + break; } throw new \Exception($config_name . ': ' . var_export($op, TRUE)); } diff --git a/core/tests/Drupal/Tests/BrowserTestBase.php b/core/tests/Drupal/Tests/BrowserTestBase.php