Commit Graph
712 Commits
Author SHA1 Message Date
renovate[bot] 759b359c09 chore(deps): update dependency phpunit/phpunit to v12.5.6 2026-01-17 12:24:53 +00:00
renovate[bot] 075819c5c2 chore(deps): update dependency php-debugbar/php-debugbar to v3.1.2 2026-01-17 08:57:50 +00:00
renovate[bot] c5fc6b10a4 chore(deps): update dependency stripe/stripe-php to v19.2.0 (#3166)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-17 00:10:58 +00:00
renovate[bot] 5973e43397 chore(deps): update dependency phpunit/phpunit to v12.5.5 2026-01-16 10:49:07 +00:00
renovate[bot] 080d834da5 chore(deps): update dependency php-debugbar/php-debugbar to v3.1.0 (#3162)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-16 08:12:48 +00:00
renovate[bot] 2c2b5a389b chore(deps): update dependency php-debugbar/php-debugbar to v3.0.6 (#3161)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-15 21:23:36 +00:00
renovate[bot] ddc7265370 chore(deps): update dependency rector/rector to v2.3.1 2026-01-14 10:39:47 +00:00
renovate[bot] 153676df08 chore(deps): update dependency php-debugbar/php-debugbar to v3.0.3 2026-01-14 10:33:43 +00:00
renovate[bot]andAdam Daley 064b89c15d fix(deps): update dependency php-debugbar/php-debugbar to v3 (#3141)
* fix(deps): update dependency php-debugbar/php-debugbar to v3

* Add `php-debugbar/twig-bridge` and update dependencies

Added `php-debugbar/twig-bridge` to `composer.json` and updated several dependencies to their latest versions, including doctrine/collections, doctrine/orm, dompdf/php-svg-lib, monolog/monolog, php-debugbar/php-debugbar, pimple/pimple, prinsfrank/standards, sabberworm/php-css-parser, symfony/* packages, and others. These updates improve compatibility, security, and feature support.

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Adam Daley <admdly@users.noreply.github.com>
2026-01-13 09:31:26 +00:00
renovate[bot]andAdam Daley 2ae6d2ad42 chore(deps): update dependency phpunit/phpunit to v12 (#3128)
* chore(deps): update dependency phpunit/phpunit to v12

* Update PHPUnit and related dependencies

Upgraded PHPUnit and several related packages (such as php-code-coverage, php-file-iterator, php-invoker, php-text-template, php-timer, and various sebastian/* libraries) to their latest major versions, requiring PHP >=8.3. This ensures compatibility with the latest testing tools and brings in new features, improvements, and security updates.

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Adam Daley <admdly@users.noreply.github.com>
2025-12-30 08:41:18 +00:00
Adam Daley 136480860b Raise minimum PHP version requirement to 8.3 (#3125)
* Raise minimum PHP version requirement to 8.3

Update all documentation, configuration, Composer requirements, and CI workflows to require PHP 8.3 or higher. Remove `symfony/polyfill-php83` and add `symfony/polyfill-php85`. Adjust installer and requirements checks accordingly.

* Update PHP version and dependencies

Remove PHP 8.5 from CI and workflows, standardizing on PHP 8.3 and 8.4. Update Composer dependencies in composer.json to latest compatible versions for both required and dev packages.
2025-12-30 08:13:04 +00:00
01612b9146 Dropped Paidsupport and Servicemembership (#3066)
* Dropped the "Paidsupport" module

* Patch to migrate existing orders and products to "custom"

* Dropped the "Servicemembership" module

* Update src/library/FOSSBilling/UpdatePatcher.php

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/library/FOSSBilling/UpdatePatcher.php

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Improve PHPStan compatibility and static analysis

Added a PHPStan ignore pattern for polyfilled ctype function parameter count errors. Updated Extension Service to explicitly check variable type before calling ctype_alnum, aiding static analysis tools like PHPStan.

* Remove polyfill-php72 and update dependencies

Removed 'symfony/polyfill-php72' from composer.json replace section. Updated composer.lock with new versions of league/csv, php-debugbar/php-debugbar, phpunit/php-code-coverage, and rector/rector.

* Update `last_patch` setting to version 47

Incremented the 'last_patch' value in the settings table from 46 to 47 to reflect the latest patch version.

---------

Co-authored-by: Adam Daley <admdly@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-27 22:42:37 +00:00
renovate[bot] c944fa09fd chore(deps): update dependency php-debugbar/php-debugbar to v2.2.6 2025-12-27 01:52:38 +00:00
renovate[bot] e4362ac667 chore(deps): update dependency rector/rector to v2.3.0 (#3121)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-26 17:29:17 +00:00
renovate[bot] 28947b010d fix(deps): update dependency stripe/stripe-php to v19 (#3033)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-24 02:00:57 +00:00
03c26e5972 Introduce RequiredParams attribute (#2965)
* Introduce RequiredParams attribute

* Use the new RequiredParams attribute instead

* Make sure we are always passing an array

* Fixed tests

* Fixed tests

* Fixed tests

* Fix validation attribute test failures

Added back manual parameter validation to API methods that use
RequiredParams attributes. The attribute validation only works when
methods are called through Api_Handler, but tests call methods directly.

Changes:
- Added checkRequiredParamsForArray calls to methods with RequiredParams
- Updated tests to include validators in DI containers
- Fixed HTTPS URL expectation in Invoice test
- Ensured all 1673 tests pass

This maintains both attribute-based validation (for Handler calls) and
inline validation (for direct calls and tests).

* Fix RequiredParams attribute validation in tests

- Made Api_Handler::validateRequiredParams() public to enable testing
- Added validateRequiredParams() helper method to BBTestCase for test validation
- Updated all failing tests to call validation before API methods
- Added RequiredParams attribute to Servicedomain update() method
- Fixed test expectation message to match actual error message
- All 1673 tests now pass successfully

This completes the RequiredParams attribute implementation by ensuring
tests properly validate required parameters through the attribute system
rather than relying on manual validation calls.

* Remove duplicate manual validation from API methods

Removed checkRequiredParamsForArray calls that were duplicating the
RequiredParams attribute validation. These manual calls are no longer
needed since the Api_Handler now processes the attributes automatically.

Files updated:
- Client/Api/Admin.php: Removed duplicate 'id' validation in update()
- Currency/Api/Admin.php: Removed duplicate 'code' validation in delete()
- Profile/Api/Admin.php: Removed duplicate password field validation in change_password()
- Staff/Api/Guest.php: Removed duplicate email/password validation in login()
- Support/Api/Admin.php: Removed duplicate 'id' validation in kb_category_* methods

All methods now rely solely on the RequiredParams attribute for validation.

* Introduce RequiredParams attribute

* Use the new RequiredParams attribute instead

* Make sure we are always passing an array

* Fixed tests

* Fixed tests

* Fixed tests

* Fix validation attribute test failures

Added back manual parameter validation to API methods that use
RequiredParams attributes. The attribute validation only works when
methods are called through Api_Handler, but tests call methods directly.

Changes:
- Added checkRequiredParamsForArray calls to methods with RequiredParams
- Updated tests to include validators in DI containers
- Fixed HTTPS URL expectation in Invoice test
- Ensured all 1673 tests pass

This maintains both attribute-based validation (for Handler calls) and
inline validation (for direct calls and tests).

* Fix RequiredParams attribute validation in tests

- Made Api_Handler::validateRequiredParams() public to enable testing
- Added validateRequiredParams() helper method to BBTestCase for test validation
- Updated all failing tests to call validation before API methods
- Added RequiredParams attribute to Servicedomain update() method
- Fixed test expectation message to match actual error message
- All 1673 tests now pass successfully

This completes the RequiredParams attribute implementation by ensuring
tests properly validate required parameters through the attribute system
rather than relying on manual validation calls.

* Remove duplicate manual validation from API methods

Removed checkRequiredParamsForArray calls that were duplicating the
RequiredParams attribute validation. These manual calls are no longer
needed since the Api_Handler now processes the attributes automatically.

Files updated:
- Client/Api/Admin.php: Removed duplicate 'id' validation in update()
- Currency/Api/Admin.php: Removed duplicate 'code' validation in delete()
- Profile/Api/Admin.php: Removed duplicate password field validation in change_password()
- Staff/Api/Guest.php: Removed duplicate email/password validation in login()
- Support/Api/Admin.php: Removed duplicate 'id' validation in kb_category_* methods

All methods now rely solely on the RequiredParams attribute for validation.

* Fix RequiredParams validation in tests

- Updated 10 tests to call validateRequiredParams() before API methods
- Fixed error message expectation in Client::update test
- Changed Staff login mock expectations from atLeastOnce to never
  (validation throws before validateAndSanitizeEmail is reached)
- Added missing validator to DI containers in Currency and Support tests
- Fixed http to https in Invoice callback URL test

All RequiredParams validation tests now properly test the attribute system.

* Fix kbHitView mock return type errors

The kbHitView method has a void return type, so mocks should not
specify a return value. Removed willReturn() calls from all kbHitView
mock setups.

Reduced errors from 70 to 64.

* Add location/ directory to gitignore

* Fix all void return type mock errors

Removed willReturn(null) from checkRequiredParamsForArray mocks and other
void methods. These methods have void return types and should not specify
return values in mocks.

Result: All 1673 tests now pass with 0 failures and 0 errors!
Only 30 PHPUnit deprecation warnings remain (not errors).

* chore: stabilize legacy tests after merge from main

- Fix PHPUnit 11 attribute compatibility issues (DataProvider, Group).
- Fix DI container issues in legacy tests by ensuring 'validator' and 'tools' are always available.
- Resolve 'IncompatibleReturnValueException' in mocks due to updated method return types (void, bool, int).
- Fix broken class/namespace references in mocks using 'getMockBuilder' and 'createMock'.
- Restore missing 'deleteLoginHistory' method in Staff Service.
- Remove obsolete Branding module legacy tests.

* chore: fully resolve legacy test failures and restore passing state

- Fixed 'testUninstall' in Extension module by allowing Filesystem injection.
- Restored missing 'deleteLoginHistory' in Staff Service.
- Updated all mocks for 'checkRequiredParamsForArray' to be optional (any()) as it's now handled by attributes.
- Corrected numerous assertions from assertIsArray/assertIsInt to assertTrue for methods whose return type changed to bool.
- Fixed relative class references and namespaces in several legacy tests.

* chore: eliminate all PHPUnit deprecations and resolve final test failures

- Replaced deprecated 'new ServiceTest()' manual instantiation in data providers with string identifiers.
- Updated 'onConsecutiveCalls' usage to use the newer 'willReturn' syntax for multiple values.
- Fixed numerous 'TypeError' and dynamic expectation call issues introduced during refactoring.
- Improved 'Email Service' by moving salt retrieval from static Config to DI container for better testability.
- Resolved all remaining legacy test failures and deprecations.

* Remove unused asset file

Deleted the file at location/Of/Assets/file as it is no longer needed.

* Restore Branding module with service, icon, and manifest

Introduces a new Branding module including the service class, SVG icon, and manifest file. This module allows voluntary display of FOSSBilling references and includes basic module permissions and uninstall functionality.

* Update .gitignore and add .gitkeep for cache directory

Modified .gitignore to properly ignore cache files while allowing the .gitkeep file to be tracked. Added src/data/cache/.gitkeep to ensure the cache directory is present in the repository.

* These were removed in #3026 and seem to be accidentally reintroduced.

* No need to use it here

* Also removed with #3026.

* Also removed with #3026.

* Update dependencies in composer.lock

Bump nette/utils from v4.1.0 to v4.1.1 and react/child-process from v0.6.6 to v0.6.7 in composer.lock to include latest bug fixes and improvements.

* Update service test mocks and improve test setup

Refactored Extension ServiceTest to properly mock getExtensionPath and filesystem exists, ensuring temp directories are created and cleaned up within the test. Updated Invoice ServiceTest to include 'toApiArray' in the list of mocked methods for relevant tests.

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Adam Daley <admdly@users.noreply.github.com>
2025-12-24 01:54:13 +00:00
renovate[bot] 5b216a4adc chore(deps): lock file maintenance 2025-12-22 10:55:59 +00:00
renovate[bot] 0c4ce3f2bb chore(deps): update dependency php-debugbar/php-debugbar to v2.2.5 2025-12-22 01:56:15 +00:00
renovate[bot] be7013847f chore(deps): update dependency doctrine/orm to v3.6.0 (#3112)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-21 01:24:59 +00:00
renovate[bot] f7a2a49b37 chore(deps): update dependency mattketmo/email-checker to v2.5.0 (#3111)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-19 06:46:36 +00:00
renovate[bot] 908a94e535 chore(deps): update dependency friendsofphp/php-cs-fixer to v3.92.3 2025-12-18 15:13:52 +00:00
renovate[bot] 8e37094dbf chore(deps): update dependency twig/twig to v3.22.2 2025-12-18 10:17:01 +00:00
renovate[bot] c221dc13a5 chore(deps): update dependency symfony/html-sanitizer to v7.4.0 (#3107)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-15 03:39:45 +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
renovate[bot] ac7003eb2c chore(deps): update dependency friendsofphp/php-cs-fixer to v3.92.0 2025-12-13 09:09:28 +00:00
renovate[bot] 06a8906349 chore(deps): update dependency prinsfrank/standards to v3.15.0 (#3096)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-13 02:44:19 +00:00
renovate[bot] c19f6c0b8f chore(deps): update dependency symfony/serializer to v7.4.2 2025-12-10 13:03:01 +00:00
renovate[bot] a73917391d chore(deps): update dependency rector/rector to v2.2.14 2025-12-10 11:06:26 +00:00
renovate[bot] 390095fafb chore(deps): update symfony packages to v7.4.1 2025-12-08 01:39:25 +00:00
renovate[bot] 5a9cc29748 chore(deps): update dependency phpunit/phpunit to v11.5.46 2025-12-07 06:31:30 +00:00
renovate[bot] 78add9f738 chore(deps): update dependency phpstan/phpstan to v2.1.33 2025-12-06 12:26:00 +00:00
renovate[bot] c295beb8c1 chore(deps): update dependency friendsofphp/php-cs-fixer to v3.91.3 2025-12-06 05:43:30 +00:00
renovate[bot] f147e81a52 chore(deps): update dependency sentry/sentry to v4.19.1 2025-12-03 07:02:02 +00:00
renovate[bot] 25146e2f36 chore(deps): update dependency rector/rector to v2.2.11 2025-12-02 21:47:31 +00:00
renovate[bot] e4599a024a chore(deps): update dependency prinsfrank/standards to v3.14.1 (#3090)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-02 21:46:50 +00:00
renovate[bot] fba36e5b36 chore(deps): update dependency phpunit/phpunit to v11.5.45 2025-12-02 12:41:51 +00:00
renovate[bot] ebe91a5165 chore(deps): update dependency symfony/webpack-encore-bundle to v2.4.0 (#3088)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-02 12:20:47 +00:00
renovate[bot] 344cb35297 chore(deps): update dependency friendsofphp/php-cs-fixer to v3.91.2 2025-12-02 05:07:18 +00:00
renovate[bot] d37d32f1f3 chore(deps): update dependency twig/twig to v3.22.1 2025-12-01 01:51:49 +00:00
renovate[bot] 81c23bddaa chore(deps): update dependency doctrine/orm to v3.5.8 2025-11-30 05:46:03 +00:00
renovate[bot] ee3260f127 chore(deps): update dependency antcms/antloader to v2.0.5 2025-11-30 02:33:25 +00:00
renovate[bot] c46d2c984d chore(deps): update dependency rector/rector to v2.2.9 (#3085)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-29 10:14:04 +00:00
renovate[bot] e4a1d7ed81 chore(deps): update dependency friendsofphp/php-cs-fixer to v3.91.0 2025-11-29 01:55:12 +00:00
renovate[bot]andAdam Daley ff96d62f10 chore(deps): update symfony packages to v7.4.0 (minor) (#3078)
* chore(deps): update symfony packages to v7.4.0

* Use `addCommand` instead of `add` for console commands

Replaces the deprecated or incorrect use of $application->add() with $application->addCommand() when registering console commands.

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Adam Daley <admdly@users.noreply.github.com>
2025-11-28 23:20:34 +00:00
renovate[bot] aa25eeb627 chore(deps): update dependency sentry/sentry to v4.19.0 (#3077)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-28 21:33:55 +00:00
renovate[bot] c358ed28f1 chore(deps): update dependency league/commonmark to v2.8.0 (#3072)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-27 06:34:32 +00:00
Belle Aerni 6abc2ee626 Updated lockfiles (#3056) 2025-11-22 00:53:28 -08:00
renovate[bot] cd0385f276 chore(deps): update dependency friendsofphp/php-cs-fixer to v3.90.0 2025-11-20 20:02:07 +00:00
renovate[bot] 193b6e7075 chore(deps): update dependency maxmind-db/reader to v1.13.0 (#3044)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-20 12:01:13 -08:00
renovate[bot] bbb299a8c2 chore(deps): update dependency twig/intl-extra to v3.22.1 2025-11-17 02:44:39 +00:00