Add the tags as categories in the ICS-files.

Fixes #34
This commit is contained in:
Tim Schumacher 2014-11-22 17:08:25 +01:00
parent a5b2f118a2
commit 10931fa07b
5 changed files with 77 additions and 56 deletions

View file

@ -440,8 +440,8 @@ class SymfonyRequirements extends RequirementCollection
} }
$this->addRequirement( $this->addRequirement(
isset($timezones[date_default_timezone_get()]), isset($timezones[@date_default_timezone_get()]),
sprintf('Configured default timezone "%s" must be supported by your installation of PHP', date_default_timezone_get()), sprintf('Configured default timezone "%s" must be supported by your installation of PHP', @date_default_timezone_get()),
'Your default timezone is not supported by PHP. Check for typos in your <strong>php.ini</strong> file and have a look at the list of deprecated timezones at <a href="http://php.net/manual/en/timezones.others.php">http://php.net/manual/en/timezones.others.php</a>.' 'Your default timezone is not supported by PHP. Check for typos in your <strong>php.ini</strong> file and have a look at the list of deprecated timezones at <a href="http://php.net/manual/en/timezones.others.php">http://php.net/manual/en/timezones.others.php</a>.'
); );
} }
@ -530,6 +530,16 @@ class SymfonyRequirements extends RequirementCollection
'Install the <strong>PCRE</strong> extension (version 8.0+).' 'Install the <strong>PCRE</strong> extension (version 8.0+).'
); );
if (extension_loaded('mbstring')) {
$this->addPhpIniRequirement(
'mbstring.func_overload',
create_function('$cfgValue', 'return (int) $cfgValue !== 0;'),
true,
'string functions should not be overloaded',
'Set "<strong>mbstring.func_overload</strong>" to <strong>0</strong> in php.ini<a href="#phpini">*</a> to disable function overloading by the mbstring extension.'
);
}
/* optional recommendations follow */ /* optional recommendations follow */
$this->addRecommendation( $this->addRecommendation(

View file

@ -33,7 +33,7 @@
"incenteev/composer-parameter-handler": "~2.0", "incenteev/composer-parameter-handler": "~2.0",
"jquery/jquery": "1.10.*", "jquery/jquery": "1.10.*",
"knplabs/knp-markdown-bundle": "~1.3", "knplabs/knp-markdown-bundle": "~1.3",
"enko/ics": "~0.1", "enko/ics": "~0.2",
"doctrine/migrations": "dev-master", "doctrine/migrations": "dev-master",
"doctrine/doctrine-migrations-bundle": "dev-master", "doctrine/doctrine-migrations-bundle": "dev-master",
"jbroadway/urlify" : "~1.0", "jbroadway/urlify" : "~1.0",

109
composer.lock generated
View file

@ -4,7 +4,7 @@
"Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"hash": "c0dd295d10e8821f679de1dc090aa14e", "hash": "6771cfbdeebb8bc4a8a5ca0071bbf312",
"packages": [ "packages": [
{ {
"name": "doctrine/annotations", "name": "doctrine/annotations",
@ -732,16 +732,16 @@
}, },
{ {
"name": "enko/ics", "name": "enko/ics",
"version": "0.1.0", "version": "0.2.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/enko/ICS.git", "url": "https://github.com/enko/ICS.git",
"reference": "60416fc3842a7b4ee4f0938b8c35c96b402fee32" "reference": "b1e4f9a725476cc36d5447c219cdb9bc06e62518"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/enko/ICS/zipball/60416fc3842a7b4ee4f0938b8c35c96b402fee32", "url": "https://api.github.com/repos/enko/ICS/zipball/b1e4f9a725476cc36d5447c219cdb9bc06e62518",
"reference": "60416fc3842a7b4ee4f0938b8c35c96b402fee32", "reference": "b1e4f9a725476cc36d5447c219cdb9bc06e62518",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -780,7 +780,7 @@
"ical", "ical",
"multi-byte safe" "multi-byte safe"
], ],
"time": "2014-07-30 23:43:46" "time": "2014-11-22 15:55:19"
}, },
{ {
"name": "enko/relativedateparser", "name": "enko/relativedateparser",
@ -1285,16 +1285,16 @@
}, },
{ {
"name": "sabre/dav", "name": "sabre/dav",
"version": "2.0.5", "version": "2.1.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/fruux/sabre-dav.git", "url": "https://github.com/fruux/sabre-dav.git",
"reference": "e390d39ebfc701543459370e89a16d2d71910bda" "reference": "0f192d4844b99552542ed086940813210b9ddc19"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/fruux/sabre-dav/zipball/e390d39ebfc701543459370e89a16d2d71910bda", "url": "https://api.github.com/repos/fruux/sabre-dav/zipball/0f192d4844b99552542ed086940813210b9ddc19",
"reference": "e390d39ebfc701543459370e89a16d2d71910bda", "reference": "0f192d4844b99552542ed086940813210b9ddc19",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1308,13 +1308,14 @@
"ext-simplexml": "*", "ext-simplexml": "*",
"ext-spl": "*", "ext-spl": "*",
"php": ">=5.4.1", "php": ">=5.4.1",
"sabre/event": "~1.0.0", "sabre/event": "~2.0.0",
"sabre/http": "~2.0.2", "sabre/http": "~3.0.0",
"sabre/vobject": "~3.3.0" "sabre/vobject": "~3.3.4"
}, },
"require-dev": { "require-dev": {
"evert/phpdoc-md": "~0.0.7", "evert/phpdoc-md": "~0.1.0",
"phpunit/phpunit": "~4.2" "phpunit/phpunit": "~4.2",
"squizlabs/php_codesniffer": "~1.5.3"
}, },
"suggest": { "suggest": {
"ext-curl": "*", "ext-curl": "*",
@ -1346,7 +1347,7 @@
} }
], ],
"description": "WebDAV Framework for PHP", "description": "WebDAV Framework for PHP",
"homepage": "http://code.google.com/p/sabredav/", "homepage": "http://sabre.io/",
"keywords": [ "keywords": [
"CalDAV", "CalDAV",
"CardDAV", "CardDAV",
@ -1354,20 +1355,20 @@
"framework", "framework",
"iCalendar" "iCalendar"
], ],
"time": "2014-10-14 16:14:28" "time": "2014-11-20 04:52:55"
}, },
{ {
"name": "sabre/event", "name": "sabre/event",
"version": "1.0.1", "version": "2.0.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/fruux/sabre-event.git", "url": "https://github.com/fruux/sabre-event.git",
"reference": "5ee3adf5441c2fe53b8ceacff6db81e621ee884c" "reference": "f33d60742d7dff63d3722d0f70016704bf32e8db"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/fruux/sabre-event/zipball/5ee3adf5441c2fe53b8ceacff6db81e621ee884c", "url": "https://api.github.com/repos/fruux/sabre-event/zipball/f33d60742d7dff63d3722d0f70016704bf32e8db",
"reference": "5ee3adf5441c2fe53b8ceacff6db81e621ee884c", "reference": "f33d60742d7dff63d3722d0f70016704bf32e8db",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1375,8 +1376,8 @@
}, },
"type": "library", "type": "library",
"autoload": { "autoload": {
"psr-0": { "psr-4": {
"Sabre\\Event": "lib/" "Sabre\\Event\\": "lib/"
} }
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "https://packagist.org/downloads/",
@ -1386,31 +1387,35 @@
"authors": [ "authors": [
{ {
"name": "Evert Pot", "name": "Evert Pot",
"email": "evert@rooftopsolutions.nl", "email": "me@evertpot.com",
"homepage": "http://www.rooftopsolutions.nl/", "homepage": "http://evertpot.com/",
"role": "Developer" "role": "Developer"
} }
], ],
"description": "The sabre/event library provides utilities for lightweight event-based programming", "description": "sabre/event is a library for lightweight event-based programming",
"homepage": "http://sabre.io/event", "homepage": "http://sabre.io/event/",
"keywords": [ "keywords": [
"EventEmitter", "EventEmitter",
"events" "events",
"hooks",
"plugin",
"promise",
"signal"
], ],
"time": "2014-06-12 16:34:49" "time": "2014-10-06 23:26:48"
}, },
{ {
"name": "sabre/http", "name": "sabre/http",
"version": "2.0.4", "version": "3.0.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/fruux/sabre-http.git", "url": "https://github.com/fruux/sabre-http.git",
"reference": "c4c24f547a5509c6c661b11ecf4ff524d2bf6a44" "reference": "897fdb22c3b195615bd7e2c8aadd1a1354884981"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/fruux/sabre-http/zipball/c4c24f547a5509c6c661b11ecf4ff524d2bf6a44", "url": "https://api.github.com/repos/fruux/sabre-http/zipball/897fdb22c3b195615bd7e2c8aadd1a1354884981",
"reference": "c4c24f547a5509c6c661b11ecf4ff524d2bf6a44", "reference": "897fdb22c3b195615bd7e2c8aadd1a1354884981",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1427,8 +1432,8 @@
}, },
"type": "library", "type": "library",
"autoload": { "autoload": {
"psr-0": { "psr-4": {
"Sabre\\HTTP": "lib/" "Sabre\\HTTP\\": "lib/"
} }
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "https://packagist.org/downloads/",
@ -1448,20 +1453,20 @@
"keywords": [ "keywords": [
"http" "http"
], ],
"time": "2014-07-14 18:13:13" "time": "2014-10-10 01:10:11"
}, },
{ {
"name": "sabre/vobject", "name": "sabre/vobject",
"version": "3.3.3", "version": "3.3.4",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/fruux/sabre-vobject.git", "url": "https://github.com/fruux/sabre-vobject.git",
"reference": "de508f160e811c09b5e651909eb20b9e058a043c" "reference": "e7cbc59a7a77325dfa32924865e1802c9216a3e0"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/fruux/sabre-vobject/zipball/de508f160e811c09b5e651909eb20b9e058a043c", "url": "https://api.github.com/repos/fruux/sabre-vobject/zipball/e7cbc59a7a77325dfa32924865e1802c9216a3e0",
"reference": "de508f160e811c09b5e651909eb20b9e058a043c", "reference": "e7cbc59a7a77325dfa32924865e1802c9216a3e0",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1514,21 +1519,21 @@
"jCard", "jCard",
"vCard" "vCard"
], ],
"time": "2014-10-09 15:59:25" "time": "2014-11-19 22:15:24"
}, },
{ {
"name": "sensio/distribution-bundle", "name": "sensio/distribution-bundle",
"version": "v3.0.8", "version": "v3.0.9",
"target-dir": "Sensio/Bundle/DistributionBundle", "target-dir": "Sensio/Bundle/DistributionBundle",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sensiolabs/SensioDistributionBundle.git", "url": "https://github.com/sensiolabs/SensioDistributionBundle.git",
"reference": "bc5e96bb4faf6bee7121085951d11b89488952f5" "reference": "82d85b032db66163568ad988e630e5ad74138c72"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sensiolabs/SensioDistributionBundle/zipball/bc5e96bb4faf6bee7121085951d11b89488952f5", "url": "https://api.github.com/repos/sensiolabs/SensioDistributionBundle/zipball/82d85b032db66163568ad988e630e5ad74138c72",
"reference": "bc5e96bb4faf6bee7121085951d11b89488952f5", "reference": "82d85b032db66163568ad988e630e5ad74138c72",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1567,7 +1572,7 @@
"configuration", "configuration",
"distribution" "distribution"
], ],
"time": "2014-11-03 21:16:34" "time": "2014-11-21 15:36:24"
}, },
{ {
"name": "sensio/framework-extra-bundle", "name": "sensio/framework-extra-bundle",
@ -1903,16 +1908,16 @@
}, },
{ {
"name": "symfony/symfony", "name": "symfony/symfony",
"version": "v2.5.6", "version": "v2.5.7",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/symfony.git", "url": "https://github.com/symfony/symfony.git",
"reference": "1a1b1e528935f15dd76169f8b1dc3ef97f0d6210" "reference": "dd4254fc39a702af22cd886a6790769541469da1"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/symfony/zipball/1a1b1e528935f15dd76169f8b1dc3ef97f0d6210", "url": "https://api.github.com/repos/symfony/symfony/zipball/dd4254fc39a702af22cd886a6790769541469da1",
"reference": "1a1b1e528935f15dd76169f8b1dc3ef97f0d6210", "reference": "dd4254fc39a702af22cd886a6790769541469da1",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1973,7 +1978,7 @@
"ircmaxell/password-compat": "1.0.*", "ircmaxell/password-compat": "1.0.*",
"monolog/monolog": "~1.3", "monolog/monolog": "~1.3",
"ocramius/proxy-manager": ">=0.3.1,<0.6-dev", "ocramius/proxy-manager": ">=0.3.1,<0.6-dev",
"propel/propel1": "1.6.*" "propel/propel1": "~1.6"
}, },
"type": "library", "type": "library",
"extra": { "extra": {
@ -2012,7 +2017,7 @@
"keywords": [ "keywords": [
"framework" "framework"
], ],
"time": "2014-10-24 06:55:39" "time": "2014-11-20 16:00:03"
}, },
{ {
"name": "twig/extensions", "name": "twig/extensions",

View file

@ -151,6 +151,12 @@ class Event extends BaseEntity
$event->setSummary($this->summary); $event->setSummary($this->summary);
$event->setUrl($this->url); $event->setUrl($this->url);
$event->setUid($this->id); $event->setUid($this->id);
if (count($this->tags) > 0) {
$categories = [];
foreach($this->tags as $tag) {
$event->addCategory($tag->name);
}
}
if ($this->location instanceof Location) { if ($this->location instanceof Location) {
$location = new EventLocation(); $location = new EventLocation();
$location->setName($this->location->name); $location->setName($this->location->name);