Skip to content

Commit

Permalink
Fix php 8
Browse files Browse the repository at this point in the history
  • Loading branch information
Prokyonn committed Sep 21, 2023
1 parent fbc26ee commit 8a55ae8
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 28 deletions.
4 changes: 2 additions & 2 deletions DependencyInjection/SuluCommentExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class SuluCommentExtension extends Extension implements PrependExtensionInterfac
/**
* {@inheritdoc}
*/
public function prepend(ContainerBuilder $container)
public function prepend(ContainerBuilder $container): void
{
if ($container->hasExtension('jms_serializer')) {
$container->prependExtensionConfig(
Expand Down Expand Up @@ -82,7 +82,7 @@ public function prepend(ContainerBuilder $container)
/**
* {@inheritdoc}
*/
public function load(array $configs, ContainerBuilder $container)
public function load(array $configs, ContainerBuilder $container): void
{
$configuration = new Configuration();
$config = $this->processConfiguration($configuration, $configs);
Expand Down
2 changes: 1 addition & 1 deletion Form/Type/CommentType.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function buildForm(FormBuilderInterface $builder, array $options)
$builder->add('submit', SubmitType::class);
}

public function configureOptions(OptionsResolver $resolver)
public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setRequired('threadId');
$resolver->setDefault('referrer', null);
Expand Down
2 changes: 1 addition & 1 deletion SuluCommentBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class SuluCommentBundle extends Bundle
/**
* {@inheritdoc}
*/
public function build(ContainerBuilder $container)
public function build(ContainerBuilder $container): void
{
$this->buildPersistence(
[
Expand Down
4 changes: 2 additions & 2 deletions Tests/Application/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

class Kernel extends SuluTestKernel
{
public function registerBundles()
public function registerBundles(): iterable
{
$bundles = parent::registerBundles();
$bundles[] = new SuluCommentBundle();
Expand All @@ -40,7 +40,7 @@ public function registerContainerConfiguration(LoaderInterface $loader)
$loader->load(__DIR__ . '/config/config_' . $context . '.yml');
}

protected function getKernelParameters()
protected function getKernelParameters(): array
{
$parameters = parent::getKernelParameters();

Expand Down
3 changes: 1 addition & 2 deletions Tests/Application/config/config_website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ security:
access_decision_manager:
strategy: affirmative

encoders:
password_hashers:
Sulu\Bundle\SecurityBundle\Entity\User: plaintext

providers:
Expand All @@ -22,7 +22,6 @@ security:
firewalls:
test:
http_basic: ~
anonymous: ~

sulu_test:
enable_test_user_provider: true
Expand Down
20 changes: 0 additions & 20 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -95,16 +95,6 @@ parameters:
count: 1
path: Controller/WebsiteCommentController.php

-
message: "#^Method Sulu\\\\Bundle\\\\CommentBundle\\\\DependencyInjection\\\\SuluCommentExtension\\:\\:load\\(\\) has no return type specified\\.$#"
count: 1
path: DependencyInjection/SuluCommentExtension.php

-
message: "#^Method Sulu\\\\Bundle\\\\CommentBundle\\\\DependencyInjection\\\\SuluCommentExtension\\:\\:prepend\\(\\) has no return type specified\\.$#"
count: 1
path: DependencyInjection/SuluCommentExtension.php

-
message: "#^Method Sulu\\\\Bundle\\\\CommentBundle\\\\Entity\\\\Comment\\:\\:getChildren\\(\\) return type with generic interface Doctrine\\\\Common\\\\Collections\\\\Collection does not specify its types\\: TKey, T$#"
count: 1
Expand Down Expand Up @@ -270,13 +260,3 @@ parameters:
count: 1
path: Form/Type/CommentType.php

-
message: "#^Method Sulu\\\\Bundle\\\\CommentBundle\\\\Form\\\\Type\\\\CommentType\\:\\:configureOptions\\(\\) has no return type specified\\.$#"
count: 1
path: Form/Type/CommentType.php

-
message: "#^Method Sulu\\\\Bundle\\\\CommentBundle\\\\SuluCommentBundle\\:\\:build\\(\\) has no return type specified\\.$#"
count: 1
path: SuluCommentBundle.php

0 comments on commit 8a55ae8

Please sign in to comment.