Skip to content
This repository has been archived by the owner on Mar 12, 2020. It is now read-only.

Commit

Permalink
Bumped react/event-loop to 1.0 and 0.5, and drop 0.4 support
Browse files Browse the repository at this point in the history
  • Loading branch information
WyriHaximus committed Jun 23, 2018
1 parent fc7b47d commit da43ed7
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 50 deletions.
5 changes: 2 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"phergie/phergie-irc-parser": "~2.0",
"phergie/phergie-irc-generator": "~1.5",
"phergie/phergie-irc-connection": "~2.0",
"react/event-loop": "^1.0 || ^0.5 || ^0.4.0",
"react/event-loop": "^1.0 || ^0.5",
"react/stream": "^1.0 || ^0.7 || ^0.6 || ^0.5 || ^0.4",
"react/socket": "^1.0 || ^0.8 || ^0.7",
"react/dns": "~0.4.0",
Expand All @@ -31,8 +31,7 @@
"autoload": {
"psr-4": {
"Phergie\\Irc\\Client\\React\\": "src"
},
"files": ["src/timer_class_alias.php"]
}
},
"autoload-dev": {
"psr-4": {
Expand Down
24 changes: 12 additions & 12 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 0 additions & 14 deletions src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -822,20 +822,6 @@ public function cancelTimer(TimerInterface $timer)
$this->getLoop()->cancelTimer($timer);
}

/**
* Checks if a timer created using addTimer() or addPeriodicTimer() is
* active. Proxies to the isTimerActive() implementation of the event loop
* implementation returned by getLoop().
*
* @param \React\EventLoop\Timer\TimerInterface $timer Timer returned by
* addTimer() or addPeriodicTimer()
* @return boolean TRUE if the specified timer is active, FALSE otherwise
*/
public function isTimerActive(TimerInterface $timer)
{
return $this->getLoop()->isTimerActive($timer);
}

/**
* There are certain incoming events that the client processes internally.
* These functions are essential to the client-server relationship: for example,
Expand Down
5 changes: 0 additions & 5 deletions src/timer_class_alias.php

This file was deleted.

18 changes: 2 additions & 16 deletions tests/ClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -821,20 +821,6 @@ public function testCancelTimer()
Phake::verify($loop)->cancelTimer($timer);
}

/**
* Tests isTimerActive().
*/
public function testIsTimerActive()
{
$timer = $this->getMockTimer();
$loop = $this->getMockLoop();
Phake::when($this->client)->getLoop()->thenReturn($loop);

$this->client->isTimerActive($timer);

Phake::verify($loop)->isTimerActive($timer);
}

/**
* Returns a mock logger.
*
Expand All @@ -848,11 +834,11 @@ protected function getMockLogger()
/**
* Returns a mock timer.
*
* @return \React\EventLoop\Timer\TimerInterface
* @return \React\EventLoop\TimerInterface
*/
protected function getMockTimer()
{
return Phake::mock('\React\EventLoop\Timer\TimerInterface');
return Phake::mock('\React\EventLoop\TimerInterface');
}

/**
Expand Down

0 comments on commit da43ed7

Please sign in to comment.