Skip to content

Commit

Permalink
PHP 8.1 compatibility (#3927)
Browse files Browse the repository at this point in the history
* 13523/14184
  • Loading branch information
paul-m committed Apr 3, 2023
1 parent a2c92fc commit 7e994fa
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 44 deletions.
65 changes: 32 additions & 33 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,36 +6,35 @@ plugins:
config:
standard: "Drupal,DrupalPractice"
exclude_patterns:
- "cypress/"
- "config/"
- "db/"
- "dist/"
- "docs/"
- "documentation/"
- "features/"
- "**/node_modules/"
- "script/"
- "**/spec/"
- "**/test/"
- "**/tests/"
- "Tests/"
- "**/vendor/"
- "**/*_test.go"
- "**/*.d.ts"
- "**/*.yml"
- "**/*.json"
- "**/*.js"
- "**/*.jsx"
- "*.md"
- "**/*.md"
- "*.install"
- "*.profile"
- "*.module"
- "*.xml"
- "**/*.xml"
- "**/*.install"
- "**/*.profile"
- "**/*.module"
- ".circleci/"
- ".gitignore"

- "cypress/"
- "config/"
- "db/"
- "dist/"
- "docs/"
- "documentation/"
- "features/"
- "**/node_modules/"
- "script/"
- "**/spec/"
- "**/test/"
- "**/tests/"
- "Tests/"
- "**/vendor/"
- "**/*_test.go"
- "**/*.d.ts"
- "**/*.yml"
- "**/*.json"
- "**/*.js"
- "**/*.jsx"
- "*.md"
- "**/*.md"
- "*.install"
- "*.profile"
- "*.module"
- "*.xml"
- "**/*.xml"
- "**/*.install"
- "**/*.profile"
- "**/*.module"
- ".circleci/"
- ".gitignore"
10 changes: 5 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,24 @@
"description": "DKAN Open Data Catalog",
"require": {
"drupal/admin_toolbar": "^3",
"drupal/config_update": "^1.6",
"drupal/config_update": "^2@dev",
"drupal/moderated_content_bulk_publish": "~2.0.20",
"drupal/search_api": "^1.15",
"drupal/select_or_other": "dev-4.x#ae0585ff8c",
"drupal/select2": "^1.13",
"drupal/views_bulk_operations": "^4.0",
"ext-json": "*",
"ezyang/htmlpurifier" : "^4.11",
"fmizzell/maquina": "^1.1.0",
"fmizzell/maquina": "^1.1.1",
"getdkan/contracts": "^1.0.0",
"getdkan/csv-parser": "^1.2.3",
"getdkan/file-fetcher" : "4.2.0",
"getdkan/csv-parser": "^1.3.0",
"getdkan/file-fetcher" : "^4.2.1",
"getdkan/harvest": "^1.0.0",
"getdkan/json-schema-provider": "^0.1.2",
"getdkan/locker": "^1.1.0",
"getdkan/procrastinator": "^4.0.0",
"getdkan/rooted-json-data": "^0.1",
"getdkan/sql-parser": "^2.0.0",
"getdkan/sql-parser": "^2.1.0",
"guzzlehttp/guzzle" : "^6.5.8 || ^7.4.5",
"ilbee/csv-response": "^1.1.1",
"m1x0n/opis-json-schema-error-presenter": "^0.5.3",
Expand Down
12 changes: 6 additions & 6 deletions modules/metastore/tests/src/Unit/Reference/ReferencerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
use Drupal\node\Entity\Node;
use Drupal\node\NodeStorage;

use GuzzleHttp\Exception\RequestException;
use GuzzleHttp\Exception\ConnectException;
use MockChain\Chain;
use MockChain\Options;
use PHPUnit\Framework\TestCase;
Expand All @@ -38,23 +38,23 @@ class ReferencerTest extends TestCase {
*
* @var string
*/
const FILE_PATH = 'tmp/mycsv.csv';
public const FILE_PATH = 'tmp/mycsv.csv';

/**
* HTTP host protocol and domain for testing download URL.
*
* @var string
*/
const HOST = 'http://example.com';
public const HOST = 'http://example.com';

const MIME_TYPE = 'text/csv';
public const MIME_TYPE = 'text/csv';

/**
* List referenceable dataset properties.
*
* @var string[]
*/
const REFERENCEABLE_PROPERTY_LIST = [
public const REFERENCEABLE_PROPERTY_LIST = [
'keyword' => 0,
'distribution' => 'distribution',
'title' => 0,
Expand Down Expand Up @@ -452,7 +452,7 @@ public function getMimeType() { return ReferencerTest::MIME_TYPE; }
$this->assertEquals(self::MIME_TYPE, $container_chain->getStoredInput('resource')[0]->getMimeType(), 'Unable to fetch MIME type for remote file');
// Test Mime Type detection on a invalid remote file path.
$data = $this->getData('http://invalid');
$this->expectException(RequestException::class);
$this->expectException(ConnectException::class);
$referencer->reference($data);
}

Expand Down

0 comments on commit 7e994fa

Please sign in to comment.