[Pkg-owncloud-commits] [php-sabre-vobject] 11/29: vCard 4 is the new default!
David Prévot
taffit at moszumanska.debian.org
Sat Dec 12 19:26:58 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository php-sabre-vobject.
commit e9b4c9d46e96cdf4d7183f89ebe20f7e4e55df05
Author: Evert Pot <me at evertpot.com>
Date: Wed Dec 2 19:02:31 2015 -0500
vCard 4 is the new default!
---
CHANGELOG.md | 1 +
lib/Component/VCard.php | 2 +-
tests/VObject/Component/VCardTest.php | 2 +-
tests/VObject/Issue40Test.php | 2 +-
tests/VObject/Property/BinaryTest.php | 2 +-
5 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7890dd9..13dc87d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,7 @@ ChangeLog
4.0.0 (????-??-??)
------------------
+* #274: When creating new vCards, the default vCard version is now 4.0.
* `ParseException` now extends `\Exception`.
* `Sabre\VObject\Reader::read` now has a `$charset` argument.
* `Sabre\VObject\Recur\EventIterator::$maxInstances` is now
diff --git a/lib/Component/VCard.php b/lib/Component/VCard.php
index 3330a6a..0935c19 100644
--- a/lib/Component/VCard.php
+++ b/lib/Component/VCard.php
@@ -417,7 +417,7 @@ class VCard extends VObject\Document {
protected function getDefaults() {
return [
- 'VERSION' => '3.0',
+ 'VERSION' => '4.0',
'PRODID' => '-//Sabre//Sabre VObject ' . VObject\Version::VERSION . '//EN',
'UID' => 'sabre-vobject-' . VObject\UUIDUtil::getUUID(),
];
diff --git a/tests/VObject/Component/VCardTest.php b/tests/VObject/Component/VCardTest.php
index b1d1fd5..c16ff34 100644
--- a/tests/VObject/Component/VCardTest.php
+++ b/tests/VObject/Component/VCardTest.php
@@ -48,7 +48,7 @@ class VCardTest extends \PHPUnit_Framework_TestCase {
[
'VERSION MUST appear exactly once in a VCARD component',
],
- "BEGIN:VCARD\r\nVERSION:3.0\r\nFN:John Doe\r\nUID:foo\r\nEND:VCARD\r\n",
+ "BEGIN:VCARD\r\nVERSION:4.0\r\nFN:John Doe\r\nUID:foo\r\nEND:VCARD\r\n",
];
// Unknown version
diff --git a/tests/VObject/Issue40Test.php b/tests/VObject/Issue40Test.php
index b9a9d0e..401cc19 100644
--- a/tests/VObject/Issue40Test.php
+++ b/tests/VObject/Issue40Test.php
@@ -18,7 +18,7 @@ class Issue40Test extends \PHPUnit_Framework_TestCase {
$expected = implode("\r\n", [
"BEGIN:VCARD",
- "VERSION:3.0",
+ "VERSION:4.0",
"PRODID:-//Sabre//Sabre VObject " . Version::VERSION . '//EN',
"N;SORT-AS=Harten,Rene:van der Harten;Rene,J.;;Sir;R.D.O.N.",
"END:VCARD",
diff --git a/tests/VObject/Property/BinaryTest.php b/tests/VObject/Property/BinaryTest.php
index aaa74c7..3356b1b 100644
--- a/tests/VObject/Property/BinaryTest.php
+++ b/tests/VObject/Property/BinaryTest.php
@@ -11,7 +11,7 @@ class BinaryTest extends \PHPUnit_Framework_TestCase {
*/
function testMimeDir() {
- $vcard = new VObject\Component\VCard();
+ $vcard = new VObject\Component\VCard(['VERSION' => '3.0']);
$vcard->add('PHOTO', ['a', 'b']);
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/php-sabre-vobject.git
More information about the Pkg-owncloud-commits
mailing list