fix: removed parseiCalDateTime

fix: remove jms/serializer from dep
This commit is contained in:
Aerex 2018-10-28 11:16:46 -05:00
parent 6f7cc93c3a
commit d465f4481e
4 changed files with 26 additions and 22 deletions

View File

@ -11,10 +11,10 @@
"sabre"
],
"require": {
"php": ">=5.5",
"sabre/dav": "~3.1.2",
"davidbadura/taskwarrior": "^3.0",
"sabre/vobject": "^4.0",
"jms/serializer": "^1.13",
"easycorp/easy-log-handler": "^1.0"
},
"require-dev": {

27
composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "f1e3c1c3defb5c3015813049f3f3294a",
"content-hash": "00583fd916fe2c7d997c69cef27b23e4",
"packages": [
{
"name": "davidbadura/taskwarrior",
@ -870,16 +870,16 @@
},
{
"name": "sabre/dav",
"version": "3.2.3",
"version": "3.1.5",
"source": {
"type": "git",
"url": "https://github.com/sabre-io/dav.git",
"reference": "a9780ce4f35560ecbd0af524ad32d9d2c8954b80"
"reference": "b5dbb56170fd4f0d8b8b1191f22950f05d306532"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sabre-io/dav/zipball/a9780ce4f35560ecbd0af524ad32d9d2c8954b80",
"reference": "a9780ce4f35560ecbd0af524ad32d9d2c8954b80",
"url": "https://api.github.com/repos/sabre-io/dav/zipball/b5dbb56170fd4f0d8b8b1191f22950f05d306532",
"reference": "b5dbb56170fd4f0d8b8b1191f22950f05d306532",
"shasum": ""
},
"require": {
@ -893,18 +893,15 @@
"ext-spl": "*",
"lib-libxml": ">=2.7.0",
"php": ">=5.5.0",
"psr/log": "^1.0",
"sabre/event": ">=2.0.0, <4.0.0",
"sabre/http": "^4.2.1",
"sabre/uri": "^1.0.1",
"sabre/vobject": "^4.1.0",
"sabre/xml": "^1.4.0"
"sabre/uri": "~1.0",
"sabre/vobject": "~4.0",
"sabre/xml": "~1.0"
},
"require-dev": {
"evert/phpdoc-md": "~0.1.0",
"monolog/monolog": "^1.18",
"phpunit/phpunit": "> 4.8, <6.0.0",
"sabre/cs": "^1.0.0"
"phpunit/phpunit": "> 4.8, <6.0.0"
},
"suggest": {
"ext-curl": "*",
@ -949,7 +946,7 @@
"framework",
"iCalendar"
],
"time": "2018-10-19T09:58:27+00:00"
"time": "2018-10-19T09:57:45+00:00"
},
{
"name": "sabre/event",
@ -3036,6 +3033,8 @@
"stability-flags": [],
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform": {
"php": ">=5.5"
},
"platform-dev": []
}

View File

@ -76,10 +76,15 @@ class iCalEventProcessor {
// parse iCalendar event times to DateTime objects
$entry = $this->taskwarrior->parseiCalDateTime($ToDoComponent->DSTAMP);
$start = $this->taskwarrior->parseiCalDateTime($ToDoComponent->DSTART);
$modified = $this->taskwarrior->parseiCalDateTime($ToDoComponent->{'LAST-MODIFIED'});
$end = $this->taskwarrior->parseiCalDateTime($ToDoComponent->DTEND);
//$entry = $this->taskwarrior->parseiCalDateTime($ToDoComponent->DSTAMP);
//$start = $this->taskwarrior->parseiCalDateTime($ToDoComponent->DSTART);
//$modified = $this->taskwarrior->parseiCalDateTime($ToDoComponent->{'LAST-MODIFIED'});
//$end = $this->taskwarrior->parseiCalDateTime($ToDoComponent->DTEND);
$start = $ToDoComponent->DSTART;
$entry = $ToDoComponent->DSTAMP;
$modified = $ToDoComponent->{'LAST-MODIFIED'};
$end = $ToDoComponent->DTEND;
$task = $this->taskwarrior->createTask($ToDoComponent->UID);

View File

@ -64,9 +64,9 @@ class iCalEventProcessorTest extends \PHPUnit\Framework\TestCase {
$mockVTodo->add('DESCRIPTION', $description);
$mockVTodo->add('CATEGORIES', $categories);
$this->mockTaskwarrior->expects($this->exactly(4))
->method('parseiCalDateTime')
->will($this->onConsecutiveCalls($startTime, $startTime, $modifiedTime, $endTime));
// $this->mockTaskwarrior->expects($this->exactly(4))
// ->method('parseiCalDateTime')
// ->will($this->onConsecutiveCalls($startTime, $startTime, $modifiedTime, $endTime));
$this->mockTaskwarrior->expects($this->once())->method('createTask')->with($this->equalTo($uuid))
->willReturn($this->mockTask);