-
Notifications
You must be signed in to change notification settings - Fork 37
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
Update embed/embed to v4 for support with newer plugins #140
Conversation
composer.json: - Update embed/embed version to v4.4 FallbackAdapter.php: - Replace Adapter class with EmbedAdapter class - Remove init() function - Remove getCode() function - Inherit from new EmbedAdapter class OembedService.php: - Replace Adapter class with EmbedAdapter class - Replace Utils class with wrav\oembed\adapters\EmbedAdapter class - Modify getOEmbed() to use Embed class for fetching oembed data - Modify create() to initialize EmbedAdapter with oembed data
My issue with this upgrade will be the support with GraphQL. @sgtpenguin would be nice is you could test this release using dev-feature/embed-v4 composer tag as I know you have a GQL project |
I briefly tested it out and it looks like it works except it errors when the field is empty again. The fix before involved setting the width and height to null when the field is empty in the FallbackAdapter. FallbackAdaper is different now but maybe there's a way to solve for it. The error I see now is:
|
@sgtpenguin thank you so many for your time reviewing the PR. I'll get on those changes 🙏 |
No problem. Let me know if I can be of any more assistance. Thank you for your work on this plugin. |
@sgtpenguin It seems to be working for me for me. That said your GQL might be more complex And if I have a NULL field complete, after I made a few changes please update to latest changes. |
@sgtpenguin I believe the error you were getting work caused when you have a NULL variable. The fix that I commit to the branch is probably the cause and has been cause of a typo 😅 |
… in composer.json This acts as a firewall for vulnerable components
@reganlawton Awesome - It works great now. Nice job! |
…or retrieving HTML data
composer.json:
FallbackAdapter.php:
OembedService.php: