Repository navigation
Dev #390
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
TatevikGr
wants to merge
14
commits into
main
Choose a base branch
from
dev
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Dev #390
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
3ebedfb
Update TemplateImageManager to set correct MIME type for resized imag…
tatevikg1 7327e72
Refactor UserMessageBounce and UserMessageView to update TODO comment…
tatevikg1 2777d0e
Improve writeFileToDirectory method to handle temp file management an…
tatevikg1 54e8f5f
Remove TODO comment for upload directory configuration in LocalUpload…
tatevikg1 c52c7cb
Add methods to retrieve bounce report data and refactor database quer…
tatevikg1 3914068
Refactor comments in CampaignProcessorMessageHandler and MessageForwa…
tatevikg1 c09147b
Validate temp file directory in FileHelper and unlink if it doesn't m…
tatevikg1 93a4548
ref: MessageDataLoader and MessageRepository for improved data handli…
tatevikg1 deff331
feat: link tracking functionality with token generation and click tra…
tatevikg1 ee412fd
ref: improve security in FileHelper
tatevikg1 6cbdced
ref: use executeStatement instead of flush
tatevikg1 8f30740
fix: ensure UID is added before fragment in personalized links
tatevikg1 e37ba43
feat: add LIST_FIELDS constant and handle null data for target and ex…
tatevikg1 4e4c6d0
ref: to fix phpmd
tatevikg1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| <?php | ||
|
|
||
| declare(strict_types=1); | ||
|
|
||
| namespace PhpList\Core\Domain\Analytics\Model\Dto; | ||
|
|
||
| /** Identifies one tracked link of one campaign for one subscriber, as carried in a click-tracking URL. */ | ||
| final class LinkTrackToken | ||
| { | ||
| public const TYPE_HTML = 'H'; | ||
| public const TYPE_TEXT = 'T'; | ||
|
|
||
| public function __construct( | ||
| public readonly string $type, | ||
| public readonly string $forwardUuid, | ||
| public readonly string $messageUuid, | ||
| public readonly string $subscriberUuid, | ||
| ) { | ||
| } | ||
|
|
||
| public function isHtml(): bool | ||
| { | ||
| return $this->type === self::TYPE_HTML; | ||
| } | ||
|
|
||
| public static function isValidType(string $type): bool | ||
| { | ||
| return in_array($type, [self::TYPE_HTML, self::TYPE_TEXT], true); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace the
flush()call with a guardedUPDATE.findOrCreateByUrlruns inside the campaign sending path throughLinkTrackService::getForward. When an existing forward has an empty UUID,$this->getEntityManager()->flush()writes every pending change in the worker's unit of work, not only this forward. The path instruction forbids this in Domain repositories: "Do not allow, flag ANY DB write / finalization:$entityManager->flush(...)". The relaxed rule permits a guardedUPDATE ... WHERE <guard>against the repository's own table. ThatUPDATEalso stops two workers from writing different UUIDs to the same legacy row.♻️ Proposed fix
As per path instructions: "Do not allow, flag ANY DB write / finalization:
$entityManager->flush(...)" and "Repositories in Domain should be abstractions without side effects".Committable suggestion
Source: Path instructions