Skip to content

Commit c8d043e

Browse files
authored
Php-82 (#341)
* Preparing for PHP 8.2 * fixing psalm in php 8.0 and 8.1 * allowing coverage upload to fail * adding fix from #340 * more restrictive php versions * php-cs-fixer fixes * bumping minimum php-cs-fixer version
1 parent 203f980 commit c8d043e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+1564
-1545
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
fail-fast: false
1414
matrix:
1515
operating-system: [ubuntu-latest]
16-
php-versions: ['7.4', '8.0', '8.1']
16+
php-versions: ['7.4', '8.0', '8.1', '8.2']
1717
composer-args: ['', '--prefer-lowest']
1818
runs-on: ${{ matrix.operating-system }}
1919
steps:
@@ -43,5 +43,4 @@ jobs:
4343
uses: codecov/codecov-action@v3
4444
with:
4545
files: ./tests/coverage/clover.xml
46-
fail_ci_if_error: true
4746
verbose: true
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Dependabot auto-merge
2+
on: pull_request
3+
4+
permissions:
5+
contents: write
6+
pull-requests: write
7+
8+
jobs:
9+
dependabot:
10+
runs-on: ubuntu-latest
11+
if: ${{ github.actor == 'dependabot[bot]' }}
12+
steps:
13+
- name: Dependabot metadata
14+
id: metadata
15+
uses: dependabot/fetch-metadata@v1
16+
with:
17+
github-token: "${{ secrets.GITHUB_TOKEN }}"
18+
- name: Enable auto-merge for Dependabot PRs
19+
run: gh pr merge --auto --merge "$PR_URL"
20+
env:
21+
PR_URL: ${{github.event.pull_request.html_url}}
22+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

.github/workflows/merge-me.yml

Lines changed: 0 additions & 32 deletions
This file was deleted.

composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,15 @@
3737
}
3838
],
3939
"require": {
40-
"php": "^7.4 || ~8.0.0 || ^8.1.0",
40+
"php": "^7.4 || ~8.0.0 || ~8.1.0 || ~8.2.0",
4141
"ext-pdo": "*",
4242
"symfony/yaml": "^3.4 || ^4.1 || ^5.0"
4343
},
4444
"require-dev": {
4545
"phpunit/php-code-coverage": "^9.1.10",
46-
"friendsofphp/php-cs-fixer": "3.6.0",
47-
"phpstan/phpstan": "1.4.2",
48-
"vimeo/psalm": "4.17.0"
46+
"friendsofphp/php-cs-fixer": "^3.51.0",
47+
"phpstan/phpstan": "1.10.14",
48+
"vimeo/psalm": "5.9.0"
4949
},
5050
"scripts": {
5151
"test": "cd tests && php run.php",

lib/Doctrine/Adapter/Oracle.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ public function setAttribute($attribute, $value)
255255
case Doctrine_Core::ATTR_DRIVER_NAME:
256256
//TODO throw an error since driver name can not be changed
257257
case Doctrine_Core::ATTR_ERRMODE:
258-
break;
258+
break;
259259
case Doctrine_Core::ATTR_CASE:
260260
if ($value == Doctrine_Core::CASE_NATURAL) {
261261
break;

lib/Doctrine/Adapter/Statement/Oracle.php

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ public function bindParam($column, &$variable, $type = null, $length = null, $dr
163163
switch ($type) {
164164
case Doctrine_Core::PARAM_STR:
165165
$oci_type = SQLT_CHR;
166-
break;
166+
break;
167167
}
168168

169169
if (is_integer($column)) {
@@ -317,25 +317,25 @@ public function fetch($fetchStyle = Doctrine_Core::FETCH_BOTH, $cursorOrientatio
317317
return oci_fetch_object($this->statement);
318318
default:
319319
throw new Doctrine_Adapter_Exception('This type of fetch is not supported: ' . $fetchStyle);
320-
/*
321-
case Doctrine_Core::FETCH_BOUND:
322-
case Doctrine_Core::FETCH_CLASS:
323-
case FETCH_CLASSTYPE:
324-
case FETCH_COLUMN:
325-
case FETCH_FUNC:
326-
case FETCH_GROUP:
327-
case FETCH_INTO:
328-
case FETCH_LAZY:
329-
case FETCH_NAMED:
330-
case FETCH_SERIALIZE:
331-
case FETCH_UNIQUE:
332-
case FETCH_ORI_ABS:
333-
case FETCH_ORI_FIRST:
334-
case FETCH_ORI_LAST:
335-
case FETCH_ORI_NEXT:
336-
case FETCH_ORI_PRIOR:
337-
case FETCH_ORI_REL:
338-
*/
320+
/*
321+
case Doctrine_Core::FETCH_BOUND:
322+
case Doctrine_Core::FETCH_CLASS:
323+
case FETCH_CLASSTYPE:
324+
case FETCH_COLUMN:
325+
case FETCH_FUNC:
326+
case FETCH_GROUP:
327+
case FETCH_INTO:
328+
case FETCH_LAZY:
329+
case FETCH_NAMED:
330+
case FETCH_SERIALIZE:
331+
case FETCH_UNIQUE:
332+
case FETCH_ORI_ABS:
333+
case FETCH_ORI_FIRST:
334+
case FETCH_ORI_LAST:
335+
case FETCH_ORI_NEXT:
336+
case FETCH_ORI_PRIOR:
337+
case FETCH_ORI_REL:
338+
*/
339339
}
340340
}
341341

@@ -524,7 +524,7 @@ public function setAttribute($attribute, $value)
524524
{
525525
switch ($attribute) {
526526
case Doctrine_Core::ATTR_ERRMODE:
527-
break;
527+
break;
528528
default:
529529
throw new Doctrine_Adapter_Exception("Unsupported Attribute: $attribute");
530530
}
@@ -572,7 +572,7 @@ private function handleError($params = array())
572572
// no break
573573
case Doctrine_Core::ERRMODE_WARNING:
574574
case Doctrine_Core::ERRMODE_SILENT:
575-
break;
575+
break;
576576
}
577577
}
578578

lib/Doctrine/Cli/AnsiColorFormatter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ public function formatSection($section, $text, $size = null)
134134
{
135135
$width = 9 + strlen($this->format('', 'INFO'));
136136

137-
return sprintf(">> %-${width}s %s", $this->format($section, 'INFO'), $this->excerpt($text, $size));
137+
return sprintf(">> %-{$width}s %s", $this->format($section, 'INFO'), $this->excerpt($text, $size));
138138
}
139139

140140
/**

lib/Doctrine/Connection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ public function __get($name)
465465
/** @psalm-var class-string $class */
466466
$class = 'Doctrine_' . ucwords($name) . '_' . $this->getDriverName();
467467
$this->modules[$name] = new $class($this);
468-
}
468+
}
469469
}
470470

471471
return $this->modules[$name];

lib/Doctrine/Connection/Mssql.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ protected function replaceBoundParamsWithInlineValuesInQuery($query, array $para
447447
* @return string
448448
*/
449449
function ($m) use ($value, $params) {
450-
return is_null($value) ? 'NULL' : $this->quote($params[$m[1]]);
450+
return is_null($value) ? 'NULL' : (string) $this->quote($params[$m[1]]);
451451
},
452452
$query
453453
);

lib/Doctrine/Connection/UnitOfWork.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,7 @@ public function update(Doctrine_Record $record)
542542
if ($table->getOption('joinedParents')) {
543543
// currrently just for bc!
544544
$this->_updateCTIRecord($table, $record);
545-
//--
545+
//--
546546
} else {
547547
$array = $record->getPrepared();
548548
$this->conn->update($table, $array, $identifier);
@@ -580,7 +580,7 @@ public function insert(Doctrine_Record $record)
580580
if ($table->getOption('joinedParents')) {
581581
// just for bc!
582582
$this->_insertCTIRecord($table, $record);
583-
//--
583+
//--
584584
} else {
585585
$this->processSingleInsert($record);
586586
}

0 commit comments

Comments
 (0)