-
Notifications
You must be signed in to change notification settings - Fork 26
Add: Rewrite to support latest Laminas, Pheanstalk and PHPUnit #67
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@taat Thank you. This looks promising! I was busy last week, but I'll be happy to help you now to finish this by doing reviews somewhat quicker!
I left some comments about some minor things. But I think you are heading in the right direction.
I'll happily review again once you polished your PR and removed your own interal TODOs.
Best of luck, and take care!
'defaults' => array( | ||
'controller' => 'SlmQueueBeanstalkd\Controller\BeanstalkdWorkerController', | ||
'options' => [ | ||
'route' => 'queue Beanstalkd <queue> [--timeout=] --start', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's keep the lower case b
. I think that is better, and it is identical to before.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I find the way we use an argument to decide what action we are going to do perform a little bit strange. Let's remodel those to:
queue beanstalkd start <queue> [--timeout]
queue beanstalkd recover <queue>
- etc..
], | ||
], | ||
], | ||
'slm_queue' => [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think everything below this line is some dummy / TODO code, that should now be removed. Right?
return array('SlmQueue'); | ||
} | ||
} | ||
require __DIR__ . '/src/Module.php'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you configure your IDE so each line ends with a return? See the warning GitHub issues here.
} | ||
|
||
public function statsAction() { | ||
// @todo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO
|
||
use Pheanstalk\Contract\JobIdInterface; | ||
|
||
class JobId implements JobIdInterface { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Formatting is of here. You can use https://github.com/JouwWeb/SlmQueue/blob/master/phpcs.xml to auto format your files if you want.
$this->id = $id; | ||
} | ||
|
||
/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feel free to remove the PHPDoc on every method call that is allready fully typed :). Or remove useles comments about constructors and such.
{ | ||
return [ | ||
'queue beanstalkd <queue> --start [--timeout=]' => 'Process Beanstalkd queue', | ||
'queue beanstalkd <queue> --recover [--executionTime=]' => 'Recover Beanstalkd worker', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stats is missing here.
use Pheanstalk\Pheanstalk; | ||
|
||
class JobOptions extends AbstractOptions { | ||
protected $__strictMode__ = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does strict mode do? And why is it wrapped around with __
? Please do add a comment about this.
Main objectives:
Travis not touched yet.
Needs cleanup, adding comments, better docs, removing old files etc.
Still dirty, but does the job.
Please review and let me know.