Skip to content

Commit

Permalink
DevKit updates for 4.x branch (#8195)
Browse files Browse the repository at this point in the history
Co-authored-by: Vincent Langlet <[email protected]>
  • Loading branch information
SonataCI and VincentLanglet authored Jul 15, 2024
1 parent 77db467 commit 64c6e28
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

use Rector\Config\RectorConfig;
use Rector\Php70\Rector\FunctionLike\ExceptionHandlerTypehintRector;
use Rector\PHPUnit\CodeQuality\Rector\Class_\AddSeeTestAnnotationRector;
use Rector\PHPUnit\CodeQuality\Rector\Class_\PreferPHPUnitThisCallRector;
use Rector\PHPUnit\Set\PHPUnitSetList;
use Rector\Set\ValueObject\LevelSetList;
Expand All @@ -40,7 +39,6 @@
$rectorConfig->importShortClasses(false);
$rectorConfig->skip([
ExceptionHandlerTypehintRector::class,
AddSeeTestAnnotationRector::class,
PreferPHPUnitThisCallRector::class,
]);
};
4 changes: 2 additions & 2 deletions src/Admin/AbstractAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -1840,7 +1840,7 @@ protected function generateBaseRoutePattern(bool $isChildAdmin = false): string

preg_match(self::CLASS_REGEX, $this->getModelClass(), $matches);

if ([] === $matches) {
if (!isset($matches[1], $matches[3], $matches[5])) {
throw new \LogicException(sprintf(
'Please define a default `baseRoutePattern` value for the admin class `%s`',
static::class
Expand Down Expand Up @@ -1877,7 +1877,7 @@ protected function generateBaseRouteName(bool $isChildAdmin = false): string

preg_match(self::CLASS_REGEX, $this->getModelClass(), $matches);

if ([] === $matches) {
if (!isset($matches[1], $matches[3], $matches[5])) {
throw new \LogicException(sprintf(
'Cannot automatically determine base route name,'
.' please define a default `baseRouteName` value for the admin class `%s`',
Expand Down

0 comments on commit 64c6e28

Please sign in to comment.