Skip to content

Commit b2dd6f0

Browse files
committed
Fix the build
1 parent 1bbbaeb commit b2dd6f0

File tree

52 files changed

+151
-512
lines changed

Some content is hidden

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

52 files changed

+151
-512
lines changed

.gitattributes

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,5 @@
1414
/infection.json.dist export-ignore
1515
/node_modules export-ignore
1616
/phpunit.xml.dist export-ignore
17-
/psalm-baseline.xml export-ignore
18-
/psalm.xml export-ignore
1917
/rector.php export-ignore
2018
/tests export-ignore

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77

88
/.phpunit.result.cache
99

10+
/.claude/*.local.json
11+
1012
# Symfony CLI https://symfony.com/doc/current/setup/symfony_server.html#different-php-settings-per-project
1113
/.php-version
1214
/php.ini

composer-dependency-analyser.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,9 @@
44

55
return (new Configuration())
66
->addPathToExclude(__DIR__ . '/tests')
7+
->ignoreUnknownClasses([
8+
League\Flysystem\FileNotFoundException::class,
9+
League\Flysystem\FilesystemInterface::class,
10+
League\Flysystem\RootViolationException::class,
11+
])
712
;

composer.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,18 @@
1818
"setono/doctrine-orm-batcher": "^0.6",
1919
"setono/doctrine-orm-batcher-bundle": "^0.3.4",
2020
"spatie/enum": "^3.7",
21+
"sylius/channel": "^1.0",
22+
"sylius/channel-bundle": "^1.0",
23+
"sylius/core": "^1.0",
24+
"sylius/core-bundle": "^1.0",
25+
"sylius/inventory": "^1.0",
26+
"sylius/locale": "^1.0",
2127
"sylius/resource-bundle": "^1.6",
28+
"sylius/ui-bundle": "^1.0",
2229
"symfony/config": "^6.4 || ^7.4",
2330
"symfony/console": "^6.4 || ^7.4",
2431
"symfony/dependency-injection": "^6.4 || ^7.4",
2532
"symfony/event-dispatcher": "^6.4 || ^7.4",
26-
"symfony/event-dispatcher-contracts": "^1.1 || ^2.2 || ^3.0",
2733
"symfony/form": "^6.4 || ^7.4",
2834
"symfony/http-foundation": "^6.4 || ^7.4",
2935
"symfony/http-kernel": "^6.4 || ^7.4",

phpstan.neon

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ parameters:
3131
identifier: doctrine.associationType
3232
-
3333
identifier: doctrine.columnType
34+
-
35+
identifier: missingType.generics
3436
-
3537
identifier: missingType.generics
3638
path: src/Form

src/Command/ProcessFeedsCommand.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,9 @@ final class ProcessFeedsCommand extends Command
1414
{
1515
protected static $defaultName = 'setono:sylius-feed:process';
1616

17-
private FeedProcessorInterface $feedProcessor;
18-
19-
public function __construct(FeedProcessorInterface $feedProcessor)
17+
public function __construct(private readonly FeedProcessorInterface $feedProcessor)
2018
{
2119
parent::__construct();
22-
23-
$this->feedProcessor = $feedProcessor;
2420
}
2521

2622
protected function configure(): void

src/Controller/Action/Admin/ProcessFeedAction.php

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -13,32 +13,14 @@
1313
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
1414
use Symfony\Contracts\Translation\TranslatorInterface;
1515

16-
/**
17-
* @psalm-suppress UndefinedClass
18-
* @psalm-suppress MixedArgument
19-
* @psalm-suppress UndefinedInterfaceMethod
20-
* @psalm-suppress MixedAssignment
21-
*/
2216
final class ProcessFeedAction
2317
{
24-
private MessageBusInterface $commandBus;
25-
26-
private UrlGeneratorInterface $urlGenerator;
27-
28-
private FlashBagInterface|RequestStack $flashBag;
29-
30-
private TranslatorInterface $translator;
31-
3218
public function __construct(
33-
MessageBusInterface $commandBus,
34-
UrlGeneratorInterface $urlGenerator,
35-
FlashBagInterface|RequestStack $requestStackOrFlashBag,
36-
TranslatorInterface $translator,
19+
private readonly MessageBusInterface $commandBus,
20+
private readonly UrlGeneratorInterface $urlGenerator,
21+
private readonly FlashBagInterface|RequestStack $flashBag,
22+
private readonly TranslatorInterface $translator,
3723
) {
38-
$this->commandBus = $commandBus;
39-
$this->urlGenerator = $urlGenerator;
40-
$this->flashBag = $requestStackOrFlashBag;
41-
$this->translator = $translator;
4224
}
4325

4426
public function __invoke(int $id): RedirectResponse

src/Controller/Action/Admin/SeverityCountAction.php

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,10 @@
1010

1111
final class SeverityCountAction
1212
{
13-
private ViolationRepositoryInterface $violationRepository;
14-
15-
private Environment $twig;
16-
17-
public function __construct(ViolationRepositoryInterface $violationRepository, Environment $twig)
18-
{
19-
$this->violationRepository = $violationRepository;
20-
$this->twig = $twig;
13+
public function __construct(
14+
private readonly ViolationRepositoryInterface $violationRepository,
15+
private readonly Environment $twig,
16+
) {
2117
}
2218

2319
public function __invoke(int $feed = null): Response

src/Controller/Action/Shop/ShowFeedAction.php

Lines changed: 5 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -16,42 +16,22 @@
1616
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
1717
use Symfony\Component\Mime\MimeTypesInterface;
1818

19-
/**
20-
* @psalm-suppress UndefinedDocblockClass
21-
* @psalm-suppress UndefinedClass
22-
*/
2319
final class ShowFeedAction
2420
{
25-
private FeedRepositoryInterface $repository;
26-
27-
private ChannelContextInterface $channelContext;
28-
29-
private LocaleContextInterface $localeContext;
30-
31-
private FeedPathGeneratorInterface $feedPathGenerator;
32-
3321
/** @var FilesystemInterface|FilesystemOperator */
3422
private $filesystem;
3523

36-
private MimeTypesInterface $mimeTypes;
37-
3824
/**
39-
* @psalm-suppress UndefinedDocblockClass
40-
*
4125
* @param FilesystemInterface|FilesystemOperator $filesystem
4226
*/
4327
public function __construct(
44-
FeedRepositoryInterface $repository,
45-
ChannelContextInterface $channelContext,
46-
LocaleContextInterface $localeContext,
47-
FeedPathGeneratorInterface $feedPathGenerator,
28+
private readonly FeedRepositoryInterface $repository,
29+
private readonly ChannelContextInterface $channelContext,
30+
private readonly LocaleContextInterface $localeContext,
31+
private readonly FeedPathGeneratorInterface $feedPathGenerator,
4832
$filesystem,
49-
MimeTypesInterface $mimeTypes,
33+
private readonly MimeTypesInterface $mimeTypes,
5034
) {
51-
$this->repository = $repository;
52-
$this->channelContext = $channelContext;
53-
$this->localeContext = $localeContext;
54-
$this->feedPathGenerator = $feedPathGenerator;
5535
if (interface_exists(FilesystemInterface::class) && $filesystem instanceof FilesystemInterface) {
5636
$this->filesystem = $filesystem;
5737
} elseif ($filesystem instanceof FilesystemOperator) {
@@ -63,7 +43,6 @@ public function __construct(
6343
FilesystemOperator::class,
6444
));
6545
}
66-
$this->mimeTypes = $mimeTypes;
6746
}
6847

6948
public function __invoke(string $code): StreamedResponse

src/DTO/SeverityCount.php

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,8 @@
66

77
final class SeverityCount
88
{
9-
private string $severity;
10-
11-
private int $count;
12-
13-
public function __construct(string $severity, int $count)
9+
public function __construct(private readonly string $severity, private readonly int $count)
1410
{
15-
$this->severity = $severity;
16-
$this->count = $count;
1711
}
1812

1913
public function getSeverity(): string

0 commit comments

Comments
 (0)