Skip to content
Code-Schnipsel Gruppen Projekte
  1. Mär 11, 2025
    • Henning Leutz's avatar
      fix: update variable declarations and cache handling · a8ecb4a0
      verfasst von Henning Leutz
      This commit involves refactoring code in Products.js by updating 'var' to 'let' or 'const' for
      proper scoping and better readability. It also introduces a new variable 'inAdministration' to
      handle specific conditions for QUIQQER's administrative state and modifies the condition for using
      cached data, considering 'inAdministration'. Expect no changes in functionality or behavior of the
      software with these changes.
      a8ecb4a0
  2. Mär 03, 2025
  3. Feb 28, 2025
    • Henning Leutz's avatar
      fix: update return type in product model methods · b5baafda
      verfasst von Henning Leutz
      Updated the getFieldValue and getFieldValueByLocale methods' return type in
      src/QUI/ERP/Products/Product/Model.php. Now these methods can return int, float, string, array, or
      null. Also simplified the exception statements.
      b5baafda
  4. Feb 20, 2025
    • Henning Leutz's avatar
      fix: update quiqqer/productsearch version in composer.json · 0a4c45e0
      verfasst von Henning Leutz
      The version of the "quiqqer/productsearch" dependency in `composer.json` was updated from "^1.1" to
      "^2" in order to match with the latest stable release of the library. This will help in making sure
      that the application stays up-to-date with the latest improvements and bug fixes.
      0a4c45e0
    • Henning Leutz's avatar
      chore(phpstan): update ignoreErrors in phpstan-baseline.neon · ca1aed26
      verfasst von Henning Leutz
      Adjusted the ignoreErrors parameter in the phpstan-baseline.neon file. Updated the referenced files
      under this setting to maintain code quality and standards. Further, added a newline at the end of
      the file for adherence to best practices.
      ca1aed26
    • Henning Leutz's avatar
      chore(phpstan): update phpstan-baseline.neon to ignore errors · 34fc1dab
      verfasst von Henning Leutz
      Update `phpstan-baseline.neon` to ignore specific errors related to invalid types, method calls,
      and properties in various parts of the project. This includes errors in `EventHandling.php` and
      `ProductList.php` related to the `AbstractOrder` class.
      34fc1dab
  5. Feb 19, 2025
    • Henning Leutz's avatar
      fix(phpstan): add class existence check before order operation in Calc.php · de683e80
      verfasst von Henning Leutz
      This commit ensures proper order operations in the Calc.php file by adding a class_exists check
      before proceeding. Its main purpose is to prevent errors if a requisite class,
      'QUI\\ERP\\Order\\AbstractOrder', is not available.
      de683e80
    • Henning Leutz's avatar
      refactor(phpcs): clean up code and remove unnecessary lines · 200c6309
      verfasst von Henning Leutz
      This commit includes cleaning up the code in several files directly and indirectly related to the
      product category and variant creation. Specific changes include the removal of unnecessary empty
      lines and import statements across three files: 'createProjectSite.php', 'Categories.php', and
      'VariantParent.php'. No logic has been altered, only code clarity and cleanliness have been
      improved.
      200c6309
    • Henning Leutz's avatar
      fix: added method_exists checks, improved sorting and exception handling · b35dcb3b
      verfasst von Henning Leutz
      - Added method_exists checks before method invocations in categories, fields and products modules
      to prevent potential crashes due to method absence.
      - Improved sorting operations in categories, fields and products modules by changing the comparison
      operator '>' to 'strcmp'.
      - Refined exception handling in categories update and products/frontend/getVariant, adding the
      ability to properly handle and log unexpected exceptions.
      - Fixed a minor issue in getInstalledProductPackages that didn't correctly traverse the package
      array.
      
      Related: #397
      b35dcb3b
    • Henning Leutz's avatar
      fix(phpstan): improve typehints and resolve phpstan errors · 93900c09
      verfasst von Henning Leutz
      - Added spaces in typehints for readability
      - Added `@phpstan-ignore-line` for DEVELOPMENT condition in `setFieldsToAllProducts()` to mitigate
      stan error
      - Cast `max_execution_time` to int before calling `set_time_limit`
      - Typecast integer variables to string in `str_pad` in `execute()` in GenerateProductCache.php for
      PHP compatibility
      - Added a check for `getCustomDataEntry` method existence before using it in `updateProductPrices`
      in UpdatePrices.php for run-time safety.
      
      Related: #397
      93900c09
    • Henning Leutz's avatar
      refactor(phpstan): improve type declarations and condition logic · 2532c540
      verfasst von Henning Leutz
      - Replaced multiple bool|int syntax with bool | int for PSR-12 compliance.
      - Added method_exists checks in some conditionals to avoid errors.
      - Replaced string comparison in `isActive` checks with strict `===`.
      - Cast `ini get` result to integer to match `set_time_limit` syntax.
      - Improved syntax for long conditional statements with multiple && conditions.
      - Fixed passing variable by reference in foreach.
      - Changed variable type passed to string from int in setDefaultVariantFields.
      - Used mb_strlen for string length calculation to prevent datatype error.
      - Improved error handling by adding @phpstan-ignore-line to silence specific PHPStan warnings.
      - Fixed a few minor typographical errors in comments.
      - Partially replaced type comments with typehints for better IDE support.
      
      Related: #397
      2532c540
    • Henning Leutz's avatar
      fix: code cleanup and minor corrections · 0ce4a5f4
      verfasst von Henning Leutz
      Made several code corrections and clean up in `AttributeGroup.php`,
      `AttributeGroupFrontendView.php`, `Folder.php`, `InputMultiLang.php`, `MultilangFrontendView.php`,
      `Price.php`, `ProductAttributeList.php`, `TimePeriod.php`, `VatFrontendView.php`, `UniqueField.php`.
      These changes consist of fixes in unions type declarations, rearrangements of conditions, removal
      of unnecessary typecasts, and small alterations for better readability and performance.
      
      Related: #397
      0ce4a5f4
    • Henning Leutz's avatar
      refactor(phpstan): improve type hinting and minor adjustments in Products Handler · 6fbd1af5
      verfasst von Henning Leutz
      - Typed parameters have been added in function signatures for better readability and type
      enforcement.
      - Replaced QUI\\Exception with just Exception for brevity and better readability.
      - Made corrections in comments for correct grammar and better understanding.
      - Removed redundant null checks and checks for method existence for concise code.
      - Certain unnecessary comments and variables have been removed for cleaner code.
      - Overall these changes contribute to improved readability and maintainability of the code.
      
      Related: #397
      6fbd1af5
    • Henning Leutz's avatar
      fix(phpstan): ensure compatibility with different datatypes · 357c24f1
      verfasst von Henning Leutz
      This commit ensures compatibility with different datatypes by adding necessary checks and type
      conversions in ERP Products module. It also removes unused comments, thus making the code cleaner
      and more efficient.
      
      Changes include:
      - In methods expecting integer parameters, explicit type casting has been added to situations where
      a string could be passed instead.
      - Additional checks are implemented before invoking method_exists(), ensuring safety.
      - Inappropriate comments and annotations have been removed to make the code more readable.
      - getEditableFieldIdsForProduct() and getInheritedFieldIdsForProduct() methods in Products.php had
      a generic parameter $Product, it has been type hinted with the ProductTypeInterface.
      
      Overall, the changes ensure better type stability and increase code reliability.
      
      Related: #397
      357c24f1
    • Henning Leutz's avatar
      refactor(phpstan): improve use of union types and add error checking in PHP files · fe754b84
      verfasst von Henning Leutz
      This commit primarily refines PHP code in multiple classes linked to handling products in the ERP
      module.
      
      These changes:
      - Add a number of error closure checks for method_exists on several method calls.
      - Refine use of union types, allowing for cleaner and clearer type declaration.
      - Amend several git blob file changes that may or may not be relevant depending on the file diff
      output specifics. These changes include variable name changes, function name changes, and code
      reformatting.
      - Update function return types for optimized concise type declarations.
      - Add checks for method existence before calling methods in several places, to ensure valid method
      calls.
      - Correct mismatches in PHPDoc comments and actual function behaviors.
      
      Refactor: #397
      fe754b84
    • Henning Leutz's avatar
      refactor(phpstan): enhance price calculation methods (Calc) · 3b9c4add
      verfasst von Henning Leutz
      Significant improvements have been made on price calculation methods in
      src/QUI/ERP/Products/Utils/Calc.php. Enhancements include:
      - Checking if Product is an instance of UniqueProduct before recalculating and getting product price
      - Handling exceptions for PriceFactor objects that are not of the right instance
      - Improved checks for visibility and existence of `Vat`
      - Affirming method availability before checking for value text in PriceFactor class
      - Broadened round method support to handle different input types
      - More robust error handling during tax type retrieval and tax entry determination for calculating
      both netto and brutto prices.
      3b9c4add
    • Henning Leutz's avatar
      refactor(phpstan): utils classes adapted to phpstan · b3c6fdde
      verfasst von Henning Leutz
      Related: #397
      b3c6fdde
  6. Feb 12, 2025
  7. Feb 07, 2025
  8. Feb 04, 2025
    • Henning Leutz's avatar
      fix: update phpstan version and remove redundant error from baseline · 8b012396
      verfasst von Henning Leutz
      Updated the phpstan version in `.phive/phars.xml` from `1.10.67` to `1.12.13` to use the latest
      features and improvements. Also, altered the specified version pattern to `1.*` to automatically
      pick up the latest minor version releases. In addition, removed a redundant error message in
      `phpstan-baseline.neon` related to the `getUrlRewrittenWithHost` method in `types/category.php`,
      which was causing unnecessary noise in the error report.
      8b012396
    • Henning Leutz's avatar
      refactor: update method parameter type hints in product model · c3956309
      verfasst von Henning Leutz
      This commit refines the type hints in the Product model. Specifically, the
      getUrlRewrittenWithHost() method's $Project parameter type is defined more explicitly, indicating
      that it can accept either a type of QUI\\Projects\\Project or null.
      
      Related: quiqqer/package-feed#15
      c3956309
  9. Dez 18, 2024
  10. Dez 03, 2024
  11. Nov 29, 2024
  12. Nov 14, 2024
  13. Nov 07, 2024
  14. Okt 31, 2024
  15. Okt 30, 2024
  16. Okt 23, 2024
  17. Okt 21, 2024
  18. Okt 18, 2024
Lade