Resolve namespace of Categories dynamically #4
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
First of all, I would like to thank for creating such a useful and well-structured package. It has been a great foundation to build upon.
Summary
This pull request addresses an issue in the
CategoryDiscoverycomponent related to resolving class namespaces when the path to the classes is changed in the project configuration.Problem
Previously,
CategoryDiscoveryallowed changing the path to locate the target classes via configuration. However, when the path was changed, the system still attempted to resolve the classes using a static namespace defined internally. Because the physical location of the class files and their declared namespaces no longer matched the static namespace, this caused resolution errors and failures in locating the classes correctly.What was changed
In this update, instead of relying on a fixed static namespace, the code now opens the moved file and reads the actual namespace declared inside the class file. It then uses this real namespace to register and resolve the class within the system.
This approach ensures that even if the files are moved to a new location with a different namespace, the class resolution works correctly without errors.
Benefits