Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ambiguous class resolution #18704

Open
2 tasks done
fiskhandlarn opened this issue Jul 19, 2022 · 8 comments
Open
2 tasks done

Ambiguous class resolution #18704

fiskhandlarn opened this issue Jul 19, 2022 · 8 comments

Comments

@fiskhandlarn
Copy link

  • I've read and understood the contribution guidelines.
  • I've searched for any related issues and avoided creating a duplicate issue.

Please give us a description of what happened.

$ composer config repositories.my-yoast composer https://my.yoast.com/packages/
$ composer require yoast/wordpress-seo yoast/wordpress-seo-premium
Using version ^19.3 for yoast/wordpress-seo
Using version ^18.9 for yoast/wordpress-seo-premium
./composer.json has been updated
Running composer update yoast/wordpress-seo yoast/wordpress-seo-premium
Loading composer repositories with package information
Updating dependencies
Lock file operations: 3 installs, 0 updates, 0 removals
  - Locking yoast/i18n-module (3.1.1)
  - Locking yoast/wordpress-seo (19.3)
  - Locking yoast/wordpress-seo-premium (18.9.0)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 3 installs, 0 updates, 0 removals
  - Installing yoast/i18n-module (3.1.1): Extracting archive
  - Installing yoast/wordpress-seo (19.3): Extracting archive
  - Installing yoast/wordpress-seo-premium (18.9.0): Extracting archive
Package frozzare/personnummer is abandoned, you should avoid using it. Use personnummer/personnummer instead.
Generating optimized autoload files
Warning: Ambiguous class resolution, "Yoast\WP\SEO\Models\Indexable_Hierarchy" was found 2x: in "/public/mu-plugins/wordpress-seo-premium/src/models/indexable-hierarchy.php" and "/public/mu-plugins/wordpress-seo/src/models/indexable-hierarchy.php", the first will be used.
Warning: Ambiguous class resolution, "Yoast\WP\SEO\Models\Indexable" was found 2x: in "/public/mu-plugins/wordpress-seo-premium/src/models/indexable.php" and "/public/mu-plugins/wordpress-seo/src/models/indexable.php", the first will be used.
Warning: Ambiguous class resolution, "Yoast\WP\SEO\Models\SEO_Links" was found 2x: in "/public/mu-plugins/wordpress-seo-premium/src/models/seo-links.php" and "/public/mu-plugins/wordpress-seo/src/models/seo-links.php", the first will be used.

do i need to worry about the warnings or is this expected behaviour?

Please describe what you expected to happen and why.

expected no warnings.

How can we reproduce this behavior?

see above.

Used versions

  • WordPress version: 5.9.3
  • Yoast SEO version: 19.3
  • Tested with theme: custom theme
@mmikhan
Copy link
Member

mmikhan commented Jul 19, 2022

Thanks for submitting the bug report. The warning you are seeing is already on our radar (DUPP-316) internally and will not affect anything negatively. You can continue using the plugin correctly, as expected.

@fiskhandlarn
Copy link
Author

@iamazik good to know, thank you!

@aleks-lynx
Copy link

@mmikhan hi, any plans to fix this soon? :) I know that it doesn't break anything, but it's the only package on our list which behaves like that :)

@sboerrigter
Copy link

I see that the class Yoast_I18n_v3 gives the same warning now. In addition to the mentioned warnings above that still exist.

Warning: Ambiguous class resolution, "Yoast_I18n_v3" was found 2x: in "/web/wp-content/plugins/wordpress-seo/src/deprecated/i18n/i18n-v3.php" and "/vendor/yoast/i18n-module/src/i18n-v3.php", the first will be used.

@jeroenrotty jeroenrotty added the IM label Apr 25, 2023
@aslamatwebdevstudios
Copy link

is there any update on this issue?

@alexbogias
Copy link

Still there

@jimojon
Copy link

jimojon commented Aug 9, 2023

Nothing new about this?

@laxmariappan
Copy link

I am still getting the same error.

A possible workaround is to remove the free version and run
composer require yoast/wordpress-seo-premium 20.13 --with-dependencies

This still shows the same warning though

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants