This repository has been archived by the owner on Jul 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #243 from koenkivits/feature/v3
v3 final
- Loading branch information
Showing
90 changed files
with
846 additions
and
152 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Ugrade to 3.0 | ||
|
||
This release adds support for PHP 8.0. | ||
|
||
## BC BREAK: `laminas-cli` replaces `laminas-mvc-console` | ||
|
||
The CLI can now be invoked with the following command: | ||
|
||
```sh | ||
vendor/bin/laminas slm-queue:start | ||
``` | ||
|
||
## BC BREAK: Dropped support for PHP 7.3 | ||
|
||
SlmQueue now requires at least PHP 7.4. | ||
|
||
## BC BREAK: Added `QueueInterface::getWorkerName()` | ||
|
||
Classes implementing `QueueInterface` are now required to indicate which worker should be used to process the queue. This change will likely only affect you if you use a custom delegator for your queue. | ||
|
||
## BC BREAK: Workers are now managed by `WorkerPluginManager` | ||
|
||
Workers (and their aliases and delegators) should now be configured under `slm_queue.worker_manager` instead of `service_manager` (Laminas) or `dependencies` (Mezzio). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,11 +44,11 @@ class MyController extends AbstractActionController | |
// Do some work | ||
|
||
$job = $this->jobManager->get('MyModule\Job\SendEmailJob'); | ||
$job->setContent(array( | ||
$job->setContent([ | ||
'to' => '[email protected]', | ||
'subject' => 'Registration completed', | ||
'message' => 'Hi bob, you just registered for our website! Welcome!' | ||
)); | ||
]); | ||
|
||
$this->queue->push($job); | ||
} | ||
|
@@ -143,13 +143,13 @@ class SendEmailJobFactory implements FactoryInterface | |
The last step is to register this factory for the above job. Note that in order for this to work the service should be registered with the FQCN of the job class as its identifier. | ||
|
||
```php | ||
'slm_queue' => array( | ||
'job_manager' => array( | ||
'factories' => array( | ||
'slm_queue' => [ | ||
'job_manager' => [ | ||
'factories' => [ | ||
'MyModule\Job\SendEmailJob' => 'MyModule\Factory\SendEmailJobFactory', | ||
), | ||
), | ||
) | ||
], | ||
], | ||
] | ||
``` | ||
|
||
Jobs with binary payload | ||
|
@@ -237,11 +237,11 @@ class MyController extends AbstractActionController | |
// Do some work | ||
|
||
$this->queue('default') | ||
->push('MyModule\Job\SendEmailJob', array( | ||
->push('MyModule\Job\SendEmailJob', [ | ||
'to' => '[email protected]', | ||
'subject' => 'Registration completed', | ||
'message' => 'Hi bob, you just registered for our website! Welcome!' | ||
)); | ||
]); | ||
} | ||
} | ||
``` | ||
|
@@ -262,15 +262,14 @@ class MyController extends AbstractActionController | |
|
||
// Push two jobs into the same queue | ||
$this->queue('default') | ||
->push('MyModule\Job\SendEmailJob', array( | ||
->push('MyModule\Job\SendEmailJob', [ | ||
'to' => '[email protected]', | ||
'subject' => 'Registration completed', | ||
'message' => 'Hi bob, you just registered for our website! Welcome!' | ||
|
||
)) | ||
->push('MyModule\Job\TweetJob', array( | ||
]) | ||
->push('MyModule\Job\TweetJob', [ | ||
'message' => 'We have a new user registered, his name is bob!' | ||
)); | ||
]); | ||
|
||
// Push into anther queue | ||
$this->queue('background') | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.