Skip to content

Commit

Permalink
fix: Crash when data contains a single backslash (#233)
Browse files Browse the repository at this point in the history
* fix: Crash when data contains a single backslash

* refactor: Add remove orphans flag

* don't stress out our poor http endpoint :'(

---------

Co-authored-by: Ghlen Nagels <[email protected]>
  • Loading branch information
exaby73 and transistive authored Oct 9, 2024
1 parent 772ee90 commit c91a479
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
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)) {
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

0 comments on commit c91a479

Please sign in to comment.