BrianHenryIE / strauss

Prefix PHP namespaces and classnames to allow multiple versions of libraries to exist without conflict.
https://brianhenryie.github.io/strauss/
MIT License
142 stars 23 forks source link

strauss duplicates the file path causing error #96

Closed bilal-ahmed-wpb closed 6 months ago

bilal-ahmed-wpb commented 6 months ago

Below is my composer.json with the configuration to namespace the dependencies in the vendor folder: ` { "require": { "google\/apiclient": "^2.15", "google\/analytics-admin": "^0.22.2", "google\/analytics-data": "^0.16.2" }, "require-dev": { "brianhenryie/strauss": "^0.17.0" }, "extra": { "strauss": { "target_directory": "vendor-prefixed", "namespace_prefix": "My_Plugin\", "classmap_prefix": "MyPlugin", "constantprefix": "WMP", "packages": [ ], "update_call_sites": false, "override_autoload": { }, "exclude_from_copy": { "packages": [ ], "namespaces": [ ], "file_patterns": [ ] }, "exclude_from_prefix": { "packages": [ ], "namespaces": [ ], "file_patterns": [ ] }, "namespace_replacement_patterns" : { }, "delete_vendor_packages": false, "delete_vendor_files": false } } }

Now the issue is as I runvendor/bin/strauss` command. I get following error:

[info] Loading config... [info] Building dependency list... [info] Enumerating files... [error] Unable to read file from location: C:/Users/WPB/Local Sites/my-plugin-google-sdk/app/public/wp-content/plugins/my-plugin/lib/Google-GA4/vendor/google/apiclient/src/aliases.php. file_get_contents(C:\Users\WPB\Local Sites\my-plugin-google-sdk\app\public\wp-content\plugins\my-plugin\lib\Google-GA4\C:/Users/WPB/Local Sites/my-plugin-google-sdk/app/public/wp-content/plugins/my-plugin/lib/Google-GA4/vendor/google/apiclient/src/aliases.php): Failed to open stream: No such file or directory

And in the error it is observed that the file path is been generated two times due to which issue is occurring. How to fix it?

BrianHenryIE commented 6 months ago

That should be fixed in master now.