Commit Graph
7 Commits
Author SHA1 Message Date
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
Adam DaleyandCopilot 315f9f3944 Refactor Filesystem and Path handling (#2836)
* Removed legacy files

* Refactor Filesystem and Path handling

* Removed `FOSSBilling\Tools` legacy functions

* Update live-tests to include file check for `php_error.log`

* Update Extension module tables to fix wrapping issue

* Apply suggestions from @Copilot

Co-Authored-By: Copilot <175728472+Copilot@users.noreply.github.com>

* Update Extension module icon URL handling

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-09 21:50:11 +01:00
Belle Aerni 45db4910a7 PHP 8.4 prep (#2464)
* Update CI for PHP 8.4

* Update composer deps for PHP 8.4

* Updates

* This is the default mode and this constant causes test failutes

* Explicily install the PDO extensions

* Temporarily downgrade the live tests to PHP 8.3

It would seem that there is some kind of problem with PHP 8.4 in regards to these tests. I believe it is outside of our control however as it installs fine for me with PHP 8.4 under DirectAdmin

* Update to address deprecations

* Make that nullable

* Fixed my typo

* Bump PHPunit to v11

* Also take care of two minor things

* Formatting fix
2024-11-21 23:16:29 -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 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