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

Link to local XSD #3218

Merged
merged 3 commits into from
Oct 31, 2019
Merged

Link to local XSD #3218

merged 3 commits into from
Oct 31, 2019

Conversation

BackEndTea
Copy link
Contributor

Q A
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Tickets N/a
License MIT
Doc PR N/a

This will allow IDEs to provide hints/ autocompletion

@dunglas dunglas merged commit d22dda9 into api-platform:master Oct 31, 2019
@dunglas
Copy link
Member

dunglas commented Oct 31, 2019

Thanks @BackEndTea

@BackEndTea
Copy link
Contributor Author

Thanks @dunglas

@BackEndTea BackEndTea deleted the patch-2 branch October 31, 2019 10:49
@teohhanhui
Copy link
Contributor

I think this change should be reverted...

@BackEndTea
Copy link
Contributor Author

Does this change break anything for you?

@teohhanhui
Copy link
Contributor

No, but see: https://www.jetbrains.com/help/phpstorm/referencing-xml-schemas-and-dtds.html

This change seems unnecessary as the IDE can indeed work with remote XSD files.

But I see this is following symfony/recipes#652

For a project that probably makes sense, but I'm not sure about a library... (What are the pros and cons?)

@BackEndTea
Copy link
Contributor Author

One of the benefits is that there is no extra user interaction needed to get any kind of auto completion/ hints. Users would have to trigger that request themselves in order to get it.

It is also possible that the link is referring to a version of the XSD that does not match the current one. Either we have an old link, or we link to a 'latest' version, which may be too new. There is also the danger that the link no longer works.

Because we use the xsd phpunit provides us with, we always have the correct version, we don't need to make any additional HTTP requests, and we can even use its information if we are offline.

@teohhanhui
Copy link
Contributor

Gotcha! We should cherry-pick this for 2.5 actually. 😄

norkunas pushed a commit to norkunas/core that referenced this pull request Dec 2, 2019
This will allow IDEs to provide hints/ autocompletion
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.

3 participants