diff --git a/composer.json b/composer.json index 5690c5b6..a5f06f29 100644 --- a/composer.json +++ b/composer.json @@ -43,7 +43,6 @@ "ext-zip": "*", "drupal/search_api_solr": "^4.3", "guzzlehttp/guzzle": "^7.5", - "guzzlehttp/psr7": "^2.7", "kint-php/kint": "^5|^6", "php-http/guzzle7-adapter": "^1.1", "psr/event-dispatcher": "^1.0", diff --git a/src/Plugin/SolrConnector/PantheonSolrConnector.php b/src/Plugin/SolrConnector/PantheonSolrConnector.php index 591c81ba..fed1b22d 100644 --- a/src/Plugin/SolrConnector/PantheonSolrConnector.php +++ b/src/Plugin/SolrConnector/PantheonSolrConnector.php @@ -122,7 +122,7 @@ public static function getPlatformConfig() { return [ 'scheme' => getenv('PANTHEON_INDEX_SCHEME'), 'host' => getenv('PANTHEON_INDEX_HOST'), - 'port' => getenv('PANTHEON_INDEX_PORT'), + 'port' => intval(getenv('PANTHEON_INDEX_PORT')), 'path' => getenv('PANTHEON_INDEX_PATH'), 'core' => getenv('PANTHEON_INDEX_CORE'), 'schema' => getenv('PANTHEON_INDEX_SCHEMA'), diff --git a/tests/Unit/EndpointServiceTest.php b/tests/Unit/EndpointServiceTest.php index 8792fda1..845e20f5 100644 --- a/tests/Unit/EndpointServiceTest.php +++ b/tests/Unit/EndpointServiceTest.php @@ -22,7 +22,7 @@ public function testURIGeneration() { $ep = new Endpoint([ 'scheme' => 'one', 'host' => 'two', - 'port' => '1234', + 'port' => 1234, 'path' => 'server-path', 'core' => '/core-name', 'schema' => '/schema-path', @@ -34,7 +34,8 @@ public function testURIGeneration() { $this->assertEquals('/core-name', $ep->getCore()); $this->assertEquals('server-path', $ep->getPath()); $this->assertEquals('one', $ep->getScheme()); - $this->assertEquals('1234', $ep->getPort()); + // If port is a string in the test, it should be an integer. + $this->assertEquals(1234, $ep->getPort()); $this->assertEquals('one://two:1234/', $ep->getBaseUri()); $this->assertEquals( 'one://two:1234/server-path/core-name/',