Skip to content

Commit

Permalink
deps: bump rekapager (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
priyadi authored Sep 1, 2024
1 parent f839842 commit 794e07a
Show file tree
Hide file tree
Showing 6 changed files with 70 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# CHANGELOG

## 0.7.5

* deps: bump rekapager

## 0.7.3

* build: exclude buggy `symfony/property-info`,
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
"api-platform/core": "^3.2.12 || ^3.3",
"doctrine/collections": "^2.2",
"rekalogika/mapper": "^1.1",
"rekalogika/rekapager-api-platform": "^0.15",
"rekalogika/rekapager-doctrine-collections-adapter": "^0.15",
"rekalogika/rekapager-doctrine-orm-adapter": "^0.15",
"rekalogika/rekapager-api-platform": "^0.17",
"rekalogika/rekapager-doctrine-collections-adapter": "^0.17",
"rekalogika/rekapager-doctrine-orm-adapter": "^0.17",
"symfony/dependency-injection": "^6.4 || ^7.0",
"symfony/http-kernel": "^6.4 || ^7.0",
"symfony/security-core": "^6.4 || ^7.0",
Expand Down
2 changes: 2 additions & 0 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ parameters:
checkInternalClassCaseSensitivity: true
reportMaybesInPropertyPhpDocTypes: true
treatPhpDocTypesAsCertain: false
excludePaths:
- tests/src/Factory
includes:
- vendor/phpstan/phpstan-phpunit/extension.neon
- vendor/phpstan/phpstan-phpunit/rules.neon
Expand Down
57 changes: 57 additions & 0 deletions rector.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<?php

declare(strict_types=1);

use Rector\CodeQuality\Rector\Identical\FlipTypeControlToUseExclusiveTypeRector;
use Rector\CodeQuality\Rector\If_\CombineIfRector;
use Rector\CodeQuality\Rector\If_\SimplifyIfElseToTernaryRector;
use Rector\CodingStyle\Rector\Catch_\CatchExceptionNameMatchingTypeRector;
use Rector\CodingStyle\Rector\Use_\SeparateMultiUseImportsRector;
use Rector\Config\RectorConfig;
use Rector\DeadCode\Rector\Assign\RemoveUnusedVariableAssignRector;
use Rector\DeadCode\Rector\ClassMethod\RemoveUnusedPublicMethodParameterRector;
use Rector\DeadCode\Rector\ClassMethod\RemoveUselessParamTagRector;
use Rector\DeadCode\Rector\ClassMethod\RemoveUselessReturnTagRector;
use Rector\DeadCode\Rector\Node\RemoveNonExistingVarAnnotationRector;
use Rector\Php71\Rector\FuncCall\RemoveExtraParametersRector;
use Rector\Php83\Rector\ClassMethod\AddOverrideAttributeToOverriddenMethodsRector;
use Rector\Strict\Rector\Ternary\DisallowedShortTernaryRuleFixerRector;
use Rector\ValueObject\PhpVersion;

return RectorConfig::configure()
->withPhpVersion(PhpVersion::PHP_83)
->withPaths([
__DIR__ . '/src',
__DIR__ . '/tests/bin',
__DIR__ . '/tests/config',
__DIR__ . '/tests/public',
__DIR__ . '/tests/src',
])
->withPreparedSets(
deadCode: true,
codeQuality: true,
codingStyle: true,
typeDeclarations: true,
privatization: true,
instanceOf: true,
strictBooleans: true,
symfonyCodeQuality: true,
doctrineCodeQuality: true,
)
->withPhpSets(php82: true)
->withRules([
AddOverrideAttributeToOverriddenMethodsRector::class,
])
->withSkip([
// potential cognitive burden
FlipTypeControlToUseExclusiveTypeRector::class,

// results in too long variables
CatchExceptionNameMatchingTypeRector::class,

// makes code unreadable
DisallowedShortTernaryRuleFixerRector::class,

// unsafe
SeparateMultiUseImportsRector::class,
]);
4 changes: 2 additions & 2 deletions tests/src/Repository/BookRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
* @extends ServiceEntityRepository<Book>
*
* @method Book|null find($id, $lockMode = null, $lockVersion = null)
* @method Book|null findOneBy(array $criteria, array $orderBy = null)
* @method Book|null findOneBy(array<string,mixed> $criteria, ?array<string,string> $orderBy = null)
* @method Book[] findAll()
* @method Book[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
* @method Book[] findBy(array<string,mixed> $criteria, ?array<string,string> $orderBy = null, $limit = null, $offset = null)
*/
class BookRepository extends ServiceEntityRepository
{
Expand Down
4 changes: 2 additions & 2 deletions tests/src/Repository/ReviewRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
* @extends ServiceEntityRepository<Review>
*
* @method Review|null find($id, $lockMode = null, $lockVersion = null)
* @method Review|null findOneBy(array $criteria, array $orderBy = null)
* @method Review|null findOneBy(array<string,mixed> $criteria, ?array<string,string> $orderBy = null)
* @method Review[] findAll()
* @method Review[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
* @method Review[] findBy(array<string,mixed> $criteria, ?array<string,string> $orderBy = null, $limit = null, $offset = null)
*/
class ReviewRepository extends ServiceEntityRepository
{
Expand Down

0 comments on commit 794e07a

Please sign in to comment.