mirror of
https://github.com/FOSSBilling/FOSSBilling.git
synced 2026-11-30 12:18:43 +09:00
* 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>
42 lines
1.9 KiB
Plaintext
42 lines
1.9 KiB
Plaintext
includes:
|
|
- phpstan-baseline.neon
|
|
|
|
parameters:
|
|
level: 3
|
|
paths:
|
|
- src
|
|
bootstrapFiles:
|
|
- src/load.php
|
|
excludePaths:
|
|
analyse:
|
|
- src/vendor
|
|
- src/library/Model/Admin.php
|
|
- src/library/Model/Client.php
|
|
- src/library/Model/ServiceLicense.php
|
|
- src/library/Model/Product.php
|
|
- src/library/Server/Manager/Custom.php
|
|
- src/library/Server/Manager/Whm.php
|
|
- src/data/cache (?)
|
|
universalObjectCratesClasses:
|
|
- \RedBeanPHP\SimpleModel
|
|
- \RedBeanPHP\OODBBean
|
|
ignoreErrors:
|
|
- '#^Function __trans not found\.$#'
|
|
- '#^Function __pluralTrans not found\.$#'
|
|
- '#^Inner named functions are not supported by PHPStan\. Consider refactoring to an anonymous function, class method, or a top\-level\-defined function\. See issue \#165 \(https\://github\.com/phpstan/phpstan/issues/165\) for more details\.$#'
|
|
- message: '#^Result of function header \(void\) is used\.$#'
|
|
path: src/modules/Custompages/Controller/Client.php
|
|
- message: '#^Variable \$ext_id on left side of \?\?\= is never defined\.$#'
|
|
path: src/modules/Extension/Service.php
|
|
- '#^Access to an undefined property RedBeanPHP\\SimpleModel\:\:\$updated_at\.$#'
|
|
- '#^Access to an undefined property RedBeanPHP\\SimpleModel\:\:\$pass\.$#'
|
|
- '#^Access to an undefined property RedBeanPHP\\SimpleModel\:\:\$username\.$#'
|
|
- '#^Access to an undefined property RedBeanPHP\\SimpleModel\:\:\$sld\.$#'
|
|
- '#^Access to an undefined property RedBeanPHP\\SimpleModel\:\:\$tld\.$#'
|
|
- '#^Access to an undefined property RedBeanPHP\\OODBBean\:\:\$client_id\.$#'
|
|
- '#^Access to an undefined property RedBeanPHP\\OODBBean\:\:\$config\.$#'
|
|
- '#^Access to an undefined property RedBeanPHP\\OODBBean\:\:\$api_key\.$#'
|
|
- '#^Access to an undefined property RedBeanPHP\\OODBBean\:\:\$updated_at\.$#'
|
|
- '#^Access to an undefined property RedBeanPHP\\OODBBean\:\:\$created_at\.$#'
|
|
- '#^Access to an undefined property RedBeanPHP\\OODBBean\:\:\$id\.$#'
|