Merge branch 'master' into 295_resume_retouches

This commit is contained in:
2021-11-19 17:22:00 +01:00
65 changed files with 1021 additions and 1351 deletions

View File

@@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
namespace Chill\MainBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
@@ -18,12 +20,12 @@ class RoleScope
* @ORM\Column(name="id", type="integer")
* @ORM\GeneratedValue(strategy="AUTO")
*/
private int $id;
private ?int $id = null;
/**
* @ORM\Column(type="string", length=255)
*/
private string $role;
private ?string $role = null;
/**
* @ORM\ManyToOne(
@@ -32,7 +34,7 @@ class RoleScope
* @ORM\JoinColumn(nullable=true, name="scope_id")
* @ORM\Cache(usage="NONSTRICT_READ_WRITE")
*/
private Scope $scope;
private ?Scope $scope = null;
/**
* @var Collection
@@ -43,53 +45,33 @@ class RoleScope
*/
private $permissionsGroups;
private bool $new;
public function __construct() {
$this->new = true;
$this->permissionsGroups = new ArrayCollection();
}
/**
* @return int
*/
public function getId()
public function getId(): ?int
{
return $this->id;
}
/**
* @return string
*/
public function getRole()
public function getRole(): ?string
{
return $this->role;
}
/**
* @return Scope
*/
public function getScope()
public function getScope(): ?Scope
{
return $this->scope;
}
/**
* @param type $role
* @return RoleScope
*/
public function setRole($role)
public function setRole(?string $role = null): self
{
$this->role = $role;
return $this;
}
/**
* @param Scope $scope
* @return RoleScope
*/
public function setScope(Scope $scope = null)
public function setScope(?Scope $scope = null): self
{
$this->scope = $scope;

View File

@@ -1,48 +1,24 @@
<?php
/*
* Copyright (C) 2018 Julien Fastré <julien.fastre@champs-libres.coop>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
declare(strict_types=1);
namespace Chill\MainBundle\Security\Authorization;
use Symfony\Component\Security\Core\Authorization\Voter\Voter;
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
use Chill\MainBundle\Security\Authorization\AuthorizationHelper;
use Chill\MainBundle\Entity\User;
use Symfony\Component\Security\Core\Role\Role;
/**
*
*
* @author Julien Fastré <julien.fastre@champs-libres.coop>
*/
class ChillExportVoter extends Voter
{
const EXPORT = 'chill_export';
/**
*
* @var AuthorizationHelper
*/
protected $authorizationHelper;
public function __construct(AuthorizationHelper $authorizationHelper)
public const EXPORT = 'chill_export';
protected AuthorizationHelperInterface $authorizationHelper;
public function __construct(AuthorizationHelperInterface $authorizationHelper)
{
$this->authorizationHelper = $authorizationHelper;
}
protected function supports($attribute, $subject): bool
{
return $attribute === self::EXPORT;
@@ -53,10 +29,7 @@ class ChillExportVoter extends Voter
if (!$token->getUser() instanceof User) {
return false;
}
$centers = $this->authorizationHelper
->getReachableCenters($token->getUser(), new Role($attribute));
return count($centers) > 0;
return [] !== $this->authorizationHelper->getReachableCenters($token->getUser(), $attribute);
}
}

View File

@@ -1,27 +1,43 @@
<?php
declare(strict_types=1);
namespace Chill\MainBundle\Security\Resolver;
class CenterResolverDispatcher
use Chill\MainBundle\Entity\Center;
/**
* @deprecated Use CenterResolverManager and its interface CenterResolverManagerInterface
*/
final class CenterResolverDispatcher
{
/**
* @var iterabble|CenterResolverInterface[]
* @var CenterResolverInterface[]
*/
private iterable $resolvers = [];
private iterable $resolvers;
public function __construct(iterable $resolvers)
public function __construct(iterable $resolvers = [])
{
$this->resolvers = $resolvers;
}
/**
* @param mixed $entity
* @param array|null $options
* @param object $entity
* @return null|Center|Center[]
*/
public function resolveCenter($entity, ?array $options = [])
{
foreach($this->resolvers as $priority => $resolver) {
trigger_deprecation(
'ChillMainBundle',
'dev-master',
'
Use the service CenterResolverManager through the interface CenterResolverManagerInterface.
The new method "CenterResolverManagerInterface::resolveCenters(): array" is available and the typing
has been improved in order to avoid mixing types.
'
);
foreach($this->resolvers as $resolver) {
if ($resolver->supports($entity, $options)) {
return $resolver->resolveCenter($entity, $options);
}

View File

@@ -6,12 +6,14 @@ use Chill\MainBundle\Entity\Center;
interface CenterResolverInterface
{
/**
* @param object $entity
*/
public function supports($entity, ?array $options = []): bool;
/**
* @param $entity
* @param array|null $options
* @return Center|array|Center[]
* @param object $entity
* @return Center|Center[]
*/
public function resolveCenter($entity, ?array $options = []);

View File

@@ -0,0 +1,29 @@
<?php
declare(strict_types=1);
namespace Chill\MainBundle\Security\Resolver;
final class CenterResolverManager implements CenterResolverManagerInterface
{
/**
* @var CenterResolverInterface[]
*/
private iterable $resolvers;
public function __construct(iterable $resolvers = [])
{
$this->resolvers = $resolvers;
}
public function resolveCenters($entity, ?array $options = []): array
{
foreach($this->resolvers as $resolver) {
if ($resolver->supports($entity, $options)) {
return (array) $resolver->resolveCenter($entity, $options);
}
}
return [];
}
}

View File

@@ -0,0 +1,16 @@
<?php
declare(strict_types=1);
namespace Chill\MainBundle\Security\Resolver;
use Chill\MainBundle\Entity\Center;
interface CenterResolverManagerInterface
{
/**
* @param object $entity
* @return Center[]
*/
public function resolveCenters($entity, ?array $options = []): array;
}

View File

@@ -1,92 +1,56 @@
<?php
/*
* Chill is a suite of a modules, Chill is a software for social workers
* Copyright (C) 2014, Champs Libres Cooperative SCRLFS, <http://www.champs-libres.coop>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
declare(strict_types=1);
namespace Chill\MainBundle\Templating;
use Symfony\Component\HttpFoundation\RequestStack;
use Symfony\Component\Translation\Translator;
use Symfony\Contracts\Translation\TranslatorInterface;
/**
*
* This helper helps to find the string in current locale from translatable_strings
*
* @author Julien Fastré <julien.fastre@champs-libres.coop>
*
*/
class TranslatableStringHelper
final class TranslatableStringHelper implements TranslatableStringHelperInterface
{
/**
*
* @var RequestStack
*/
private $requestStack;
private $fallbackLocales;
public function __construct(RequestStack $requestStack, Translator $translator)
private RequestStack $requestStack;
private TranslatorInterface $translator;
public function __construct(RequestStack $requestStack, TranslatorInterface $translator)
{
$this->requestStack = $requestStack;
$this->fallbackLocales = $translator->getFallbackLocales();
$this->translator = $translator;
}
/**
* return the string in current locale if it exists.
*
* If it does not exists; return the name in the first language available.
*
* Return a blank string if any strings are available.
* Return NULL if $translatableString is NULL
*
* @param array $translatableStrings
* @return string
*/
public function localize(array $translatableStrings)
{
if (NULL === $translatableStrings) {
return NULL;
}
$language = $this->requestStack->getCurrentRequest()->getLocale();
if (isset($translatableStrings[$language])) {
return $translatableStrings[$language];
} else {
foreach ($this->fallbackLocales as $locale) {
if (array_key_exists($locale, $translatableStrings)) {
return $translatableStrings[$locale];
}
}
public function localize(array $translatableStrings): ?string
{
if ([] === $translatableStrings) {
return null;
}
$request = $this->requestStack->getCurrentRequest();
if (null === $request) {
return null;
}
$language = $request->getLocale();
if (array_key_exists($language, $translatableStrings)) {
return $translatableStrings[$language];
}
foreach ($this->translator->getFallbackLocales() as $locale) {
if (array_key_exists($locale, $translatableStrings)) {
return $translatableStrings[$locale];
}
}
// no fallback translation... trying the first available
$langs = array_keys($translatableStrings);
if (count($langs) === 0) {
if ([] === $langs) {
return '';
}
return $translatableStrings[$langs[0]];
return $translatableStrings[$langs[0]];
}
}
}

View File

@@ -0,0 +1,17 @@
<?php
declare(strict_types=1);
namespace Chill\MainBundle\Templating;
interface TranslatableStringHelperInterface
{
/**
* Return the string in current locale if it exists.
*
* If it does not exists; return the name in the first language available.
*
* Return a blank string if any strings are available.
*/
public function localize(array $translatableStrings): ?string;
}

View File

@@ -8,38 +8,29 @@ services:
Chill\MainBundle\Repository\:
resource: '../Repository/'
autowire: true
autoconfigure: true
Chill\MainBundle\Repository\UserACLAwareRepositoryInterface: '@Chill\MainBundle\Repository\UserACLAwareRepository'
Chill\MainBundle\Serializer\Normalizer\:
resource: '../Serializer/Normalizer'
autoconfigure: true
autowire: true
tags:
- { name: 'serializer.normalizer', priority: 64 }
Chill\MainBundle\Form\Type\:
resource: '../Form/Type'
autoconfigure: true
autowire: true
tags:
- { name: form.type }
Chill\MainBundle\Doctrine\Event\:
resource: '../Doctrine/Event/'
autowire: true
tags:
- { name: 'doctrine.event_subscriber' }
chill.main.helper.translatable_string:
class: Chill\MainBundle\Templating\TranslatableStringHelper
arguments:
- "@request_stack"
- "@translator.default"
Chill\MainBundle\Templating\TranslatableStringHelper: '@chill.main.helper.translatable_string'
Chill\MainBundle\Templating\TranslatableStringHelperInterface: '@Chill\MainBundle\Templating\TranslatableStringHelper'
chill.main.twig.translatable_string:
class: Chill\MainBundle\Templating\TranslatableStringTwig

View File

@@ -1,4 +1,8 @@
services:
_defaults:
autowire: true
autoconfigure: true
chill_main.tag_aware_cache:
class: Symfony\Component\Cache\Adapter\TagAwareAdapter
arguments:

View File

@@ -1,11 +1,9 @@
services:
_defaults:
autowire: true
autoconfigure: true
Chill\MainBundle\Command\ChillImportUsersCommand:
arguments:
$em: '@Doctrine\ORM\EntityManagerInterface'
$logger: '@Psr\Log\LoggerInterface'
$passwordEncoder: '@Symfony\Component\Security\Core\Encoder\UserPasswordEncoderInterface'
$validator: '@Symfony\Component\Validator\Validator\ValidatorInterface'
$userRepository: '@Chill\MainBundle\Repository\UserRepository'
tags:
- { name: console.command }

View File

@@ -1,12 +1,13 @@
services:
_defaults:
autowire: true
autoconfigure: true
Chill\MainBundle\Controller\:
autowire: true
resource: '../../Controller'
tags: ['controller.service_arguments']
Chill\MainBundle\Controller\PasswordController:
autowire: true
arguments:
$chillLogger: '@monolog.logger.chill'
tags: ['controller.service_arguments']
@@ -28,10 +29,6 @@ services:
$validator: '@Symfony\Component\Validator\Validator\ValidatorInterface'
tags: ['controller.service_arguments']
Chill\MainBundle\Controller\UserController:
autowire: true
autoconfigure: true
Chill\MainBundle\Controller\NotificationController:
arguments:
$security: '@Symfony\Component\Security\Core\Security'

View File

@@ -1,4 +1,8 @@
services:
_defaults:
autowire: true
autoconfigure: true
Chill\MainBundle\CRUD\Routing\CRUDRoutesLoader:
arguments:
$crudConfig: '%chill_main_crud_route_loader_config%'

View File

@@ -1,3 +1,7 @@
---
services:
'Chill\MainBundle\Doctrine\Migrations\VersionComparator': ~
_defaults:
autowire: true
autoconfigure: true
Chill\MainBundle\Doctrine\Migrations\VersionComparator: ~

View File

@@ -1,9 +1,13 @@
services:
_defaults:
autowire: true
autoconfigure: true
chill.main.export_element_validator:
class: Chill\MainBundle\Validator\Constraints\Export\ExportElementConstraintValidator
tags:
- { name: validator.constraint_validator }
# deprecated in favor of spreadsheet_formatter
# chill.main.export.csv_formatter:
# class: Chill\MainBundle\Export\Formatter\CSVFormatter
@@ -11,7 +15,7 @@ services:
# - "@translator"
# tags:
# - { name: chill.export_formatter, alias: 'csv' }
chill.main.export.spreadsheet_formatter:
class: Chill\MainBundle\Export\Formatter\SpreadSheetFormatter
arguments:
@@ -19,7 +23,7 @@ services:
$exportManager: '@Chill\MainBundle\Export\ExportManager'
tags:
- { name: chill.export_formatter, alias: 'spreadsheet' }
chill.main.export.list_formatter:
class: Chill\MainBundle\Export\Formatter\CSVListFormatter
arguments:
@@ -27,7 +31,7 @@ services:
$exportManager: '@Chill\MainBundle\Export\ExportManager'
tags:
- { name: chill.export_formatter, alias: 'csvlist' }
chill.main.export.list_spreadsheet_formatter:
class: Chill\MainBundle\Export\Formatter\SpreadsheetListFormatter
arguments:
@@ -35,7 +39,7 @@ services:
$exportManager: '@Chill\MainBundle\Export\ExportManager'
tags:
- { name: chill.export_formatter, alias: 'spreadlist' }
chill.main.export.pivoted_list_formatter:
class: Chill\MainBundle\Export\Formatter\CSVPivotedListFormatter
arguments:
@@ -43,4 +47,3 @@ services:
$exportManager: '@Chill\MainBundle\Export\ExportManager'
tags:
- { name: chill.export_formatter, alias: 'csv_pivoted_list' }

View File

@@ -1,4 +1,8 @@
services:
_defaults:
autowire: true
autoconfigure: true
Chill\MainBundle\DataFixtures\ORM\:
resource: ../../DataFixtures/ORM
tags: [ 'doctrine.fixture.orm' ]

View File

@@ -1,4 +1,7 @@
services:
_defaults:
autowire: true
autoconfigure: true
chill.main.form.type.translatable.string:
class: Chill\MainBundle\Form\Type\TranslatableStringFormType
@@ -39,9 +42,7 @@ services:
tags:
- { name: form.type, alias: select2_chill_language }
Chill\MainBundle\Form\Type\PickCenterType:
autowire: true
autoconfigure: true
Chill\MainBundle\Form\Type\PickCenterType: ~
chill.main.form.type.composed_role_scope:
class: Chill\MainBundle\Form\Type\ComposedRoleScopeType
@@ -62,9 +63,7 @@ services:
tags:
- { name: form.type }
Chill\MainBundle\Form\ChoiceLoader\PostalCodeChoiceLoader:
autowire: true
autoconfigure: true
Chill\MainBundle\Form\ChoiceLoader\PostalCodeChoiceLoader: ~
chill.main.form.type.export:
class: Chill\MainBundle\Form\Type\Export\ExportType
@@ -96,14 +95,10 @@ services:
arguments:
- '@Chill\MainBundle\Export\ExportManager'
Chill\MainBundle\Form\Type\DataTransformer\CenterTransformer:
autowire: true
autoconfigure: true
Chill\MainBundle\Form\Type\DataTransformer\CenterTransformer: ~
chill.main.form.advanced_search_type:
class: Chill\MainBundle\Form\AdvancedSearchType
autowire: true
autoconfigure: true
arguments:
- "@chill_main.search_provider"
tags:
@@ -116,9 +111,7 @@ services:
tags:
- { name: form.type }
Chill\MainBundle\Form\UserType:
autowire: true
autoconfigure: true
Chill\MainBundle\Form\UserType: ~
Chill\MainBundle\Form\PermissionsGroupType:
tags:
@@ -131,15 +124,8 @@ services:
tags:
- { name: form.type }
Chill\MainBundle\Form\Type\PickAddressType: ~
Chill\MainBundle\Form\Type\PickAddressType:
autoconfigure: true
autowire: true
Chill\MainBundle\Form\DataTransform\AddressToIdDataTransformer: ~
Chill\MainBundle\Form\DataTransform\AddressToIdDataTransformer:
autoconfigure: true
autowire: true
Chill\MainBundle\Form\Type\LocationFormType:
autowire: true
autoconfigure: true
Chill\MainBundle\Form\Type\LocationFormType: ~

View File

@@ -1,4 +1,8 @@
services:
_defaults:
autowire: true
autoconfigure: true
chill.main.logger:
# a logger to log events from the app (deletion, remove, etc.)
alias: monolog.logger.chill

View File

@@ -1,9 +1,11 @@
services:
Chill\MainBundle\Routing\MenuBuilder\:
resource: '../../Routing/MenuBuilder'
_defaults:
autowire: true
autoconfigure: true
Chill\MainBundle\Routing\MenuBuilder\:
resource: '../../Routing/MenuBuilder'
Chill\MainBundle\Routing\MenuBuilder\UserMenuBuilder:
arguments:
$tokenStorage: '@Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface'

View File

@@ -1,4 +1,8 @@
services:
_defaults:
autowire: true
autoconfigure: true
Chill\MainBundle\Notification\Mailer:
arguments:
$logger: '@Psr\Log\LoggerInterface'
@@ -9,6 +13,4 @@ services:
$translator: '@Symfony\Component\Translation\TranslatorInterface'
$routeParameters: '%chill_main.notifications%'
Chill\MainBundle\Notification\NotificationRenderer:
autoconfigure: true
autowire: true
Chill\MainBundle\Notification\NotificationRenderer: ~

View File

@@ -1,9 +1,11 @@
services:
_defaults:
autowire: true
autoconfigure: true
chill_main.paginator_factory:
class: Chill\MainBundle\Pagination\PaginatorFactory
public: true
autowire: true
autoconfigure: true
arguments:
- "@request_stack"
- "@router"

View File

@@ -1,19 +1,21 @@
services:
_defaults:
autowire: true
autoconfigure: true
Chill\MainBundle\Phonenumber\PhonenumberHelper:
arguments:
$logger: '@Psr\Log\LoggerInterface'
$config: '%chill_main.phone_helper%'
$cachePool: '@cache.user_data'
Chill\MainBundle\Phonenumber\Templating:
arguments:
$phonenumberHelper: '@Chill\MainBundle\Phonenumber\PhonenumberHelper'
tags:
- { name: twig.extension }
Chill\MainBundle\Validation\Validator\ValidPhonenumber:
arguments:
$logger: '@Psr\Log\LoggerInterface'
$phonenumberHelper: '@Chill\MainBundle\Phonenumber\PhonenumberHelper'
tags:
- { name: validator.constraint_validator }

View File

@@ -1,10 +1,13 @@
services:
_defaults:
autowire: true
autoconfigure: true
Chill\MainBundle\Redis\RedisConnectionFactory:
arguments:
$parameters: "%chill_main.redis%"
tags:
- { name: kernel.event_subcriber }
Chill\MainBundle\Redis\ChillRedis:
factory: [ '@Chill\MainBundle\Redis\RedisConnectionFactory', 'create' ]

View File

@@ -1,4 +1,8 @@
services:
_defaults:
autowire: true
autoconfigure: true
chill.main.menu_composer:
class: Chill\MainBundle\Routing\MenuComposer
arguments:
@@ -6,7 +10,7 @@ services:
- '@Knp\Menu\FactoryInterface'
- '@Symfony\Component\Translation\TranslatorInterface'
Chill\MainBundle\Routing\MenuComposer: '@chill.main.menu_composer'
chill.main.routes_loader:
class: Chill\MainBundle\Routing\Loader\ChillRoutesLoader
arguments:

View File

@@ -1,14 +1,14 @@
services:
_defaults:
autowire: true
autoconfigure: true
chill_main.search_provider:
class: Chill\MainBundle\Search\SearchProvider
Chill\MainBundle\Search\SearchProvider: '@chill_main.search_provider'
Chill\MainBundle\Search\SearchApi:
autowire: true
autoconfigure: true
Chill\MainBundle\Search\SearchApi: ~
Chill\MainBundle\Search\Entity\:
autowire: true
autoconfigure: true
resource: '../../Search/Entity'

View File

@@ -3,46 +3,35 @@ services:
autowire: true
autoconfigure: true
# do not autowire the directory Security/Resolver
Chill\MainBundle\Security\Resolver\CenterResolverDispatcher:
arguments:
- !tagged_iterator chill_main.center_resolver
Chill\MainBundle\Security\Resolver\CenterResolverManager:
arguments:
- !tagged_iterator chill_main.center_resolver
Chill\MainBundle\Security\Resolver\CenterResolverManagerInterface: '@Chill\MainBundle\Security\Resolver\CenterResolverManager'
Chill\MainBundle\Security\Resolver\ScopeResolverDispatcher:
arguments:
- !tagged_iterator chill_main.scope_resolver
# do not autowire the directory Security/Resolver
Chill\MainBundle\Security\Resolver\DefaultCenterResolver:
autoconfigure: true
autowire: true
Chill\MainBundle\Security\Resolver\DefaultCenterResolver: ~
Chill\MainBundle\Security\Resolver\DefaultScopeResolver:
autoconfigure: true
autowire: true
Chill\MainBundle\Security\Resolver\DefaultScopeResolver: ~
# do not autowire the directory Security/Resolver
Chill\MainBundle\Security\Resolver\ResolverTwigExtension:
autoconfigure: true
autowire: true
Chill\MainBundle\Security\Resolver\ResolverTwigExtension: ~
# do not autowire the directory Security/Resolver
Chill\MainBundle\Security\Authorization\DefaultVoterHelperFactory:
autowire: true
Chill\MainBundle\Security\Authorization\DefaultVoterHelperFactory: ~
# do not autowire the directory Security/Resolver
Chill\MainBundle\Security\Authorization\VoterHelperFactoryInterface: '@Chill\MainBundle\Security\Authorization\DefaultVoterHelperFactory'
chill.main.security.authorization.helper:
class: Chill\MainBundle\Security\Authorization\AuthorizationHelper
autowire: true
autoconfigure: true
Chill\MainBundle\Security\Authorization\AuthorizationHelper: '@chill.main.security.authorization.helper'
Chill\MainBundle\Security\Authorization\AuthorizationHelperInterface: '@chill.main.security.authorization.helper'
Chill\MainBundle\Security\ParentRoleHelper:
autowire: true
autoconfigure: true
Chill\MainBundle\Security\ParentRoleHelper: ~
chill.main.role_provider:
class: Chill\MainBundle\Security\RoleProvider
@@ -54,20 +43,16 @@ services:
Symfony\Component\Security\Core\User\UserProviderInterface: "@chill.main.user_provider"
Chill\MainBundle\Security\Authorization\ChillExportVoter:
arguments:
$authorizationHelper: '@Chill\MainBundle\Security\Authorization\AuthorizationHelper'
tags:
- { name: security.voter }
Chill\MainBundle\Security\PasswordRecover\TokenManager:
arguments:
$secret: '%kernel.secret%'
$logger: '@Psr\Log\LoggerInterface'
Chill\MainBundle\Security\PasswordRecover\RecoverPasswordHelper:
arguments:
$tokenManager: '@Chill\MainBundle\Security\PasswordRecover\TokenManager'
$urlGenerator: '@Symfony\Component\Routing\Generator\UrlGeneratorInterface'
$mailer: '@Chill\MainBundle\Notification\Mailer'
$routeParameters: "%chill_main.notifications%"
@@ -80,11 +65,9 @@ services:
Chill\MainBundle\Security\PasswordRecover\PasswordRecoverLocker:
arguments:
$chillRedis: '@Chill\MainBundle\Redis\ChillRedis'
$logger: '@Psr\Log\LoggerInterface'
Chill\MainBundle\Security\PasswordRecover\PasswordRecoverVoter:
arguments:
$locker: '@Chill\MainBundle\Security\PasswordRecover\PasswordRecoverLocker'
$requestStack: '@Symfony\Component\HttpFoundation\RequestStack'
tags:
- { name: security.voter }

View File

@@ -1,11 +1,13 @@
---
services:
_defaults:
autowire: true
autoconfigure: true
# note: the autowiring for serializers and normalizers is declared
# into ../services.yaml
Chill\MainBundle\Serializer\Normalizer\DoctrineExistingEntityNormalizer:
autowire: true
tags:
- { name: 'serializer.normalizer', priority: 8 }

View File

@@ -1,4 +1,8 @@
services:
_defaults:
autowire: true
autoconfigure: true
# twig_intl:
# class: Twig_Extensions_Extension_Intl
# tags:
@@ -32,8 +36,6 @@ services:
- { name: twig.extension }
Chill\MainBundle\Templating\Entity\CommentRender:
autoconfigure: true
autowire: true
tags:
- { name: 'chill.render_entity' }
@@ -41,17 +43,11 @@ services:
tags:
- { name: twig.extension }
Chill\MainBundle\Templating\Entity\AddressRender:
autoconfigure: true
autowire: true
Chill\MainBundle\Templating\Entity\AddressRender: ~
Chill\MainBundle\Templating\Entity\UserRender:
autoconfigure: true
autowire: true
Chill\MainBundle\Templating\Entity\UserRender: ~
Chill\MainBundle\Templating\Listing\:
resource: './../../Templating/Listing'
autoconfigure: true
autowire: true
Chill\MainBundle\Templating\Listing\FilterOrderHelperFactoryInterface: '@Chill\MainBundle\Templating\Listing\FilterOrderHelperFactory'

View File

@@ -1,4 +1,8 @@
services:
_defaults:
autowire: true
autoconfigure: true
chill_main.timeline_builder:
class: Chill\MainBundle\Timeline\TimelineBuilder
arguments:

View File

@@ -1,11 +1,15 @@
services:
_defaults:
autowire: true
autoconfigure: true
chill_main.validator_user_circle_consistency:
class: Chill\MainBundle\Validator\Constraints\Entity\UserCircleConsistencyValidator
arguments:
- "@chill.main.security.authorization.helper"
tags:
- { name: "validator.constraint_validator" }
Chill\MainBundle\Validation\Validator\UserUniqueEmailAndUsername:
arguments:
$em: '@Doctrine\ORM\EntityManagerInterface'

View File

@@ -1,2 +1,6 @@
services:
_defaults:
autowire: true
autoconfigure: true
Chill\MainBundle\Templating\UI\CountNotificationUser: ~