Skip to content

Kh/dev/backport eu markets v33 - #295

Merged
printminion-co merged 17 commits into
ionos-dev-v33from
kh/dev/backport-eu-markets-v33
Aug 3, 2026
Merged

Kh/dev/backport eu markets v33#295
printminion-co merged 17 commits into
ionos-dev-v33from
kh/dev/backport-eu-markets-v33

Conversation

@bromiesTM

Copy link
Copy Markdown
  • Resolves: #

Summary

TODO

  • ...

Checklist

bromiesTM and others added 17 commits August 3, 2026 15:27
Signed-off-by: Kai Henseler <kai.henseler@strato.de>
Signed-off-by: Kai Henseler <kai.henseler@strato.de>
- Pin docker/build-push-action to tagged release SHA v7.2.0 (was
  pinned to an untagged intermediate commit with no version label)
- Fix shivammathur/setup-php version comment: the action uses no 'v'
  prefix in its tags, so '#v2.31.1' is wrong; correct to '# 2.31.1'

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Kai Henseler <kai.henseler@strato.de>
Signed-off-by: Kai Henseler <kai.henseler@strato.de>
…ateData variables

Extract the inline array literals passed to each createEMailTemplate() call
into named $templateData variables. For sendNote(), which previously passed no
data array, add a minimal array so all four send methods are consistent.

Zero behaviour change — $templateData is passed straight through to
createEMailTemplate() with identical contents.
…ach mail send

Dispatch a typed PSR-14 event immediately before every mailer->send() call
in ShareByMailProvider so that external listeners can intercept and replace
Nextcloud's native SMTP delivery.

Event hierarchy:
  AbstractBeforeShareMailSentEvent (base: share, resolvedEmails, message,
    markMailHandled / isMailHandled)
  ├── BeforeShareMailSentEvent   – sendEmail()
  ├── BeforeSharePasswordMailSentEvent – sendPassword() + sendPasswordToOwner()
  └── BeforeShareNoteMailSentEvent – sendNote()

Each concrete class holds its own typed $templateData (psalm array-shape)
and exposes named getters (getSenderUserId(), getFileName(), …) instead of
a generic getMailData(): array<string,mixed>.  This avoids defensive
is_string() / null guards in listeners.

$templateData reuses the array already passed to createEMailTemplate(), with
one extra key added for sendEmail(): senderUserId (the raw user ID, distinct
from the display name stored under 'initiator').

The native mailer->send() is skipped when a listener calls markMailHandled().
If the listener's own send throws, the exception propagates and the native
send is also skipped — no silent SMTP fallback.

sendEmail() and sendPassword() are flattened from nested
if (!isMailHandled()) { ... } pyramids to early-return style.

Signed-off-by: Misha M.-Kupriyanov <kupriyanov@strato.de>
…ssmap

autoload_real.php sets setClassMapAuthoritative(true), which disables
PSR-4 fallback entirely. Any class not listed in $classMap is never
found, regardless of whether PSR-4 would resolve it.

Signed-off-by: Tatjana Kaschperko Lindt <kaschperko-lindt@strato.de>
…a and event refactors

- Add senderUserId to the expected RecipientNotification templateData in 3 tests
  (added by the createEMailTemplate params refactor in 242b896)
- Update dispatchTyped expectation from once(GenerateSecurePasswordEvent) to
  exactly(3) with withConsecutive for GenerateSecurePasswordEvent,
  BeforeShareMailSentEvent, and BeforeSharePasswordMailSentEvent
  (sendEmail() and sendPassword() now each dispatch a Before*Event)

Signed-off-by: Tatjana Kaschperko Lindt <kaschperko-lindt@strato.de>
…t dispatch

Signed-off-by: Tatjana Kaschperko Lindt <kaschperko-lindt@strato.de>
…s suppressed

sendPassword() and sendPasswordToOwner() called createPasswordSendActivity()
unconditionally outside the isMailHandled() guard. A listener intercepting the
BeforeSharePasswordMailSentEvent would suppress the SMTP send but still cause
a false activity-log entry for a mail that was never delivered.

Apply the same early-return pattern used by sendEmail(): return immediately
when isMailHandled() is true so no side effects run after the flag is set.

Signed-off-by: Tatjana Kaschperko Lindt <kaschperko-lindt@strato.de>
…r "file request")

https://github.com/IONOS-Productivity/nc-ionos-processes/releases/tag/1.0.0-9501a5e

Signed-off-by: Misha M.-Kupriyanov <kupriyanov@strato.de>
Co-authored-by: Tatjana Kaschperko Lindt <kaschperko-lindt@strato.de>
…2.0.6 (Linux/Nautilus, files search, devtool fix, test fixes)
Signed-off-by: Kai Henseler <kai.henseler@strato.de>
Signed-off-by: Kai Henseler <kai.henseler@strato.de>
Signed-off-by: Kai Henseler <kai.henseler@strato.de>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces new “before send” events in the ShareByMail app to let listeners intercept/override outgoing share-related emails (share link, password, note), with corresponding unit test updates. It also updates repository operational configuration (new submodule entry) and hardens CI workflows by pinning GitHub Actions to specific commit SHAs.

Changes:

  • Add BeforeShare*MailSentEvent event types and dispatch them immediately before native mail sending, allowing listeners to suppress the default send.
  • Update ShareByMail provider tests to assert the new dispatch behavior and to cover the “mail handled by listener” behavior.
  • Update repo ops/CI: add a new submodule entry and pin multiple GitHub Actions uses to commit SHAs; adjust a build target in the HiDrive workflow.

Reviewed changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
apps/sharebymail/lib/ShareByMailProvider.php Dispatch new typed “before mail sent” events and allow listeners to suppress native mail sending; pass structured template data.
apps/sharebymail/lib/Event/AbstractBeforeShareMailSentEvent.php New base event carrying share, resolved recipients, prepared message, and a “handled” flag.
apps/sharebymail/lib/Event/BeforeShareMailSentEvent.php New event for share-link notification emails.
apps/sharebymail/lib/Event/BeforeShareNoteMailSentEvent.php New event for note-update emails.
apps/sharebymail/lib/Event/BeforeSharePasswordMailSentEvent.php New event for password emails (recipient + owner flows).
apps/sharebymail/tests/ShareByMailProviderTest.php Extend tests to assert new event dispatching and listener-handled behavior.
apps/sharebymail/composer/composer/autoload_static.php Composer autoload updates for newly added event classes.
apps/sharebymail/composer/composer/autoload_classmap.php Composer classmap updates for newly added event classes.
.gitmodules Add apps-external/notify_push submodule entry.
.github/workflows/sbom-matrix.yaml Pin multiple GitHub Actions to specific SHAs for SBOM generation/upload.
.github/workflows/hidrive-next-build.yml Pin actions + adjust Nextcloud build target used by the workflow.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/hidrive-next-build.yml
@printminion-co
printminion-co marked this pull request as ready for review August 3, 2026 14:53
@printminion-co
printminion-co merged commit 97a102e into ionos-dev-v33 Aug 3, 2026
17 of 29 checks passed
@printminion-co
printminion-co deleted the kh/dev/backport-eu-markets-v33 branch August 3, 2026 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants