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

Draft
wants to merge 30 commits into
base: 2.x
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
4552a3c
Trying some D11 compatibility
dafeder Dec 9, 2024
a35cf37
Update dkan.info.yml
dafeder Dec 9, 2024
4ddadea
Module versions
dafeder Dec 9, 2024
a4d3a5f
Fix missing methods in Connection
dafeder Dec 9, 2024
f99979f
Update phpunit schema
dafeder Dec 10, 2024
c6cdabe
Remove LoggerTrait
dafeder Dec 10, 2024
b1f86a3
Updates to DatastoreServiceTest
dafeder Dec 10, 2024
4dab475
Updates to PostImportTest
dafeder Dec 10, 2024
8a9266b
Fix deprecations, mostly static providers
dafeder Dec 10, 2024
9cda5a3
Remove getMockForAbstractClass from HarvestHashes...
dafeder Dec 10, 2024
3338405
Fix extra static in ImportJobTest
dafeder Dec 10, 2024
0ead122
Fix EventDispatcher dependency in WebServiceApiTest
dafeder Dec 10, 2024
98f45fe
Fix WebServiceApiTest
dafeder Dec 10, 2024
0c677dc
Fix DatabaseTableFactoryTest
dafeder Dec 10, 2024
d1f0185
Fix DatabaseTableTest
dafeder Dec 10, 2024
9ca2532
Fix SearchTest
dafeder Dec 11, 2024
5c3e327
Fix DataDictionarySettingsForm and test
dafeder Dec 11, 2024
c4408d6
Fix metastoreServiceTest
dafeder Dec 11, 2024
d38ec83
Fix SimpleSitemapArbitraryLinksAlterTest
dafeder Dec 11, 2024
4c679e7
More EventDispatcher Replacements
dafeder Dec 11, 2024
2ddcd53
Version constraint for datastore_mysql_import.info.yml
dafeder Dec 11, 2024
8119782
Fixed docs in DataDictionarySettingsForm
dafeder Dec 11, 2024
8ebd839
Fix HarvestHashesEntityDatabaseTableTest
dafeder Dec 12, 2024
0001b5b
Fix MySQLQueryTest
dafeder Dec 12, 2024
718f993
Add phpunit cache to gitignore
dafeder Dec 13, 2024
73378fd
Fix file validation in json_form_widget
dafeder Dec 13, 2024
f003527
Temporarily allow dev branch of select2
dafeder Dec 13, 2024
fc45648
Fix one test
dafeder Dec 13, 2024
4b4dc68
Restore connection class
dafeder Dec 19, 2024
4658533
Revert phpunit changes
dafeder Dec 19, 2024
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
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
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: 'Data Dictionary Widget'
description: 'Provides a field widget to generate a data-dictionary form'
package: DKAN
type: module
core_version_requirement: ^9.4 || ^10
core_version_requirement: ^9.4 || ^10 || ^11
dependencies:
- drupal:field
- metastore
2 changes: 1 addition & 1 deletion modules/datastore/datastore.info.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Datastore
description: Provides integration with the datastore library.
type: module
core_version_requirement: ^10
core_version_requirement: ^10 || ^11
package: DKAN
dependencies:
- dkan:common
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Datastore MySQL Import
description: Provides a MySQL Importer class.
type: module
core_version_requirement: ^10
core_version_requirement: ^10 || ^11
package: DKAN
configure: datastore.mysql_import.settings
dependencies:
Expand Down
Loading