Commit Graph
990 Commits
Author SHA1 Message Date
Adam Daley 0f29d0794e Add invoice hash self-healing and patch backfill (#3807)
* Add invoice hash self-healing and patch backfill

* Simplify invoice-hash comments and update test

* Update last_patch to 74

* Fix invoice hash backfill case matching
2026-06-19 22:08:34 +01:00
Yağızhan Burak YakarandAdam Daley 7ade5bbdf3 Unify public tickets with client tickets (#3799)
* Merge public ticket logic into regular client tickets

* Unified email templates

* Unified events and listeners

* Remove passthrough service methods

* Corrected phpDocs

* Create a combined `author` array to replace `client`, `client_id`, `author_name`, `author_email`

* Switch to using "Author" instead of "Requester"

* Switch to using a single endpoint and single template for client and guest tickets

Also left a redirect behind to make sure previously sent emails still have a working link

* Add author_role parameter to onBeforeClientOpenTicket

* Adjusted rate limit ordering

* Update Twig templates and the update patcher

* "Public ticket" -> "Guest ticket"

* Addressed code review comments

* Address code review comments

* Also purge old pticket email templates

* Fix email sending

* Support: enforce auth, fix guest email links

* Migrate mod_support config key name

---------

Co-authored-by: Adam Daley <admdly@users.noreply.github.com>
2026-06-19 19:01:52 +01:00
Adam Daley f39fd44f0f Add is_cron flag and limit cron-admin fallback (#3805)
* Add `is_cron` flag and limit cron-admin fallback

* Restore cron context after cron runs

* Fix cron context restoration test
2026-06-19 11:50:14 +01:00
Adam Daley febec281a6 Migrate product models and enhance promo redemption functionality (#3587)
* Migrate product models; add `promo_redemption`

* Add DomainPricing & ProductOrder repositories

* Use Promo entity typehints and update tests

* Use DI logger, validate order config, update tests

* Replace `error_log` with logger; use stubs in tests

* Use attachOrderConfig and tighten service checks

* Clarify domain defaults and remove deprecated doc tag

* Add missing indexes to `promo_redemption` table

* Enrich promo API arrays and add redemption filters

* Various UI/JS fixes and template cleanups

* Log invoice issues as warnings; expose form_id

* Normalize spelling in UpdatePatcher comment

* Remove checkLimits production method and clean up stale test mocks

* Use getConfig() and add promo permission

* Use container logger directly, remove helpers

* Use defaults for optional Twig settings

* Import macro_functions into admin template

* Compensate promo redemptions on checkout failure

* 🐛 Fix product category and add-on availability handling
2026-06-18 17:56:14 +01:00
Adam DaleyandCopilot Autofix powered by AI 0d6c34137c Fixes for 4 code quality findings in Invoice module (#3803)
* 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/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-06-18 17:16:05 +01:00
FOSSBilling BotandFOSSBilling Bot 5a43315fe8 Apply PHP Code Styling & Quality Changes (#3802)
Co-authored-by: FOSSBilling Bot <fossbilling-bot>
2026-06-18 16:47:19 +01:00
Adam Daley f47617c7ae Enhance registrar, email, staff, domain features and pagination (#3801)
* Enhance registrar, email, staff, domain, pagination

* Validate Reply-To and improve domain error message

* Use auth isAdminLoggedIn instead of exception
2026-06-18 15:49:39 +01:00
c7f43acac7 Use fb_api_link instead of custom event listeners in Huraga (#3794)
* Use fb_api_link rather than custom event listeners in Huraga

* API.js: Fall back to window.prompt when Modals isn't present in the theme

* Fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Adam Daley <admdly@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-06-18 05:36:16 +01:00
59a24d7714 Replace Coloris with native input type="color" (#3795)
* Replace Coloris with native `input type="color"`

* Fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Adam Daley <admdly@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-06-18 05:02:55 +01:00
Yağızhan Burak YakarandAdam Daley 9142057d42 Removed dead code & Code refactoring (#3796)
* Replace hardcoded recurrent pricing rows with a loop

* Replace long if chain with a Twig map

* Remove unnecessary uninstall method for Branding

* Remove dead `createServicePlan` method in Plesk adapter

* Make setDi() disallow passing null

This would actually match what's expected in InjectionAwareInterface.

---------

Co-authored-by: Adam Daley <admdly@users.noreply.github.com>
2026-06-18 04:49:36 +01:00
Yağızhan Burak YakarandAdam Daley f3673742f8 Improve Huraga pagination to automatically redirect to the correct tab (#3797)
* huraga: Automatically display linked tab

* huraga: Accept a `hash` value in pagination partial

* Use hash-based tab behavior rather than local workarounds

---------

Co-authored-by: Adam Daley <admdly@users.noreply.github.com>
2026-06-18 04:40:51 +01:00
Adam Daley 98b75dd680 Refactor extension service types and add theme toggling (#3789)
* Refactor Extension service types, fix button text

* Add persistent light/dark theme toggling

* Update cspell.json

* Expose dark logo and update login templates

* Safely check footer link enabled setting
2026-06-16 23:14:11 +01:00
Adam Daley a56767e1fc Fix API permission identity forwarding and IPN subscription/deposit payment handling (#3788)
* Add AbstractApi::checkPermissions and patch71

* Bump last_patch setting to 71

* Add tests for AbstractApi::checkPermissions

* Handle subscription renewals and validate payments

* Add overpayments to cspell word list

* Treat null transaction amounts as 0

* Mark deposit invoices as paid; add unit test

* Test overpayment warnings in validatePaymentAmount
2026-06-16 20:33:47 +01:00
105842daf5 Apply PHP Code Styling & Quality Changes (#3786)
* Apply PHP Code Styling & Quality Changes

* Add 'missingmodule' to cspell ignore list

---------

Co-authored-by: FOSSBilling Bot <fossbilling-bot>
Co-authored-by: Adam Daley <admdly@users.noreply.github.com>
2026-06-16 11:16:23 +01:00
Adam Daley 239321a2f7 Add type hints to Stripe and update tests/template (#3785)
Add type hints to Stripe; update tests/template
2026-06-16 10:53:25 +01:00
Adam Daley f3ad3d2aa4 Cast database getCell results to integer (#3783)
* Cast db getCell results to int

* Add logo image_width and adjust toast z-index

* Use theme-specific public logo in layout
2026-06-16 08:39:51 +01:00
Adam Daley ef2bc70319 Mark transactions as errored and implement SQL claim fixes (#3782)
* Mark transactions as errored and allow retries

* Use IN for claim SQL and fix logger args
2026-06-16 08:18:04 +01:00
Adam Daley e5ccf2d688 Fix invoice layout and add company logo width (#3778)
Invoice fixes and add company logo width
2026-06-15 18:37:59 +01:00
Adam Daley d6c2b718ea Refactor API handling and switch to Composer autoload (#3776)
* Remove AntLoader and switch to Composer autoload

* Use DI-provided http_client and remove include_path

* Introduce Api_Dispatcher and refactor Api_Handler

* Add FOSSBilling\Api\Proxy and refactor API dispatcher

* Replace Api_Handler with FOSSBilling\Api\Identity

* Move/rename API base class and update DI key

* Fix Docker Composer autoload build

* Fix Docker runtime autoload paths

* Preserve vendor autoload in Docker runtime

* Fix cron task calls without params

* Fix update autoload fallbacks
2026-06-14 19:28:11 +01:00
Adam Daley 0a9c16c528 Add module-level company logo partial fallback (#3773)
Add module logo partial fallback
2026-06-14 15:46:50 +01:00
Adam Daley 1f9a677695 Refactor icon sprite generation and update logo handling (#3772)
* Refactor icon sprite generation and theme builds

* Add svg-sprite to root deps, remove from themes

* Use public_logo_url and logo fallbacks in templates

* Replace xlink:href with href and add icon tools

* Refactor icon sprite build and theme paths

* Replace flag icon styles and update TomSelect

* Replace em dash with colon in update template
2026-06-14 15:13:01 +01:00
FOSSBilling BotandFOSSBilling Bot 638d8a5015 Apply PHP Code Styling & Quality Changes (#3771)
Co-authored-by: FOSSBilling Bot <fossbilling-bot>
2026-06-14 14:15:33 +01:00
Adam Daley d04256f89c Clear stale unpaid_invoice references, and update queries & tests (#3770)
Clear stale unpaid_invoice refs; update queries & tests
2026-06-14 07:07:55 +01:00
Adam Daley 7927792fe1 Enhance API with batch retrieval and admin transaction handling (#3769)
* Set X-Requested-With for same-origin requests

* Add string type hints and update copyrights

* Make addon API output admin-aware

* Admin mark-as-paid: save transaction and mark processed

* Use batch API fetch for order list

* Use batch API retrieval for orders

* Remove hardcoded 'Payment gateway' fallback

* Allow mixed value type for hash filter

* Fix custom admin transaction handling
2026-06-14 03:11:52 +01:00
Adam Daley cb412f3e16 Fix admin order templates and enhance PayPalEmail service (#3765)
* Fix admin order templates null and binding checks

* Use Invoice service in PayPalEmail; add defaults/tests

* Guard against undefined permissions and category
2026-06-13 13:10:10 +01:00
Adam Daley fbfb7746f4 Render email example and add tests for Twig tags (#3764)
* Render email example verbatim and add test

* Fix typo and prevent raw Twig apply tags in sample

* Update cspell.json
2026-06-13 02:57:32 +01:00
Adam DaleyandCopilot Autofix powered by AI b73e4ce09c Replace legacy icons and standardize SVG icon markup (#3758)
* Replace legacy icons and add icon sprite generator

* Update package-lock.json

* Standardize SVG icon markup and fallback

* Render client email as plain text

* Fix for pull request finding 'Unused variable, import, function or class'

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

* Add dedicated email signature for templates

* Fix Huraga SVG sprite theme resolution (#3760)

🐛 Fix SVG sprite theme resolution

---------

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
2026-06-12 02:14:40 +01:00
Adam Daley c50725cd3a Persist selected period in product configuration (#3754)
* Persist selected period in product config

* Add period default to edgeCaseRequest
2026-06-11 19:44:50 +01:00
Adam Daley 219ad9c79a Enhance email templates and Twig templates with defaults (#3753)
* Quote avatar data URI; add .db-avatar styles

* Pagination partial - require url & append hash

* Use defaults in email templates; add delay msg

* Guard Twig template vars with default()

* Replace arrow fn with static closure in test

* Add defaults to email templates and Twig policy

* Guard Twig templates with default filters

* Assert no strict-variable findings with toBeEmpty

* Guard email templates against missing order data

* Make activated_at null-safe in email templates

* 🐛 Use admin recipient in staff reset emails
2026-06-11 19:19:12 +01:00
Adam DaleyandCopilot Autofix powered by AI 261f399361 Fixes for 3 code quality findings in Index (#3740)
* Apply suggested fix to src/modules/Index/templates/client/mod_index_dashboard.html.twig 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/Index/templates/client/mod_index_dashboard.html.twig 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/Index/templates/client/mod_index_dashboard.html.twig 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-06-09 21:34:33 +01:00
FOSSBilling BotandFOSSBilling Bot 3c6ab0bd4f Apply PHP Code Styling & Quality Changes (#3739)
Co-authored-by: FOSSBilling Bot <fossbilling-bot>
2026-06-09 19:17:44 +01:00
Adam Daley 8e34b8f64d Fix button class and restore selected options in currency settings (#3736)
* Use explicit currency and fix button class

* Restore selected options and fix JS in currency settings
2026-06-08 07:43:34 +01:00
Yağızhan Burak Yakar 9bd64e99a2 Add widget slots to Huraga dashboard (#3734) 2026-06-07 17:05:59 +03:00
Yağızhan Burak Yakar 2cf48e23c8 Fix currency settings throwing on missing sync rates (#3733)
* Fix currency settings throwing on missing sync rates

* Update cspell.json and GOVERNANCE.md

* Escape sync_rate and provider values

* Update cspell.json
2026-06-07 16:32:04 +03:00
Adam Daley 5ecfeb335e Harden templates and API responses against missing data (#3730)
* Guard Activity index template against missing client/staff nested data

The activity log API at Activity/Api/Admin.php:38-49 only injects a
nested 'client' or 'staff' key when the corresponding *_id is set
(via isset() which returns false for null). System events and
client-only events therefore have no 'client' key, while staff-only
events have no 'client' key.

Under strict_variables, '{% if event.client %}' (line 191) throws
"Key 'client' ... does not exist" for any event without a client.

Switch the conditional to event.client_id / event.staff_id (always
present as SQL columns) and add '|default("")' to the nested
event.client.email / event.client.name / event.staff.email / event.staff.name
accesses so deleted-but-referenced records render gracefully.

* Guard Security iplookup template against empty country/asn data

When the GeoIP or ASN lookup fails (IncompleteRecord from MaxMind), the
Service catches and substitutes [] for the missing data. Under
strict_variables, the empty mapping at record.asn / record.country
causes line 48 to throw "sequence/mapping is empty".

Twig's |default filter on a GetAttrExpression compiles to a safe
is-defined check, so it correctly falls through to the placeholder
when the underlying array is empty or the key is missing.

Verified:
- /admin/security/iplookup?ip=192.168.1.1 (private IP, empty asn)
  renders the row with 'Unknown' ASN cells.
- /admin/security/iplookup?ip=8.8.8.8 still renders
  '15169' / 'GOOGLE' / 'United States'.

* Initialize notes/rel arrays in Support toApiArray so templates render without errors

Two related issues surfaced under strict_variables on the admin support
ticket page:

1. toApiArray only set $data['notes'] inside the foreach loop over
   ticket notes. Tickets without any notes therefore had no 'notes' key
   and 'ticket.notes|length' in mod_support_ticket.html.twig:42 threw
   'Key "notes" does not exist'.

2. _getRelDetails returned [] (empty array) when a ticket has no
   related entity. mod_support_ticket.html.twig sets {% set task =
   ticket.rel %} and then accesses task.task, task.type, task.status
   etc. on the next lines. Any access into an empty mapping throws
   under strict_variables.

Fixes:
- Service::toApiArray: always initialize $data['notes'] = [] for admin
  identity so the key is present even when empty.
- Service::_getRelDetails: always return the base structure with all
  fields (id, type, task, new_value, status) set to null when there
  is no related entity. Skip the DB lookups for the non-rel case.

Template hardening (defense-in-depth, in case other code paths return
a different shape):
- mod_support_ticket.html.twig:42: 'ticket.notes|length' -> 'is defined and
  ticket.notes|length'.
- mod_support_ticket.html.twig:222: 'ticket.notes' -> 'ticket.notes|default([])'.
- mod_support_tickets.html.twig:238: same is defined guard.

Verified on dev:
- /admin/support/ticket/1 renders without errors.
- API now returns rel as {id: null, type: null, ...} and notes: [] for
  tickets without related data.
- 1777 local tests pass, PHPStan clean.

* Harden tests and add Twig/ToApi linters

* Remove redundant setAccessible calls in tests

* Update cspell.json word list

* Add UrlAwarePermissiveContainer & trim errors

* Add geoip stub and fix ParserFactory usage

* Enforce and apply parentheses for new expressions
2026-06-06 18:32:19 +01:00
Adam Daley e8db6000ad Simplify tests and suppress notices in renderer (#3729) 2026-06-06 10:49:59 +01:00
Adam DaleyandCopilot Autofix powered by AI 422378d62a Fixes for several code quality findings (#3728)
* Apply suggested fix to src/modules/Theme/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/Theme/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/Theme/Service.php from Copilot Autofix

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

* Capitalize 'View System Information' display_name

* Guard Orderbutton templates against undefined fields

* Use buildThemeConfig instead of _loadTheme

* Fix Theme ServiceTest::deletePreset mock for findOneByExtensionAndScope

The test invokes deletePreset which internally calls getCurrentThemePreset,
which queries findOneByExtensionAndScope on the repository. The test only
mocked deleteByExtensionAndScope (twice), so the unmocked query threw a
Mockery BadMethodCallException.

Add a mock ExtensionMeta that returns the preset name being deleted, so
getCurrentThemePreset resolves to the same preset and both deleteBy calls
fire as the test already expected.

---------

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
2026-06-06 09:30:39 +01:00
Adam DaleyandCopilot Autofix powered by AI 7baa28e22f Enhance Twig strict variables handling and improve test coverage (#3721)
* Import template macros and fix invoices tab id

* Handle nulls in Twig extensions and add tests

* Enable Twig strict_variables and add tests

* Improve Twig strict-variables test harness

Fix several undefined-variable issues in admin templates and harden the strict-variables test harness.

- Templates: guard against missing variables by using default() for order_actions and checking header/type in partial_extensions.twig.
- Loader: CombinedTwigLoader now registers theme and module template paths with namespaces (module_area), and includes email template directories.
- Variable collection: VariableCollectorVisitor now collects keys passed via {% embed %} and {% include %} with { ... } so embedded templates get proper stubs.
- Renderer: StrictTemplateRenderer gains better relative template naming for module templates, additional logging for kb_article parsing, and broader classification of render errors as test-infra (typed-return mismatches, NumberFormatter issues, callable/iterable errors, loader quirks) to reduce false positives.
- Tests: add baseline marker files for strict findings, adjust StrictVariablesTest to treat infra findings as informational while failing on real-bug findings, and write findings JSON for review.

Overall these changes reduce noise from the render-everything harness and make the strict-variables suite more robust and actionable.

* Bump test memory limit to 2G via ini_set in bootstrap

The strict-variables render-everything harness parses every FOSSBilling
template and allocates many stubs and AST nodes, which exceeds the
default 128M limit and causes the pest process to exit with 255
mid-suite. Setting the limit in tests/Pest.php means it applies to both
local 'composer test' and CI 'pest --ci' invocations without needing
to modify the workflow file.

* Fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Scope error_reporting suppression to the render-everything harness

* Replace unsupported 'now' Twig global with 'now'|date filter

The reserved 'now' Twig global is only defined in some contexts and is
not present in the install or admin email-template environments. Under
strict_variables it throws a fatal 'Variable "now" does not exist'
error, which crashes the installer and the email template playground.

Both call sites use the date filter to format the current year, so the
correct fix is to feed the filter a string literal: 'now'|date('Y').
This is the same pattern we used for the admin_default and huraga theme
layouts.

Discovered by hitting the install page on the dev instance after the
strict_variables rollout.

* Make sitemap tolerant of missing product.updated_at

The product guest API (Box\Mod\Product\Service::toApiArray) returns
updated_at only for admin requests, not for guests. The sitemap uses
the guest API, so product.updated_at was always undefined for it.

Before strict_variables this was harmless: the date filter silently
returned null and the template rendered. With strict_variables enabled,
the missing key throws 'Key updated_at does not exist', which
get_custom_page catches and converts to a 404.

Pipe through |default('now') so we fall back to the current date when
the field is missing, while still using the real value when present.

Discovered by the live test 'urls return ok status' failing on sitemap.xml
in CI.

* Remove stray blank line in StrictTemplateRenderer

* Fix four templates for strict_variables Cypress failures

The Cypress tests run against a fresh install with strict_variables
enabled, which catches undefined key access in templates that the
non-strict mode silently allowed.

1. mod_invoice_index.html.twig:432
   productId is a JavaScript variable, not a Twig variable. The
   Twig expression tried to evaluate it server-side and threw
   'Variable productId does not exist'. Build the URL with JS
   template literal interpolation instead.

2. mod_client_profile.html.twig:158
   guest.client_custom_fields is not a real field in the guest
   API response. The current lookup threw 'sequence/mapping is
   empty' when no custom fields exist. Default to an empty
   mapping, then null, and add a truthy guard.

3. mod_support_ticket.html.twig:60
   ticket.rel_type is only populated for tickets linked to an
   order; the guest response omits it otherwise. Default to
   empty string so the comparison still works.

4. mod_support_ticket.html.twig:80
   message.author exposes only name and role for client-side
   messages, no email. Pass through |default('') so the avatar
   function gets a string and renders its fallback.

* Fix client invoice page for strict_variables

The tab labels on the client invoice index reference
unpaid_invoices.total and paid_invoices.total on lines 33/37
to show count badges, but the corresponding {% set %} calls
sit inside the table bodies on lines 53/85. Under
strict_variables this throws 'Variable unpaid_invoices does
not exist' before the lists are ever fetched.

Move both fetches to the top of the content block so the
variables are defined when first read.

* Allow guest checkout rendering under strict vars

* Rename test helper and tweak test expectations

* Guard optional adapter form fields in gateway and build_form templates

The admin payment gateway edit page and the domain registrar build_form
macro both test element[1].description directly in an if condition,
and both read gateway.config[name] / values[name] without a default.
Built-in adapters (Stripe, PayPalEmail, Custom, the Custom registrar)
define form fields with only a label and sometimes validators or
required_when, so on a fresh install the page throws:

  Key 'description' for sequence/mapping with keys 'label, validators'
  does not exist in 'mod_invoice_gateway.html.twig' at line 115.

The outer '?? ''' on the inner expression does not help: the
exception is thrown when evaluating the if condition, not when
rendering the markdown. With strict_variables on, that becomes a 500.

Replace each 'if element[1].description' with the short-circuit
'is defined and ...' pattern already used in the same file for
required_when, and drop the now-redundant '?? ''' from the inner
expression. Guard the gateway.config[name] / values[name] reads
with |default('') (or |default([]) for the iterable check) so
fields that have not been configured yet do not throw on a fresh
or upgraded install.

Verified on the dev instance:
  /admin/invoice/gateway/{1,2}        HTTP 200
  /admin/servicedomain/registrar/{1,2} HTTP 200
PayPal gateway form save+reload round-trips correctly.

* Fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-06-06 08:53:52 +01:00
Copilot d6632a0d24 Fix tabnapping vulnerability, loop-invariant settings call, and compound extension stripping in Theme (#3723)
* Initial plan

* Fix reverse tabnapping, loop-invariant getThemeSettings, and .html.twig extension stripping

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
2026-06-04 22:33:07 +01:00
Adam Daley d312170e46 Enhance email template validation and error handling (#3720)
* Add email template validation and error tracking

* Email templates: bulk actions & batch delete

* Add email template syntax checker

* Add last_error to template API; remove error styling

* Add error fields to email_template

* Render templates during validation with vars

* Update crypt mock expectation in Email test
2026-06-04 19:35:48 +01:00
FOSSBilling BotandFOSSBilling Bot e99537b6d5 Apply PHP Code Styling & Quality Changes (#3719)
Co-authored-by: FOSSBilling Bot <fossbilling-bot>
2026-06-04 16:58:27 +01:00
Adam DaleyandCopilot Autofix powered by AI 7055d10ecf Validate extension uninstall paths and harden core-module checks (#3718)
* 🔒 Validate extension uninstall paths

* Fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Use InformationException in docblock

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-06-04 09:41:57 +01:00
Adam DaleyandCopilot Autofix powered by AI 26a48f8eb3 Restore ADMIN_AREA guard in Theme\Service::getCurrentRouteTheme (#3717)
* 🐛 Fix current route theme selection

* Fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Fix stray brace and comment in Theme Service

* Update phpstan ignore annotation in Theme Service

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-06-04 09:16:41 +01:00
Adam DaleyandCopilot Autofix powered by AI a650e0809e Fix for 1 code quality finding in Page module (#3715)
Apply suggested fix to src/modules/Page/templates/client/mod_page_login.html.twig from Copilot Autofix

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
2026-06-03 22:16:11 +01:00
Copilot 0080e76fca Remove echoed password values from login templates (#3714)
* Initial plan

* Remove echoed password values

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
2026-06-03 20:37:43 +01:00
Yağızhan Burak YakarandAdam Daley e0a0a34e08 Added widget slots to login forms (#3712)
Co-authored-by: Adam Daley <admdly@users.noreply.github.com>
2026-06-03 19:27:13 +01:00
Yağızhan Burak Yakar 5aaffc644b Fix regression bug while updating extensions (#3713) 2026-06-03 18:24:45 +01:00
83949ce8f0 Apply PHP Code Styling & Quality Changes (#3705)
Co-authored-by: FOSSBilling Bot <fossbilling-bot>
Co-authored-by: Adam Daley <admdly@users.noreply.github.com>
2026-06-03 11:31:36 +01:00
Adam Daley 4315d610b2 Move E2E tests into modules and update test config (#3707)
* Move E2E tests into modules and update test config

* Update php-build-test.yml

* Remove premature curl_close calls

* E2E tests: clean assertions, cart client, currency

* Refactor E2E tests imports & assertions

* Fix Antispam E2E - skip disposable email test when domain list unavailable
2026-06-03 11:18:29 +01:00
29a3a6a692 Fix typos in tests and update cspell.json (#3703)
* Fix typos in tests and update cspell.json

* Fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Fix Myanma typo: correct to Myanmar in currency test, remove from cspell ignoreWords

* chore: remove unused cspell typo token

* Fix typo allowlist feedback in cspell review thread

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
2026-06-02 08:20:28 +01:00