Skip to content

Conversation

@N6REJ
Copy link
Contributor

@N6REJ N6REJ commented Oct 1, 2025

User description

Test carefullly by renaming the .ber file to something else like .test


PR Type

Bug fix


Description

  • Remove .ber file extension from PostgreSQL path scanning

  • Update file inclusion filters in two core classes


Diagram Walkthrough

flowchart LR
  A["PostgreSQL Path Scanning"] --> B["Remove .ber Extension"]
  B --> C["Keep .conf and .bat Only"]
Loading

File Walkthrough

Relevant files
Bug fix
class.action.switchVersion.php
Remove .ber extension from switchVersion action                   

core/classes/actions/class.action.switchVersion.php

  • Remove .ber from includes array in PostgreSQL path scanning
    configuration
  • Keep only .conf and .bat file extensions for scanning
+1/-1     
class.util.php
Remove .ber extension from utility scanning                           

core/classes/class.util.php

  • Remove .ber from includes array in getPathsToScan method
  • Maintain .conf and .bat extensions for PostgreSQL folder scanning
+1/-1     

@N6REJ N6REJ added the enhancement ✨ Improve program label Oct 1, 2025
@qodo-merge-pro
Copy link
Contributor

qodo-merge-pro bot commented Oct 1, 2025

PR Compliance Guide 🔍

Below is a summary of compliance checks for this PR:

Security Compliance
🟢
No security concerns identified No security vulnerabilities detected by AI analysis. Human verification advised for critical code.
Ticket Compliance
🎫 No ticket provided
  • Create ticket/issue
Codebase Duplication Compliance
Codebase context is not defined

Follow the guide to enable codebase context checks.

Custom Compliance
No custom compliance provided

Follow the guide to enable custom compliance check.

Compliance status legend 🟢 - Fully Compliant
🟡 - Partial Compliant
🔴 - Not Compliant
⚪ - Requires Further Human Verification
🏷️ - Compliance label

@qodo-merge-pro
Copy link
Contributor

qodo-merge-pro bot commented Oct 1, 2025

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
General
Refactor duplicated code into a method

Refactor the duplicated logic for generating PostgreSQL scan paths into a new
static method within the Util class to adhere to the DRY principle and improve
maintainability.

core/classes/class.util.php [1076-1084]

 // PostgreSQL
-$folderList = self::getFolderList($bearsamppBins->getPostgresql()->getRootPath());
-foreach ($folderList as $folder) {
-    $paths[] = array(
-        'path'      => $bearsamppBins->getPostgresql()->getRootPath() . '/' . $folder,
-        'includes'  => array( '.conf', '.bat'),
-        'recursive' => true
-    );
-}
+$paths = array_merge($paths, self::getPostgresqlScanPaths());

[To ensure code accuracy, apply this suggestion manually]

Suggestion importance[1-10]: 7

__

Why: The suggestion correctly identifies duplicated code across two files, which the PR itself highlights, and proposes a valid refactoring to improve code quality and maintainability.

Medium
  • More

@jwaisner jwaisner merged commit b5f1eab into main Oct 9, 2025
3 checks passed
@jwaisner jwaisner deleted the ber branch October 9, 2025 00:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement ✨ Improve program

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants