Skip to content

Commit

Permalink
update dev dependencies & re-run rector
Browse files Browse the repository at this point in the history
  • Loading branch information
limenet committed Feb 20, 2024
1 parent e683c15 commit b4fbf9e
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 22 deletions.
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
"require-dev": {
"bamarni/composer-bin-plugin": "^1.8.2",
"phpstan/extension-installer": "^1.3.1",
"phpstan/phpstan": "^1.10.56",
"phpstan/phpstan": "^1.10.58",
"phpstan/phpstan-deprecation-rules": "^1.1.4",
"phpstan/phpstan-strict-rules": "^1.5.2",
"rector/rector": "^0.19.2",
"rector/rector": "^1.0.1",
"roave/security-advisories": "dev-latest",
"sentry/sentry": "^3.22.1",
"symfony/http-client": "^6.4.2"
"symfony/http-client": "^6.4.3"
},
"license": "MIT",
"authors": [
Expand Down
37 changes: 23 additions & 14 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,39 @@

declare(strict_types=1);

use Rector\CodeQuality\Rector\Foreach_\SimplifyForeachToCoalescingRector;
use Rector\CodeQuality\Rector\FuncCall\SingleInArrayToCompareRector;
use Rector\CodingStyle\Rector\FuncCall\CountArrayToEmptyArrayComparisonRector;
use Rector\Config\RectorConfig;
use Rector\Php55\Rector\String_\StringClassNameToClassConstantRector;
use Rector\Php80\Rector\FunctionLike\MixedTypeRector;
use Rector\Set\ValueObject\LevelSetList;
use Rector\Set\ValueObject\SetList;

return static function (RectorConfig $rectorConfig): void {
$rectorConfig->paths([
return RectorConfig::configure()
->withPhpSets()
->withPreparedSets(
codeQuality: true,
)
->withAttributesSets(
symfony: true,
doctrine: true,
)
->withPaths([
__DIR__ . '/src',
]);

$rectorConfig->skip([
])
->withSkip([
CountArrayToEmptyArrayComparisonRector::class,
StringClassNameToClassConstantRector::class => [
'src/Elastica/Client/ElasticsearchClientFactory.php',
],
MixedTypeRector::class => [
'src/Document/DataObjectNormalizerTrait.php',
'src/Index/IndexInterface.php',
],
]);

$rectorConfig->sets([
LevelSetList::UP_TO_PHP_81,
SetList::CODE_QUALITY,
]);
};
SingleInArrayToCompareRector::class => [
'src/Command/NonBundleIndexTrait.php',
],
SimplifyForeachToCoalescingRector::class => [
'src/Repository/IndexRepository.php',
],
])
->withRootFiles();
7 changes: 2 additions & 5 deletions src/Document/DataObjectNormalizerTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
use Pimcore\Model\DataObject\Concrete;
use Pimcore\Model\DataObject\Localizedfield;
use Pimcore\Tool;
use Symfony\Contracts\Service\Attribute\Required;

/**
* Collection of helpers for normalizing a DataObject.
Expand All @@ -19,11 +20,7 @@ trait DataObjectNormalizerTrait
{
protected LocaleService $localeService;

/**
* Injects the LocaleService using Symfony's DI.
*
* @required
*/
#[Required]
public function setLocaleService(LocaleService $localeService): void
{
$this->localeService = $localeService;
Expand Down

0 comments on commit b4fbf9e

Please sign in to comment.