Commit Graph
6638 Commits
Author SHA1 Message Date
Adam DaleyandCopilot Autofix powered by AI e2e9ff1125 Fixes for 2 code quality findings in RouterMatcherTest (#3930)
* Apply suggested fix to tests/Unit/FOSSBilling/RouteMatcherTest.php from Copilot Autofix

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>

* Apply suggested fix to tests/Unit/FOSSBilling/RouteMatcherTest.php from Copilot Autofix

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>

---------

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
2026-07-07 06:00:42 +01:00
Adam DaleyandCopilot Autofix powered by AI d6c21c4b4a Fixes for 2 code quality findings in PayPalEmail adapter (#3931)
* Apply suggested fix to src/library/Payment/Adapter/PayPalEmail.php from Copilot Autofix

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>

* Apply suggested fix to src/library/Payment/Adapter/PayPalEmail.php from Copilot Autofix

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>

* Fix syntax error from orphaned brace in PayPalEmail adapter

A prior autofix commit closed the `payment_status == 'Completed'` if-block
early with an else/break, but left the block's original closing brace in
place, breaking the rest of the switch statement.

---------

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
2026-07-07 05:53:20 +01:00
Adam DaleyandCopilot Autofix powered by AI 7c5699be80 Fixes for 4 code quality findings in PayPalEmail adapter (#3929)
* Apply suggested fix to src/library/Payment/Adapter/PayPalEmail.php from Copilot Autofix

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>

* Apply suggested fix to src/library/Payment/Adapter/PayPalEmail.php from Copilot Autofix

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>

* Apply suggested fix to src/library/Payment/Adapter/PayPalEmail.php from Copilot Autofix

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>

* Apply suggested fix to src/library/Payment/Adapter/PayPalEmail.php from Copilot Autofix

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>

---------

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
2026-07-07 05:28:07 +01:00
Adam Daley 85cd7aac2a Modernize HTTP response flow (#3928)
* Modernize HTTP response flow

* Fix route matcher test spelling
2026-07-07 05:15:39 +01:00
Adam Daley 50d315406b Prevent duplicate PayPal subscriptions on repeated subscr_signup IPNs (#3927)
PayPal can resend/duplicate the subscr_signup IPN for a subscription,
and the handler had no idempotency check before creating a new
Subscription row (unlike subscr_payment, which is well-guarded). This
could result in duplicate subscription records and duplicate renewal
notifications, matching reports on issue #3055.
2026-07-07 04:52:35 +01:00
Adam Daley eac0dd8f95 Refactor Staff entities and improve Support ticket handling (#3926)
* Refresh legacy headers and manifests

* Add Staff Doctrine entities and service fixes

Introduces Doctrine-backed Staff entities/repositories for `admin` and `admin_password_reset`, including lifecycle timestamps and typed lookup helpers. Staff service list retrieval now uses DBAL `fetchAllKeyValue`.

Also refactors Support ticket creation to pass `clientId` instead of loading `Model_Client`, and uses an order lookup by client/order IDs for related ticket data. Product promo failure compensation was tightened to be idempotent by returning early when no redemptions remain and decrementing promo usage by the actual number of removed redemptions. Includes minor import/whitespace/docblock cleanup.

* Fix AdminRepository return type annotation
2026-07-07 03:46:20 +01:00
Adam DaleyandCopilot Autofix powered by AI 0ed3c50036 Fixes for 2 code quality findings in FOSSBilling i18n tests (#3925)
* Apply suggested fix to tests/Unit/FOSSBilling/i18nTest.php from Copilot Autofix

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>

* Apply suggested fix to tests/Unit/FOSSBilling/i18nTest.php from Copilot Autofix

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>

---------

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
2026-07-07 03:02:16 +01:00
Adam Daley c183e91c7a Move migrated module lookups to repositories (#3924) 2026-07-07 02:52:59 +01:00
renovate[bot] 0b19ac818a Update dependency pestphp/pest to v4.7.5 2026-07-07 01:23:32 +00:00
renovate[bot] 1cb8fdfe6d Update composer:2 Docker digest to 805ff9b 2026-07-07 00:59:48 +00:00
Adam DaleyandCopilot Autofix powered by AI 1be5a8e72d Fixes for 2 code quality findings in i18n tests (#3923)
* Apply suggested fix to tests/Unit/FOSSBilling/i18nTest.php from Copilot Autofix

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>

* Apply suggested fix to tests/Unit/FOSSBilling/i18nTest.php from Copilot Autofix

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>

* Fix failing timezone alias test to match actual validateTimezone behavior

US/Eastern is a legacy tzdata backward-compatibility alias excluded from
DateTimeZone::listIdentifiers(), so validateTimezone() correctly rejects
it. The test asserted the opposite and failed CI.

---------

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
2026-07-07 01:58:59 +01:00
Adam Daley 0880c60501 Expose custom client IDs (#3922) 2026-07-07 01:41:15 +01:00
Adam DaleyandCopilot Autofix powered by AI 0ad2ad1f41 Fix for 1 code quality finding in i18n tests (#3921)
Apply suggested fix to tests/Unit/FOSSBilling/i18nTest.php from Copilot Autofix

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
2026-07-07 01:25:01 +01:00
Adam DaleyandCopilot Autofix powered by AI 62d235e130 Fixes for 2 code quality findings in i18n tests (#3920)
* Apply suggested fix to tests/Unit/FOSSBilling/i18nTest.php from Copilot Autofix

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>

* Apply suggested fix to tests/Unit/FOSSBilling/i18nTest.php from Copilot Autofix

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>

---------

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
2026-07-07 01:11:16 +01:00
Adam DaleyandCopilot Autofix powered by AI 0e64aed45f Fix for 1 code quality finding in i18n tests (#3919)
Apply suggested fix to tests/Unit/FOSSBilling/i18nTest.php from Copilot Autofix

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
2026-07-07 00:51:00 +01:00
Adam DaleyandCopilot Autofix powered by AI 53b8bef1de Fixes for 2 code quality findings in Invoice tests (#3918)
* Apply suggested fix to src/modules/Invoice/tests/Unit/ServiceTest.php from Copilot Autofix

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>

* Apply suggested fix to src/modules/Invoice/tests/Unit/ServiceTest.php from Copilot Autofix

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>

---------

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
2026-07-07 00:38:03 +01:00
Adam DaleyandCopilot Autofix powered by AI 9ab5256a33 Fixes for 2 code quality findings in Twig EdgeCaseRenderer tests (#3917)
* Apply suggested fix to tests/Unit/FOSSBilling/Twig/EdgeCaseRenderingTest.php from Copilot Autofix

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>

* Apply suggested fix to tests/Unit/FOSSBilling/Twig/EdgeCaseRenderingTest.php from Copilot Autofix

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>

* Fix incorrect assertion flip in admin ticket edited-message test

The prior "code quality" pass flipped the editMessage2 assertion to
not->toContain, but the admin ticket template renders an edit link for
every admin-authored message regardless of whether it was edited, so
the assertion should remain toContain.

---------

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
2026-07-07 00:23:15 +01:00
Adam Daley fd46d31f6a Add configurable invoice reminder intervals (#3914)
* Add configurable invoice reminder intervals

* Address invoice reminder review feedback
2026-07-07 00:07:10 +01:00
Adam DaleyandCopilot Autofix powered by AI ddb7875cf8 Fixes for 2 code quality findings in i18n tests (#3915)
* Apply suggested fix to tests/Unit/FOSSBilling/i18nTest.php from Copilot Autofix

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>

* Apply suggested fix to tests/Unit/FOSSBilling/i18nTest.php from Copilot Autofix

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>

---------

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
2026-07-06 23:52:19 +01:00
Adam DaleyandCopilot Autofix powered by AI c4c648c2a6 Fixes for 2 code quality findings in Twig EdgeCaseRendering tests (#3916)
* Apply suggested fix to tests/Unit/FOSSBilling/Twig/EdgeCaseRenderingTest.php from Copilot Autofix

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>

* Apply suggested fix to tests/Unit/FOSSBilling/Twig/EdgeCaseRenderingTest.php from Copilot Autofix

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>

---------

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
2026-07-06 23:44:59 +01:00
Adam Daley d144dfdc07 Attach PDF invoices to invoice emails (#3913)
* Attach PDF invoices to invoice emails (#1724)

Adds generic file-attachment support to the email pipeline (Mail, QueuedEmail,
Email\Service) and wires it into invoice notifications via a new
"Attach PDF Copy to Invoice Emails" setting, so clients who pay by bank
transfer can view the invoice without logging in.

Also carries the same attachment into the sent-email activity log so a
later "resend" (client or admin) reattaches the PDF instead of dropping it.

* Address PR review: avoid blob hydration in email history list, fix checkbox uncheck

- ActivityClientEmailRepository::getSearchQueryBuilder() now selects a partial
  entity that excludes attachment_content, so the paginated admin/client email
  history list no longer hydrates every PDF into memory just to render
  has_attachment. Verified against a real Doctrine EntityManager that the DQL
  parses, the generated SQL excludes the blob column, and toApiArray() still
  works correctly on the partial entity.
- mod_invoice_settings.html.twig: add the hidden-input-before-checkbox pattern
  already used elsewhere in this codebase (e.g. mod_client_new_form.html.twig),
  so unchecking "Attach PDF Copy to Invoice Emails" actually persists as
  disabled instead of being silently dropped from the form submission.
2026-07-06 23:32:12 +01:00
Adam Daley feb6794a80 Ignore WIP/Draft PR titles in CodeRabbit (#3912) 2026-07-06 22:59:15 +01:00
Adam Daley c8cd721e49 Fix cron settings defaults (#3911) 2026-07-06 22:08:46 +01:00
Adam Daley 038ba75f84 Add CodeRabbit configuration for manual reviews (#3910)
* Add CodeRabbit config for manual reviews

* Update cspell.json

* Update .coderabbit.yaml
2026-07-06 21:39:41 +01:00
Adam Daley d9b211c9cd Sort client custom fields alphabetically and raise field cap to 20 (#3909)
* Sort client custom fields alphabetically and raise field cap to 20

Addresses #3174: client-facing forms (profile, signup, orderbutton)
now render custom fields sorted by their configured title instead of
a fixed numeric order, and the hardcoded limit of 10 custom fields is
raised to 20 via a new client table migration (patch85).

Also ignores src/config.old.php, the backup file the config patcher
creates automatically during config version migrations.

* Show custom fields 11-20 in the admin client management form

mod_client_manage.html.twig still looped 1..10 for the per-client
custom field editor, so staff couldn't view or edit values for the
new custom_11..custom_20 fields from the admin profile UI.

* Cover all 20 custom fields in the Profile updateClient test

CodeRabbit nitpick: the test payload only exercised custom_11 and
custom_20, unlike the full custom_1..custom_10 coverage it already
had, leaving custom_12..custom_19 untested.
2026-07-06 21:03:54 +01:00
Adam Daley f1f5a41ca3 Add CodeRabbit config for manual reviews (#3908)
* Add CodeRabbit config for manual reviews

* Update cspell.json
2026-07-06 20:09:19 +01:00
Adam Daley 800a7456d8 Stop mapping timers before debugbar collection (#3907)
* Stop mapping timers before debugbar collection

* Fix DebugBar timing PHPStan type

* Refactor timing measure stop checks in Box_App
2026-07-06 19:55:33 +01:00
Adam Daley 9ea2095ce1 Allow admins to edit ticket replies, with edit history (#3906)
* Allow admins to edit ticket replies, with edit history (#2317)

Admins previously had no way to fix a typo or correct a reply without
editing the database directly. Adds an Edit action to admin-authored
messages in the admin ticket view; client-authored messages remain
uneditable so an admin can never alter a client's own words.

Every edit snapshots the message's prior content into a new
support_ticket_message_history table before overwriting it, so the
original wording sent to a client is never silently lost. Admins can
view a message's revision history via a lazy-loaded modal.

Also fixes ticket_message_update, which existed but was never wired
into any UI and skipped the markdown sanitization that ticket_reply
already applies.

* Bump fresh-install last_patch to 83

Fresh installs seed last_patch from content.sql so the patcher doesn't
try to reapply migrations already baked into structure.sql. Missed
bumping this when patch83 (support_ticket_message_history) was added.

* Fix message history modal getting stuck on Loading... after a failed fetch

dataset.loaded was set before the API call resolved, so a failed
request left the modal permanently stuck on "Loading..." with no way
to retry short of a page reload. Move the flag to the success
callback and add an error handler that shows a retryable message.

* Make support_ticket_message_history.support_ticket_message_id required

A history row is meaningless without the message it snapshots; allowing
NULL let orphaned rows exist. Tightened the column in patch84,
structure.sql, and the entity's JoinColumn to NOT NULL.

* Delete message edit history when a ticket is removed

Service::rm() explicitly removes a ticket's notes and messages rather
than relying on the entity mapping's onDelete: CASCADE, because this
schema has no real FK constraints anywhere (referential integrity is
handled at the application layer throughout this codebase). History
rows were missed by that pattern and were left orphaned after a ticket
delete. Now removed alongside their message, following the same
explicit-cleanup convention as notes/messages.

Also cache SupportTicketMessageHistoryRepository via setDi(), matching
every other repository on this service, and add direct coverage for
getMessageHistory().
2026-07-06 19:01:45 +01:00
Adam Daley c207e12313 Skip renewals for pending paid invoice items (#3905)
* Skip renewals with pending paid invoice items

* Add index for pending renewal invoice items

* Adjust invoice_item renewal index definition
2026-07-06 18:13:59 +01:00
Adam DaleyandCopilot Autofix powered by AI 3763246051 Fixes for 2 code quality findings in Twig FOSSBillingExtension tests (#3904)
* Apply suggested fix to tests/Unit/FOSSBilling/Twig/Extension/FOSSBillingExtensionTest.php from Copilot Autofix

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>

* Apply suggested fix to tests/Unit/FOSSBilling/Twig/Extension/FOSSBillingExtensionTest.php from Copilot Autofix

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>

---------

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
2026-07-06 17:33:35 +01:00
Adam DaleyandCopilot Autofix powered by AI d90ff52052 Fix for 1 code quality finding in i18n tests (#3903)
Apply suggested fix to tests/Unit/FOSSBilling/i18nTest.php from Copilot Autofix

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
2026-07-06 17:25:16 +01:00
renovate[bot] 348b15a952 Update dependency rector/rector to v2.5.4 2026-07-06 16:07:38 +00:00
renovate[bot] 5a6878d5e1 Lock file maintenance 2026-07-06 09:49:37 +00:00
renovate[bot] 0cb23c98d6 Update dependency phpstan/phpstan to v2.2.5 2026-07-06 01:34:29 +00:00
Adam Daley 08d8d2f08e Remove config.old.php file 2026-07-05 12:27:51 +01:00
renovate[bot] 641119efab Update dependency rector/rector to v2.5.3 2026-07-05 03:30:40 +00:00
Adam DaleyandCopilot Autofix powered by AI 114dc23714 Fixes for 2 code quality findings in i18n tests (#3901)
* Apply suggested fix to tests/Unit/FOSSBilling/i18nTest.php from Copilot Autofix

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>

* Apply suggested fix to tests/Unit/FOSSBilling/i18nTest.php from Copilot Autofix

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>

---------

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
2026-07-05 04:29:38 +01:00
Adam Daley 85fa3dc1b2 Refactor HTTP helpers and inject Filesystem via DI (#3900)
* Remove redundant HTTP helper wrappers

* Inject Filesystem via DI across services

* Fix constructor and Theme DI wiring
2026-07-05 04:07:54 +01:00
Adam Daley c3d91257d4 Restrict staff notification emails by staff group (#3899)
Previously an email template's "enabled" flag was the only way to control
whether a staff notification (new order, ticket, signup, etc.) went out, and
when enabled it always went to every active staff member. This adds a
per-template staff-group allow-list so notifications can be scoped to the
teams that should actually receive them.

- New email_template_group join table/entity linking templates to admin
  groups, with admin API endpoints and a UI card on the template page
  mirroring the existing staff-member group management UI.
- Email\Service resolves to_staff recipients from the template's assigned
  groups; a template with no groups assigned sends to nobody.
- Existing and newly-created built-in staff templates are auto-linked to
  every current staff group (via an UpdatePatcher migration and
  createBuiltinTemplateRecord) so upgrades and fresh installs keep today's
  "notify everyone" behavior by default.
- Staff\Service::deleteGroup() now blocks removing a group that's still
  restricting an email template.

Closes #1247
2026-07-05 03:37:20 +01:00
Adam DaleyandCopilot Autofix powered by AI d96d6646e7 Fix for 1 code quality finding in i18n tests (#3898)
Apply suggested fix to tests/Unit/FOSSBilling/i18nTest.php from Copilot Autofix

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
2026-07-05 03:07:55 +01:00
Adam DaleyandCopilot Autofix powered by AI 8d0c068b8b Fixes for 2 code quality findings in i18n tests (#3897)
* Apply suggested fix to tests/Unit/FOSSBilling/i18nTest.php from Copilot Autofix

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>

* Apply suggested fix to tests/Unit/FOSSBilling/i18nTest.php from Copilot Autofix

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>

---------

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
2026-07-05 02:54:28 +01:00
Adam Daley fcae50dbc5 Add per-user timezone support across the app (#3895)
* Add per-user timezone support across app

* Bump install DB last_patch to 81

* Address timezone review findings

* Fix uninitialized variable warnings in Email

* Consolidate validation and fix PHPStan variable init

- Hoist the template parse above the recipient dispatch so
  $subject/$content are always defined before use (CI PHPStan
  caught them as potentially undefined in the elseif branches).
- Address timezone review feedback
2026-07-05 02:42:38 +01:00
Adam DaleyandCopilot Autofix powered by AI 9b35d576d7 Apply suggested fixes from Copilot Autofix across multiple files (#3896)
* Apply suggested fix to src/modules/Invoice/tests/Unit/ServiceTest.php from Copilot Autofix

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>

* Apply suggested fix to src/modules/Invoice/tests/Unit/ServiceTest.php from Copilot Autofix

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>

* Apply suggested fix to src/modules/Massmailer/Service.php from Copilot Autofix

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>

* Apply suggested fix to src/modules/Staff/tests/Unit/Api/AdminTest.php from Copilot Autofix

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>

* Apply suggested fix to tests/Unit/FOSSBilling/ResponseFactoryTest.php from Copilot Autofix

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>

* Fix file/download response content disposition

---------

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
2026-07-05 02:32:47 +01:00
Adam Daley e57dee4f5c Recover DirectAdmin account deletion from false-negative API errors (#3894)
* Recover DirectAdmin account deletion from false-negative API errors

Some DirectAdmin servers return an error for the account-delete request
even though the deletion already succeeded server-side, leaving the
order stuck in FOSSBilling and forcing users to rely on "Force delete".
cancelAccount() now verifies whether the account still exists before
failing, and only rethrows the original error if it does.

Fixes #3725

* Verify account existence via user list, not a fallible per-user check

The delete-verification check must not confuse a genuine transport,
auth, or permission failure with a successful deletion. Switch from a
per-user API_SHOW_USER_CONFIG lookup (which can fail for reasons
unrelated to whether the account still exists) to API_SHOW_USERS, a
reseller/admin-scoped listing call, and only treat the account as
deleted when the list confirms it's actually gone. If the
verification call itself errors, assume the account still exists so
the original deletion failure is preserved.
2026-07-05 01:12:19 +01:00
Adam Daley 102e97bd61 Modernize HTTP routing and response handling (#3892)
* Modernize Box app HTTP routing

* Use response factory for module redirects

* Clean up IPN response handling
2026-07-05 00:54:07 +01:00
Adam Daley 6d059f8573 Fix invoice using product price instead of edited order price (#3893)
* Polish exception imports and invoice modal payload

* Use order price for non-domain renewals
2026-07-05 00:45:52 +01:00
Adam Daley 2e97e7b710 Polish exception imports and invoice modal payload (#3891) 2026-07-05 00:36:47 +01:00
Adam Daley 80c0322aeb Backfill manage_settings permission for existing staff groups (#3890)
* Backfill manage_settings permission for existing staff groups (#3873)

PR #3856 started enforcing an explicit manage_settings permission to
view or edit a module's settings (e.g. Scheduled Tasks), but existing
staff groups that already had general access to those modules never
had the new permission granted, silently locking non-super-admin
staff out of settings pages they could previously use.

Add an update patch that grants manage_settings to any existing group
that already has access to the affected modules, preserving prior
behavior for upgrading installs.

* Match json_encode style with sibling permissions patch

Drop JSON_THROW_ON_ERROR to stay consistent with patch79's plain
json_encode() calls for admin_group.permissions.

* Bump fresh-install last_patch to 80

Adding patch80 in the previous commit made a fresh install's seeded
last_patch (still 79) report as behind on patches, since
latestPatchLevel() now returns 80. Live Tests caught this via the
"system is up to date" health check.

* Scope manage_settings backfill to groups predating the enforcement change

Codex correctly flagged that patch80 couldn't tell a legacy missing
manage_settings key apart from a group where an admin deliberately left
it unchecked after #3856 shipped, since the group form only submits
checked checkboxes. Concretely, patch79 creates the Support Staff
group scoped to ticket permissions only, and patch80 was immediately
re-granting it support.manage_settings in the same run.

Restrict the backfill to admin_group rows not updated since before
#3856 (2026-06-28), so it only touches groups whose missing key
predates the manage_settings checkbox existing at all.
2026-07-05 00:23:25 +01:00
Adam DaleyandCopilot Autofix powered by AI 90fdaaad4d Fixes for 2 code quality findings in Staff tests (#3889)
* Apply suggested fix to src/modules/Staff/tests/Unit/Api/AdminTest.php from Copilot Autofix

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>

* Apply suggested fix to src/modules/Staff/tests/Unit/Api/AdminTest.php from Copilot Autofix

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>

* Fix Staff admin API super-admin test mocks

---------

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
2026-07-04 23:36:59 +01:00
Adam DaleyandCopilot Autofix powered by AI 86469d8d46 Fixes for 2 code quality findings in Staff tests (#3888)
* Apply suggested fix to src/modules/Staff/tests/Unit/Api/AdminTest.php from Copilot Autofix

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>

* Apply suggested fix to src/modules/Staff/tests/Unit/Api/AdminTest.php from Copilot Autofix

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>

---------

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
2026-07-04 22:25:20 +01:00