Conversation
RFC 6350 makes KEY and SOUND URIs by default in vCard 4.0, but they mapped to FlatText: jCard and xCard gave them the text type, and the 4.0 to 3.0 conversion never reached its SOUND branch. They now map to Property\Uri in vCard 4.0, as PHOTO and LOGO already do. The xCard tests of the RFC 6350 SOUND and KEY examples now expect <uri>, the type of those examples. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In vCard 4.0, KEY and SOUND hold a URI by default (RFC 6350, sections 6.7.5 and 6.8.1). A text KEY needs
VALUE=text. sabre maps both toFlatText, though, and only switches PHOTO and LOGO toUrifor vCard 4.0. So a vCard 4.0 KEY or SOUND:["key", {}, "text", "https://…"]and to xCard as<text>, where RFC 7095 and RFC 6351 useuri;VCardConverter. The 4.0 to 3.0 conversion turnsUriPHOTO, LOGO and SOUND values into binary, but SOUND is not aUri, so adata:URI stays as is.Change
VCard::getClassNameForPropertyName()returnsProperty\Urifor KEY and SOUND in vCard 4.0, next to the existing switch fromBinarytoUri.Unchanged:
VALUE=text, which stays text.Two xCard tests change:
XmlTest::testRFC6350Section6Part7Part5(SOUND) andtestRFC6350Section6Part8Part1(KEY). Each wrote the value back as<text>, while the RFC examples they use are URIs. In the SOUND test, the first assertion already uses<uri>. They now expect<uri>.Tests
tests/VObject/Component/VCardKeySoundTest.phpcovers the class and jCard type in vCard 4.0, a text KEY, unchanged vCard 3.0, and the conversion of a SOUNDdata:URI to binary in vCard 3.0. Two of its tests fail without the fix.🤖 Generated with Claude Code