* chore: Remove jQuery dependencies and update build system
- Remove jQuery from theme dependencies
- Simplify build configuration
- Update documentation to reflect jQuery removal
- Apply PSR-12 code style formatting
- Replace jQuery with vanilla JS in ClientBalance adapter
* refactor: Complete JavaScript API rewrite with modern architecture
- Rewrite API.js with improved URL handling and CSRF management
- Add reusable utility functions in utils.js
- Remove deprecated jQuery-based bb object
- Update Tom Select integration
* feat: Add Twig API functions for declarative API interaction
- Add fb_api(), fb_api_form(), fb_api_link() Twig functions
- Add asset deduplication to prevent duplicate script/style loading
Note: Dashboard/Index module moved to separate refactor/index PR
* refactor: Integrate new API into theme layouts and core templates
- Update theme layouts to use new API functions
- Convert theme partials and macros
- Update core admin module templates (System, Theme, Wysiwyg, Staff)
* refactor: Update module templates to use new API functions
- Replace data-api-* attributes with fb_api_*() Twig functions
- Remove manual CSRF token handling
- Update all module templates for consistency
Note: Index module excluded (moved to refactor/index PR)
* Remove custom ignore rule from phpstan.neon
Deleted a specific ignore rule for ctype_alnum argument count in src/modules/Extension/Service.php, likely because it is no longer needed or the underlying issue has been resolved.
* chore(deps): update streetsidesoftware/cspell-action digest to 24fa8d3
* Update PHPStan config to ignore `ctype_alnum` argument count
Added a new ignore rule in `phpstan.neon` for the 'Function ctype_alnum invoked with 1 parameter, 0 required' message in src/modules/Extension/Service.php. Minor formatting change in `phpstan-baseline.neon`.
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Adam Daley <admdly@users.noreply.github.com>
* Fixed Downloadable product issue where the product config was overwritten if the settings were saved.
* Ran phpstan & cs-fixer
* Added pdate function to fix products where possible
* Fixed uploading new files when the config is broken.
* Added fix to updater
* Removed superfluous line
* Bump Last Patch Level to Fix Live Tests
* Clean up file download response headers and fix `json_decode` usage
* Handle null config in saveProductConfig and sendProductFile
* Apply suggestion from @Copilot
Co-Authored-By: Copilot <175728472+Copilot@users.noreply.github.com>
* Fix file upload path and improve error handling
* Refactor file update logic in Service class
Replaces inline update of the servicedownloadable record with a call to updateProductFile, improving code organization and maintainability.
* Update `last_patch` setting to version 48
Incremented the 'last_patch' value in the settings table from 47 to 48 to reflect the latest patch version.
* Improve downloadable product filename recovery in patch
Enhanced patch 48 in UpdatePatcher to more robustly recover missing filenames for downloadable products by checking both order configs and service_downloadable records, updating all related data sources, and cleaning up orphaned records. Added detailed statistics logging for the recovery process. Also removed an obsolete PHPStan ignore rule for polyfilled ctype functions.
* Add required param validation to config_save method
Introduced explicit required parameter validation for the 'id' field in the config_save method of the Admin API. This ensures that a missing product ID is caught early with a clear error message.
* Refactor file handling and patch logic for downloadable products
Simplifies and streamlines the patch logic for recovering lost filenames in downloadable products, removing verbose statistics and redundant comments. Refactors file upload error handling in Servicedownloadable Service to use a dedicated error message method and eliminates unnecessary try/catch blocks. Updates Admin API to use attribute-based required parameter validation for product file downloads.
* Update src/modules/Servicedownloadable/Service.php
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Refactor Servicedownloadable Admin API param validation
Removed redundant manual required param validation in Admin API methods in favor of attribute-based validation. Updated related tests to reflect this change and added more comprehensive tests for file sending scenarios. Also updated HTML form element IDs for clarity.
* Remove redundant test for missing product ID in config save
Deleted the testConfigSaveMissingId test from AdminTest.php as it is no longer needed. This streamlines the test suite by removing duplicate or unnecessary validation checks.
---------
Co-authored-by: Chris Schläpfer <c.schlaepfer@datact.ch>
Co-authored-by: Adam Daley <admdly@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* 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>
* Refactor System Updater
Refactor Box/Update to clean things up, merge related functionality, improve error checking, and move to FOSSBilling namespace.
Also refactor foss-update.php into core class, `UpdatePatcher`.
* Refactor file system actions to use Symfony Filesystem
Refactor file system actions to use Symfony Filesystem component, and declare all used resources at start of files rather than duplicating throughout.
* Replace guzzlehttp/guzzle with symfony/http-client
Replace guzzlehttp/guzzle with symfony/http-client to standardise around one globally available HTTP client.
* Replace Box\Curl library and native cURL with symfony/http-client
Replace the Box\Curl library and native cURL with symfony/http-client to standardise around one well supported HTTP client, reduce unnecessary code, and improve compatibility.
* Remove obsolete functionality from Spamchecker module
Remove obsolete functions from Spamchecker module which depended upon cURL.
* Move RedBeanPHP to composer
* Remove missed references to rb.php
* This *should* fix the tests
* Update DummyBean.php
* Remove payment adapter tests
They.. honestly didn't test much and are proving to cause issues when moving rb.php to composer
* Move PHPStan to it's own action
* Bump PHPStan to level 1
* This fix it?
* Update Box_MailTest.php
* And fix a typo in the action
* Update phpstan.yml
* Update phpstan.yml
* Test