Commit Graph
16 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
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
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
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 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