Skip to content

Commit b6a9384

Browse files
authored
Merge pull request #2849 from tarlepp/tools/phpstan-deprecation-rules
Chore(tools) - Added `phpstan/phpstan-deprecation-rules`
2 parents 964d89b + c0703ef commit b6a9384

File tree

15 files changed

+271
-194
lines changed

15 files changed

+271
-194
lines changed

.idea/symfony-flex-backend.iml

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

phpstan.neon.dist

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,6 @@ parameters:
2727
- src/*
2828
includes:
2929
- tools/02_phpstan/vendor/phpstan/phpstan/conf/bleedingEdge.neon
30+
- tools/02_phpstan/vendor/phpstan/phpstan-deprecation-rules/rules.neon
3031
- tools/02_phpstan/vendor/phpstan/phpstan-phpunit/extension.neon
3132
- tools/02_phpstan/vendor/phpstan/phpstan-symfony/extension.neon

src/Doctrine/DBAL/Types/UTCDateTimeType.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
use DateTime;
1212
use DateTimeInterface;
1313
use DateTimeZone;
14+
use Doctrine\DBAL\Exception;
1415
use Doctrine\DBAL\Platforms\AbstractPlatform;
1516
use Doctrine\DBAL\Types\ConversionException;
1617
use Doctrine\DBAL\Types\DateTimeType;
@@ -47,6 +48,7 @@ public function convertToDatabaseValue($value, AbstractPlatform $platform): stri
4748
* @template T
4849
*
4950
* @throws ConversionException
51+
* @throws Exception
5052
*/
5153
public function convertToPHPValue($value, AbstractPlatform $platform): DateTimeInterface|null
5254
{
@@ -77,6 +79,7 @@ private function getUtcDateTimeZone(): DateTimeZone
7779
* Method to check if conversion was successfully or not.
7880
*
7981
* @throws ConversionException
82+
* @throws Exception
8083
*/
8184
private function checkConvertedValue(string $value, AbstractPlatform $platform, ?DateTime $converted): DateTime
8285
{
@@ -86,7 +89,7 @@ private function checkConvertedValue(string $value, AbstractPlatform $platform,
8689

8790
throw ConversionException::conversionFailedFormat(
8891
$value,
89-
$this->getName(),
92+
self::lookupName($this),
9093
$platform->getDateTimeFormatString()
9194
);
9295
}

tools/01_phpunit/composer.lock

Lines changed: 10 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tools/02_phpstan/composer.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@
66
"php": "^8.3.0"
77
},
88
"require-dev": {
9-
"phpstan/phpstan": "1.12.4",
9+
"phpstan/phpstan": "1.12.5",
10+
"phpstan/phpstan-deprecation-rules": "1.2.1",
1011
"phpstan/phpstan-phpunit": "1.4.0",
11-
"phpstan/phpstan-symfony": "1.4.9",
12+
"phpstan/phpstan-symfony": "1.4.10",
1213
"roave/security-advisories": "dev-latest"
1314
},
1415
"config": {

tools/02_phpstan/composer.lock

Lines changed: 69 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)