Skip to content

Commit b2b3e91

Browse files
committed
feat/incompatible-with-neo4j-php/neo4j-php-client-3.4.0: replaced wdt.xml and profiler.xml with .php
1 parent f39c9e2 commit b2b3e91

File tree

3 files changed

+13
-23
lines changed

3 files changed

+13
-23
lines changed

tests/App/config/routes.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ run-on-transaction:
1212
controller: Neo4j\Neo4jBundle\Tests\App\Controller\TestController::runOnTransaction
1313

1414
web_profiler_wdt:
15-
resource: '@WebProfilerBundle/Resources/config/routing/wdt.xml'
15+
resource: '@WebProfilerBundle/Resources/config/routing/wdt.php'
1616
prefix: /_wdt
1717
web_profiler_profiler:
18-
resource: '@WebProfilerBundle/Resources/config/routing/profiler.xml'
18+
resource: '@WebProfilerBundle/Resources/config/routing/profiler.php'
1919
prefix: /_profiler4

tests/Functional/ProfilerTest.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ private function skipIfNeo4jNotAvailable(): void
4141
// In Docker environments, this is typically 'neo4j'
4242
$host = $_ENV['NEO4J_HOST'] ?? 'neo4j';
4343
$port = $_ENV['NEO4J_PORT'] ?? '7687';
44-
44+
4545
// Create a simple TCP connection test
46-
$socket = @fsockopen($host, (int)$port, $errno, $errstr, 5);
46+
$socket = @fsockopen($host, (int) $port, $errno, $errstr, 5);
4747
if (!$socket) {
4848
$this->markTestSkipped(
4949
'Neo4j server is not available for testing. '.
@@ -52,34 +52,34 @@ private function skipIfNeo4jNotAvailable(): void
5252
);
5353
}
5454
fclose($socket);
55-
55+
5656
// Additional check: Try to make a simple HTTP request to Neo4j's web interface
5757
$httpPort = $_ENV['NEO4J_HTTP_PORT'] ?? '7474';
5858
$context = stream_context_create([
5959
'http' => [
6060
'timeout' => 5,
61-
'method' => 'GET'
62-
]
61+
'method' => 'GET',
62+
],
6363
]);
64-
64+
6565
$httpResponse = @file_get_contents("http://$host:$httpPort", false, $context);
66-
if ($httpResponse === false) {
66+
if (false === $httpResponse) {
6767
$this->markTestSkipped(
6868
'Neo4j server is not fully available for testing. '.
6969
'Please start a Neo4j server to run profiler tests. '.
7070
"Error: Cannot connect to Neo4j HTTP interface at $host:$httpPort"
7171
);
7272
}
73-
73+
7474
// Final check: Try to create a minimal Neo4j client connection
7575
try {
7676
$user = $_ENV['NEO4J_USER'] ?? 'neo4j';
7777
$password = $_ENV['NEO4J_PASSWORD'] ?? 'testtest';
78-
78+
7979
$client = \Laudis\Neo4j\ClientBuilder::create()
8080
->withDriver('default', "bolt://$user:$password@$host:$port")
8181
->build();
82-
82+
8383
// Try a simple query to verify the connection works
8484
$result = $client->run('RETURN 1 as test');
8585
} catch (\Exception $e) {

tests/bootstrap.php

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,5 @@
22

33
declare(strict_types=1);
44

5-
use Symfony\Bridge\PhpUnit\DeprecationErrorHandler;
6-
7-
DeprecationErrorHandler::register(
8-
E_ALL & ~E_USER_DEPRECATED & ~E_DEPRECATED,
9-
[
10-
'Since symfony/routing 7.3: The "wdt.xml" routing configuration file is deprecated, import "wdt.php" instead.',
11-
'Since symfony/routing 7.3: The "profiler.xml" routing configuration file is deprecated, import "profiler.php" instead.',
12-
'Since symfony/framework-bundle 7.3: Setting the "framework.profiler.collect_serializer_data" config option to "false" is deprecated.',
13-
]
14-
);
15-
5+
// Load the Composer autoloader
166
require dirname(__DIR__).'/vendor/autoload.php';

0 commit comments

Comments
 (0)