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

Call to undefined function IndieBlocks\Mf2\parse() in indieblocks/includes/class-webmention-parser.php:24 #49

Closed
janboddez opened this issue Jan 3, 2023 · 9 comments
Labels
bug Something isn't working

Comments

@janboddez
Copy link
Owner

Well, this ain't good

@janboddez
Copy link
Owner Author

Autoloader looks OK, file is prefixed alright. Yet it only works when we explicitly require Mf2's Parser.php. Hmm

@janboddez janboddez added the bug Something isn't working label Jan 3, 2023
@janboddez
Copy link
Owner Author

Hargl.

'757772e28a0943a9afe83def8db95bdf' => $vendorDir . '/mf2/mf2/Mf2/Parser.php',

namespace IndieBlocks\Mf2;

@janboddez
Copy link
Owner Author

Fix by reinstall from WP.org repo

@janboddez
Copy link
Owner Author

And it's happened again

@janboddez janboddez reopened this Jan 6, 2023
@janboddez
Copy link
Owner Author

Looks like a conflict with my feed reader plugin, which uses the same (but differently prefixed!) library

@janboddez
Copy link
Owner Author

janboddez commented Jan 6, 2023

Think that might actually be the issue, both classes, or rather, files are referenced in autoload_files.php as 757772e28a0943a9afe83def8db95bdf. My guess is it won't (re)load whichever one comes last, and bam, "class not found"!

@janboddez
Copy link
Owner Author

The way forward here is probably to just include the file directly, without composer.

@janboddez
Copy link
Owner Author

Dangit, I ran into this exact same issue before and then it disappeared because I basically merged the two plugins, and now it's back because I created a third one. https://github.com/janboddez/webmention-comments/issues/4

Either way, seems it's solved in PHP-Scoper so now all I need to do is update to PHP 8.1 so I can actually install the latest version.

@janboddez
Copy link
Owner Author

Fixed in a6991eb.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant