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

fix: Crash when data contains a single backslash #233

Merged
merged 3 commits into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/integration-test-cluster-neo4j-4.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- uses: hoverkraft-tech/[email protected]
with:
compose-file: './docker-compose-neo4j-4.yml'
up-flags: '--build'
up-flags: '--build --remove-orphans'
- name: Test
run: |
docker compose run client composer install
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/integration-test-cluster-neo4j-5.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- uses: hoverkraft-tech/[email protected]
with:
compose-file: './docker-compose.yml'
up-flags: '--build'
up-flags: '--build --remove-orphans'
- name: Test
run: |
docker compose run client composer install
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/integration-test-single-server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- uses: hoverkraft-tech/[email protected]
with:
compose-file: './docker-compose-neo4j-4.yml'
up-flags: '--build'
up-flags: '--build --remove-orphans'
- name: Composer install
run: |
docker compose run client composer install
Expand Down
2 changes: 1 addition & 1 deletion src/Formatter/Specialised/BoltOGMTranslator.php
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ public function mapValueToType(mixed $value)
$type = get_debug_type($value);
foreach ($this->rawToTypes as $class => $formatter) {
/** @psalm-suppress ArgumentTypeCoercion */
if ($type === $class || is_a($value, $class, true)) {
if ($type === $class || is_a($value, $class)) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great catch bhai

return $formatter($value);
}
}
Expand Down
4 changes: 4 additions & 0 deletions tests/Integration/EdgeCasesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ public function testComplex(): void

public function testRunALotOfStatements(): void
{
if (str_starts_with($_ENV['CONNECTION'] ?? '', 'http')) {
$this->markTestSkipped('HTTP mass queries overload tiny neo4j instances');
}

$persons = $this->getSession()->run('MATCH (p:Person) RETURN p');
$movies = $this->getSession()->run('MATCH (m:Movie) RETURN m');

Expand Down
Loading