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

NEW Use embed/embed v4 #1254

Merged
merged 1 commit into from
Mar 29, 2022

Conversation

emteknetnz
Copy link
Member


use Exception;

class InvalidUrlException extends Exception
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we creating this exception?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commented in reply below

code/Forms/RemoteFileFormFactory.php Outdated Show resolved Hide resolved
code/Forms/RemoteFileFormFactory.php Show resolved Hide resolved
@emteknetnz emteknetnz force-pushed the pulls/1/embed branch 3 times, most recently from 230969f to 56480fc Compare March 14, 2022 00:48
Copy link
Contributor

@maxime-rainville maxime-rainville left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

InvalidUrlException sound too generic for something that is very oEmbed specific. At the very least, there should be a comment on the class to explain its purpose.

I'm wondering if it wouldn't make more sense to have this exception in framework instead?

code/Forms/RemoteFileFormFactory.php Outdated Show resolved Hide resolved
@emteknetnz
Copy link
Member Author

emteknetnz commented Mar 16, 2022

Have renamed to InvalidRemoteUrlException so that it better matches the RemoteFileFormFactory where it's thrown from

Note there's something of an unavoidable (semver breaking?) API change in that the Exception thrown has changed. It's unavoidable because the old Exception came from embed/embed v3, which no longer exists.

@maxime-rainville
Copy link
Contributor

Build is failing because it's still trying to install an older version of frameworktest.

I took the liberty to bump it up

@maxime-rainville
Copy link
Contributor

Actually, the framewortest version got fixed in #1259 already. I removed my extra commit, merged up the other fixed and rebased.

@maxime-rainville maxime-rainville merged commit aebf7a9 into silverstripe:1 Mar 29, 2022
@maxime-rainville maxime-rainville deleted the pulls/1/embed branch March 29, 2022 10:57
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