Commit Graph
6481 Commits
Author SHA1 Message Date
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 eaaf137315 Qualify classes and enhance Stripe appearance (#3784)
Qualify classes and add Stripe appearance
2026-06-16 10:29:10 +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
renovate[bot] 2afd52b2af Lock file maintenance 2026-06-16 05:52:53 +00:00
renovate[bot] cd92d51a6f Update composer:2 Docker digest to e8fdff9 2026-06-16 03:48:28 +00: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
renovate[bot] 15e846184c Update phpmyadmin:5 Docker digest to 51b7480 2026-06-15 06:05:11 +00:00
renovate[bot] 1e0337c704 Update composer:2 Docker digest to 1c62c57 2026-06-15 02:52:37 +00:00
Adam DaleyandCopilot Autofix powered by AI 7f5de0de88 Fix for 1 code quality finding in Huraga (#3777)
Apply suggested fix to src/themes/huraga/html/partial_pending_messages.html.twig from Copilot Autofix

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
2026-06-14 19:53:30 +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 bbda2e4cf0 Fix Huraga pending flash message timing (#3775)
Fix Huraga pending message initialization
2026-06-14 16:13:15 +01:00
Adam DaleyandCopilot Autofix powered by AI 98f68a8654 Refactor esbuild helpers and add JS checker with asset optimization (#3774)
* Refactor esbuild helpers and theme builds

* Add JS checker, esbuild splitting, lazy-load assets

* Refactor esbuild scripts; add flag icons

* Fix for pull request finding 'Useless conditional'

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-14 15:56:35 +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
renovate[bot]andAdam Daley 94893fb315 Update dependency dicebear/core to v10.3.0 (#3768)
* Update dependency dicebear/core to v10.3.0

* Use Style::fromJson to load avatar style

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Adam Daley <admdly@users.noreply.github.com>
2026-06-14 00:56:49 +01:00
renovate[bot] 008c2c18cd Update dependency prinsfrank/standards to v3.16.5 2026-06-13 21:31:01 +00:00
renovate[bot] cf7641a616 Update dependency friendsofphp/php-cs-fixer to v3.95.7 2026-06-13 21:11:03 +00: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
renovate[bot] 164ab76889 Lock file maintenance 2026-06-13 02:05:45 +00: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
renovate[bot] 450774f6dc Update dependency stripe/stripe-php to v20.2.1 2026-06-13 01:08:52 +00:00
renovate[bot] 7baecf60ff Update dependency pestphp/pest to v4.7.3 2026-06-13 00:47:26 +00:00
Adam Daley 106198ad92 Add legacy IPN query mappings and reorder rules (#3763)
* Add legacy IPN query mappings and reorder rules

* Clarify IPN rewrite comments in .htaccess

* Add ipn.php rewrite rules for bb_* params
2026-06-13 01:46:17 +01:00
renovate[bot] e3a49f5310 Update dependency sass to v1.101.0 (#3761)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-06-12 02:47:35 +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
renovate[bot] 402e98617a Update dependency esbuild to v0.28.1 (#3759)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-06-12 02:00:06 +01:00
renovate[bot] bbe375226d Update dependency sentry/sentry to v4.28.0 (#3757)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-06-12 01:34:03 +01:00
renovate[bot] 7c8a129fff Update phpmyadmin:5 Docker digest to c9f2c37 2026-06-11 20:32:44 +00:00
renovate[bot] 1ca173f5bd Update composer:2 Docker digest to c883af1 2026-06-11 18:54:32 +00: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 Daley 408013d3ea Add rewrite alias for bb-ipn.php to ipn.php (#3749) 2026-06-11 05:40:23 +01:00
renovate[bot] 3baaf2e215 Update dependency dicebear/core to v10.2.0 (#3748)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-06-11 05:12:46 +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
renovate[bot] dedb05c078 Update dependency friendsofphp/php-cs-fixer to v3.95.5 2026-06-09 18:21:19 +00: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
renovate[bot] 31ea1d2487 Update dependency dicebear/styles to v10.2.0 (#3738) 2026-06-09 03:53:36 +01:00
renovate[bot] fc80442183 Update shivammathur/setup-php digest to f3e473d 2026-06-08 21:08:33 +00:00
renovate[bot]andAdam Daley 42a5c6b9be Lock file maintenance (#3735)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Adam Daley <admdly@users.noreply.github.com>
2026-06-08 08:04:00 +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
renovate[bot] 7cca0bd7a4 Update dependency dicebear/core to v10.1.0 (#3732) 2026-06-08 04:29:06 +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