Skip to content

Rename TikTok.php for psr-4 compatibility #348

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

Merged
merged 2 commits into from
Apr 26, 2020

Conversation

dhensby
Copy link

@dhensby dhensby commented Apr 25, 2020

#347 introduced the TikTok oembed provider but the filename has a capital I which is not in compliance with the PSR-4 loading standard.

This causes a deprecation warning in composer as this class will not be autoloaded in composer v2

@oscarotero
Copy link
Collaborator

In fact, the class name should be Tiktok (with only the first letter as upper case), because this is the way getClassForDomain() function generates the class name to discover the Oembed configuration for a specific site (https://github.com/oscarotero/Embed/blob/v3.x/src/Providers/OEmbed.php#L188)

This code works in macOS and windows because their filesystems are case insensitive, but in Linux it won't work.

@dhensby
Copy link
Author

dhensby commented Apr 26, 2020

OK - I've renamed the file and class now

@oscarotero oscarotero merged commit 5797670 into php-embed:v3.x Apr 26, 2020
@oscarotero
Copy link
Collaborator

Thanks

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

Successfully merging this pull request may close these issues.

2 participants