diff --git a/composer.json b/composer.json index 74050f473c..e3957a9f53 100755 --- a/composer.json +++ b/composer.json @@ -5,6 +5,7 @@ "toin0u/digitalocean": "~1.4", "twig/twig": "1.*", "michelf/php-markdown": "1.4.1", - "emojione/emojione": "1.3.0" + "emojione/emojione": "1.3.0", + "zendframework/zend-config": "2.3.3" } } diff --git a/composer.lock b/composer.lock index f3f49a8cd4..bd15f962d6 100755 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "3de2d83995130ea086a473db7a35a0a9", + "hash": "1abe77cf0b8752805b4ac0e3cde352b0", "packages": [ { "name": "alchemy/binary-driver", @@ -482,16 +482,16 @@ }, { "name": "sabre/vobject", - "version": "3.3.3", + "version": "3.3.4", "source": { "type": "git", "url": "https://github.com/fruux/sabre-vobject.git", - "reference": "de508f160e811c09b5e651909eb20b9e058a043c" + "reference": "e7cbc59a7a77325dfa32924865e1802c9216a3e0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/fruux/sabre-vobject/zipball/de508f160e811c09b5e651909eb20b9e058a043c", - "reference": "de508f160e811c09b5e651909eb20b9e058a043c", + "url": "https://api.github.com/repos/fruux/sabre-vobject/zipball/e7cbc59a7a77325dfa32924865e1802c9216a3e0", + "reference": "e7cbc59a7a77325dfa32924865e1802c9216a3e0", "shasum": "" }, "require": { @@ -544,21 +544,21 @@ "jCard", "vCard" ], - "time": "2014-10-09 15:59:25" + "time": "2014-11-19 22:15:24" }, { "name": "symfony/console", - "version": "v2.5.6", + "version": "v2.6.1", "target-dir": "Symfony/Component/Console", "source": { "type": "git", "url": "https://github.com/symfony/Console.git", - "reference": "6f177fca24200a5b97aef5ce7a5c98124a0f0db0" + "reference": "ef825fd9f809d275926547c9e57cbf14968793e8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Console/zipball/6f177fca24200a5b97aef5ce7a5c98124a0f0db0", - "reference": "6f177fca24200a5b97aef5ce7a5c98124a0f0db0", + "url": "https://api.github.com/repos/symfony/Console/zipball/ef825fd9f809d275926547c9e57cbf14968793e8", + "reference": "ef825fd9f809d275926547c9e57cbf14968793e8", "shasum": "" }, "require": { @@ -566,16 +566,18 @@ }, "require-dev": { "psr/log": "~1.0", - "symfony/event-dispatcher": "~2.1" + "symfony/event-dispatcher": "~2.1", + "symfony/process": "~2.1" }, "suggest": { "psr/log": "For using the console logger", - "symfony/event-dispatcher": "" + "symfony/event-dispatcher": "", + "symfony/process": "" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.5-dev" + "dev-master": "2.6-dev" } }, "autoload": { @@ -599,21 +601,21 @@ ], "description": "Symfony Console Component", "homepage": "http://symfony.com", - "time": "2014-10-05 13:57:04" + "time": "2014-12-02 20:19:20" }, { "name": "symfony/filesystem", - "version": "v2.5.6", + "version": "v2.6.1", "target-dir": "Symfony/Component/Filesystem", "source": { "type": "git", "url": "https://github.com/symfony/Filesystem.git", - "reference": "4e62fab0060a826561c78b665925b37c870c45f5" + "reference": "ff6efc95256cb33031933729e68b01d720b5436b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Filesystem/zipball/4e62fab0060a826561c78b665925b37c870c45f5", - "reference": "4e62fab0060a826561c78b665925b37c870c45f5", + "url": "https://api.github.com/repos/symfony/Filesystem/zipball/ff6efc95256cb33031933729e68b01d720b5436b", + "reference": "ff6efc95256cb33031933729e68b01d720b5436b", "shasum": "" }, "require": { @@ -622,7 +624,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.5-dev" + "dev-master": "2.6-dev" } }, "autoload": { @@ -646,21 +648,21 @@ ], "description": "Symfony Filesystem Component", "homepage": "http://symfony.com", - "time": "2014-09-22 09:14:18" + "time": "2014-12-02 20:19:20" }, { "name": "symfony/process", - "version": "v2.5.6", + "version": "v2.6.1", "target-dir": "Symfony/Component/Process", "source": { "type": "git", "url": "https://github.com/symfony/Process.git", - "reference": "9bbacbb3a7a27b17c0d51e2f126f59e0e588ad3a" + "reference": "bf0c9bd625f13b0b0bbe39919225cf145dfb935a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Process/zipball/9bbacbb3a7a27b17c0d51e2f126f59e0e588ad3a", - "reference": "9bbacbb3a7a27b17c0d51e2f126f59e0e588ad3a", + "url": "https://api.github.com/repos/symfony/Process/zipball/bf0c9bd625f13b0b0bbe39919225cf145dfb935a", + "reference": "bf0c9bd625f13b0b0bbe39919225cf145dfb935a", "shasum": "" }, "require": { @@ -669,7 +671,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.5-dev" + "dev-master": "2.6-dev" } }, "autoload": { @@ -693,21 +695,21 @@ ], "description": "Symfony Process Component", "homepage": "http://symfony.com", - "time": "2014-10-01 05:50:18" + "time": "2014-12-02 20:19:20" }, { "name": "symfony/yaml", - "version": "v2.5.6", + "version": "v2.6.1", "target-dir": "Symfony/Component/Yaml", "source": { "type": "git", "url": "https://github.com/symfony/Yaml.git", - "reference": "2d9f527449cabfa8543dd7fa3a466d6ae83d6726" + "reference": "3346fc090a3eb6b53d408db2903b241af51dcb20" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Yaml/zipball/2d9f527449cabfa8543dd7fa3a466d6ae83d6726", - "reference": "2d9f527449cabfa8543dd7fa3a466d6ae83d6726", + "url": "https://api.github.com/repos/symfony/Yaml/zipball/3346fc090a3eb6b53d408db2903b241af51dcb20", + "reference": "3346fc090a3eb6b53d408db2903b241af51dcb20", "shasum": "" }, "require": { @@ -716,7 +718,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.5-dev" + "dev-master": "2.6-dev" } }, "autoload": { @@ -740,7 +742,7 @@ ], "description": "Symfony Yaml Component", "homepage": "http://symfony.com", - "time": "2014-10-01 05:50:18" + "time": "2014-12-02 20:19:20" }, { "name": "toin0u/digitalocean", @@ -918,6 +920,112 @@ "templating" ], "time": "2014-10-17 12:53:44" + }, + { + "name": "zendframework/zend-config", + "version": "2.3.3", + "target-dir": "Zend/Config", + "source": { + "type": "git", + "url": "https://github.com/zendframework/Component_ZendConfig.git", + "reference": "a9ad512e1482461a5b500ee3fcf2d06ec9c7c7e8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zendframework/Component_ZendConfig/zipball/a9ad512e1482461a5b500ee3fcf2d06ec9c7c7e8", + "reference": "a9ad512e1482461a5b500ee3fcf2d06ec9c7c7e8", + "shasum": "" + }, + "require": { + "php": ">=5.3.23", + "zendframework/zend-stdlib": "self.version" + }, + "require-dev": { + "zendframework/zend-filter": "self.version", + "zendframework/zend-i18n": "self.version", + "zendframework/zend-json": "self.version", + "zendframework/zend-servicemanager": "self.version" + }, + "suggest": { + "zendframework/zend-filter": "Zend\\Filter component", + "zendframework/zend-i18n": "Zend\\I18n component", + "zendframework/zend-json": "Zend\\Json to use the Json reader or writer classes", + "zendframework/zend-servicemanager": "Zend\\ServiceManager for use with the Config Factory to retrieve reader and writer instances" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.3-dev", + "dev-develop": "2.4-dev" + } + }, + "autoload": { + "psr-0": { + "Zend\\Config\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "provides a nested object property based user interface for accessing this configuration data within application code", + "homepage": "https://github.com/zendframework/zf2", + "keywords": [ + "config", + "zf2" + ], + "time": "2014-09-16 22:58:11" + }, + { + "name": "zendframework/zend-stdlib", + "version": "2.3.3", + "target-dir": "Zend/Stdlib", + "source": { + "type": "git", + "url": "https://github.com/zendframework/Component_ZendStdlib.git", + "reference": "fa33e6647f830d0d2a1cb451efcdfe1bb9a66c33" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zendframework/Component_ZendStdlib/zipball/fa33e6647f830d0d2a1cb451efcdfe1bb9a66c33", + "reference": "fa33e6647f830d0d2a1cb451efcdfe1bb9a66c33", + "shasum": "" + }, + "require": { + "php": ">=5.3.23" + }, + "require-dev": { + "zendframework/zend-eventmanager": "self.version", + "zendframework/zend-serializer": "self.version", + "zendframework/zend-servicemanager": "self.version" + }, + "suggest": { + "zendframework/zend-eventmanager": "To support aggregate hydrator usage", + "zendframework/zend-serializer": "Zend\\Serializer component", + "zendframework/zend-servicemanager": "To support hydrator plugin manager usage" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.3-dev", + "dev-develop": "2.4-dev" + } + }, + "autoload": { + "psr-0": { + "Zend\\Stdlib\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "homepage": "https://github.com/zendframework/zf2", + "keywords": [ + "stdlib", + "zf2" + ], + "time": "2014-09-16 22:58:11" } ], "packages-dev": [], diff --git a/vendor/autoload.php b/vendor/autoload.php index bf3e8b6afd..ee7642b128 100755 --- a/vendor/autoload.php +++ b/vendor/autoload.php @@ -4,4 +4,4 @@ require_once __DIR__ . '/composer' . '/autoload_real.php'; -return ComposerAutoloaderInitf179af6e0a538ee26448f8cc5e031097::getLoader(); +return ComposerAutoloaderInit6960ef7dac86925470234c7bd58c9074::getLoader(); diff --git a/vendor/composer/ClassLoader.php b/vendor/composer/ClassLoader.php index 443364959a..4a56396af5 100755 --- a/vendor/composer/ClassLoader.php +++ b/vendor/composer/ClassLoader.php @@ -56,7 +56,10 @@ class ClassLoader public function getPrefixes() { - return call_user_func_array('array_merge', $this->prefixesPsr0); + if (!empty($this->prefixesPsr0)) { + return call_user_func_array('array_merge', $this->prefixesPsr0); + } + return array(); } public function getPrefixesPsr4() diff --git a/vendor/composer/autoload_namespaces.php b/vendor/composer/autoload_namespaces.php index 3a8dc94aa9..04434c4739 100755 --- a/vendor/composer/autoload_namespaces.php +++ b/vendor/composer/autoload_namespaces.php @@ -6,6 +6,8 @@ $vendorDir = dirname(dirname(__FILE__)); $baseDir = dirname($vendorDir); return array( + 'Zend\\Stdlib\\' => array($vendorDir . '/zendframework/zend-stdlib'), + 'Zend\\Config\\' => array($vendorDir . '/zendframework/zend-config'), 'Twig_' => array($vendorDir . '/twig/twig/lib'), 'Symfony\\Component\\Yaml\\' => array($vendorDir . '/symfony/yaml'), 'Symfony\\Component\\Process\\' => array($vendorDir . '/symfony/process'), diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php index 14c6607223..8130548c55 100755 --- a/vendor/composer/autoload_real.php +++ b/vendor/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInitf179af6e0a538ee26448f8cc5e031097 +class ComposerAutoloaderInit6960ef7dac86925470234c7bd58c9074 { private static $loader; @@ -19,9 +19,9 @@ class ComposerAutoloaderInitf179af6e0a538ee26448f8cc5e031097 return self::$loader; } - spl_autoload_register(array('ComposerAutoloaderInitf179af6e0a538ee26448f8cc5e031097', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInit6960ef7dac86925470234c7bd58c9074', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(); - spl_autoload_unregister(array('ComposerAutoloaderInitf179af6e0a538ee26448f8cc5e031097', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInit6960ef7dac86925470234c7bd58c9074', 'loadClassLoader')); $map = require __DIR__ . '/autoload_namespaces.php'; foreach ($map as $namespace => $path) { @@ -44,7 +44,7 @@ class ComposerAutoloaderInitf179af6e0a538ee26448f8cc5e031097 } } -function composerRequiref179af6e0a538ee26448f8cc5e031097($file) +function composerRequire6960ef7dac86925470234c7bd58c9074($file) { require $file; } diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 3a4570bc3c..fcc0a89ad4 100755 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -523,43 +523,133 @@ ] }, { - "name": "sabre/vobject", - "version": "3.3.3", - "version_normalized": "3.3.3.0", + "name": "twig/twig", + "version": "v1.16.2", + "version_normalized": "1.16.2.0", "source": { "type": "git", - "url": "https://github.com/fruux/sabre-vobject.git", - "reference": "de508f160e811c09b5e651909eb20b9e058a043c" + "url": "https://github.com/fabpot/Twig.git", + "reference": "42f758d9fe2146d1f0470604fc05ee43580873fc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/fruux/sabre-vobject/zipball/de508f160e811c09b5e651909eb20b9e058a043c", - "reference": "de508f160e811c09b5e651909eb20b9e058a043c", + "url": "https://api.github.com/repos/fabpot/Twig/zipball/42f758d9fe2146d1f0470604fc05ee43580873fc", + "reference": "42f758d9fe2146d1f0470604fc05ee43580873fc", "shasum": "" }, "require": { - "ext-mbstring": "*", - "php": ">=5.3.1" + "php": ">=5.2.4" }, - "require-dev": { - "phpunit/phpunit": "*", - "squizlabs/php_codesniffer": "*" + "time": "2014-10-17 12:53:44", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.16-dev" + } }, - "time": "2014-10-09 15:59:25", - "bin": [ - "bin/vobject", - "bin/generate_vcards" + "installation-source": "dist", + "autoload": { + "psr-0": { + "Twig_": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" + }, + { + "name": "Armin Ronacher", + "email": "armin.ronacher@active-4.com", + "role": "Project Founder" + }, + { + "name": "Twig Team", + "homepage": "https://github.com/fabpot/Twig/graphs/contributors", + "role": "Contributors" + } ], + "description": "Twig, the flexible, fast, and secure template language for PHP", + "homepage": "http://twig.sensiolabs.org", + "keywords": [ + "templating" + ] + }, + { + "name": "emojione/emojione", + "version": "v1.3.0", + "version_normalized": "1.3.0.0", + "source": { + "type": "git", + "url": "https://github.com/Ranks/emojione.git", + "reference": "2a34acf3771a219045e133063aa759035d4f842c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Ranks/emojione/zipball/2a34acf3771a219045e133063aa759035d4f842c", + "reference": "2a34acf3771a219045e133063aa759035d4f842c", + "shasum": "" + }, + "require": { + "php": ">=5.3" + }, + "time": "2014-10-31 19:31:57", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Emojione\\": "lib/php/src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "description": "Emoji One is a complete set of emojis designed for the web. It includes libraries to easily convert unicode characters to shortnames (:smile:) and shortnames to our custom emoji images. PNG and SVG formats provided for the emoji images.", + "homepage": "http://www.emojione.com", + "keywords": [ + "Emoji One", + "emoji", + "emojione", + "emojis", + "emoticons", + "smileys", + "smilies", + "unicode" + ] + }, + { + "name": "michelf/php-markdown", + "version": "1.4.1", + "version_normalized": "1.4.1.0", + "source": { + "type": "git", + "url": "https://github.com/michelf/php-markdown.git", + "reference": "de9a19c7bf352d41cc99ed86c3c0ef17e87394b6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/michelf/php-markdown/zipball/de9a19c7bf352d41cc99ed86c3c0ef17e87394b6", + "reference": "de9a19c7bf352d41cc99ed86c3c0ef17e87394b6", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "time": "2014-05-05 02:43:50", "type": "library", "extra": { "branch-alias": { - "dev-master": "3.2.x-dev" + "dev-lib": "1.4.x-dev" } }, "installation-source": "dist", "autoload": { - "psr-4": { - "Sabre\\VObject\\": "lib/" + "psr-0": { + "Michelf": "" } }, "notification-url": "https://packagist.org/downloads/", @@ -568,57 +658,113 @@ ], "authors": [ { - "name": "Evert Pot", - "email": "me@evertpot.com", - "homepage": "http://evertpot.com/", + "name": "Michel Fortin", + "email": "michel.fortin@michelf.ca", + "homepage": "http://michelf.ca/", "role": "Developer" }, { - "name": "Dominik Tobschall", - "email": "dominik@fruux.com", - "homepage": "http://tobschall.de/", - "role": "Developer" + "name": "John Gruber", + "homepage": "http://daringfireball.net/" } ], - "description": "The VObject library for PHP allows you to easily parse and manipulate iCalendar and vCard objects", - "homepage": "http://sabre.io/vobject/", + "description": "PHP Markdown", + "homepage": "http://michelf.ca/projects/php-markdown/", "keywords": [ - "VObject", - "iCalendar", - "jCal", - "jCard", - "vCard" + "markdown" ] }, { - "name": "twig/twig", - "version": "v1.16.2", - "version_normalized": "1.16.2.0", + "name": "zendframework/zend-stdlib", + "version": "2.3.3", + "version_normalized": "2.3.3.0", + "target-dir": "Zend/Stdlib", "source": { "type": "git", - "url": "https://github.com/fabpot/Twig.git", - "reference": "42f758d9fe2146d1f0470604fc05ee43580873fc" + "url": "https://github.com/zendframework/Component_ZendStdlib.git", + "reference": "fa33e6647f830d0d2a1cb451efcdfe1bb9a66c33" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/fabpot/Twig/zipball/42f758d9fe2146d1f0470604fc05ee43580873fc", - "reference": "42f758d9fe2146d1f0470604fc05ee43580873fc", + "url": "https://api.github.com/repos/zendframework/Component_ZendStdlib/zipball/fa33e6647f830d0d2a1cb451efcdfe1bb9a66c33", + "reference": "fa33e6647f830d0d2a1cb451efcdfe1bb9a66c33", "shasum": "" }, "require": { - "php": ">=5.2.4" + "php": ">=5.3.23" }, - "time": "2014-10-17 12:53:44", + "require-dev": { + "zendframework/zend-eventmanager": "self.version", + "zendframework/zend-serializer": "self.version", + "zendframework/zend-servicemanager": "self.version" + }, + "suggest": { + "zendframework/zend-eventmanager": "To support aggregate hydrator usage", + "zendframework/zend-serializer": "Zend\\Serializer component", + "zendframework/zend-servicemanager": "To support hydrator plugin manager usage" + }, + "time": "2014-09-16 22:58:11", "type": "library", "extra": { "branch-alias": { - "dev-master": "1.16-dev" + "dev-master": "2.3-dev", + "dev-develop": "2.4-dev" } }, "installation-source": "dist", "autoload": { "psr-0": { - "Twig_": "lib/" + "Zend\\Stdlib\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "homepage": "https://github.com/zendframework/zf2", + "keywords": [ + "stdlib", + "zf2" + ] + }, + { + "name": "sabre/vobject", + "version": "3.3.4", + "version_normalized": "3.3.4.0", + "source": { + "type": "git", + "url": "https://github.com/fruux/sabre-vobject.git", + "reference": "e7cbc59a7a77325dfa32924865e1802c9216a3e0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/fruux/sabre-vobject/zipball/e7cbc59a7a77325dfa32924865e1802c9216a3e0", + "reference": "e7cbc59a7a77325dfa32924865e1802c9216a3e0", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "php": ">=5.3.1" + }, + "require-dev": { + "phpunit/phpunit": "*", + "squizlabs/php_codesniffer": "*" + }, + "time": "2014-11-19 22:15:24", + "bin": [ + "bin/vobject", + "bin/generate_vcards" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Sabre\\VObject\\": "lib/" } }, "notification-url": "https://packagist.org/downloads/", @@ -627,52 +773,52 @@ ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com", - "homepage": "http://fabien.potencier.org", - "role": "Lead Developer" - }, - { - "name": "Armin Ronacher", - "email": "armin.ronacher@active-4.com", - "role": "Project Founder" + "name": "Evert Pot", + "email": "me@evertpot.com", + "homepage": "http://evertpot.com/", + "role": "Developer" }, { - "name": "Twig Team", - "homepage": "https://github.com/fabpot/Twig/graphs/contributors", - "role": "Contributors" + "name": "Dominik Tobschall", + "email": "dominik@fruux.com", + "homepage": "http://tobschall.de/", + "role": "Developer" } ], - "description": "Twig, the flexible, fast, and secure template language for PHP", - "homepage": "http://twig.sensiolabs.org", + "description": "The VObject library for PHP allows you to easily parse and manipulate iCalendar and vCard objects", + "homepage": "http://sabre.io/vobject/", "keywords": [ - "templating" + "VObject", + "iCalendar", + "jCal", + "jCard", + "vCard" ] }, { "name": "symfony/filesystem", - "version": "v2.5.6", - "version_normalized": "2.5.6.0", + "version": "v2.6.1", + "version_normalized": "2.6.1.0", "target-dir": "Symfony/Component/Filesystem", "source": { "type": "git", "url": "https://github.com/symfony/Filesystem.git", - "reference": "4e62fab0060a826561c78b665925b37c870c45f5" + "reference": "ff6efc95256cb33031933729e68b01d720b5436b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Filesystem/zipball/4e62fab0060a826561c78b665925b37c870c45f5", - "reference": "4e62fab0060a826561c78b665925b37c870c45f5", + "url": "https://api.github.com/repos/symfony/Filesystem/zipball/ff6efc95256cb33031933729e68b01d720b5436b", + "reference": "ff6efc95256cb33031933729e68b01d720b5436b", "shasum": "" }, "require": { "php": ">=5.3.3" }, - "time": "2014-09-22 09:14:18", + "time": "2014-12-02 20:19:20", "type": "library", "extra": { "branch-alias": { - "dev-master": "2.5-dev" + "dev-master": "2.6-dev" } }, "installation-source": "dist", @@ -700,18 +846,18 @@ }, { "name": "symfony/console", - "version": "v2.5.6", - "version_normalized": "2.5.6.0", + "version": "v2.6.1", + "version_normalized": "2.6.1.0", "target-dir": "Symfony/Component/Console", "source": { "type": "git", "url": "https://github.com/symfony/Console.git", - "reference": "6f177fca24200a5b97aef5ce7a5c98124a0f0db0" + "reference": "ef825fd9f809d275926547c9e57cbf14968793e8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Console/zipball/6f177fca24200a5b97aef5ce7a5c98124a0f0db0", - "reference": "6f177fca24200a5b97aef5ce7a5c98124a0f0db0", + "url": "https://api.github.com/repos/symfony/Console/zipball/ef825fd9f809d275926547c9e57cbf14968793e8", + "reference": "ef825fd9f809d275926547c9e57cbf14968793e8", "shasum": "" }, "require": { @@ -719,17 +865,19 @@ }, "require-dev": { "psr/log": "~1.0", - "symfony/event-dispatcher": "~2.1" + "symfony/event-dispatcher": "~2.1", + "symfony/process": "~2.1" }, "suggest": { "psr/log": "For using the console logger", - "symfony/event-dispatcher": "" + "symfony/event-dispatcher": "", + "symfony/process": "" }, - "time": "2014-10-05 13:57:04", + "time": "2014-12-02 20:19:20", "type": "library", "extra": { "branch-alias": { - "dev-master": "2.5-dev" + "dev-master": "2.6-dev" } }, "installation-source": "dist", @@ -757,28 +905,28 @@ }, { "name": "symfony/yaml", - "version": "v2.5.6", - "version_normalized": "2.5.6.0", + "version": "v2.6.1", + "version_normalized": "2.6.1.0", "target-dir": "Symfony/Component/Yaml", "source": { "type": "git", "url": "https://github.com/symfony/Yaml.git", - "reference": "2d9f527449cabfa8543dd7fa3a466d6ae83d6726" + "reference": "3346fc090a3eb6b53d408db2903b241af51dcb20" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Yaml/zipball/2d9f527449cabfa8543dd7fa3a466d6ae83d6726", - "reference": "2d9f527449cabfa8543dd7fa3a466d6ae83d6726", + "url": "https://api.github.com/repos/symfony/Yaml/zipball/3346fc090a3eb6b53d408db2903b241af51dcb20", + "reference": "3346fc090a3eb6b53d408db2903b241af51dcb20", "shasum": "" }, "require": { "php": ">=5.3.3" }, - "time": "2014-10-01 05:50:18", + "time": "2014-12-02 20:19:20", "type": "library", "extra": { "branch-alias": { - "dev-master": "2.5-dev" + "dev-master": "2.6-dev" } }, "installation-source": "dist", @@ -806,28 +954,28 @@ }, { "name": "symfony/process", - "version": "v2.5.6", - "version_normalized": "2.5.6.0", + "version": "v2.6.1", + "version_normalized": "2.6.1.0", "target-dir": "Symfony/Component/Process", "source": { "type": "git", "url": "https://github.com/symfony/Process.git", - "reference": "9bbacbb3a7a27b17c0d51e2f126f59e0e588ad3a" + "reference": "bf0c9bd625f13b0b0bbe39919225cf145dfb935a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Process/zipball/9bbacbb3a7a27b17c0d51e2f126f59e0e588ad3a", - "reference": "9bbacbb3a7a27b17c0d51e2f126f59e0e588ad3a", + "url": "https://api.github.com/repos/symfony/Process/zipball/bf0c9bd625f13b0b0bbe39919225cf145dfb935a", + "reference": "bf0c9bd625f13b0b0bbe39919225cf145dfb935a", "shasum": "" }, "require": { "php": ">=5.3.3" }, - "time": "2014-10-01 05:50:18", + "time": "2014-12-02 20:19:20", "type": "library", "extra": { "branch-alias": { - "dev-master": "2.5-dev" + "dev-master": "2.6-dev" } }, "installation-source": "dist", @@ -854,96 +1002,60 @@ "homepage": "http://symfony.com" }, { - "name": "emojione/emojione", - "version": "v1.3.0", - "version_normalized": "1.3.0.0", + "name": "zendframework/zend-config", + "version": "2.3.3", + "version_normalized": "2.3.3.0", + "target-dir": "Zend/Config", "source": { "type": "git", - "url": "https://github.com/Ranks/emojione.git", - "reference": "2a34acf3771a219045e133063aa759035d4f842c" + "url": "https://github.com/zendframework/Component_ZendConfig.git", + "reference": "a9ad512e1482461a5b500ee3fcf2d06ec9c7c7e8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Ranks/emojione/zipball/2a34acf3771a219045e133063aa759035d4f842c", - "reference": "2a34acf3771a219045e133063aa759035d4f842c", + "url": "https://api.github.com/repos/zendframework/Component_ZendConfig/zipball/a9ad512e1482461a5b500ee3fcf2d06ec9c7c7e8", + "reference": "a9ad512e1482461a5b500ee3fcf2d06ec9c7c7e8", "shasum": "" }, "require": { - "php": ">=5.3" - }, - "time": "2014-10-31 19:31:57", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Emojione\\": "lib/php/src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "description": "Emoji One is a complete set of emojis designed for the web. It includes libraries to easily convert unicode characters to shortnames (:smile:) and shortnames to our custom emoji images. PNG and SVG formats provided for the emoji images.", - "homepage": "http://www.emojione.com", - "keywords": [ - "Emoji One", - "emoji", - "emojione", - "emojis", - "emoticons", - "smileys", - "smilies", - "unicode" - ] - }, - { - "name": "michelf/php-markdown", - "version": "1.4.1", - "version_normalized": "1.4.1.0", - "source": { - "type": "git", - "url": "https://github.com/michelf/php-markdown.git", - "reference": "de9a19c7bf352d41cc99ed86c3c0ef17e87394b6" + "php": ">=5.3.23", + "zendframework/zend-stdlib": "self.version" }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/michelf/php-markdown/zipball/de9a19c7bf352d41cc99ed86c3c0ef17e87394b6", - "reference": "de9a19c7bf352d41cc99ed86c3c0ef17e87394b6", - "shasum": "" + "require-dev": { + "zendframework/zend-filter": "self.version", + "zendframework/zend-i18n": "self.version", + "zendframework/zend-json": "self.version", + "zendframework/zend-servicemanager": "self.version" }, - "require": { - "php": ">=5.3.0" + "suggest": { + "zendframework/zend-filter": "Zend\\Filter component", + "zendframework/zend-i18n": "Zend\\I18n component", + "zendframework/zend-json": "Zend\\Json to use the Json reader or writer classes", + "zendframework/zend-servicemanager": "Zend\\ServiceManager for use with the Config Factory to retrieve reader and writer instances" }, - "time": "2014-05-05 02:43:50", + "time": "2014-09-16 22:58:11", "type": "library", "extra": { "branch-alias": { - "dev-lib": "1.4.x-dev" + "dev-master": "2.3-dev", + "dev-develop": "2.4-dev" } }, "installation-source": "dist", "autoload": { "psr-0": { - "Michelf": "" + "Zend\\Config\\": "" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], - "authors": [ - { - "name": "Michel Fortin", - "email": "michel.fortin@michelf.ca", - "homepage": "http://michelf.ca/", - "role": "Developer" - }, - { - "name": "John Gruber", - "homepage": "http://daringfireball.net/" - } - ], - "description": "PHP Markdown", - "homepage": "http://michelf.ca/projects/php-markdown/", + "description": "provides a nested object property based user interface for accessing this configuration data within application code", + "homepage": "https://github.com/zendframework/zf2", "keywords": [ - "markdown" + "config", + "zf2" ] } ] diff --git a/vendor/sabre/vobject/ChangeLog.md b/vendor/sabre/vobject/ChangeLog.md index 085fe2bea5..6dcc337df3 100644 --- a/vendor/sabre/vobject/ChangeLog.md +++ b/vendor/sabre/vobject/ChangeLog.md @@ -1,6 +1,23 @@ ChangeLog ========= +3.3.4 (2014-11-19) +------------------ + +* #154: Converting `ANNIVERSARY` to `X-ANNIVERSARY` and `X-ABDATE` and + vice-versa when converting to/from vCard 4. +* #154: It's now possible to easily select all vCard properties belonging to + a single group with `$vcard->{'ITEM1.'}` syntax. (@armin-hackmann) +* #156: Simpler way to check if a string is UTF-8. (@Hywan) +* Unittest improvements. +* #159: The recurrence iterator, freebusy generator and iCalendar DATE and + DATE-TIME properties can now all accept a reference timezone when working + floating times or all-day events. +* #159: Master events will no longer get a `RECURRENCE-ID` when expanding. +* #159: `RECURRENCE-ID` for all-day events will now be correct when expanding. +* #163: Added a `getTimeZone()` method to `VTIMEZONE` components. + + 3.3.3 (2014-10-09) ------------------ diff --git a/vendor/sabre/vobject/lib/Component.php b/vendor/sabre/vobject/lib/Component.php index 4ac0314a6b..60a32f005a 100644 --- a/vendor/sabre/vobject/lib/Component.php +++ b/vendor/sabre/vobject/lib/Component.php @@ -225,8 +225,14 @@ class Component extends Node { foreach($this->children as $key=>$child) { if ( - strtoupper($child->name) === $name && - (is_null($group) || ( $child instanceof Property && strtoupper($child->group) === $group)) + ( + strtoupper($child->name) === $name + && (is_null($group) || ( $child instanceof Property && strtoupper($child->group) === $group)) + ) + || + ( + $name === '' && $child instanceof Property && strtoupper($child->group) === $group + ) ) { $result[$key] = $child; diff --git a/vendor/sabre/vobject/lib/Component/VCalendar.php b/vendor/sabre/vobject/lib/Component/VCalendar.php index 01c165d18a..8704d332b4 100644 --- a/vendor/sabre/vobject/lib/Component/VCalendar.php +++ b/vendor/sabre/vobject/lib/Component/VCalendar.php @@ -2,10 +2,11 @@ namespace Sabre\VObject\Component; -use - Sabre\VObject, - Sabre\VObject\Component, - Sabre\VObject\Recur\EventIterator; +use DateTime; +use DateTimeZone; +use Sabre\VObject; +use Sabre\VObject\Component; +use Sabre\VObject\Recur\EventIterator; /** * The VCalendar component @@ -239,12 +240,18 @@ class VCalendar extends VObject\Document { * * @param DateTime $start * @param DateTime $end + * @param DateTimeZone $timeZone reference timezone for floating dates and + * times. * @return void */ - public function expand(\DateTime $start, \DateTime $end) { + public function expand(DateTime $start, DateTime $end, DateTimeZone $timeZone = null) { $newEvents = array(); + if (!$timeZone) { + $timeZone = new DateTimeZone('UTC'); + } + foreach($this->select('VEVENT') as $key=>$vevent) { if (isset($vevent->{'RECURRENCE-ID'})) { @@ -266,7 +273,7 @@ class VCalendar extends VObject\Document { throw new \LogicException('Event did not have a UID!'); } - $it = new EventIterator($this, $vevent->uid); + $it = new EventIterator($this, $vevent->uid, $timeZone); $it->fastForward($start); while($it->valid() && $it->getDTStart() < $end) { @@ -288,11 +295,11 @@ class VCalendar extends VObject\Document { foreach($newEvent->children as $child) { if ($child instanceof VObject\Property\ICalendar\DateTime && $child->hasTime()) { - $dt = $child->getDateTimes(); + $dt = $child->getDateTimes($timeZone); // We only need to update the first timezone, because // setDateTimes will match all other timezones to the // first. - $dt[0]->setTimeZone(new \DateTimeZone('UTC')); + $dt[0]->setTimeZone(new DateTimeZone('UTC')); $child->setDateTimes($dt); } diff --git a/vendor/sabre/vobject/lib/Component/VTimeZone.php b/vendor/sabre/vobject/lib/Component/VTimeZone.php index e1bf5dce6c..6c3be7bbec 100644 --- a/vendor/sabre/vobject/lib/Component/VTimeZone.php +++ b/vendor/sabre/vobject/lib/Component/VTimeZone.php @@ -16,6 +16,20 @@ use Sabre\VObject; */ class VTimeZone extends VObject\Component { + /** + * Returns the PHP DateTimeZone for this VTIMEZONE component. + * + * If we can't accurately determine the timezone, this method will return + * UTC. + * + * @return \DateTimeZone + */ + function getTimeZone() { + + return VObject\TimeZoneUtil::getTimeZone((string)$this->TZID, $this->root); + + } + /** * A simple list of validation rules. * @@ -30,7 +44,7 @@ class VTimeZone extends VObject\Component { * * @var array */ - public function getValidationRules() { + function getValidationRules() { return array( 'TZID' => 1, diff --git a/vendor/sabre/vobject/lib/DateTimeParser.php b/vendor/sabre/vobject/lib/DateTimeParser.php index e702b40c1c..88a7982949 100644 --- a/vendor/sabre/vobject/lib/DateTimeParser.php +++ b/vendor/sabre/vobject/lib/DateTimeParser.php @@ -2,6 +2,12 @@ namespace Sabre\VObject; +use DateTime; +use DateTimeZone; +use DateInterval; +use InvalidArgumentException; +use LogicException; + /** * DateTimeParser * @@ -25,19 +31,19 @@ class DateTimeParser { * @param DateTimeZone $tz * @return DateTime */ - static public function parseDateTime($dt, \DateTimeZone $tz = null) { + static public function parseDateTime($dt, DateTimeZone $tz = null) { // Format is YYYYMMDD + "T" + hhmmss $result = preg_match('/^([0-9]{4})([0-1][0-9])([0-3][0-9])T([0-2][0-9])([0-5][0-9])([0-5][0-9])([Z]?)$/',$dt,$matches); if (!$result) { - throw new \LogicException('The supplied iCalendar datetime value is incorrect: ' . $dt); + throw new LogicException('The supplied iCalendar datetime value is incorrect: ' . $dt); } if ($matches[7]==='Z' || is_null($tz)) { - $tz = new \DateTimeZone('UTC'); + $tz = new DateTimeZone('UTC'); } - $date = new \DateTime($matches[1] . '-' . $matches[2] . '-' . $matches[3] . ' ' . $matches[4] . ':' . $matches[5] .':' . $matches[6], $tz); + $date = new DateTime($matches[1] . '-' . $matches[2] . '-' . $matches[3] . ' ' . $matches[4] . ':' . $matches[5] .':' . $matches[6], $tz); // Still resetting the timezone, to normalize everything to UTC // $date->setTimeZone(new \DateTimeZone('UTC')); @@ -46,21 +52,26 @@ class DateTimeParser { } /** - * Parses an iCalendar (rfc5545) formatted date and returns a DateTime object + * Parses an iCalendar (rfc5545) formatted date and returns a DateTime object. * * @param string $date + * @param DateTimeZone $tz * @return DateTime */ - static public function parseDate($date) { + static public function parseDate($date, DateTimeZone $tz = null) { // Format is YYYYMMDD $result = preg_match('/^([0-9]{4})([0-1][0-9])([0-3][0-9])$/',$date,$matches); if (!$result) { - throw new \LogicException('The supplied iCalendar date value is incorrect: ' . $date); + throw new LogicException('The supplied iCalendar date value is incorrect: ' . $date); + } + + if (is_null($tz)) { + $tz = new DateTimeZone('UTC'); } - $date = new \DateTime($matches[1] . '-' . $matches[2] . '-' . $matches[3], new \DateTimeZone('UTC')); + $date = new DateTime($matches[1] . '-' . $matches[2] . '-' . $matches[3], $tz); return $date; } @@ -79,7 +90,7 @@ class DateTimeParser { $result = preg_match('/^(?P\+|-)?P((?P\d+)W)?((?P\d+)D)?(T((?P\d+)H)?((?P\d+)M)?((?P\d+)S)?)?$/', $duration, $matches); if (!$result) { - throw new \LogicException('The supplied iCalendar duration value is incorrect: ' . $duration); + throw new LogicException('The supplied iCalendar duration value is incorrect: ' . $duration); } if (!$asString) { @@ -128,7 +139,7 @@ class DateTimeParser { if ($duration==='P') { $duration = 'PT0S'; } - $iv = new \DateInterval($duration); + $iv = new DateInterval($duration); if ($invert) $iv->invert = true; return $iv; @@ -164,17 +175,17 @@ class DateTimeParser { * Parses either a Date or DateTime, or Duration value. * * @param string $date - * @param DateTimeZone|string $referenceTZ + * @param DateTimeZone|string $referenceTz * @return DateTime|DateInterval */ - static public function parse($date, $referenceTZ = null) { + static public function parse($date, $referenceTz = null) { if ($date[0]==='P' || ($date[0]==='-' && $date[1]==='P')) { return self::parseDuration($date); } elseif (strlen($date)===8) { - return self::parseDate($date); + return self::parseDate($date, $referenceTz); } else { - return self::parseDateTime($date, $referenceTZ); + return self::parseDateTime($date, $referenceTz); } } @@ -284,7 +295,7 @@ class DateTimeParser { $/x'; if (!preg_match($regex, $date, $matches)) { - throw new \InvalidArgumentException('Invalid vCard date-time string: ' . $date); + throw new InvalidArgumentException('Invalid vCard date-time string: ' . $date); } } @@ -387,7 +398,7 @@ class DateTimeParser { $/x'; if (!preg_match($regex, $date, $matches)) { - throw new \InvalidArgumentException('Invalid vCard time string: ' . $date); + throw new InvalidArgumentException('Invalid vCard time string: ' . $date); } } diff --git a/vendor/sabre/vobject/lib/FreeBusyGenerator.php b/vendor/sabre/vobject/lib/FreeBusyGenerator.php index f71d2dbc16..ef6e72a511 100644 --- a/vendor/sabre/vobject/lib/FreeBusyGenerator.php +++ b/vendor/sabre/vobject/lib/FreeBusyGenerator.php @@ -2,6 +2,7 @@ namespace Sabre\VObject; +use DateTimeZone; use Sabre\VObject\Component\VCalendar; use Sabre\VObject\Recur\EventIterator; @@ -49,6 +50,21 @@ class FreeBusyGenerator { */ protected $baseObject; + /** + * Reference timezone. + * + * When we are calculating busy times, and we come across so-called + * floating times (times without a timezone), we use the reference timezone + * instead. + * + * This is also used for all-day events. + * + * This defaults to UTC. + * + * @var DateTimeZone + */ + protected $timeZone; + /** * Creates the generator. * @@ -58,9 +74,10 @@ class FreeBusyGenerator { * @param DateTime $start * @param DateTime $end * @param mixed $objects + * @param DateTimeZone $timeZone * @return void */ - public function __construct(\DateTime $start = null, \DateTime $end = null, $objects = null) { + public function __construct(\DateTime $start = null, \DateTime $end = null, $objects = null, DateTimeZone $timeZone = null) { if ($start && $end) { $this->setTimeRange($start, $end); @@ -69,6 +86,10 @@ class FreeBusyGenerator { if ($objects) { $this->setObjects($objects); } + if (is_null($timeZone)) { + $timeZone = new DateTimeZone('UTC'); + } + $this->setTimeZone($timeZone); } @@ -136,6 +157,18 @@ class FreeBusyGenerator { } + /** + * Sets the reference timezone for floating times. + * + * @param DateTimeZone $timeZone + * @return void + */ + public function setTimeZone(DateTimeZone $timeZone) { + + $this->timeZone = $timeZone; + + } + /** * Parses the input data and returns a correct VFREEBUSY object, wrapped in * a VCALENDAR. @@ -172,7 +205,7 @@ class FreeBusyGenerator { if ($component->RRULE) { - $iterator = new EventIterator($object, (string)$component->uid); + $iterator = new EventIterator($object, (string)$component->uid, $this->timeZone); if ($this->start) { $iterator->fastForward($this->start); } @@ -196,13 +229,13 @@ class FreeBusyGenerator { } else { - $startTime = $component->DTSTART->getDateTime(); + $startTime = $component->DTSTART->getDateTime($this->timeZone); if ($this->end && $startTime > $this->end) { break; } $endTime = null; if (isset($component->DTEND)) { - $endTime = $component->DTEND->getDateTime(); + $endTime = $component->DTEND->getDateTime($this->timeZone); } elseif (isset($component->DURATION)) { $duration = DateTimeParser::parseDuration((string)$component->DURATION); $endTime = clone $startTime; diff --git a/vendor/sabre/vobject/lib/ITip/Broker.php b/vendor/sabre/vobject/lib/ITip/Broker.php index 73534b6f09..a256756d60 100644 --- a/vendor/sabre/vobject/lib/ITip/Broker.php +++ b/vendor/sabre/vobject/lib/ITip/Broker.php @@ -736,6 +736,10 @@ class Broker { $event->add('SUMMARY', $summary); } } else { + // This branch of the code is reached, when a reply is + // generated for an instance of a recurring event, through the + // fact that the instance has disappeared by showing up in + // EXDATE $dt = DateTimeParser::parse($instance['id'], $eventInfo['timezone']); // Treat is as a DATE field if (strlen($instance['id']) <= 8) { diff --git a/vendor/sabre/vobject/lib/Property/ICalendar/DateTime.php b/vendor/sabre/vobject/lib/Property/ICalendar/DateTime.php index 3d9ffbfeed..5e7eb59aa3 100644 --- a/vendor/sabre/vobject/lib/Property/ICalendar/DateTime.php +++ b/vendor/sabre/vobject/lib/Property/ICalendar/DateTime.php @@ -2,11 +2,11 @@ namespace Sabre\VObject\Property\ICalendar; -use - Sabre\VObject\Property, - Sabre\VObject\Parser\MimeDir, - Sabre\VObject\DateTimeParser, - Sabre\VObject\TimeZoneUtil; +use DateTimeZone; +use Sabre\VObject\Property; +use Sabre\VObject\Parser\MimeDir; +use Sabre\VObject\DateTimeParser; +use Sabre\VObject\TimeZoneUtil; /** * DateTime property @@ -117,11 +117,16 @@ class DateTime extends Property { * first will be returned. To get an array with multiple values, call * getDateTimes. * + * If no timezone information is known, because it's either an all-day + * property or floating time, we will use the DateTimeZone argument to + * figure out the exact date. + * + * @param DateTimeZone $timeZone * @return \DateTime */ - public function getDateTime() { + public function getDateTime(DateTimeZone $timeZone = null) { - $dt = $this->getDateTimes(); + $dt = $this->getDateTimes($timeZone); if (!$dt) return null; return $dt[0]; @@ -131,20 +136,25 @@ class DateTime extends Property { /** * Returns multiple date-time values. * + * If no timezone information is known, because it's either an all-day + * property or floating time, we will use the DateTimeZone argument to + * figure out the exact date. + * + * @param DateTimeZone $timeZone * @return \DateTime[] */ - public function getDateTimes() { + public function getDateTimes(DateTimeZone $timeZone = null) { - // Finding the timezone. - $tz = $this['TZID']; + // Does the property have a TZID? + $tzid = $this['TZID']; - if ($tz) { - $tz = TimeZoneUtil::getTimeZone((string)$tz, $this->root); + if ($tzid) { + $timeZone = TimeZoneUtil::getTimeZone((string)$tzid, $this->root); } $dts = array(); foreach($this->getParts() as $part) { - $dts[] = DateTimeParser::parse($part, $tz); + $dts[] = DateTimeParser::parse($part, $timeZone); } return $dts; diff --git a/vendor/sabre/vobject/lib/Recur/EventIterator.php b/vendor/sabre/vobject/lib/Recur/EventIterator.php index 2ea55a418a..8743f5ae1b 100644 --- a/vendor/sabre/vobject/lib/Recur/EventIterator.php +++ b/vendor/sabre/vobject/lib/Recur/EventIterator.php @@ -4,6 +4,7 @@ namespace Sabre\VObject\Recur; use InvalidArgumentException; use DateTime; +use DateTimeZone; use Sabre\VObject\Component; use Sabre\VObject\Component\VEvent; @@ -55,6 +56,20 @@ use Sabre\VObject\Component\VEvent; */ class EventIterator implements \Iterator { + /** + * Reference timeZone for floating dates and times. + * + * @var DateTimeZone + */ + protected $timeZone; + + /** + * True if we're iterating an all-day event. + * + * @var bool + */ + protected $allDay = false; + /** * Creates the iterator * @@ -63,8 +78,15 @@ class EventIterator implements \Iterator { * * @param Component $vcal * @param string|null $uid + * @param DateTimeZone $timeZone Reference timezone for floating dates and + * times. */ - public function __construct(Component $vcal, $uid = null) { + public function __construct(Component $vcal, $uid = null, DateTimeZone $timeZone = null) { + + if (is_null($this->timeZone)) { + $timeZone = new DateTimeZone('UTC'); + } + $this->timeZone = $timeZone; $rrule = null; if ($vcal instanceof VEvent) { @@ -95,7 +117,9 @@ class EventIterator implements \Iterator { } else { - $this->exceptions[$vevent->{'RECURRENCE-ID'}->getDateTime()->getTimeStamp()] = true; + $this->exceptions[ + $vevent->{'RECURRENCE-ID'}->getDateTime($this->timeZone)->getTimeStamp() + ] = true; $this->overriddenEvents[] = $vevent; } @@ -126,13 +150,14 @@ class EventIterator implements \Iterator { 'COUNT' => 1, ); } - $this->startDate = $this->masterEvent->DTSTART->getDateTime(); + $this->startDate = $this->masterEvent->DTSTART->getDateTime($this->timeZone); + $this->allDay = !$this->masterEvent->DTSTART->hasTime(); if (isset($this->masterEvent->EXDATE)) { foreach($this->masterEvent->EXDATE as $exDate) { - foreach($exDate->getDateTimes() as $dt) { + foreach($exDate->getDateTimes($this->timeZone) as $dt) { $this->exceptions[$dt->getTimeStamp()] = true; } @@ -142,14 +167,14 @@ class EventIterator implements \Iterator { if (isset($this->masterEvent->DTEND)) { $this->eventDuration = - $this->masterEvent->DTEND->getDateTime()->getTimeStamp() - + $this->masterEvent->DTEND->getDateTime($this->timeZone)->getTimeStamp() - $this->startDate->getTimeStamp(); } elseif (isset($this->masterEvent->DURATION)) { $duration = $this->masterEvent->DURATION->getDateInterval(); $end = clone $this->startDate; $end->add($duration); $this->eventDuration = $end->getTimeStamp() - $this->startDate->getTimeStamp(); - } elseif ($this->masterEvent->DTSTART->getValueType() === 'DATE') { + } elseif ($this->allDay) { $this->eventDuration = 3600 * 24; } else { $this->eventDuration = 0; @@ -259,8 +284,15 @@ class EventIterator implements \Iterator { if (isset($event->DTEND)) { $event->DTEND->setDateTime($this->getDtEnd()); } - if ($this->recurIterator->key() > 0) { - $event->add('RECURRENCE-ID', $event->DTSTART->getDateTime()); + // Including a RECURRENCE-ID to the object, unless this is the first + // object. + // + // The inner recurIterator is always one step ahead, this is why we're + // checking for the key being higher than 1. + if ($this->recurIterator->key() > 1) { + $recurid = clone $event->DTSTART; + $recurid->name = 'RECURRENCE-ID'; + $event->add($recurid); } return $event; @@ -301,7 +333,7 @@ class EventIterator implements \Iterator { // re-creating overridden event index. $index = array(); foreach($this->overriddenEvents as $key=>$event) { - $stamp = $event->DTSTART->getDateTime()->getTimeStamp(); + $stamp = $event->DTSTART->getDateTime($this->timeZone)->getTimeStamp(); $index[$stamp] = $key; } krsort($index); @@ -357,7 +389,7 @@ class EventIterator implements \Iterator { // Putting the rrule next date aside. $this->nextDate = $nextDate; - $this->currentDate = $this->currentOverriddenEvent->DTSTART->getDateTime(); + $this->currentDate = $this->currentOverriddenEvent->DTSTART->getDateTime($this->timeZone); // Ensuring that this item will only be used once. array_pop($this->overriddenEventsIndex); diff --git a/vendor/sabre/vobject/lib/Recur/RRuleIterator.php b/vendor/sabre/vobject/lib/Recur/RRuleIterator.php index ba882d78fe..08f20101ed 100644 --- a/vendor/sabre/vobject/lib/Recur/RRuleIterator.php +++ b/vendor/sabre/vobject/lib/Recur/RRuleIterator.php @@ -374,7 +374,11 @@ class RRuleIterator implements Iterator { // Current hour of the day $currentHour = $this->currentDate->format('G'); - } while (($this->byDay && !in_array($currentDay, $recurrenceDays)) || ($this->byHour && !in_array($currentHour, $recurrenceHours)) || ($this->byMonth && !in_array($currentMonth, $recurrenceMonths))); + } while ( + ($this->byDay && !in_array($currentDay, $recurrenceDays)) || + ($this->byHour && !in_array($currentHour, $recurrenceHours)) || + ($this->byMonth && !in_array($currentMonth, $recurrenceMonths)) + ); } diff --git a/vendor/sabre/vobject/lib/StringUtil.php b/vendor/sabre/vobject/lib/StringUtil.php index 98bd7c1c76..bca717afbc 100644 --- a/vendor/sabre/vobject/lib/StringUtil.php +++ b/vendor/sabre/vobject/lib/StringUtil.php @@ -19,17 +19,12 @@ class StringUtil { */ static public function isUTF8($str) { - // First check.. mb_check_encoding - if (!mb_check_encoding($str, 'UTF-8')) { - return false; - } - // Control characters - if (preg_match('%(?:[\x00-\x08\x0B-\x0C\x0E\x0F])%', $str)) { + if (preg_match('%[\x00-\x08\x0B-\x0C\x0E\x0F]%', $str)) { return false; } - return true; + return (bool)preg_match('%%u', $str); } diff --git a/vendor/sabre/vobject/lib/VCardConverter.php b/vendor/sabre/vobject/lib/VCardConverter.php index 6afa486b2e..87d6c142a3 100644 --- a/vendor/sabre/vobject/lib/VCardConverter.php +++ b/vendor/sabre/vobject/lib/VCardConverter.php @@ -76,7 +76,6 @@ class VCardConverter { } $parameters = $property->parameters(); - $valueType = null; if (isset($parameters['VALUE'])) { $valueType = $parameters['VALUE']->getValue(); @@ -85,14 +84,19 @@ class VCardConverter { if (!$valueType) { $valueType = $property->getValueType(); } + $newProperty = $output->createProperty( + $property->name, + $property->getParts(), + array(), // parameters will get added a bit later. + $valueType + ); - $newProperty = null; if ($targetVersion===Document::VCARD30) { if ($property instanceof Property\Uri && in_array($property->name, array('PHOTO','LOGO','SOUND'))) { - $newProperty = $this->convertUriToBinary($output, $property, $parameters); + $newProperty = $this->convertUriToBinary($output, $newProperty, $parameters); } elseif ($property instanceof Property\VCard\DateAndOrTime) { @@ -106,26 +110,38 @@ class VCardConverter { $parts = DateTimeParser::parseVCardDateTime($property->getValue()); if (is_null($parts['year'])) { $newValue = '1604-' . $parts['month'] . '-' . $parts['date']; - $newProperty = $output->createProperty( - $property->name, - $newValue, - array( - 'X-APPLE-OMIT-YEAR' => '1604' - ), - $valueType - ); + $newProperty->setValue($newValue); + $newProperty['X-APPLE-OMIT-YEAR'] = '1604'; + } + if ($newProperty->name == 'ANNIVERSARY') { + // Microsoft non-standard anniversary + $newProperty->name = 'X-ANNIVERSARY'; + + // We also need to add a new apple property for the same + // purpose. This apple property needs a 'label' in the same + // group, so we first need to find a groupname that doesn't + // exist yet. + $x = 1; + while($output->select('ITEM' . $x . '.')) { + $x++; + } + $output->add('ITEM' . $x . '.X-ABDATE', $newProperty->getValue(), array('VALUE' => 'DATE-AND-OR-TIME')); + $output->add('ITEM' . $x . '.X-ABLABEL', '_$!!$_'); } } elseif ($property->name === 'KIND') { switch(strtolower($property->getValue())) { case 'org' : - // OS X addressbook property. + // vCard 3.0 does not have an equivalent to KIND:ORG, + // but apple has an extension that means the same + // thing. $newProperty = $output->createProperty('X-ABSHOWAS','COMPANY'); break; + case 'individual' : - // Individual is implied, so we can just skip it. + // Individual is implicit, so we skip it. return; case 'group' : @@ -146,7 +162,7 @@ class VCardConverter { if ($property instanceof Property\Binary) { - $newProperty = $this->convertBinaryToUri($output, $property, $parameters); + $newProperty = $this->convertBinaryToUri($output, $newProperty, $parameters); } elseif ($property instanceof Property\VCard\DateAndOrTime && isset($parameters['X-APPLE-OMIT-YEAR'])) { @@ -155,45 +171,66 @@ class VCardConverter { $parts = DateTimeParser::parseVCardDateTime($property->getValue()); if ($parts['year']===$property['X-APPLE-OMIT-YEAR']->getValue()) { $newValue = '--' . $parts['month'] . '-' . $parts['date']; - $newProperty = $output->createProperty( - $property->name, - $newValue, - array(), - $valueType - ); + $newProperty->setValue($newValue); } // Regardless if the year matched or not, we do need to strip // X-APPLE-OMIT-YEAR. unset($parameters['X-APPLE-OMIT-YEAR']); - } else { - switch($property->name) { - case 'X-ABSHOWAS' : - if (strtoupper($property->getValue()) === 'COMPANY') { - $newProperty = $output->createProperty('KIND','org'); - } - break; - case 'X-ADDRESSBOOKSERVER-KIND' : - if (strtoupper($property->getValue()) === 'GROUP') { - $newProperty = $output->createProperty('KIND','group'); + } + switch($property->name) { + case 'X-ABSHOWAS' : + if (strtoupper($property->getValue()) === 'COMPANY') { + $newProperty = $output->createProperty('KIND','ORG'); + } + break; + case 'X-ADDRESSBOOKSERVER-KIND' : + if (strtoupper($property->getValue()) === 'GROUP') { + $newProperty = $output->createProperty('KIND','GROUP'); + } + break; + case 'X-ANNIVERSARY' : + $newProperty->name = 'ANNIVERSARY'; + // If we already have an anniversary property with the same + // value, ignore. + foreach ($output->select('ANNIVERSARY') as $anniversary) { + if ($anniversary->getValue() === $newProperty->getValue()) { + return; } + } + break; + case 'X-ABDATE' : + // Find out what the label was, if it exists. + if (!$property->group) { break; - } - - } - - } + } + $label = $input->{$property->group . '.X-ABLABEL'}; + // We only support converting anniversaries. + if ($label->getValue()!=='_$!!$_') { + break; + } - if (is_null($newProperty)) { + // If we already have an anniversary property with the same + // value, ignore. + foreach ($output->select('ANNIVERSARY') as $anniversary) { + if ($anniversary->getValue() === $newProperty->getValue()) { + return; + } + } + $newProperty->name = 'ANNIVERSARY'; + break; + // Apple's per-property label system. + case 'X-ABLABEL' : + if($newProperty->getValue() === '_$!!$_') { + // We can safely remove these, as they are converted to + // ANNIVERSARY properties. + return; + } + break; - $newProperty = $output->createProperty( - $property->name, - $property->getParts(), - array(), // no parameters yet - $valueType - ); + } } @@ -231,10 +268,11 @@ class VCardConverter { * the new property. * @return Property\Uri */ - protected function convertBinaryToUri(Component\VCard $output, Property\Binary $property, array &$parameters) { + protected function convertBinaryToUri(Component\VCard $output, Property\Binary $newProperty, array &$parameters) { + $value = $newProperty->getValue(); $newProperty = $output->createProperty( - $property->name, + $newProperty->name, null, // no value array(), // no parameters yet 'URI' // Forcing the BINARY type @@ -267,8 +305,7 @@ class VCardConverter { } - $newProperty->setValue('data:' . $mimeType . ';base64,' . base64_encode($property->getValue())); - + $newProperty->setValue('data:' . $mimeType . ';base64,' . base64_encode($value)); return $newProperty; } @@ -286,17 +323,17 @@ class VCardConverter { * the new property. * @return Property\Binary|null */ - protected function convertUriToBinary(Component\VCard $output, Property\Uri $property, array &$parameters) { + protected function convertUriToBinary(Component\VCard $output, Property\Uri $newProperty, array &$parameters) { - $value = $property->getValue(); + $value = $newProperty->getValue(); // Only converting data: uris if (substr($value, 0, 5)!=='data:') { - return; + return $newProperty; } $newProperty = $output->createProperty( - $property->name, + $newProperty->name, null, // no value array(), // no parameters yet 'BINARY' diff --git a/vendor/sabre/vobject/lib/Version.php b/vendor/sabre/vobject/lib/Version.php index acd59d6fec..1a5ecbb140 100644 --- a/vendor/sabre/vobject/lib/Version.php +++ b/vendor/sabre/vobject/lib/Version.php @@ -14,6 +14,6 @@ class Version { /** * Full version number */ - const VERSION = '3.3.3'; + const VERSION = '3.3.4'; } diff --git a/vendor/sabre/vobject/tests/VObject/Component/VCalendarTest.php b/vendor/sabre/vobject/tests/VObject/Component/VCalendarTest.php index 0b2812407f..2f4d21cdff 100644 --- a/vendor/sabre/vobject/tests/VObject/Component/VCalendarTest.php +++ b/vendor/sabre/vobject/tests/VObject/Component/VCalendarTest.php @@ -2,6 +2,7 @@ namespace Sabre\VObject\Component; +use DateTimeZone; use Sabre\VObject; class VCalendarTest extends \PHPUnit_Framework_TestCase { @@ -9,13 +10,16 @@ class VCalendarTest extends \PHPUnit_Framework_TestCase { /** * @dataProvider expandData */ - public function testExpand($input, $output) { + public function testExpand($input, $output, $timeZone = 'UTC', $start = '2011-12-01', $end = '2011-12-31') { $vcal = VObject\Reader::read($input); + $timeZone = new DateTimeZone($timeZone); + $vcal->expand( - new \DateTime('2011-12-01'), - new \DateTime('2011-12-31') + new \DateTime($start), + new \DateTime($end), + $timeZone ); // This will normalize the output @@ -218,6 +222,52 @@ END:VCALENDAR '; $tests[] = array($input, $output); + + // Floating dates and times. + $input = <<assertEquals( + $tz, + $obj->VTIMEZONE->getTimeZone() + ); + + } + } diff --git a/vendor/sabre/vobject/tests/VObject/FreeBusyGeneratorTest.php b/vendor/sabre/vobject/tests/VObject/FreeBusyGeneratorTest.php index e96bc236e6..1e580be46d 100644 --- a/vendor/sabre/vobject/tests/VObject/FreeBusyGeneratorTest.php +++ b/vendor/sabre/vobject/tests/VObject/FreeBusyGeneratorTest.php @@ -6,8 +6,9 @@ class FreeBusyGeneratorTest extends \PHPUnit_Framework_TestCase { function getInput() { - // shows up -$blob1 = <<