Skip to content

Commit 7929fca

Browse files
Changed namespace (bc break)
1 parent 8ff8c1d commit 7929fca

5 files changed

Lines changed: 28 additions & 6 deletions

File tree

UPGRADING.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
UPGRADING
2+
=========
3+
## 1.x → 2.x
4+
5+
### PHP 8.0 required
6+
From version 2.0.0, `kodus/sql-split` requires at least PHP version 8.0
7+
8+
### Namespace changed
9+
From version 2.0.0, the namespace of the `Splitter` and `Tokenizer` has changed from `Kodus\SQL` to `Kodus\SQLSplit`.
10+
11+
```diff
12+
<?php
13+
14+
-use Kodus\SQLSplit\Splitter;
15+
+use Kodus\SQLSPlit\Splitter;
16+
-use Kodus\SQLSplit\Tokenizer;
17+
+use Kodus\SQLSPlit\Tokenizer;
18+
```
19+
20+
_The namespace Kodus/SQL collided with a namespace of another (private) kodus repository. The namespace `Kodus\SQL` is
21+
more appropriate for the other repository, so this change was preferred, even though this leads to a
22+
backwards compatibility break for this (public) repository._

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@
1414
}
1515
],
1616
"require": {
17-
"php": "^7.0|^8.0"
17+
"php": ">=8.0"
1818
},
1919
"require-dev": {
2020
"mindplay/testies": "^0.3.0"
2121
},
2222
"autoload": {
2323
"psr-4": {
24-
"Kodus\\SQL\\": "src/"
24+
"Kodus\\SQLSplit\\": "src/"
2525
}
2626
}
2727
}

src/Splitter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace Kodus\SQL;
3+
namespace Kodus\SQLSplit;
44

55
/**
66
* This class implements comment-stripping and kerjiggers the SQL tokens back into statements.

src/Tokenizer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace Kodus\SQL;
3+
namespace Kodus\SQLSplit;
44

55
use RuntimeException;
66

test/test.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

3-
use Kodus\SQL\Splitter;
4-
use Kodus\SQL\Tokenizer;
3+
use Kodus\SQLSplit\Splitter;
4+
use Kodus\SQLSplit\Tokenizer;
55

66
require dirname(__DIR__) . '/vendor/autoload.php';
77

0 commit comments

Comments
 (0)