Commit Graph
31 Commits
Author SHA1 Message Date
72c6dcc532 Fixes for 3 code quality findings (#3450)
* Apply suggested fix to tests/Modules/System/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/Modules/System/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/Modules/System/AdminTest.php from Copilot Autofix

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

* fix: add VERIFYPEER and VERIFYHOST to cspell ignoreWords

Agent-Logs-Url: https://github.com/FOSSBilling/FOSSBilling/sessions/c79bcd25-22d6-424f-b7cb-b17b6ef16246

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

---------

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: admdly <2807620+admdly@users.noreply.github.com>
2026-04-26 23:01:11 +01:00
Adam DaleyandCopilot Autofix powered by AI 9ba38e4fea Fixes for 2 code quality findings (#3448)
* Apply suggested fix to tests/Modules/System/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/Modules/System/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-04-26 22:11:02 +01:00
Adam DaleyandCopilot Autofix powered by AI f981ceb518 Fixes for 4 code quality findings (#3446)
* Apply suggested fix to tests/Modules/System/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/Modules/System/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/Modules/System/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/Modules/System/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-04-26 21:41:16 +01:00
Adam DaleyandCopilot Autofix powered by AI e2052adbb2 Fixes for 2 code quality findings (#3445)
* Apply suggested fix to tests/Modules/System/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/Modules/System/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-04-26 21:12:02 +01:00
Copilotandadmdly ade0c4d0c1 Fix bugs and typos in installer/pricing templates, improve System admin test coverage (#3444)
* Initial plan

* Fix HTML/JS bugs and typos in installer and pricing templates, improve test coverage

Agent-Logs-Url: https://github.com/FOSSBilling/FOSSBilling/sessions/d16eb3f4-9538-40af-a14b-3f110fe8bed1

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

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: admdly <2807620+admdly@users.noreply.github.com>
2026-04-26 21:04:48 +01:00
52081d284a Improved type casting and removed unnecessary parameters (#3431)
* Cast ticket ID to integer

* Added type casting and removed unnecessary $per_page params

* Fixed tests

* Updated ddev PHP and nginx config

* Support ticket validation and upgrade checks

* Add order mock and constants in ServiceTest

* Require active status for API auth and clear tokens

* Validate client/admin sessions against DB

* Invalidate sessions on user status deactivation

* Check locale availability before toggling

* Escape database name properly

* Validate and cast rel_id to int in ticketCreateForClient to prevent TypeError

Agent-Logs-Url: https://github.com/FOSSBilling/FOSSBilling/sessions/ce700346-2168-43cc-8309-fc6baee7cc82

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

* Improve rel_id validation error message to include the invalid value

Agent-Logs-Url: https://github.com/FOSSBilling/FOSSBilling/sessions/ce700346-2168-43cc-8309-fc6baee7cc82

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

* Fix Notification AdminTest mock expectation to match actual paginateDoctrineQuery call

Agent-Logs-Url: https://github.com/FOSSBilling/FOSSBilling/sessions/2fb587cf-6312-4b98-89e5-10f074646eaa

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

* Validate interface and custom interface inputs

* Tighten custom interface hostname validation

* Accept `per_page` in paginated API responses

* Validate HTTP interfaces and normalize upgrades

* Enforce active status and secure config export

* Cast rel_type/rel_task/rel_status to string in SupportTicketValidator to prevent TypeError

Agent-Logs-Url: https://github.com/FOSSBilling/FOSSBilling/sessions/1ecf2bb3-1139-420f-8421-41ae8f6d1d5f

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

* Use FILTER_VALIDATE_INT instead of is_numeric for rel_id validation in Service.php

Agent-Logs-Url: https://github.com/FOSSBilling/FOSSBilling/sessions/7bacd505-ba15-42da-8f52-7621afa1d634

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

* Validate rel_new_value as a positive integer before using as Product ID in upgrade tickets

Agent-Logs-Url: https://github.com/FOSSBilling/FOSSBilling/sessions/842c7e1c-255b-4f09-8235-f34681e0392b

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

* Tighten `sValidHttpInterface` validation

* Add page parameter to pager calls

---------

Co-authored-by: Adam Daley <admdly@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: admdly <2807620+admdly@users.noreply.github.com>
2026-04-26 20:30:22 +01:00
2f22c210ab Apply PHP Code Styling & Quality Changes (#3285)
Co-authored-by: FOSSBilling Bot <fossbilling-bot>
Co-authored-by: Adam Daley <admdly@users.noreply.github.com>
2026-03-04 07:11:16 +00:00
Adam DaleyandCopilot Autofix powered by AI 5dffd5af9a Fixes for 2 code quality findings (#3280)
* Apply suggested fix to tests/Modules/Support/GuestTest.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/Modules/Support/GuestTest.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-02-27 21:48:25 +00:00
Copilotandadmdly e0ee5c5cf6 Improve test robustness in Support GuestTest (#3278)
* Improve test robustness in Support GuestTest

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

* Fix error message strings to match actual API responses

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

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: admdly <2807620+admdly@users.noreply.github.com>
2026-02-27 21:24:00 +00:00
Adam DaleyandCopilot Autofix powered by AI 74d24d4d1f Fixes for 2 code quality findings (#3274)
* Apply suggested fix to tests/Modules/Support/GuestTest.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/Modules/Support/GuestTest.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-02-27 21:04:44 +00:00
Belle Aerni 982703d0b3 Reduce invoice & guest hash entropy (#3242)
* Reduce invoice & guest hash entropy

* Update GuestTest.php

* derp
2026-02-26 01:21:41 +00:00
Belle Aerni 6ce3bbae06 Introduce some simple phone number validation (#3186)
* Introduce some simple phone number validation

* Expanded client creation tests to include phone numbers

* Update Admin.php

* Addressed the review

* Ran CS fixes

* Fixed
2026-01-28 12:57:27 -08:00
Belle Aerni 07698df6be Re-enable the network interface tests (#2810)
* Re-enable the network interface tests

I am pretty sure a Symfomy HTTP client bug was causing the issue we saw. Some time ago they published fixes related to the BIND_TO option with IPv6

* We actually should expect the result to be empty here
2025-07-07 08:48:59 -07:00
Adam Daley c0cc400b9d Fix Live Tests (#2325)
* Refactor `getExternalIP()` to use `RetryableHttpClient`

Refactor `FOSSBilling\Tools` `getExternalIP()` function to use `RetryableHttpClient`.

* Fix incorrect parameter names and add cURL timeout

* Disable Network Interface live-tests
2024-07-02 21:20:10 +01:00
FOSSBilling BotandFOSSBilling Bot 2b02c0c1a2 Apply PHP Code Styling & Quality Changes (#2323)
Co-authored-by: FOSSBilling Bot <fossbilling-bot>
2024-07-02 20:00:28 +01:00
Belle Aerni 945a201572 Small Currency Improvements (#2311)
* Removed the hardcoded currencies list

Also streamlined the process of adding new currencies by allowing the title & exchange rate to automatically be determined.

* Use an existing translatable string

* Update the test workflows

* Dropped the legacy test, wrote two new ones

* Fixed a typo in my assert

* Whooooops
2024-06-27 09:48:37 -07:00
Belle Aerni 917b812835 Trying to resolve / workaround sporadic failures (#2313) 2024-06-26 11:59:13 -07:00
Belle Aerni 075c809881 Updated our rector configs (#2224)
* Some rector config work

* Increased type coverage, added dead code
2024-04-09 00:51:42 -07:00
Belle AerniandJohn @ S4 037acce702 Bulk fix of many grammar / phraseology mistakes (#2166)
* Bulk fix of many grammar / phraseology mistakes

* Small fixes after self-review

* Corrections

* Update mod_currency_settings.html.twig

* Update mod_currency_settings.html.twig

* Update mod_formbuilder_field.html.twig

---------

Co-authored-by: John @ S4 <64874788+John-S4@users.noreply.github.com>
2024-02-27 03:01:07 -08:00
Jaap Marcus 83c2f3620b Password generated can have a small change to have no lower case aswell (#2148) 2024-02-16 15:55:03 -08:00
Belle Aerni a3c3a1ed6e Ensure random passwords meet the requirements (#2145)
I made a mistake when I setup the random password generation for the live tests and forgot that `bin2hex(random_bytes(6));` wasn't guaranteed to actually generate something with a number, this change fixes that to ensure one will be set.
2024-02-15 14:52:46 -08:00
FOSSBilling BotandFOSSBilling Bot db8ed5f4d8 Apply PHP Code Styling & Quality Changes (#2126)
Co-authored-by: FOSSBilling Bot <fossbilling-bot>
2024-02-08 16:25:53 -08:00
Belle Aerni 0493c3a3e5 Further test improvements (#2122)
* Slight structure change to the testcases

* Fix

* Ported some random low-level tests

* Spelling

* Ported over some other low-level tests

* Fixes

* And now other fixes

* Another one
2024-02-06 13:13:04 -08:00
Belle Aerni 6e438b1a59 Add a option to disable public tickets (#2113)
* Add a option to disable public tickets

* Replaced legacy test, written a new one

* Fix an unrelated error that appeared in the error log
2024-02-02 12:18:46 -08:00
FOSSBilling BotandFOSSBilling Bot 33cfc4f793 Apply PHP Code Styling & Quality Changes (#2097)
Co-authored-by: FOSSBilling Bot <fossbilling-bot>
2024-01-24 05:36:10 -08:00
Belle Aerni cca0515491 Transfer carts when logging in (#2083)
* Transfer the cart when logging in

* Wrote a test for it

* This should at least fix one of the tests

* Oops

* Wrong spot...

* Ah-ha!
2024-01-21 16:00:41 +01:00
Belle Aerni 8f4d0d4cac More tests and CI improvements (#2078)
* Wrote a few more tests, improvements

* Ran Rector & PHP-CS-Fixer

* Append a capital letter to the test client passwords

* Minor tweaks

* Display more info after the tests run

* Oops, I forgot to set the dir

* Fix cron behavior for test env, dropped legacy tests

* Rename the empty test suite so PHPUnit ignores it

* Update cspell.json

* Minor tweaks to the tests

* Fixes
2024-01-17 18:11:45 -08:00
Belle Aerni 76b32a6026 Feat: allow selection of the default network interface (#2065)
* Feat: allow selection of the default network interface

* Update cspell.json

* Wrote some tests, moved the setting to the config file

* Cleanup, fixes, include Sentry in the bind setting

* Use JS to update the IP rather than reload, minor tweaks

* UI tweaks

* Removed leftover incomplete sentence, mention interface names
2024-01-17 01:46:32 -08:00
Belle Aerni b061d5da04 Implemented a new class for config management (#2066)
* Implemented a new class for config management

* Run Rector & PHP-CS-Fixer

* Spelling

* Pointed a bunch of code to the new class

* Fix tests, removed 2 broken ones that did nothing

* Quick run of PHP-CS-Fixer

* Fixed issues noticed in self review

* Updated remaining old methods. Fixed minor error page issue

* Very minor code tweak

* Fixes, added a related test

* Check for OPCache functions being defined

* I don't think this timeout is needed
2024-01-15 14:12:53 -08:00
Belle Aerni 1b0fba1922 Various additional tests (#2069)
* Various additional tests

* Fixes

* More fixes

* Fixed my other mistakes

* Final fix
2024-01-15 00:46:19 -08:00
Belle Aerni ccc97a3ec9 Initial implementation of CI against a live FOSSBilling Install (#2067)
* Rename tests to tests-legacy

* Groundwork for live tests

* Somewhat working tests on a live instance

* Hmmmmmm

* Fix

* Fixed the other bug

* Added a handful of various tests

* Typos, all these are admin endpoints

* Bypass this check for testing envs

* Disable it for now

* Mini cleanup

* Cleanup from debugging, ran PHP-CS-Fixer
2024-01-14 22:51:32 -08:00