diff --git a/.github/workflows/test-application.yaml b/.github/workflows/test-application.yaml index d4cb96d..05db631 100644 --- a/.github/workflows/test-application.yaml +++ b/.github/workflows/test-application.yaml @@ -41,12 +41,25 @@ jobs: SYMFONY_DEPRECATIONS_HELPER: weak - php-version: '8.1' - lint: true + lint: false + dependency-versions: 'highest' + tools: 'composer:v2' + env: + SYMFONY_DEPRECATIONS_HELPER: weak + + - php-version: '8.2' + lint: false dependency-versions: 'highest' tools: 'composer:v2' env: SYMFONY_DEPRECATIONS_HELPER: weak + - php-version: '8.3' + lint: true + dependency-versions: 'highest' + tools: 'composer:v2' + env: + SYMFONY_DEPRECATIONS_HELPER: weak services: mysql: image: mysql:5.7 @@ -71,6 +84,11 @@ jobs: if: ${{ matrix.php-version == '7.2' }} run: composer remove php-cs-fixer/shim --dev --no-interaction + - name: Install additional lowest dependencies + if: ${{ matrix.dependency-versions == 'lowest' }} + run: | + composer require symfony/swiftmailer-bundle --no-interaction --no-update + - name: Install composer dependencies uses: ramsey/composer-install@v1 with: diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index 7434ac2..3a06d53 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -17,38 +17,33 @@ $config->setRiskyAllowed(true) ->setRules([ '@Symfony' => true, - '@Symfony:risky' => true, - 'ordered_imports' => true, - 'concat_space' => ['spacing' => 'one'], 'array_syntax' => ['syntax' => 'short'], - 'phpdoc_align' => ['align' => 'left'], - 'class_definition' => [ - 'multi_line_extends_each_single_line' => true, - ] , - 'linebreak_after_opening_tag' => true, -// 'declare_strict_types' => true, - 'method_argument_space' => ['on_multiline' => 'ensure_fully_multiline'], + 'class_definition' => false, + 'concat_space' => ['spacing' => 'one'], + 'function_declaration' => ['closure_function_spacing' => 'none'], + 'header_comment' => ['header' => $header], 'native_constant_invocation' => true, 'native_function_casing' => true, 'native_function_invocation' => ['include' => ['@internal']], - 'no_php4_constructor' => true, + 'global_namespace_import' => ['import_classes' => false, 'import_constants' => false, 'import_functions' => false], 'no_superfluous_phpdoc_tags' => ['allow_mixed' => true, 'remove_inheritdoc' => true], - 'no_unreachable_default_argument_value' => true, - 'no_useless_else' => true, - 'no_useless_return' => true, - 'php_unit_strict' => true, - 'phpdoc_order' => true, - 'semicolon_after_instruction' => true, - 'strict_comparison' => true, - 'strict_param' => true, - 'array_indentation' => true, - 'multiline_whitespace_before_semicolons' => true, + 'ordered_imports' => true, + 'phpdoc_align' => ['align' => 'left'], + 'phpdoc_types_order' => false, 'single_line_throw' => false, - 'visibility_required' => ['elements' => ['property', 'method', 'const']], + 'single_line_comment_spacing' => false, 'phpdoc_to_comment' => [ 'ignored_tags' => ['todo', 'var'], ], - 'trailing_comma_in_multiline' => ['elements' => ['arrays', /*'arguments', 'parameters' */]], + 'phpdoc_separation' => [ + 'groups' => [ + ['Serializer\\*', 'VirtualProperty', 'Accessor', 'Type', 'Groups', 'Expose', 'Exclude', 'SerializedName', 'Inline', 'ExclusionPolicy'], + ], + ], + 'get_class_to_class_keyword' => false, // should be enabled as soon as support for php < 8 is dropped + 'nullable_type_declaration_for_default_null_value' => true, + 'no_null_property_initialization' => false, + 'fully_qualified_strict_types' => false, ]) ->setFinder($finder); diff --git a/Controller/AbstractController.php b/Controller/AbstractController.php index dc4a08c..148a1b1 100644 --- a/Controller/AbstractController.php +++ b/Controller/AbstractController.php @@ -88,12 +88,11 @@ protected function encodePassword(User $user, string $plainPassword): string $hasher = $this->container->get('?security.password_hasher'); return $hasher->hashPassword($user, $plainPassword); - } else { - /** @var \Symfony\Component\Security\Core\Encoder\UserPasswordEncoderInterface $encoder */ - $encoder = $this->container->get('?security.password_encoder'); - - return $encoder->encodePassword($user, $plainPassword); } + /** @var \Symfony\Component\Security\Core\Encoder\UserPasswordEncoderInterface $encoder */ + $encoder = $this->container->get('?security.password_encoder'); + + return $encoder->encodePassword($user, $plainPassword); } /** @@ -147,9 +146,6 @@ private function getTemplateAttributes(array $custom = []): array return $this->getTemplateAttributeResolver()->resolve($custom); } - /** - * @return User - */ public function getUser(): ?User { $user = parent::getUser(); @@ -190,7 +186,7 @@ private function addAddress(User $user): void /** * @param mixed[] $parameters */ - public function render(string $view, array $parameters = [], Response $response = null): Response + public function render(string $view, array $parameters = [], ?Response $response = null): Response { return parent::render( $view, diff --git a/Controller/BlacklistItemController.php b/Controller/BlacklistItemController.php index 1d46d1c..75c628b 100644 --- a/Controller/BlacklistItemController.php +++ b/Controller/BlacklistItemController.php @@ -34,6 +34,7 @@ * Provides admin-api for blacklist-items. * * @NamePrefix("sulu_community.") + * * @RouteResource("blacklist-item") */ class BlacklistItemController extends AbstractRestController implements ClassResourceInterface @@ -148,7 +149,7 @@ public function deleteAction(int $id): Response */ public function cdeleteAction(Request $request): Response { - $ids = \array_map(function ($id) { + $ids = \array_map(function($id) { return (int) $id; }, \array_filter(\explode(',', (string) $request->query->get('ids', '')))); diff --git a/Controller/ConfirmationController.php b/Controller/ConfirmationController.php index 8316ae6..305dddc 100644 --- a/Controller/ConfirmationController.php +++ b/Controller/ConfirmationController.php @@ -49,7 +49,7 @@ public function indexAction(Request $request, string $token): Response $redirectTo = $communityManager->getConfigTypeProperty(self::TYPE, Configuration::REDIRECT_TO); if ($redirectTo) { - if (0 === \strpos($redirectTo, '/')) { + if (\str_starts_with($redirectTo, '/')) { $url = \str_replace('{localization}', $request->getLocale(), $redirectTo); } else { $url = $this->getRouter()->generate($redirectTo); diff --git a/DependencyInjection/CompilerPass/CommunityManagerCompilerPass.php b/DependencyInjection/CompilerPass/CommunityManagerCompilerPass.php index bde28d3..5be3d11 100644 --- a/DependencyInjection/CompilerPass/CommunityManagerCompilerPass.php +++ b/DependencyInjection/CompilerPass/CommunityManagerCompilerPass.php @@ -38,7 +38,6 @@ * }, * delete_user: bool, * } - * * @phpstan-type Config array{ * from: string|string[], * to: string|string[], diff --git a/DependencyInjection/Configuration.php b/DependencyInjection/Configuration.php index ce818d0..cc9cdcb 100644 --- a/DependencyInjection/Configuration.php +++ b/DependencyInjection/Configuration.php @@ -136,7 +136,7 @@ public function getConfigTreeBuilder() ->end() ->beforeNormalization() ->ifString() - ->then(function ($value) { + ->then(function($value) { return [ self::EMAIL_FROM_NAME => $value, self::EMAIL_FROM_EMAIL => $value, @@ -151,7 +151,7 @@ public function getConfigTreeBuilder() ->end() ->beforeNormalization() ->ifString() - ->then(function ($value) { + ->then(function($value) { return [ self::EMAIL_TO_NAME => $value, self::EMAIL_TO_EMAIL => $value, diff --git a/DependencyInjection/SuluCommunityExtension.php b/DependencyInjection/SuluCommunityExtension.php index d456bda..a219ffe 100644 --- a/DependencyInjection/SuluCommunityExtension.php +++ b/DependencyInjection/SuluCommunityExtension.php @@ -153,7 +153,7 @@ public function prepend(ContainerBuilder $container): void 'orm' => [ 'dql' => [ 'string_functions' => [ - 'regexp' => RegExp::class, + 'regexp' => Regexp::class, ], ], ], diff --git a/Entity/BlacklistItem.php b/Entity/BlacklistItem.php index e7bfd6e..d8d85cc 100644 --- a/Entity/BlacklistItem.php +++ b/Entity/BlacklistItem.php @@ -44,10 +44,6 @@ class BlacklistItem */ private $type; - /** - * @param string $pattern - * @param string $type - */ public function __construct(?string $pattern = null, ?string $type = null) { $this->type = $type; diff --git a/EventListener/LastLoginListener.php b/EventListener/LastLoginListener.php index 97d60bd..73f8458 100644 --- a/EventListener/LastLoginListener.php +++ b/EventListener/LastLoginListener.php @@ -66,7 +66,7 @@ public static function getSubscribedEvents() */ public function onRequest(RequestEvent $event): void { - if (!$event->isMasterRequest()) { + if (!$event->isMainRequest()) { return; } diff --git a/Form/Type/RegistrationType.php b/Form/Type/RegistrationType.php index 176ea05..0534bba 100644 --- a/Form/Type/RegistrationType.php +++ b/Form/Type/RegistrationType.php @@ -73,7 +73,7 @@ public function configureOptions(OptionsResolver $resolver): void [ 'data_class' => User::class, 'validation_groups' => ['registration'], - 'empty_data' => function (FormInterface $form) { + 'empty_data' => function(FormInterface $form) { $user = new User(); $user->setContact(new Contact()); diff --git a/Mail/Mail.php b/Mail/Mail.php index 76f0d35..a4b7f52 100644 --- a/Mail/Mail.php +++ b/Mail/Mail.php @@ -28,8 +28,6 @@ class Mail * user_template: string|null, * admin_template: string|null, * } $config - * - * @return Mail */ public static function create($from, $to, array $config): self { diff --git a/Mail/MailFactory.php b/Mail/MailFactory.php index 9fe6e98..55c91f3 100644 --- a/Mail/MailFactory.php +++ b/Mail/MailFactory.php @@ -12,6 +12,7 @@ namespace Sulu\Bundle\CommunityBundle\Mail; use Sulu\Bundle\SecurityBundle\Entity\User; +use Symfony\Component\Mailer\Mailer; use Symfony\Component\Mailer\MailerInterface; use Symfony\Component\Mime\Address; use Symfony\Component\Mime\Email; @@ -25,7 +26,7 @@ class MailFactory implements MailFactoryInterface { /** - * @var MailerInterface + * @var MailerInterface|\Swift_Mailer */ protected $mailer; @@ -39,7 +40,7 @@ class MailFactory implements MailFactoryInterface */ protected $translator; - public function __construct(MailerInterface $mailer, Environment $twig, TranslatorInterface $translator) + public function __construct($mailer, Environment $twig, TranslatorInterface $translator) { $this->mailer = $mailer; $this->twig = $twig; @@ -72,7 +73,6 @@ public function sendEmails(Mail $mail, User $user, array $parameters = []): void } } - /** * Create and send email. * @@ -84,30 +84,41 @@ protected function sendEmail($from, $to, string $subject, string $template, arra { $body = $this->twig->render($template, $data); - $email = (new Email()) - ->subject($this->translator->trans($subject)) - ->from($this->getAddress($from)) - ->to($this->getAddress($to)) - ->html($body); + if ($this->mailer instanceof \Swift_Mailer) { + $email = $this->mailer->createMessage() + ->setSubject($this->translator->trans($subject)) + ->setFrom($from) + ->setTo($to) + ->setBody($body, 'text/html'); + } else { + if (!$this->getAddress($from) || !$this->getAddress($to)) { + return; + } + + $email = (new Email()) + ->subject($this->translator->trans($subject)) + ->from($this->getAddress($from)) + ->to($this->getAddress($to)) + ->html($body); + } $this->mailer->send($email); } /** - * Convert string/array email address to an Address object + * Convert string/array email address to an Address object. * - * @param $address - * @return Address + * @param mixed $address */ protected function getAddress($address): ?Address { $name = ''; - if (is_array($address)) { - if(empty($address)) { + if (\is_array($address)) { + if (empty($address)) { return null; - } else if (!isset($address['email'])) { - $email = $address[array_keys($address)[0]]; + } elseif (!isset($address['email'])) { + $email = $address[\array_keys($address)[0]]; } else { $email = $address['email']; $name = $address['name'] ?? ''; diff --git a/Manager/CommunityManagerInterface.php b/Manager/CommunityManagerInterface.php index f26e8a1..ff6beca 100644 --- a/Manager/CommunityManagerInterface.php +++ b/Manager/CommunityManagerInterface.php @@ -34,7 +34,6 @@ * }, * delete_user: bool, * } - * * @phpstan-type Config array{ * from: string|string[], * to: string|string[], @@ -109,9 +108,9 @@ public function getConfig(): array; * * @param TConfig $property * - * @throws \InvalidArgumentException - * * @return Config[TTypeConfig] + * + * @throws \InvalidArgumentException */ public function getConfigProperty(string $property); @@ -124,9 +123,9 @@ public function getConfigProperty(string $property); * @param TConfig $type * @param TTypeConfigProperty $property * - * @throws \InvalidArgumentException - * * @return Config[TConfig][TTypeConfigProperty] + * + * @throws \InvalidArgumentException */ public function getConfigTypeProperty(string $type, string $property); @@ -137,8 +136,6 @@ public function sendEmails(string $type, User $user): void; /** * Save profile for given user. - * - * @return User */ public function saveProfile(User $user): ?User; } diff --git a/Tests/Functional/Controller/RegistrationTest.php b/Tests/Functional/Controller/RegistrationTest.php index b806da8..b57ac46 100644 --- a/Tests/Functional/Controller/RegistrationTest.php +++ b/Tests/Functional/Controller/RegistrationTest.php @@ -113,6 +113,13 @@ public function testConfirmation(): User public function testLogin(): void { $this->testConfirmation(); + $user = $this->findUser(); + + if ($user) { + $user->setSalt(''); + $user->setPassword('my-sulu'); + $this->getEntityManager()->flush(); + } $crawler = $this->client->request('GET', '/login'); $this->assertHttpStatusCode(200, $this->client->getResponse()); @@ -181,8 +188,12 @@ public function testRegistrationBlacklistedBlocked(): void $this->assertNull($this->findUser()); } - public function testRegistrationBlacklistedRequested(): RawMessage + public function testRegistrationBlacklistedRequested(): ?RawMessage { + if (\class_exists(\Swift_Mailer::class)) { + $this->markTestSkipped('Skip test for swift mailer.'); + } + $this->createBlacklistItem($this->getEntityManager(), '*@sulu.io', BlacklistItem::TYPE_REQUEST); $crawler = $this->client->request('GET', '/registration'); @@ -274,6 +285,10 @@ public function testBlacklistBlocked(): void public function testPasswordForget(): void { + if (\class_exists(\Swift_Mailer::class)) { + $this->markTestSkipped('Skip test for swift mailer.'); + } + $user = $this->testConfirmation(); $crawler = $this->client->request('GET', '/password-forget'); @@ -320,10 +335,10 @@ public function testPasswordForget(): void ); $this->client->submit($form); - $this->getEntityManager()->clear(); + //$this->getEntityManager()->clear(); /** @var User $user */ - $user = $this->findUser(); + $user = $this->findUser('sulu'); $password = $user->getPassword(); $this->assertNotNull($password); $this->assertStringStartsWith('my-new-password', $password); @@ -334,14 +349,12 @@ public function testPasswordForget(): void */ private function findUser(string $username = 'sulu'): ?User { - // clear entity-manager to ensure newest user - $this->getEntityManager()->clear(); - $repository = $this->getContainer()->get('sulu.repository.user'); try { /** @var User $user */ $user = $repository->findUserByUsername($username); + $this->getEntityManager()->refresh($user); return $user; } catch (NoResultException $exception) { diff --git a/Tests/Functional/Entity/BlacklistItemRepositoryTest.php b/Tests/Functional/Entity/BlacklistItemRepositoryTest.php index 6f9e201..2bd84c9 100644 --- a/Tests/Functional/Entity/BlacklistItemRepositoryTest.php +++ b/Tests/Functional/Entity/BlacklistItemRepositoryTest.php @@ -39,7 +39,7 @@ public function testFindBySender(): void $entityManager->clear(); $items = \array_map( - function (BlacklistItem $item) { + function(BlacklistItem $item) { return ['pattern' => $item->getPattern(), 'type' => $item->getType()]; }, $repository->findBySender('test@sulu.io') diff --git a/Tests/Unit/Listener/BlacklistListenerTest.php b/Tests/Unit/Listener/BlacklistListenerTest.php index a80079f..b36e934 100644 --- a/Tests/Unit/Listener/BlacklistListenerTest.php +++ b/Tests/Unit/Listener/BlacklistListenerTest.php @@ -92,7 +92,7 @@ public function testValidateEmail(): void $this->entityManager->persist( Argument::that( - function (BlacklistUser $item) use ($user) { + function(BlacklistUser $item) use ($user) { return '123-123-123' === $item->getToken() && 'sulu-io' === $item->getWebspaceKey() && $item->getUser() === $user->reveal(); diff --git a/Tests/Unit/Listener/EmailConfirmationListenerTest.php b/Tests/Unit/Listener/EmailConfirmationListenerTest.php index 7da5a11..95d61be 100644 --- a/Tests/Unit/Listener/EmailConfirmationListenerTest.php +++ b/Tests/Unit/Listener/EmailConfirmationListenerTest.php @@ -114,7 +114,7 @@ public function testSendConfirmation(): void $this->entityManager->persist( Argument::that( - function (EmailConfirmationToken $token) { + function(EmailConfirmationToken $token) { return '123-123-123' === $token->getToken() && $token->getUser() === $this->user->reveal(); } ) diff --git a/Tests/phpstan/object-manager.php b/Tests/phpstan/object-manager.php index 8a0eff1..596d140 100644 --- a/Tests/phpstan/object-manager.php +++ b/Tests/phpstan/object-manager.php @@ -34,7 +34,7 @@ // this is a workaround for the following phpstan issue: https://github.com/phpstan/phpstan-doctrine/issues/98 $resolveTargetEntityListener = \current(\array_filter( $objectManager->getEventManager()->getListeners('loadClassMetadata'), - static function ($listener) { + static function($listener) { return $listener instanceof ResolveTargetEntityListener; } )); diff --git a/composer.json b/composer.json index 032ba4c..3f85ab2 100644 --- a/composer.json +++ b/composer.json @@ -4,26 +4,27 @@ "type": "sulu-bundle", "license": "MIT", "require": { - "php": "^8.0 || ^8.1", + "php": "^7.2 || ^8.0", "beberlei/doctrineextensions": "^1.0", "doctrine/doctrine-bundle": "^1.10 || ^2.0", "doctrine/orm": "^2.5.3", - "doctrine/persistence": "^1.3 || ^2.0", + "doctrine/persistence": "^1.3 || ^2.0 || ^3.0", + "doctrine/phpcr-bundle": "^2 || ^3.0", "jms/serializer-bundle": "^3.3 || ^4.0", "massive/build-bundle": "^0.3 || ^0.4 || ^0.5", - "sulu/sulu": "^2.5.0 || ^2.6@dev", - "symfony/config": "^5.4 || ^6.0", - "symfony/console": "^5.4 || ^6.0", - "symfony/dependency-injection": "^5.4 || ^6.0", - "symfony/event-dispatcher": "^5.4 || ^6.0", - "symfony/form": "^5.4 || ^6.0", - "symfony/mailer": "^5.4 || ^6.0", - "symfony/framework-bundle": "^5.4 || ^6.0", - "symfony/http-foundation": "^5.4 || ^6.0", - "symfony/http-kernel": "^5.4 || ^6.0", - "symfony/intl": "^5.4 || ^6.0", - "symfony/routing": "^5.4 || ^6.0", - "symfony/security-bundle": "^5.4 || ^6.0" + "sulu/sulu": "^2.4.0 || ^2.6@dev", + "symfony/config": "^5.4 || ^6.2", + "symfony/console": "^5.4 || ^6.2", + "symfony/dependency-injection": "^5.4 || ^6.2", + "symfony/event-dispatcher": "^5.4 || ^6.2", + "symfony/form": "^5.4 || ^6.2", + "symfony/framework-bundle": "^5.4 || ^6.2", + "symfony/http-foundation": "^5.4 || ^6.2", + "symfony/http-kernel": "^5.4 || ^6.2", + "symfony/intl": "^5.4 || ^6.2", + "symfony/mailer": "^5.4 || ^6.2", + "symfony/routing": "^5.4 || ^6.2", + "symfony/security-bundle": "^5.4 || ^6.2" }, "require-dev": { "doctrine/data-fixtures": "^1.3.3", @@ -38,15 +39,18 @@ "phpstan/phpstan-phpunit": "^1.0", "phpstan/phpstan-symfony": "^1.0", "phpunit/phpunit": "^8.2", - "symfony/browser-kit": "^5.4 || ^6.0", - "symfony/css-selector": "^5.4 || ^6.0", - "symfony/dotenv": "^5.4 || ^6.0", + "symfony/browser-kit": "^5.4 || ^6.2", + "symfony/css-selector": "^5.4 || ^6.2", + "symfony/dotenv": "^5.4 || ^6.2", "symfony/monolog-bundle": "^3.1", - "symfony/phpunit-bridge": "^5.4 || ^6.0", - "symfony/stopwatch": "^5.4 || ^6.0", - "symfony/var-dumper": "^5.4 || ^6.0", + "symfony/phpunit-bridge": "^5.4 || ^6.2", + "symfony/stopwatch": "^5.4 || ^6.2", + "symfony/var-dumper": "^5.4 || ^6.2", "thecodingmachine/phpstan-strict-rules": "^1.0" }, + "conflict": { + "dantleech/phpcr-migrations-bundle": "<1.2.0" + }, "keywords": [ "registration", "login", @@ -112,6 +116,9 @@ ] }, "config": { - "sort-packages": true + "sort-packages": true, + "allow-plugins": { + "php-http/discovery": true + } } } diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 3c960b4..b730990 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -1,5 +1,25 @@ parameters: ignoreErrors: + - + message: "#^Else branch is unreachable because previous condition is always true\\.$#" + count: 1 + path: Command/InitCommand.php + + - + message: "#^Call to method encodePassword\\(\\) on an unknown class Symfony\\\\Component\\\\Security\\\\Core\\\\Encoder\\\\UserPasswordEncoderInterface\\.$#" + count: 1 + path: Controller/AbstractController.php + + - + message: "#^Method Sulu\\\\Bundle\\\\CommunityBundle\\\\Controller\\\\AbstractController\\:\\:getSubscribedServices\\(\\) should return array\\ but returns array\\\\.$#" + count: 1 + path: Controller/AbstractController.php + + - + message: "#^PHPDoc tag @var for variable \\$encoder contains unknown class Symfony\\\\Component\\\\Security\\\\Core\\\\Encoder\\\\UserPasswordEncoderInterface\\.$#" + count: 1 + path: Controller/AbstractController.php + - message: "#^Strict comparison using \\=\\=\\= between true and array\\{from\\: array\\\\|string, to\\: array\\\\|string, webspace_key\\: string, role\\: string, firewall\\: string, maintenance\\: array\\{enabled\\: bool, template\\: string\\}, login\\: array\\{enabled\\: bool, template\\: string, service\\: string\\|null, embed_template\\: string, type\\: string, options\\: array, activate_user\\: bool, auto_login\\: bool, \\.\\.\\.\\}, registration\\: array\\{enabled\\: bool, template\\: string, service\\: string\\|null, embed_template\\: string, type\\: string, options\\: array, activate_user\\: bool, auto_login\\: bool, \\.\\.\\.\\}, \\.\\.\\.\\} will always evaluate to false\\.$#" count: 1 @@ -41,7 +61,7 @@ parameters: path: Controller/ConfirmationController.php - - message: "#^Parameter \\#1 \\$haystack of function strpos expects string, array\\\\|string\\> given\\.$#" + message: "#^Parameter \\#1 \\$haystack of function str_starts_with expects string, array\\\\|string\\> given\\.$#" count: 1 path: Controller/ConfirmationController.php @@ -250,6 +270,31 @@ parameters: count: 1 path: EventListener/MailListener.php + - + message: "#^Call to method createMessage\\(\\) on an unknown class Swift_Mailer\\.$#" + count: 1 + path: Mail/MailFactory.php + + - + message: "#^Call to method send\\(\\) on an unknown class Swift_Mailer\\.$#" + count: 1 + path: Mail/MailFactory.php + + - + message: "#^Class Swift_Mailer not found\\.$#" + count: 1 + path: Mail/MailFactory.php + + - + message: "#^Method Sulu\\\\Bundle\\\\CommunityBundle\\\\Mail\\\\MailFactory\\:\\:__construct\\(\\) has parameter \\$mailer with no type specified\\.$#" + count: 1 + path: Mail/MailFactory.php + + - + message: "#^Property Sulu\\\\Bundle\\\\CommunityBundle\\\\Mail\\\\MailFactory\\:\\:\\$mailer has unknown class Swift_Mailer as its type\\.$#" + count: 1 + path: Mail/MailFactory.php + - message: "#^Method Sulu\\\\Bundle\\\\CommunityBundle\\\\Manager\\\\CommunityManager\\:\\:getConfigProperty\\(\\) should return array\\{from\\: array\\\\|string, to\\: array\\\\|string, webspace_key\\: string, role\\: string, firewall\\: string, maintenance\\: array\\{enabled\\: bool, template\\: string\\}, login\\: array\\{enabled\\: bool, template\\: string, service\\: string\\|null, embed_template\\: string, type\\: string, options\\: array, activate_user\\: bool, auto_login\\: bool, \\.\\.\\.\\}, registration\\: array\\{enabled\\: bool, template\\: string, service\\: string\\|null, embed_template\\: string, type\\: string, options\\: array, activate_user\\: bool, auto_login\\: bool, \\.\\.\\.\\}, \\.\\.\\.\\} but returns array\\\\|string\\.$#" count: 1 @@ -275,6 +320,11 @@ parameters: count: 1 path: Manager/CommunityManager.php + - + message: "#^Parameter \\#2 \\$firewallName of class Symfony\\\\Component\\\\Security\\\\Core\\\\Authentication\\\\Token\\\\UsernamePasswordToken constructor expects string, array\\\\|string\\> given\\.$#" + count: 1 + path: Manager/CommunityManager.php + - message: "#^Parameter \\#2 \\$to of static method Sulu\\\\Bundle\\\\CommunityBundle\\\\Mail\\\\Mail\\:\\:create\\(\\) expects array\\\\|string, array\\\\|string\\> given\\.$#" count: 1 @@ -291,7 +341,17 @@ parameters: path: Manager/CommunityManager.php - - message: "#^Parameter \\#3 \\$roles of class Symfony\\\\Component\\\\Security\\\\Core\\\\Authentication\\\\Token\\\\UsernamePasswordToken constructor expects array\\, array\\\\|string\\> given\\.$#" + message: "#^If condition is always true\\.$#" count: 1 - path: Manager/CommunityManager.php + path: Tests/Application/config/config.php + + - + message: "#^Cannot call method getHtmlBody\\(\\) on Symfony\\\\Component\\\\Mime\\\\RawMessage\\|null\\.$#" + count: 3 + path: Tests/Functional/Controller/RegistrationTest.php + + - + message: "#^Cannot call method getTo\\(\\) on Symfony\\\\Component\\\\Mime\\\\RawMessage\\|null\\.$#" + count: 3 + path: Tests/Functional/Controller/RegistrationTest.php