Commit Graph
27 Commits
Author SHA1 Message Date
3b2ca2a92b Apply PHP Code Styling & Quality Changes (#3811)
* Apply PHP Code Styling & Quality Changes

* Fix docblock return type to float

---------

Co-authored-by: FOSSBilling Bot <fossbilling-bot>
Co-authored-by: Adam Daley <admdly@users.noreply.github.com>
2026-06-20 00:49:01 +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 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 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
Yağızhan Burak YakarandAdam Daley 2d9fb39e4c Add PSR-3 styled logger method names to Box_Log (#3691)
* Add PSR-3 styled logger method names to Box_Log

* Switch to using PSR-3 style method names in logger callers

* Handle writer failures centrally and harden masking behavior

* Fix wrong context format used

---------

Co-authored-by: Adam Daley <admdly@users.noreply.github.com>
2026-06-02 01:58:26 +01:00
4a9d44ff06 Refactor currency formatting and enhance admin UI features (#3539)
* Remove currency format fields & refactor formatting

* Handle missing currency and remove bold

* Adjust column widths in redirect settings form

* Add unified filter panel & request globals

* Normalize admin path and revamp activity UI

* Fix ADMIN_PREFIX check and ignore search filter

* Point docs links to docs.fossbilling.org

* ci: make live installer step retry before phpunit-live

Agent-Logs-Url: https://github.com/FOSSBilling/FOSSBilling/sessions/3c14643b-8b1c-441d-8592-c3ba09df048f

Co-authored-by: admdly <2807620+admdly@users.noreply.github.com>

* ci: avoid duplicate install attempt in live test retries

Agent-Logs-Url: https://github.com/FOSSBilling/FOSSBilling/sessions/3c14643b-8b1c-441d-8592-c3ba09df048f

Co-authored-by: admdly <2807620+admdly@users.noreply.github.com>

* Remove currency_format and simplify request handling

* Ensure request exists in DI for Twig tests

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: admdly <2807620+admdly@users.noreply.github.com>
2026-05-14 18:55:36 +01:00
Adam Daley 435944defa Refactor pagination and API with strict types and validation (#3391)
* Add strict types; refactor pagination, tools & API

* Replace `Box_Paginator` with FOSSBilling `Paginator`

* Clarify paginator comment wording

* Validate JSON response and include HTTP code

* Cast language params to bool and add JSON preview
2026-04-06 22:06:13 +01:00
Adam Daley addb0820e9 Simplify auth checks, cleanup types/docs (#3251) 2026-02-18 19:31:25 +00:00
Adam Daley e12fe8229f Improve type safety, auth checks and PHPStan fixes (#3250)
* Improve type safety, auth checks and PHPStan fixes

* Remove @phpstan-ignore annotations

* Improve type safety, auth checks and PHPStan fixes

* Remove @phpstan-ignore annotations

* Remove redundant @phpstan-ignore comment
2026-02-17 07:36:53 +00:00
Yağızhan Burak YakarandAdam Daley 58956422c7 Support module improvements (#2997)
* Use Monolog instead

* Method types

* Use Symfony's HTML Sanitizer to actually sanitize content

* Fixed tests

* Types and sanitization

* Make sanitizeContent a static method instead

* Updated composer.lock

* Update lockfiles

* Copilot suggestions

* Fixed method signatures

* Fixed tests

* Added basic sanitizeContent tests

* Fixed SQL query

---------

Co-authored-by: Adam Daley <admdly@users.noreply.github.com>
2025-12-14 18:52:58 +03:00
Adam Daley a9b903c222 Codebase modernisation, configuration cleanup, and improved type safety (#2957)
* Refactor tests to replace depreciated functions

* Update Rector config and dependencies

* Rector: Add explicit string casting for stricter type safety

* Rector: Add return type hints to methods across codebase

* Rector: Increase dead code level and refactor invoice item logic

* Remove unnecessary `willReturn` from test mocks

Eliminate redundant `willReturn(null)` and similar calls from PHPUnit mock setups in legacy module tests, leaving only method expectations. Also update some test values to use floats for consistency.

* Refactor API controller and email adapter return values

* Update formatting and guidelines in `AGENTS.md`
2025-10-11 23:39:44 +01:00
Belle Aerni 368f8cd6ad Bump the year (#2581) 2025-01-23 15:11:53 -08:00
Belle Aerni 3449537c92 Fixed CS / Rector workflow and ran both (#2580) 2025-01-20 16:19:45 -08:00
Belle Aerni b35d902a6a Security dashboard & checks (#2503)
* Started implimenting a security dashboard and checks

* Wrote two functional checks

* Fix typos

* Update webserver.php

* + a new check

* Slight cleanup, made translatable

* Added some general checks

* Update cspell.json

* Typo

* Slight tweaks, add a permission to run checks
2025-01-08 10:52:07 +00:00
Belle Aerni 303f4cfa2d Code styling & rector config improvements (#2254)
* Bumped the Rector deadcode level

* Added the instanceof setlist

* Increasded type coverage and updated tests config too

* Bumped type coverage & ran PHP-cs-fixer
2024-04-23 10:38:18 -07:00
Belle Aerni d771457efc Bump the year (#2167)
* Bump the year

* And fix the spelling
2024-02-25 02:45:38 -08:00
FOSSBilling BotandFOSSBilling Bot 9e85bcecef Apply PHP Code Styling & Quality Changes (#1793)
Co-authored-by: FOSSBilling Bot <fossbilling-bot>
2023-11-08 06:51:20 +00:00
Adam DaleyandBelle Aerni b35b2efc52 Merge Kb and Support modules (#1180)
* Merge Kb and Support modules

Merge the Kb and Support modules as they contain related functionality.

* General improvements to Support module UI

Update Support module copy and navigation to be more consistent, and other general improvements.

* This was missed.. and now it's not 😉

---------

Co-authored-by: Belle Aerni <belleaerni@gmail.com>
2023-11-06 04:10:09 +00:00
fefbcd21b0 Apply PHP Code Styling & Quality Changes (#1498)
* Apply PHP Code Styling & Quality Changes

* Delete these

* Update .gitignore

* Fixes for PHPStan

* Ignore spelling in the gitnore

* Allow null for that type

Honestly doing so makes ZERO sense, but it matches the current behavior.

---------

Co-authored-by: FOSSBilling Bot <fossbilling-bot>
Co-authored-by: Belle Aerni <belleaerni@gmail.com>
2023-07-30 08:57:44 -07:00
Yağızhanandfossbilling-bot fd872ac941 Implement PHP-CS-Fixer as an automated workflow (#1240)
* Implement PHP-CS-Fixer as an automated workflow

* Apply PHP-CS-Fixer changes

---------

Co-authored-by: fossbilling-bot <121974958+fossbilling-bot@users.noreply.github.com>
2023-07-30 06:49:11 -07:00
Yağızhan d909d77f7e -Unnecessary whitespace in the class headers (#1219) 2023-05-07 13:24:29 -07:00
Yağızhan 412e4a9fbd Standardized the class headers (#1212) 2023-05-06 13:06:17 +01:00
Adam Daley e54569d2cd Introduce namespaces and strict typing for FOSSBilling library classes (#1206) 2023-05-04 01:02:06 +01:00
Yağızhan 950e4dccef Type hinting the DI methods and variables (#1201) 2023-05-01 21:01:35 +03:00
Belle Aerni d71d445661 Make module labels translatable 2023-01-21 21:38:08 -08:00
Belle Aerni 774f0d5c95 Use Rector to modernize code for PHP 8.0 2023-01-12 00:40:54 -08:00
Belle Aerni edd6f72634 Drop the "BB" prefix 2022-11-28 17:22:50 +03:00