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

Some fixes for Drupal 11.0.x compatibility #4354

Open
wants to merge 43 commits into
base: 2.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
c538bf4
Trying some D11 compatibility
dafeder Dec 9, 2024
932d92c
Update dkan.info.yml
dafeder Dec 9, 2024
d9ce7ee
Module versions
dafeder Dec 9, 2024
aaf1e88
Fix missing methods in Connection
dafeder Dec 9, 2024
5329dd6
Update phpunit schema
dafeder Dec 10, 2024
139825c
Remove LoggerTrait
dafeder Dec 10, 2024
6033f08
Updates to DatastoreServiceTest
dafeder Dec 10, 2024
53eb217
Updates to PostImportTest
dafeder Dec 10, 2024
c1989ac
Fix deprecations, mostly static providers
dafeder Dec 10, 2024
1216ef9
Remove getMockForAbstractClass from HarvestHashes...
dafeder Dec 10, 2024
314882a
Fix extra static in ImportJobTest
dafeder Dec 10, 2024
53f7601
Fix EventDispatcher dependency in WebServiceApiTest
dafeder Dec 10, 2024
fda5b02
Fix WebServiceApiTest
dafeder Dec 10, 2024
74ecad3
Fix DatabaseTableFactoryTest
dafeder Dec 10, 2024
0d51b75
Fix DatabaseTableTest
dafeder Dec 10, 2024
efded9a
Fix SearchTest
dafeder Dec 11, 2024
82a26a4
Fix DataDictionarySettingsForm and test
dafeder Dec 11, 2024
f04dab7
Fix metastoreServiceTest
dafeder Dec 11, 2024
8dac4bb
Fix SimpleSitemapArbitraryLinksAlterTest
dafeder Dec 11, 2024
38dd2b0
More EventDispatcher Replacements
dafeder Dec 11, 2024
15f8a17
Version constraint for datastore_mysql_import.info.yml
dafeder Dec 11, 2024
46081c2
Fixed docs in DataDictionarySettingsForm
dafeder Dec 11, 2024
2865968
Fix HarvestHashesEntityDatabaseTableTest
dafeder Dec 12, 2024
dbb3c72
Fix MySQLQueryTest
dafeder Dec 12, 2024
63a5e0e
Add phpunit cache to gitignore
dafeder Dec 13, 2024
515075e
Fix file validation in json_form_widget
dafeder Dec 13, 2024
5497335
Temporarily allow dev branch of select2
dafeder Dec 13, 2024
7a12226
Fix one test
dafeder Dec 13, 2024
b68384c
Restore connection class
dafeder Dec 19, 2024
cb83ea9
Revert phpunit changes
dafeder Dec 19, 2024
38cbb97
Use newer select2
dafeder Jan 16, 2025
6f6ff3c
Fix includes on DatabaseTableFactoryTest
dafeder Jan 16, 2025
b0380bf
Unit tests running again
dafeder Jan 16, 2025
d30f0bf
Add D11 to matrix
dafeder Jan 16, 2025
3a599aa
Tweaking circleCI
dafeder Jan 16, 2025
ae0b928
More circleCI
dafeder Jan 16, 2025
adc70e8
More circleCI
dafeder Jan 16, 2025
d027777
Typo
dafeder Jan 16, 2025
abd6e72
Just test for ya on runner
dafeder Jan 17, 2025
ea420ff
Use yq for config
dafeder Jan 17, 2025
d1eb2e4
debug
dafeder Jan 17, 2025
da6d4ab
Fix mysql paramaters
dafeder Jan 17, 2025
eef0ef2
Remove D11 from matrix
dafeder Jan 28, 2025
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
22 changes: 19 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ commands:
description: 'PHP major.minor for DDev to use.'
default: '8.2'
type: string
database_version:
description: 'Database version for DDev to use.'
default: '5.7'
type: string
addon_branch:
description: 'Repo branch name for the DKAN DDev add-on you want to test against.'
default: 'main'
Expand All @@ -50,10 +54,12 @@ commands:
which ddev
ddev --version
ddev config --project-name test-$CIRCLE_WORKFLOW_JOB_ID --project-type drupal9 --docroot docroot --create-docroot
ddev get https://github.com/GetDKAN/dkan-ddev-addon/archive/refs/heads/<< parameters.addon_branch >>.tar.gz
ddev add-on get https://github.com/GetDKAN/dkan-ddev-addon/archive/refs/heads/<< parameters.addon_branch >>.tar.gz
bash -c 'echo COMPOSER_AUTH=$COMPOSER_AUTH' > .ddev/.env
# Modify config to use our PHP version.
sed -i 's/^php_version.*$/php_version: "<< parameters.php_version >>"/' .ddev/config.dkan.yaml
# Modify config to use our PHP version and database.
yq '.database.version ="<< parameters.database_version >>"' -i .ddev/config.dkan.yaml
yq '.php_version ="<< parameters.php_version >>"' -i .ddev/config.dkan.yaml
cat .ddev/config.dkan.yaml
ddev restart
ddev status
ddev dkan-init --project-version << parameters.dkan_recommended_branch>> --force
Expand Down Expand Up @@ -122,6 +128,10 @@ jobs:
description: 'PHP major.minor for DDev to use.'
default: '8.1'
type: string
database_version:
description: 'Database version for DDev to use.'
default: '5.7'
type: string
dkan_recommended_branch:
description: 'Branch of getdkan/recommended-project to use.'
default: '10.2.x-dev'
Expand All @@ -137,6 +147,7 @@ jobs:
steps:
- prepare_build:
php_version: << parameters.php_version >>
database_version: << parameters.database_version >>
dkan_recommended_branch: << parameters.dkan_recommended_branch >>
- prepare_site:
upgrade: << parameters.upgrade >>
Expand Down Expand Up @@ -189,6 +200,10 @@ jobs:
description: 'PHP major.minor for DDev to use.'
default: '8.2'
type: string
database_version:
description: 'Database version for DDev to use.'
default: '5.7'
type: string
dkan_recommended_branch:
description: 'Branch of getdkan/recommended-project to use.'
default: '10.2.x-dev'
Expand All @@ -200,6 +215,7 @@ jobs:
steps:
- prepare_build:
php_version: << parameters.php_version >>
database_version: << parameters.database_version >>
dkan_recommended_branch: << parameters.dkan_recommended_branch >>
- prepare_site:
upgrade: << parameters.upgrade >>
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ tagfile
/tests/reports
/web
.phpunit.result.cache
.phpunit.cache
docs/build
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"drupal/facets": "^3.0@beta",
"drupal/moderated_content_bulk_publish": "~2.0.20",
"drupal/search_api": "^1.15",
"drupal/select2": "^1.13",
"drupal/select2": "^2.0",
"drupal/select_or_other": "^4.2.0",
"drupal/views_bulk_operations": "^4.0",
"ezyang/htmlpurifier": "^4.11",
Expand All @@ -27,13 +27,13 @@
"getdkan/pdlt": "^0.1.7",
"getdkan/procrastinator": "^5.0.3",
"getdkan/rooted-json-data": "^0.2.2",
"guzzlehttp/guzzle": "^6.5.8 || ^7.4.5",
"guzzlehttp/guzzle": "^6.5.8 || ^7",
"ilbee/csv-response": "^1.2.0",
"justinrainbow/json-schema": "^5.2",
"m1x0n/opis-json-schema-error-presenter": "^0.5.3",
"npm-asset/select2": "^4.0",
"npm-asset/select2": "^4.0 || dev-develop",
"oomphinc/composer-installers-extender": "^2.0",
"ramsey/uuid": "^3.8.0",
"ramsey/uuid": "^3.8.0 || ^4",
"stolt/json-merge-patch": "^2.0",
"symfony/polyfill-php80": "^1.27"
},
Expand Down
2 changes: 1 addition & 1 deletion dkan.info.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: DKAN
description: 'DKAN Open Data Portal'
type: module
core_version_requirement: ^10
core_version_requirement: ^10 || ^11
package: DKAN
dependencies:
- dkan:metastore
Expand Down
2 changes: 1 addition & 1 deletion modules/common/common.info.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Common
description: Provides common utilities, functions, and base api endpoints used by other DKAN modules.
type: module
core_version_requirement: ^10
core_version_requirement: ^10 || ^11
package: DKAN
123 changes: 0 additions & 123 deletions modules/common/src/LoggerTrait.php

This file was deleted.

84 changes: 0 additions & 84 deletions modules/common/tests/src/Traits/LoggerTraitTest.php

This file was deleted.

4 changes: 4 additions & 0 deletions modules/common/tests/src/Unit/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ class Connection extends CoreConnection {
*/
protected $statementClass;

public function upsert($table, array $options = []) { }

public function schema() { }

/**
* {@inheritdoc}
*/
Expand Down
4 changes: 2 additions & 2 deletions modules/common/tests/src/Unit/Events/EventTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

use Drupal\common\EventDispatcherTrait;
use Drupal\common\Events\Event;
use Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher;
use MockChain\Chain;
use PHPUnit\Framework\TestCase;
use Symfony\Component\DependencyInjection\Container;
use Symfony\Component\EventDispatcher\EventDispatcher;

class EventTest extends TestCase
{
Expand All @@ -19,7 +19,7 @@ public function testDataIntegrityAcrossEventSubscribers() {
->add(Container::class)
->getMock();

$dispatcher = new ContainerAwareEventDispatcher($containerx);
$dispatcher = new EventDispatcher($containerx);
$dispatcher->addListener('test_event', function(Event $event) {
$event->setData(1);
});
Expand Down
30 changes: 0 additions & 30 deletions modules/common/tests/src/Unit/LoggerTraitTest.php

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class QueryDataProvider {
/**
*
*/
public function getAllData($return): array {
public static function getAllData(): array {
$tests = [
'noPropertiesQuery',
'propertiesQuery',
Expand Down
Loading