Skip to content

Commit b169bb7

Browse files
Merge pull request #5 from kodus/feature/change-namespace
Feature/change namespace
2 parents 0842db6 + a977417 commit b169bb7

7 files changed

Lines changed: 34 additions & 14 deletions

File tree

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
language: php
22

33
php:
4-
- 7.4
54
- 8.0
65
- 8.1
76

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: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,21 @@
88
"name": "Rasmus Schultz",
99
"email": "rasmus@mindplay.dk"
1010
},
11-
{
11+
{
1212
"name": "Thomas Nordahl Pedersen",
1313
"email": "thno@jfmedier.dk"
14-
}
14+
}
1515
],
1616
"require": {
17-
"php": ">=7.4"
18-
},
19-
"autoload": {
20-
"psr-4": {
21-
"Kodus\\SQL\\": "src/"
22-
}
17+
"php": ">=8.0"
2318
},
2419
"require-dev": {
2520
"codeception/codeception": "^4.2",
2621
"codeception/module-asserts": "^2.0"
22+
},
23+
"autoload": {
24+
"psr-4": {
25+
"Kodus\\SQLSplit\\": "src/"
26+
}
2727
}
2828
}

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

tests/unit/SplitterCest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
namespace unit;
44

55
use Codeception\Example;
6-
use Kodus\SQL\Splitter;
6+
use Kodus\SQLSplit\Splitter;
77
use UnitTester;
88

99
class SplitterCest

tests/unit/TokenizerCest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
namespace unit;
44

55
use Codeception\Example;
6-
use Codeception\PHPUnit\TestCase;
7-
use Kodus\SQL\Tokenizer;
6+
use Kodus\SQLSplit\Tokenizer;
87
use UnitTester;
98

109
class TokenizerCest

0 commit comments

Comments
 (0)