Skip to content

Commit f859c16

Browse files
authored
Merge 429f5bb into fde7479
2 parents fde7479 + 429f5bb commit f859c16

31 files changed

+1069
-830
lines changed

.github/workflows/continuous-integration.yml

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818

1919
steps:
2020
- name: "Checkout"
21-
uses: "actions/checkout@v2"
21+
uses: "actions/checkout@v4"
2222

2323
- name: "Install PHP"
2424
uses: "shivammathur/setup-php@v2"
@@ -28,14 +28,14 @@ jobs:
2828
tools: "cs2pr"
2929

3030
- name: "Cache dependencies installed with composer"
31-
uses: "actions/cache@v1"
31+
uses: "actions/cache@v4"
3232
with:
3333
path: "~/.composer/cache"
3434
key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}"
3535
restore-keys: "php-${{ matrix.php-version }}-composer-locked-"
3636

3737
- name: "Install dependencies with composer"
38-
run: "composer install --no-interaction --no-progress --no-suggest"
38+
run: "composer install --no-interaction --no-progress"
3939

4040
- name: "Run PHP-CS-Fixer on src/"
4141
run: "vendor/bin/php-cs-fixer fix src/ --dry-run --stop-on-violation --format=checkstyle | cs2pr"
@@ -54,7 +54,7 @@ jobs:
5454

5555
steps:
5656
- name: "Checkout"
57-
uses: "actions/checkout@v2"
57+
uses: "actions/checkout@v4"
5858

5959
- name: "Install PHP"
6060
uses: "shivammathur/setup-php@v2"
@@ -64,14 +64,14 @@ jobs:
6464
tools: "cs2pr"
6565

6666
- name: "Cache dependencies installed with composer"
67-
uses: "actions/cache@v1"
67+
uses: "actions/cache@v4"
6868
with:
6969
path: "~/.composer/cache"
7070
key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}"
7171
restore-keys: "php-${{ matrix.php-version }}-composer-locked-"
7272

7373
- name: "Install dependencies with composer"
74-
run: "composer install --no-interaction --no-progress --no-suggest"
74+
run: "composer install --no-interaction --no-progress"
7575

7676
- name: "Run require-checker"
7777
run: "composer require-checker"
@@ -96,7 +96,7 @@ jobs:
9696

9797
steps:
9898
- name: "Checkout"
99-
uses: "actions/checkout@v2"
99+
uses: "actions/checkout@v4"
100100
with:
101101
fetch-depth: 2
102102

@@ -109,20 +109,20 @@ jobs:
109109
tools: "cs2pr"
110110

111111
- name: "Cache dependencies installed with composer"
112-
uses: "actions/cache@v1"
112+
uses: "actions/cache@v4"
113113
with:
114114
path: "~/.composer/cache"
115115
key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}"
116116
restore-keys: "php-${{ matrix.php-version }}-composer-locked-"
117117

118118
- name: "Install dependencies with composer"
119-
run: "composer install --no-interaction --no-progress --no-suggest"
119+
run: "composer install --no-interaction --no-progress"
120120

121121
- name: "Run PHPUnit"
122122
run: "vendor/bin/phpunit -c phpunit.mysql8.xml --coverage-clover=coverage.xml"
123123

124124
- name: "Upload Code Coverage"
125-
uses: "codecov/codecov-action@v1"
125+
uses: "codecov/codecov-action@v5"
126126

127127
# PHPStan is run after PHPUnit because we want to analyze the generated files too.
128128
- name: "Run a static analysis with phpstan/phpstan"
@@ -149,7 +149,7 @@ jobs:
149149

150150
steps:
151151
- name: "Checkout"
152-
uses: "actions/checkout@v2"
152+
uses: "actions/checkout@v4"
153153
with:
154154
fetch-depth: 2
155155

@@ -161,20 +161,20 @@ jobs:
161161
coverage: "pcov"
162162

163163
- name: "Cache dependencies installed with composer"
164-
uses: "actions/cache@v1"
164+
uses: "actions/cache@v4"
165165
with:
166166
path: "~/.composer/cache"
167167
key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}"
168168
restore-keys: "php-${{ matrix.php-version }}-composer-locked-"
169169

170170
- name: "Install dependencies with composer"
171-
run: "composer install --no-interaction --no-progress --no-suggest"
171+
run: "composer install --no-interaction --no-progress"
172172

173173
- name: "Run PHPUnit"
174174
run: "vendor/bin/phpunit -c phpunit.mysql8.xml --coverage-clover=coverage.xml"
175175

176176
- name: "Upload Code Coverage"
177-
uses: "codecov/codecov-action@v1"
177+
uses: "codecov/codecov-action@v5"
178178

179179
phpunit-prefer-lowest:
180180
name: "PHPUnit with prefer-lowest"
@@ -196,7 +196,7 @@ jobs:
196196

197197
steps:
198198
- name: "Checkout"
199-
uses: "actions/checkout@v2"
199+
uses: "actions/checkout@v4"
200200
with:
201201
fetch-depth: 2
202202

@@ -208,20 +208,20 @@ jobs:
208208
coverage: "pcov"
209209

210210
- name: "Cache dependencies installed with composer"
211-
uses: "actions/cache@v1"
211+
uses: "actions/cache@v4"
212212
with:
213213
path: "~/.composer/cache"
214214
key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}"
215215
restore-keys: "php-${{ matrix.php-version }}-composer-locked-"
216216

217217
- name: "Install dependencies with composer"
218-
run: "composer update --no-interaction --no-progress --no-suggest --prefer-lowest"
218+
run: "composer update --no-interaction --no-progress --prefer-lowest"
219219

220220
- name: "Run PHPUnit"
221221
run: "vendor/bin/phpunit -c phpunit.mysql8.xml --coverage-clover=coverage.xml"
222222

223223
- name: "Upload Code Coverage"
224-
uses: "codecov/codecov-action@v1"
224+
uses: "codecov/codecov-action@v5"
225225

226226
phpunit-mariadb105:
227227
name: "PHPUnit on MariaDB 10.5"
@@ -242,7 +242,7 @@ jobs:
242242

243243
steps:
244244
- name: "Checkout"
245-
uses: "actions/checkout@v2"
245+
uses: "actions/checkout@v4"
246246
with:
247247
fetch-depth: 2
248248

@@ -254,20 +254,20 @@ jobs:
254254
coverage: "pcov"
255255

256256
- name: "Cache dependencies installed with composer"
257-
uses: "actions/cache@v1"
257+
uses: "actions/cache@v4"
258258
with:
259259
path: "~/.composer/cache"
260260
key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}"
261261
restore-keys: "php-${{ matrix.php-version }}-composer-locked-"
262262

263263
- name: "Install dependencies with composer"
264-
run: "composer install --no-interaction --no-progress --no-suggest"
264+
run: "composer install --no-interaction --no-progress"
265265

266266
- name: "Run PHPUnit"
267267
run: "vendor/bin/phpunit -c phpunit.mariadb.xml --coverage-clover=coverage.xml"
268268

269269
- name: "Upload Code Coverage"
270-
uses: "codecov/codecov-action@v1"
270+
uses: "codecov/codecov-action@v5"
271271

272272
phpunit-postgresql:
273273
name: "PHPUnit on PostgreSQL"
@@ -293,7 +293,7 @@ jobs:
293293
--health-retries 5
294294
steps:
295295
- name: "Checkout"
296-
uses: "actions/checkout@v2"
296+
uses: "actions/checkout@v4"
297297
with:
298298
fetch-depth: 2
299299

@@ -305,20 +305,20 @@ jobs:
305305
coverage: "pcov"
306306

307307
- name: "Cache dependencies installed with composer"
308-
uses: "actions/cache@v1"
308+
uses: "actions/cache@v4"
309309
with:
310310
path: "~/.composer/cache"
311311
key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}"
312312
restore-keys: "php-${{ matrix.php-version }}-composer-locked-"
313313

314314
- name: "Install dependencies with composer"
315-
run: "composer install --no-interaction --no-progress --no-suggest"
315+
run: "composer install --no-interaction --no-progress"
316316

317317
- name: "Run PHPUnit"
318318
run: "vendor/bin/phpunit -c phpunit.postgres.github.xml --coverage-clover=coverage.xml"
319319

320320
- name: "Upload Code Coverage"
321-
uses: "codecov/codecov-action@v1"
321+
uses: "codecov/codecov-action@v5"
322322

323323
phpunit-phpbench:
324324
name: "PHPBench"
@@ -340,7 +340,7 @@ jobs:
340340

341341
steps:
342342
- name: "Checkout"
343-
uses: "actions/checkout@v2"
343+
uses: "actions/checkout@v4"
344344
with:
345345
fetch-depth: 0
346346

@@ -352,14 +352,14 @@ jobs:
352352
coverage: "pcov"
353353

354354
- name: "Cache dependencies installed with composer"
355-
uses: "actions/cache@v1"
355+
uses: "actions/cache@v4"
356356
with:
357357
path: "~/.composer/cache"
358358
key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}"
359359
restore-keys: "php-${{ matrix.php-version }}-composer-locked-"
360360

361361
- name: "Install dependencies with composer"
362-
run: "composer install --no-interaction --no-progress --no-suggest"
362+
run: "composer install --no-interaction --no-progress"
363363

364364
- name: "Running PHPBench on current branch"
365365
run: "./phpbench.dist.sh run --tag=current_pr --store"
@@ -393,7 +393,7 @@ jobs:
393393

394394
steps:
395395
- name: "Checkout"
396-
uses: "actions/checkout@v2"
396+
uses: "actions/checkout@v4"
397397

398398
- name: "Install PHP"
399399
uses: "shivammathur/setup-php@v2"
@@ -403,17 +403,17 @@ jobs:
403403
coverage: "pcov"
404404

405405
- name: "Cache dependencies installed with composer"
406-
uses: "actions/cache@v1"
406+
uses: "actions/cache@v4"
407407
with:
408408
path: "~/.composer/cache"
409409
key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}"
410410
restore-keys: "php-${{ matrix.php-version }}-composer-locked-"
411411

412412
- name: "Install dependencies with composer"
413-
run: "composer install --no-interaction --no-progress --no-suggest"
413+
run: "composer install --no-interaction --no-progress"
414414

415415
- name: "Run PHPUnit"
416416
run: "vendor/bin/phpunit -c phpunit.oracle.xml --coverage-clover=coverage.xml"
417417

418418
- name: "Upload Code Coverage"
419-
uses: "codecov/codecov-action@v1"
419+
uses: "codecov/codecov-action@v5"

.github/workflows/deploy-website.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717

1818
steps:
1919
- name: "Checkout"
20-
uses: "actions/checkout@v2"
20+
uses: "actions/checkout@v4"
2121

2222
- uses: CouscousPHP/GitHub-Action@v1
2323
- name: Deploy

composer.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,22 +19,22 @@
1919
],
2020
"require" : {
2121
"php": "^7.4 || ^8.0",
22-
"mouf/magic-query": "^1.4.3",
22+
"mouf/magic-query": "^2.0",
2323
"mouf/schema-analyzer": "^2.0",
2424
"doctrine/dbal": "^3.0",
2525
"psr/log": "^1 || ^2 || ^3",
2626
"doctrine/inflector": "^1.4.3 || ^2",
2727
"mouf/classname-mapper": "~1.0",
2828
"doctrine/cache": "^1.6",
2929
"greenlion/php-sql-parser": "^4.3.0",
30-
"symfony/console": "^2 || ^3 || ^4 || ^5",
30+
"symfony/console": "^2 || ^3 || ^4 || ^5 || ^6",
3131
"mouf/utils.log.psr.multi-logger": "^1.0",
32-
"symfony/filesystem": "^2.7 || ^3 || ^4 || ^5",
32+
"symfony/filesystem": "^2.7 || ^3 || ^4 || ^5 || ^6",
33+
"symfony/yaml": "^2 || ^3 || ^4 || ^5 || ^6",
3334
"ramsey/uuid": "^3.7 || ^4.0",
3435
"doctrine/annotations": "^1.10",
3536
"laminas/laminas-code": "^4.7",
3637
"psr/container": "^1 || ^2",
37-
"brain-diminished/schema-version-control": "^1.0.5",
3838
"ext-PDO": "*",
3939
"ext-json": "*",
4040
"ext-hash": "*",
@@ -47,7 +47,7 @@
4747
"wa72/simplelogger": "^1.0",
4848
"friendsofphp/php-cs-fixer": "^3.11",
4949
"symfony/process": "^3 || ^4 || ^5",
50-
"thecodingmachine/tdbm-fluid-schema-builder": "^1.0.0",
50+
"thecodingmachine/tdbm-fluid-schema-builder": "^v2.0.0",
5151
"phpstan/phpstan": "^0.12.81",
5252
"thecodingmachine/phpstan-strict-rules": "^0.12.1",
5353
"bamarni/composer-bin-plugin": "^1.4.1",

src/AlterableResultIterator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ public function offsetGet($offset)
177177
*
178178
* @since 5.0.0
179179
*/
180-
public function offsetSet($offset, $value)
180+
public function offsetSet($offset, $value): void
181181
{
182182
throw new TDBMInvalidOperationException('You can set values in a TDBM result set, even in an alterable one. Use the add method instead.');
183183
}
@@ -193,7 +193,7 @@ public function offsetSet($offset, $value)
193193
*
194194
* @since 5.0.0
195195
*/
196-
public function offsetUnset($offset)
196+
public function offsetUnset($offset): void
197197
{
198198
throw new TDBMInvalidOperationException('You can unset values in a TDBM result set, even in an alterable one. Use the delete method instead.');
199199
}

src/Configuration.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@
1010
use Mouf\Database\SchemaAnalyzer\SchemaAnalyzer;
1111
use TheCodingMachine\TDBM\Schema\LockFileSchemaManager;
1212
use TheCodingMachine\TDBM\Utils\Annotation\AnnotationParser;
13-
use TheCodingMachine\TDBM\Utils\Annotation\Autoincrement;
14-
use TheCodingMachine\TDBM\Utils\Annotation\UUID;
15-
use TheCodingMachine\TDBM\Utils\BaseCodeGeneratorListener;
1613
use TheCodingMachine\TDBM\Utils\CodeGeneratorEventDispatcher;
1714
use TheCodingMachine\TDBM\Utils\CodeGeneratorListenerInterface;
1815
use TheCodingMachine\TDBM\Utils\DefaultNamingStrategy;
@@ -24,6 +21,9 @@
2421
use TheCodingMachine\TDBM\Utils\PathFinder\PathFinder;
2522
use TheCodingMachine\TDBM\Utils\RootProjectLocator;
2623

24+
use function hash;
25+
use function serialize;
26+
2727
class Configuration implements ConfigurationInterface
2828
{
2929
/**
@@ -221,7 +221,7 @@ public function getCodeGeneratorListener(): CodeGeneratorListenerInterface
221221
*/
222222
private function getConnectionUniqueId(): string
223223
{
224-
return hash('md4', $this->connection->getHost().'-'.$this->connection->getPort().'-'.$this->connection->getDatabase().'-'.$this->connection->getDriver()->getName());
224+
return hash('md4', serialize($this->connection->getParams()));
225225
}
226226

227227
/**

src/DbRow.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ public function _dbLoadIfNotLoaded(): void
211211
$this->dbRow[$key] = $types[$key]->convertToPHPValue($value, $connection->getDatabasePlatform());
212212
}
213213

214-
$result->closeCursor();
214+
$result->free();
215215

216216
$this->status = TDBMObjectStateEnum::STATE_LOADED;
217217
}

src/EmptyInnerResultIterator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public function offsetGet($offset)
106106
* @return void
107107
* @since 5.0.0
108108
*/
109-
public function offsetSet($offset, $value)
109+
public function offsetSet($offset, $value): void
110110
{
111111
throw new TDBMInvalidOperationException('You cannot set values in a TDBM result set.');
112112
}
@@ -120,7 +120,7 @@ public function offsetSet($offset, $value)
120120
* @return void
121121
* @since 5.0.0
122122
*/
123-
public function offsetUnset($offset)
123+
public function offsetUnset($offset): void
124124
{
125125
throw new TDBMInvalidOperationException('You cannot unset values in a TDBM result set.');
126126
}

0 commit comments

Comments
 (0)