Skip to content

Commit acbe7aa

Browse files
author
Carl Sverre
authored
Cleanup, formatting, tests (#42)
* remove @author * cleanup some formatting * make the Misc test suite run and pass (wasn't running before) * test the mediumint question from issue #37
1 parent 9a5eef4 commit acbe7aa

37 files changed

+163
-229
lines changed

.github/workflows/tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
services:
4747
singlestore:
4848
# check for new versions at https://github.com/singlestore-labs/singlestoredb-dev-image/pkgs/container/singlestoredb-dev/versions
49-
image: ghcr.io/singlestore-labs/singlestoredb-dev:0.0.8
49+
image: ghcr.io/singlestore-labs/singlestoredb-dev:0.1.3
5050
ports:
5151
- "3306:3306"
5252
env:
@@ -57,10 +57,10 @@ jobs:
5757

5858
steps:
5959
- name: Checkout code
60-
uses: actions/checkout@v2
60+
uses: actions/checkout@v3
6161

6262
- name: Cache dependencies
63-
uses: actions/cache@v2
63+
uses: actions/cache@v3
6464
with:
6565
path: ~/.composer/cache/files
6666
key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}

composer.json

Lines changed: 47 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,50 @@
11
{
2-
"name": "singlestoredb/singlestoredb-laravel",
3-
"description": "A SingleStoreDB database driver for Laravel.",
4-
"type": "library",
5-
"license": "Apache-2.0",
6-
"autoload": {
7-
"psr-4": {
8-
"SingleStore\\Laravel\\": "src/"
9-
}
2+
"name": "singlestoredb/singlestoredb-laravel",
3+
"description": "A SingleStoreDB database driver for Laravel.",
4+
"type": "library",
5+
"license": "Apache-2.0",
6+
"autoload": {
7+
"psr-4": {
8+
"SingleStore\\Laravel\\": "src/"
9+
}
10+
},
11+
"autoload-dev": {
12+
"psr-4": {
13+
"SingleStore\\Laravel\\Tests\\": "tests/"
14+
}
15+
},
16+
"authors": [
17+
{
18+
"name": "Aaron Francis",
19+
"email": "aarondfrancis@gmail.com"
1020
},
11-
"autoload-dev": {
12-
"psr-4": {
13-
"SingleStore\\Laravel\\Tests\\": "tests/"
14-
}
15-
},
16-
"authors": [
17-
{
18-
"name": "Aaron Francis",
19-
"email": "aarondfrancis@gmail.com"
20-
}
21-
],
22-
"require": {
23-
"php": "^7.3|^8.0",
24-
"illuminate/container": "^8.0|^9.0",
25-
"illuminate/database": "^8.0|^9.0",
26-
"illuminate/events": "^8.0|^9.0",
27-
"illuminate/support": "^8.0|^9.0"
28-
},
29-
"require-dev": {
30-
"mockery/mockery": "^1.5",
31-
"orchestra/testbench": "^6.0|^7.0|^8.0",
32-
"phpunit/phpunit": "^8.5.23|^9.5"
33-
},
34-
"config": {
35-
"sort-packages": true
36-
},
37-
"extra": {
38-
"laravel": {
39-
"providers": [
40-
"SingleStore\\Laravel\\SingleStoreProvider"
41-
]
42-
}
43-
},
44-
"minimum-stability": "dev",
45-
"prefer-stable": true
21+
{
22+
"name": "Carl Sverre",
23+
"email": "carl@singlestore.com"
24+
}
25+
],
26+
"require": {
27+
"php": "^7.3|^8.0",
28+
"illuminate/container": "^8.0|^9.0",
29+
"illuminate/database": "^8.0|^9.0",
30+
"illuminate/events": "^8.0|^9.0",
31+
"illuminate/support": "^8.0|^9.0"
32+
},
33+
"require-dev": {
34+
"mockery/mockery": "^1.5",
35+
"orchestra/testbench": "^6.0|^7.0|^8.0",
36+
"phpunit/phpunit": "^8.5.23|^9.5"
37+
},
38+
"config": {
39+
"sort-packages": true
40+
},
41+
"extra": {
42+
"laravel": {
43+
"providers": [
44+
"SingleStore\\Laravel\\SingleStoreProvider"
45+
]
46+
}
47+
},
48+
"minimum-stability": "dev",
49+
"prefer-stable": true
4650
}

src/Connect/Connection.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
<?php
2-
/**
3-
* @author Aaron Francis <aarondfrancis@gmail.com|https://twitter.com/aarondfrancis>
4-
*/
52

63
namespace SingleStore\Laravel\Connect;
74

@@ -54,7 +51,9 @@ protected function getDefaultSchemaGrammar()
5451
public function query()
5552
{
5653
return new Query\Builder(
57-
$this, $this->getQueryGrammar(), $this->getPostProcessor()
54+
$this,
55+
$this->getQueryGrammar(),
56+
$this->getPostProcessor()
5857
);
5958
}
6059
}

src/Connect/Connector.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
<?php
2-
/**
3-
* @author Aaron Francis <aarondfrancis@gmail.com|https://twitter.com/aarondfrancis>
4-
*/
52

63
namespace SingleStore\Laravel\Connect;
74

src/Exceptions/SingleStoreDriverException.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
<?php
2-
/**
3-
* @author Aaron Francis <aarondfrancis@gmail.com|https://twitter.com/aarondfrancis>
4-
*/
52

63
namespace SingleStore\Laravel\Exceptions;
74

src/Exceptions/UnsupportedFunctionException.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
<?php
2-
/**
3-
* @author Aaron Francis <aarondfrancis@gmail.com|https://twitter.com/aarondfrancis>
4-
*/
52

63
namespace SingleStore\Laravel\Exceptions;
74

src/Fluency/SpatialIndexCommand.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
<?php
2-
/**
3-
* @author Aaron Francis <aarondfrancis@gmail.com|https://twitter.com/aarondfrancis>
4-
*/
52

63
namespace SingleStore\Laravel\Fluency;
74

src/Query/Builder.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
<?php
2-
/**
3-
* @author Aaron Francis <aarondfrancis@gmail.com|https://twitter.com/aarondfrancis>
4-
*/
52

63
namespace SingleStore\Laravel\Query;
74

src/Query/Grammar.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
<?php
2-
/**
3-
* @author Aaron Francis <aarondfrancis@gmail.com|https://twitter.com/aarondfrancis>
4-
*/
52

63
namespace SingleStore\Laravel\Query;
74

@@ -83,7 +80,9 @@ protected function wrapJsonSelector($value)
8380
protected function wrapJsonBooleanSelector($value)
8481
{
8582
return str_replace(
86-
'JSON_EXTRACT_STRING', 'JSON_EXTRACT_DOUBLE', $this->wrapJsonSelector($value)
83+
'JSON_EXTRACT_STRING',
84+
'JSON_EXTRACT_DOUBLE',
85+
$this->wrapJsonSelector($value)
8786
);
8887
}
8988

src/Schema/Blueprint.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
<?php
2-
/**
3-
* @author Aaron Francis <aarondfrancis@gmail.com|https://twitter.com/aarondfrancis>
4-
*/
52

63
namespace SingleStore\Laravel\Schema;
74

0 commit comments

Comments
 (0)