Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Several small fixes. #1278

Merged
merged 5 commits into from
Apr 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,8 @@ jobs:
name: Export DB after download
command: |
[ ! -f /tmp/download-db-success ] && echo "==> Database download semaphore file is missing. DB export will not proceed." && exit 0
docker compose up -d
sleep 15
./scripts/drevops/login-docker.sh
docker compose up -d && sleep 15
docker compose exec cli mkdir -p .data && docker compose cp -L .data/db.sql cli:/app/.data/db.sql || true
docker compose exec $(env | cut -f1 -d= | sed 's/^/-e /') -T cli bash -c "DREVOPS_PROVISION_POST_OPERATIONS_SKIP=1 ./scripts/drevops/provision.sh"
grep -q ^DREVOPS_DB_DOCKER_IMAGE .env && rm .data/db.sql || true
Expand Down Expand Up @@ -227,6 +227,9 @@ jobs:
- v1.19.0-db10-{{ checksum "/tmp/db_cache_branch" }}-{{ checksum "/tmp/db_cache_fallback_yes" }}-{{ checksum "/tmp/db_cache_timestamp" }}
- v1.19.0-db10-{{ checksum "/tmp/db_cache_branch" }}-{{ checksum "/tmp/db_cache_fallback_yes" }}-
#;> !PROVISION_USE_PROFILE
- run:
name: Login to Docker registry
command: ./scripts/drevops/login-docker.sh
- run:
name: Build stack
command: docker compose up -d
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ web/themes/**/node_modules
web/themes/**/build
.data
.logs
.twig-cs-fixer.cache

# Ignore local override files.
docker-compose.override.yml
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"drevops/behat-screenshot": "^1",
"drevops/behat-steps": "^2.2",
"drupal/core-dev": "^10.2.0",
"drupal/drupal-extension": "^5@rc",
"drupal/drupal-extension": "^5",
"mglaman/phpstan-drupal": "^1.2",
"palantirnet/drupal-rector": "^0.20",
"phpcompatibility/php-compatibility": "^9.3",
Expand Down Expand Up @@ -73,7 +73,7 @@
"pyrech/composer-changelogs": true
},
"platform": {
"php": "8.2.13"
"php": "8.2.17"
}
},
"autoload": {
Expand Down
5 changes: 5 additions & 0 deletions docker-compose.override.default.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Local docker services override.
#
# Copy this file to docker-compose.override.yml and set relevant values.
# docker-compose.override.yml is excluded from the repository,

services:
chrome:
# Chrome image with Apple M1 support.
Expand Down
2 changes: 0 additions & 2 deletions phpcs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
<arg name="colors"/>
<arg value="sp"/>
<arg name="parallel" value="75"/>
<!-- Lint code against platform version specified in composer.json key "config.platform.php". -->
<config name="testVersion" value="8.1"/>

<!-- Exclude CircleCI config files. -->
<exclude-pattern>circle\.yml</exclude-pattern>
Expand Down
5 changes: 5 additions & 0 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
use Rector\DeadCode\Rector\If_\RemoveAlwaysTrueIfConditionRector;
use Rector\Set\ValueObject\SetList;
use Rector\Strict\Rector\Empty_\DisallowedEmptyRuleFixerRector;
use Rector\TypeDeclaration\Rector\StmtsAwareInterface\DeclareStrictTypesRector;

return static function (RectorConfig $rectorConfig): void {
$rectorConfig->paths([
Expand All @@ -37,6 +38,7 @@
// Provided by Rector.
SetList::PHP_80,
SetList::PHP_81,
SetList::PHP_82,
SetList::CODE_QUALITY,
SetList::CODING_STYLE,
SetList::DEAD_CODE,
Expand All @@ -48,6 +50,8 @@
Drupal10SetList::DRUPAL_10,
]);

$rectorConfig->rule(DeclareStrictTypesRector::class);

$drupalFinder = new DrupalFinder();
$drupalFinder->locateRoot(__DIR__);

Expand Down Expand Up @@ -78,6 +82,7 @@
'*/modules/contrib/*',
'*/themes/contrib/*',
'*/profiles/contrib/*',
'*/sites/default/default.settings.php',
// Files.
'*/sites/default/files/*',
'*/sites/simpletest/*',
Expand Down
2 changes: 2 additions & 0 deletions tests/behat/bootstrap/FeatureContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
* YOURSITE Drupal context for Behat testing.
*/

declare(strict_types=1);

use DrevOps\BehatSteps\ContentTrait;
use DrevOps\BehatSteps\FieldTrait;
use DrevOps\BehatSteps\FileTrait;
Expand Down
2 changes: 2 additions & 0 deletions tests/phpunit/CircleCiConfigTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

use Drupal\Core\Serialization\Yaml;
use PHPUnit\Framework\TestCase;

Expand Down
2 changes: 2 additions & 0 deletions tests/phpunit/Drupal/DatabaseSettingsTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Drupal;

/**
Expand Down
2 changes: 2 additions & 0 deletions tests/phpunit/Drupal/EnvironmentSettingsTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Drupal;

/**
Expand Down
2 changes: 2 additions & 0 deletions tests/phpunit/Drupal/SettingsTestCase.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Drupal;

use PHPUnit\Framework\TestCase;
Expand Down
2 changes: 2 additions & 0 deletions tests/phpunit/Drupal/SwitchableSettingsTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Drupal;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Drupal\Tests\ys_core\Functional;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Drupal\Tests\ys_core\Functional;

use Drupal\Tests\BrowserTestBase;
Expand Down
2 changes: 2 additions & 0 deletions web/modules/custom/ys_core/tests/src/Kernel/ExampleTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Drupal\Tests\ys_core\Kernel;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Drupal\Tests\ys_core\Kernel;

use Drupal\KernelTests\KernelTestBase;
Expand Down
2 changes: 2 additions & 0 deletions web/modules/custom/ys_core/tests/src/Traits/ArrayTrait.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Drupal\Tests\ys_core\Traits;

/**
Expand Down
2 changes: 2 additions & 0 deletions web/modules/custom/ys_core/tests/src/Traits/AssertTrait.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Drupal\Tests\ys_core\Traits;

/**
Expand Down
2 changes: 2 additions & 0 deletions web/modules/custom/ys_core/tests/src/Traits/MockTrait.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Drupal\Tests\ys_core\Traits;

use PHPUnit\Framework\MockObject\MockObject;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Drupal\Tests\ys_core\Traits;

/**
Expand Down
2 changes: 2 additions & 0 deletions web/modules/custom/ys_core/tests/src/Unit/ExampleTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Drupal\Tests\ys_core\Unit;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Drupal\Tests\ys_core\Unit;

use Drupal\Tests\UnitTestCase;
Expand Down
2 changes: 2 additions & 0 deletions web/modules/custom/ys_core/ys_core.deploy.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
* phpcs:disable Squiz.WhiteSpace.FunctionSpacing.After
*/

declare(strict_types=1);

use Drupal\Core\Extension\ExtensionDiscovery;

/**
Expand Down
2 changes: 2 additions & 0 deletions web/modules/custom/ys_core/ys_core.module
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
* Core module for YOURSITE.
*/

declare(strict_types=1);

use Drupal\Core\Site\Settings;

/**
Expand Down
2 changes: 2 additions & 0 deletions web/modules/custom/ys_search/ys_search.install
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
* Install for YOURSITE Search module.
*/

declare(strict_types=1);

/**
* Implements hook_install().
*/
Expand Down
2 changes: 2 additions & 0 deletions web/sites/default/default.settings.local.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
* Settings file for local environment.
*/

declare(strict_types=1);

// Show all error messages on the site.
$config['system.logging']['error_level'] = 'all';

Expand Down
2 changes: 2 additions & 0 deletions web/sites/default/includes/modules/settings.clamav.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
* ClamAV settings.
*/

declare(strict_types=1);

if (file_exists($contrib_path . '/clamav') && !empty(getenv('DRUPAL_CLAMAV_ENABLED'))) {
$clamav_mode = getenv('DRUPAL_CLAMAV_MODE') ?: NULL;
if (in_array(strtolower((string) $clamav_mode), ['0', 'daemon'])) {
Expand Down
2 changes: 2 additions & 0 deletions web/sites/default/includes/modules/settings.config_split.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
* Config split settings.
*/

declare(strict_types=1);

switch ($settings['environment']) {
case ENVIRONMENT_TEST:
$config['config_split.config_split.test']['status'] = TRUE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
* Environment indicator settings.
*/

declare(strict_types=1);

$config['environment_indicator.indicator']['name'] = $settings['environment'];
$config['environment_indicator.indicator']['bg_color'] = '#006600';
$config['environment_indicator.indicator']['fg_color'] = '#ffffff';
Expand Down
2 changes: 2 additions & 0 deletions web/sites/default/includes/modules/settings.fast404.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
* Fast404 settings.
*/

declare(strict_types=1);

if (file_exists($contrib_path . '/fast404/fast404.inc')) {
// @codeCoverageIgnoreStart
$settings['fast404_exts'] = '/^(?!robots).*\.(txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i';
Expand Down
2 changes: 2 additions & 0 deletions web/sites/default/includes/modules/settings.redis.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
* Redis configuration.
*/

declare(strict_types=1);

use Drupal\Component\Serialization\PhpSerialize;
use Drupal\redis\Cache\CacheBackendFactory;
use Drupal\redis\Cache\PhpRedis;
Expand Down
2 changes: 2 additions & 0 deletions web/sites/default/includes/modules/settings.shield.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
* Shield settings.
*/

declare(strict_types=1);

// Default Shield credentials.
//
// Shield can be enabled and disabled in production through UI.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
* Stage file proxy settings.
*/

declare(strict_types=1);

$origin = getenv('DRUPAL_STAGE_FILE_PROXY_ORIGIN');
if (!empty($origin) && $settings['environment'] != ENVIRONMENT_PROD) {
$user = getenv('DRUPAL_SHIELD_USER');
Expand Down
2 changes: 2 additions & 0 deletions web/sites/default/includes/providers/settings.acquia.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
* @see https://docs.acquia.com/acquia-cloud/develop/env-variable
*/

declare(strict_types=1);

if (!empty(getenv('AH_SITE_ENVIRONMENT'))) {
// Delay the initial database connection.
$config['acquia_hosting_settings_autoconnect'] = FALSE;
Expand Down
2 changes: 2 additions & 0 deletions web/sites/default/includes/providers/settings.lagoon.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
* Lagoon hosting provider settings.
*/

declare(strict_types=1);

if (getenv('LAGOON') && getenv('LAGOON_ENVIRONMENT_TYPE') == 'production' || getenv('LAGOON_ENVIRONMENT_TYPE') == 'development') {
// Do not put any Lagoon-specific settings in this code block. It is used
// to explicitly map Lagoon environments to $settings['environment']
Expand Down
2 changes: 2 additions & 0 deletions web/sites/default/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
* phpcs:disable DrupalPractice.CodeAnalysis.VariableAnalysis.UnusedVariable
*/

declare(strict_types=1);

////////////////////////////////////////////////////////////////////////////////
/// ENVIRONMENT CONSTANTS ///
////////////////////////////////////////////////////////////////////////////////
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Drupal\Tests\your_site_theme\Functional;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Drupal\Tests\your_site_theme\Functional;

use Drupal\Tests\BrowserTestBase;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Drupal\Tests\your_site_theme\Kernel;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Drupal\Tests\your_site_theme\Kernel;

use Drupal\KernelTests\KernelTestBase;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Drupal\Tests\your_site_theme\Unit;

/**
Expand Down
Loading
Loading