Skip to content

Commit 33f3120

Browse files
committed
Merge pull request #158 from heiglandreas/hotfix/calendar
Fixes calendar-use with PHP7 and VEvent4.0
2 parents c245c01 + 906033d commit 33f3120

File tree

5 files changed

+5
-7
lines changed

5 files changed

+5
-7
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"org_heigl/mailproxy" : "~1.0@stable",
1010
"org_heigl/hybridauth" : "dev-feature/multipleProviders",
1111
"org_heigl/geolocation" : "~1.0@stable",
12-
"sabre/vobject" : "~3.0@stable",
12+
"sabre/vobject" : "dev-master",
1313
"monolog/monolog" : "~1.9@stable",
1414
"willdurand/geocoder" : "~2.4@stable",
1515
"zendframework/zendservice-twitter": "~2.1@stable",

src/module/Phpug/src/Phpug/Api/v1/CalendarController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public function listAction()
6868
$calendar = new VObject\Component\VCalendar();
6969
$affectedUGs = $this->findGroupsWithinRangeAndDistance();
7070
foreach ($result as $cal) {
71-
if (! $cal->getGRoup()) {
71+
if (! $cal->getGroup()) {
7272
continue;
7373
}
7474

@@ -78,7 +78,7 @@ public function listAction()
7878

7979
try {
8080
$ical = VObject\Reader::read($cal->getCache());
81-
foreach ($ical->children as $event) {
81+
foreach ($ical->children() as $event) {
8282
if (!$event instanceof VObject\Component\VEvent) {
8383
continue;
8484
}

src/module/Phpug/src/Phpug/Entity/Grouptype.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@
3232

3333
namespace Phpug\Entity;
3434

35-
use Zend\XmlRpc\Value\String;
36-
3735
use Doctrine\Common\Collections\ArrayCollection;
3836
use Doctrine\ORM\Mapping as ORM
3937
;

src/module/Phpug/src/Phpug/View/Helper/DateRangePrinter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class DateRangePrinter extends AbstractHelper
4949
*
5050
* @return string
5151
*/
52-
public function __invoke(\DateTime $start, \DateTime $end, $format = null, \DateTimeZone $timezone = null, $separator = ' - ')
52+
public function __invoke(\DateTimeInterface $start, \DateTimeInterface $end, $format = null, \DateTimeZone $timezone = null, $separator = ' - ')
5353
{
5454
if (null !== $timezone) {
5555
$start->setTimezone($timezone);

src/module/Phpug/src/Phpug/Wrapper/SabreVCalendarWrapper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public function getEvents(\DateInterval $interval)
6464
$return = array();
6565
try {
6666
$this->object->expand($now, $then);
67-
foreach ($this->object->children as $item) {
67+
foreach ($this->object->children() as $item) {
6868
if (! $item instanceof VEvent) {
6969
continue;
7070
}

0 commit comments

Comments
 (0)