robwittman/shopify-php-sdk

Ambiguous class resolution

brenjt opened this issue · 2 comments

There are many classes that have conflicting names. I received this output with composer install

Warning: Ambiguous class resolution, "Shopify\Object\Location" was found in both "/www/vendor/robwittman/shopify-php-sdk/lib/Object/Location.php" and "/www/vendor/robwittman/shopify-php-sdk/lib/Object/Policy.php", the first will be used.
Warning: Ambiguous class resolution, "Shopify\Options\Blog\ListOptions" was found in both "/www/vendor/robwittman/shopify-php-sdk/lib/Options/Blog/GetOptions.php" and "/www/vendor/robwittman/shopify-php-sdk/lib/Options/Blog/ListOptions.php", the first will be used.
Warning: Ambiguous class resolution, "Shopify\Options\Article\CountOptions" was found in both "/www/vendor/robwittman/shopify-php-sdk/lib/Options/Article/CountOptions.php" and "/www/vendor/robwittman/shopify-php-sdk/lib/Options/Collect/CountOptions.php", the first will be used.
Warning: Ambiguous class resolution, "Shopify\Options\Article\GetOptions" was found in both "/www/vendor/robwittman/shopify-php-sdk/lib/Options/Article/GetOptions.php" and "/www/vendor/robwittman/shopify-php-sdk/lib/Options/Collect/GetOptions.php", the first will be used.
Warning: Ambiguous class resolution, "Shopify\Options\Article\ListOptions" was found in both "/www/vendor/robwittman/shopify-php-sdk/lib/Options/Article/ListOptions.php" and "/www/vendor/robwittman/shopify-php-sdk/lib/Options/Comment/GetOptions.php", the first will be used.
Warning: Ambiguous class resolution, "Shopify\Options\Article\ListOptions" was found in both "/www/vendor/robwittman/shopify-php-sdk/lib/Options/Article/ListOptions.php" and "/www/vendor/robwittman/shopify-php-sdk/lib/Options/Country/GetOptions.php", the first will be used.
Warning: Ambiguous class resolution, "Shopify\Options\Article\ListOptions" was found in both "/www/vendor/robwittman/shopify-php-sdk/lib/Options/Article/ListOptions.php" and "/www/vendor/robwittman/shopify-php-sdk/lib/Options/Country/ListOptions.php", the first will be used.
Warning: Ambiguous class resolution, "Shopify\Options\Fulfillment\ListOptions" was found in both "/www/vendor/robwittman/shopify-php-sdk/lib/Options/Fulfillment/ListOptions.php" and "/www/vendor/robwittman/shopify-php-sdk/lib/Options/Metafield/ListOptions.php", the first will be used.
Warning: Ambiguous class resolution, "Shopify\Options\Fulfillment\ListOptions" was found in both "/www/vendor/robwittman/shopify-php-sdk/lib/Options/Fulfillment/ListOptions.php" and "/www/vendor/robwittman/shopify-php-sdk/lib/Options/ProductVariant/GetOptions.php", the first will be used.

Just tried installing for a new project and found the same errors.

I'll open a PR to fix over the weekend

I had removed the usage of *Options objects to pass arguments to service functions a while ago, but hadn't drafted a new release yet. v2.1.0 has been tagged.