Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@
"symfony/sendgrid-mailer": "^6.4",
"symfony/twig-bundle": "^6.4",
"symfony/messenger": "^6.4",
"symfony/lock": "^6.4"
"symfony/lock": "^6.4",
"webklex/php-imap": "^6.2",
"ext-imap": "*"
},
"require-dev": {
"phpunit/phpunit": "^9.5",
Expand Down
2 changes: 1 addition & 1 deletion config/PHPMD/rules.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
<!-- rules from the "naming" rule set -->
<rule ref="rulesets/naming.xml/ShortVariable">
<properties>
<property name="exceptions" value="id,ip,cc"/>
<property name="exceptions" value="id,ip,cc,io"/>
</properties>
</rule>
<rule ref="rulesets/naming.xml/LongVariable">
Expand Down
9 changes: 0 additions & 9 deletions config/PhpCodeSniffer/ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
<!-- Classes -->
<rule ref="Generic.Classes.DuplicateClassName"/>
<rule ref="Squiz.Classes.ClassFileName"/>
<rule ref="Squiz.Classes.DuplicateProperty"/>
<rule ref="Squiz.Classes.LowercaseClassKeywords"/>
<rule ref="Squiz.Classes.SelfMemberReference"/>

Expand All @@ -41,9 +40,6 @@
<!-- Control structures -->
<rule ref="PEAR.ControlStructures.ControlSignature"/>

<!-- Debug -->
<rule ref="Generic.Debug.ClosureLinter"/>

<!-- Files -->
<rule ref="Generic.Files.OneClassPerFile"/>
<rule ref="Generic.Files.OneInterfacePerFile"/>
Expand All @@ -54,7 +50,6 @@
<rule ref="PEAR.Formatting.MultiLineAssignment"/>

<!-- Functions -->
<rule ref="Generic.Functions.CallTimePassByReference"/>
<rule ref="Squiz.Functions.FunctionDuplicateArgument"/>
<rule ref="Squiz.Functions.GlobalFunction"/>

Expand All @@ -66,9 +61,6 @@
<rule ref="Generic.NamingConventions.ConstructorName"/>
<rule ref="PEAR.NamingConventions.ValidClassName"/>

<!-- Objects -->
<rule ref="Squiz.Objects.ObjectMemberComma"/>

<!-- Operators -->
<rule ref="Squiz.Operators.IncrementDecrementUsage"/>
<rule ref="Squiz.Operators.ValidLogicalOperators"/>
Expand Down Expand Up @@ -110,6 +102,5 @@
<rule ref="Squiz.WhiteSpace.CastSpacing"/>
<rule ref="Squiz.WhiteSpace.LogicalOperatorSpacing"/>
<rule ref="Squiz.WhiteSpace.OperatorSpacing"/>
<rule ref="Squiz.WhiteSpace.PropertyLabelSpacing"/>
<rule ref="Squiz.WhiteSpace.SemicolonSpacing"/>
</ruleset>
26 changes: 26 additions & 0 deletions config/parameters.yml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,32 @@ parameters:
app.password_reset_url: '%%env(PASSWORD_RESET_URL)%%'
env(PASSWORD_RESET_URL): 'https://example.com/reset/'

# bounce email settings
imap_bounce.email: '%%env(BOUNCE_EMAIL)%%'
env(BOUNCE_EMAIL): 'bounce@phplist.com'
imap_bounce.password: '%%env(BOUNCE_IMAP_PASS)%%'
env(BOUNCE_IMAP_PASS): 'bounce@phplist.com'
imap_bounce.host: '%%env(BOUNCE_IMAP_HOST)%%'
env(BOUNCE_IMAP_HOST): 'imap.phplist.com'
imap_bounce.port: '%%env(BOUNCE_IMAP_PORT)%%'
env(BOUNCE_IMAP_PORT): '993'
imap_bounce.encryption: '%%env(BOUNCE_IMAP_ENCRYPTION)%%'
env(BOUNCE_IMAP_ENCRYPTION): 'ssl'
imap_bounce.mailbox: '%%env(BOUNCE_IMAP_MAILBOX)%%'
env(BOUNCE_IMAP_MAILBOX): '/var/spool/mail/bounces'
imap_bounce.mailbox_name: '%%env(BOUNCE_IMAP_MAILBOX_NAME)%%'
env(BOUNCE_IMAP_MAILBOX_NAME): 'INBOX,ONE_MORE'
imap_bounce.protocol: '%%env(BOUNCE_IMAP_PROTOCOL)%%'
env(BOUNCE_IMAP_PROTOCOL): 'imap'
imap_bounce.unsubscribe_threshold: '%%env(BOUNCE_IMAP_UNSUBSCRIBE_THRESHOLD)%%'
env(BOUNCE_IMAP_UNSUBSCRIBE_THRESHOLD): '5'
imap_bounce.blacklist_threshold: '%%env(BOUNCE_IMAP_BLACKLIST_THRESHOLD)%%'
env(BOUNCE_IMAP_BLACKLIST_THRESHOLD): '3'
imap_bounce.purge: '%%env(BOUNCE_IMAP_PURGE)%%'
env(BOUNCE_IMAP_PURGE): '0'
imap_bounce.purge_unprocessed: '%%env(BOUNCE_IMAP_PURGE_UNPROCESSED)%%'
env(BOUNCE_IMAP_PURGE_UNPROCESSED): '0'

# Messenger configuration for asynchronous processing
app.messenger_transport_dsn: '%%env(MESSENGER_TRANSPORT_DSN)%%'
env(MESSENGER_TRANSPORT_DSN): 'doctrine://default?auto_setup=true'
Expand Down
96 changes: 48 additions & 48 deletions config/services.yml
Original file line number Diff line number Diff line change
@@ -1,51 +1,51 @@
imports:
- { resource: 'services/*.yml' }
- { resource: 'services/*.yml' }

services:
_defaults:
autowire: true
autoconfigure: true
public: false

PhpList\Core\Core\ConfigProvider:
arguments:
$config: '%app.config%'

PhpList\Core\Core\ApplicationStructure:
public: true

PhpList\Core\Security\Authentication:
public: true

PhpList\Core\Security\HashGenerator:
public: true

PhpList\Core\Routing\ExtraLoader:
tags: [routing.loader]

PhpList\Core\Domain\Common\Repository\AbstractRepository:
abstract: true
autowire: true
autoconfigure: false
public: true
factory: ['@doctrine.orm.entity_manager', getRepository]

# controllers are imported separately to make sure they're public
# and have a tag that allows actions to type-hint services
PhpList\Core\EmptyStartPageBundle\Controller\:
resource: '../src/EmptyStartPageBundle/Controller'
public: true
tags: [controller.service_arguments]

doctrine.orm.metadata.annotation_reader:
alias: doctrine.annotation_reader

doctrine.annotation_reader:
class: Doctrine\Common\Annotations\AnnotationReader
autowire: true

doctrine.orm.default_annotation_metadata_driver:
class: Doctrine\ORM\Mapping\Driver\AnnotationDriver
arguments:
- '@annotation_reader'
- '%kernel.project_dir%/src/Domain/Model/'
_defaults:
autowire: true
autoconfigure: true
public: false

PhpList\Core\Core\ConfigProvider:
arguments:
$config: '%app.config%'

PhpList\Core\Core\ApplicationStructure:
public: true

PhpList\Core\Security\Authentication:
public: true

PhpList\Core\Security\HashGenerator:
public: true

PhpList\Core\Routing\ExtraLoader:
tags: [routing.loader]

PhpList\Core\Domain\Common\Repository\AbstractRepository:
abstract: true
autowire: true
autoconfigure: false
public: true
factory: ['@doctrine.orm.entity_manager', getRepository]

# controllers are imported separately to make sure they're public
# and have a tag that allows actions to type-hint services
PhpList\Core\EmptyStartPageBundle\Controller\:
resource: '../src/EmptyStartPageBundle/Controller'
public: true
tags: [controller.service_arguments]

doctrine.orm.metadata.annotation_reader:
alias: doctrine.annotation_reader

doctrine.annotation_reader:
class: Doctrine\Common\Annotations\AnnotationReader
autowire: true

doctrine.orm.default_annotation_metadata_driver:
class: Doctrine\ORM\Mapping\Driver\AnnotationDriver
arguments:
- '@annotation_reader'
- '%kernel.project_dir%/src/Domain/Model/'
2 changes: 1 addition & 1 deletion config/services/builders.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ services:
autowire: true
autoconfigure: true

PhpListPhpList\Core\Domain\Messaging\Service\Builder\MessageOptionsBuilder:
PhpList\Core\Domain\Messaging\Service\Builder\MessageOptionsBuilder:
autowire: true
autoconfigure: true
4 changes: 4 additions & 0 deletions config/services/commands.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ services:
PhpList\Core\Domain\Identity\Command\:
resource: '../../src/Domain/Identity/Command'
tags: ['console.command']

PhpList\Core\Domain\Messaging\Command\ProcessBouncesCommand:
arguments:
$protocolProcessors: !tagged_iterator 'phplist.bounce_protocol_processor'
12 changes: 12 additions & 0 deletions config/services/managers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,22 @@ services:
autowire: true
autoconfigure: true

PhpList\Core\Domain\Messaging\Service\Manager\BounceManager:
autowire: true
autoconfigure: true

PhpList\Core\Domain\Messaging\Service\Manager\ListMessageManager:
autowire: true
autoconfigure: true

PhpList\Core\Domain\Configuration\Service\Manager\ConfigManager:
autowire: true
autoconfigure: true

PhpList\Core\Domain\Messaging\Service\Manager\BounceRuleManager:
autowire: true
autoconfigure: true

PhpList\Core\Domain\Messaging\Service\Manager\SendProcessManager:
autowire: true
autoconfigure: true
21 changes: 21 additions & 0 deletions config/services/processor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
services:
_defaults:
autowire: true
autoconfigure: true
public: false

PhpList\Core\Domain\Messaging\Service\Processor\PopBounceProcessor:
arguments:
$host: '%imap_bounce.host%'
$port: '%imap_bounce.port%'
$mailboxNames: '%imap_bounce.mailbox_name%'
tags: ['phplist.bounce_protocol_processor']

PhpList\Core\Domain\Messaging\Service\Processor\MboxBounceProcessor:
tags: ['phplist.bounce_protocol_processor']

PhpList\Core\Domain\Messaging\Service\Processor\AdvancedBounceRulesProcessor: ~

PhpList\Core\Domain\Messaging\Service\Processor\UnidentifiedBounceReprocessor: ~

PhpList\Core\Domain\Messaging\Service\Processor\BounceDataProcessor: ~
4 changes: 4 additions & 0 deletions config/services/providers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@ services:
PhpList\Core\Domain\Subscription\Service\Provider\SubscriberProvider:
autowire: true
autoconfigure: true

PhpList\Core\Domain\Messaging\Service\Provider\BounceActionProvider:
autowire: true
autoconfigure: true
Loading
Loading