diff --git a/.circleci/config.yml b/.circleci/config.yml index 88e715043a..d6a2be91f7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -26,7 +26,7 @@ commands: parameters: php_version: description: 'PHP major.minor for DDev to use.' - default: '8.1' + default: '8.2' type: string addon_branch: description: 'Repo branch name for the dkan-ddev-addon you want to test against.' @@ -34,7 +34,7 @@ commands: type: string dkan_recommended_branch: description: 'Branch of getdkan/recommended-project to use.' - default: '10.1.x-dev' + default: '10.2.x-dev' type: string steps: - run: @@ -124,7 +124,7 @@ jobs: type: string dkan_recommended_branch: description: 'Branch of getdkan/recommended-project to use.' - default: '10.1.x-dev' + default: '10.2.x-dev' type: string report_coverage: description: 'Generate coverage report and send it to CodeClimate' @@ -191,7 +191,7 @@ jobs: type: string dkan_recommended_branch: description: 'Branch of getdkan/recommended-project to use.' - default: '10.1.x-dev' + default: '10.2.x-dev' type: string upgrade: description: 'If true, will install the latest stable DKAN version and test upgrade' @@ -230,19 +230,14 @@ workflows: jobs: - cypress: name: install_test_cypress - dkan_recommended_branch: '10.1.x-dev' - - phpunit: - matrix: - parameters: - dkan_recommended_branch: [ '9.5.x-dev'] - php_version: [ '7.4', '8.0', '8.1' ] + dkan_recommended_branch: '10.2.x-dev' - phpunit: - name: 'Install target (Drupal 10.1, PHP 8.1)' + name: 'Install target (Drupal 10.2, PHP 8.2)' report_coverage: true matrix: parameters: - dkan_recommended_branch: [ '10.1.x-dev'] - php_version: [ '8.1' ] + dkan_recommended_branch: [ '10.2.x-dev'] + php_version: [ '8.2' ] - phpunit: matrix: parameters: @@ -253,16 +248,21 @@ workflows: parameters: dkan_recommended_branch: [ '10.0.x-dev'] php_version: [ '8.1' ] + - phpunit: + matrix: + parameters: + dkan_recommended_branch: [ '10.2.x-dev'] + php_version: [ '8.1' ] upgrade_and_test: jobs: - cypress: name: upgrade_test_cypress upgrade: true - dkan_recommended_branch: '10.1.x-dev' + dkan_recommended_branch: '10.2.x-dev' - phpunit: - name: 'Upgrade target (Drupal 10.1, PHP 8.1)' + name: 'Upgrade target (Drupal 10.2, PHP 8.2)' upgrade: true matrix: parameters: - dkan_recommended_branch: [ '10.1.x-dev'] - php_version: [ '8.1' ] + dkan_recommended_branch: [ '10.2.x-dev'] + php_version: [ '8.2' ] diff --git a/modules/datastore/src/Storage/DatabaseTable.php b/modules/datastore/src/Storage/DatabaseTable.php index 4ffe0ced66..c96bea8b86 100755 --- a/modules/datastore/src/Storage/DatabaseTable.php +++ b/modules/datastore/src/Storage/DatabaseTable.php @@ -195,7 +195,7 @@ protected function buildTableSchema(string $tableName, array $fieldsInfo) { * Drupal Schema API array. */ protected function addIndexInfo(array &$schema): void { - if ($this->connection->getConnectionOptions()['driver'] != 'mysql') { + if (!str_contains($this->connection->getConnectionOptions()['driver'], 'mysql')) { return; } diff --git a/modules/metastore/tests/src/Unit/DataDictionary/DataDictionaryDiscoveryTest.php b/modules/metastore/tests/src/Unit/DataDictionary/DataDictionaryDiscoveryTest.php index 8f6f6c2572..ede43164d9 100644 --- a/modules/metastore/tests/src/Unit/DataDictionary/DataDictionaryDiscoveryTest.php +++ b/modules/metastore/tests/src/Unit/DataDictionary/DataDictionaryDiscoveryTest.php @@ -6,9 +6,9 @@ use Drupal\Core\Config\ConfigFactory; use Drupal\Core\Config\ImmutableConfig; use Drupal\metastore\DataDictionary\DataDictionaryDiscovery as Discovery; +use Drupal\metastore\MetastoreService; use Drupal\metastore\Reference\MetastoreUrlGenerator; use Drupal\metastore\Reference\ReferenceLookup; -use Drupal\metastore\Service; use MockChain\Chain; use MockChain\Options; use OutOfRangeException; @@ -16,7 +16,6 @@ use RootedData\RootedJsonData; class DataDictionaryDiscoveryTest extends TestCase { - // If mode is set to "none", we should get NULL no matter what. public function testModeNone() { @@ -66,7 +65,7 @@ public function testGetReferenceDictId() { $this->getMetastoreService(), $this->getLookup(), $this->getUrlGenerator() - ); + ); $id = $discovery->dictionaryIdFromResource('resource1'); $this->assertEquals('111', $id); @@ -136,7 +135,7 @@ private function getMetastoreService() { ->add('444', new RootedJsonData($json4, "{}")) ->index(1); return (new Chain($this)) - ->add(Service::class, 'get', $sequence) + ->add(MetastoreService::class, 'get', $sequence) ->getMock(); } @@ -148,7 +147,7 @@ private function getUrlGenerator() { $uriFromUrl = (new Options()) ->add('https://example.com/api/1/metastore/schemas/data-dictionary/items/111', 'dkan://metastore/schemas/data-dictionary/items/111') ->add('dkan://metastore/schemas/dataset/items/444', 'dkan://metastore/schemas/dataset/items/444'); - + return (new Chain($this)) ->add(MetastoreUrlGenerator::class, 'uriFromUrl', $uriFromUrl) ->add(MetastoreUrlGenerator::class, 'extractItemId', $extract)