Skip to content

Commit 8a72047

Browse files
authored
Merge pull request #10 from PyRowMan/feature/4
Update doc and travis config
2 parents f26a972 + fab4dc3 commit 8a72047

File tree

12 files changed

+124
-322
lines changed

12 files changed

+124
-322
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ env:
1111
# - SYMFONY_VERSION=2.5.*
1212
# - SYMFONY_VERSION=2.6.*
1313
# - SYMFONY_VERSION=2.7.*
14-
# - SYMFONY_VERSION=3.*
14+
- SYMFONY_VERSION=3.*
1515
- SYMFONY_VERSION=4.*
1616

1717
#matrix:

CHANGELOG.md

Lines changed: 0 additions & 111 deletions
Original file line numberDiff line numberDiff line change
@@ -1,114 +1,3 @@
1-
## 3.3.0
2-
3-
* Support Symfony 4
4-
5-
## 3.1.0
6-
7-
* Allow dependencies `symfony/framework-bundle` ~3.0
8-
* Allow dependencies `symfony/console` ~3.0
9-
10-
## 3.0.0
11-
12-
This version does not break compatibility itself, but it does upgrade
13-
Pheanstalk to version 3, which uses namespaces. If you use any Pheanstalk
14-
classes directly in your code, you should update those references.
15-
16-
* Upped Pheanstalk version to ~3.0
17-
* Upped Symfony requirement to ~2.3
18-
* Upped PHP version requirement to 5.5.9
19-
* Added PRS-4 autoloader configuration
20-
* The option `enabled` was removed from configuration
21-
* The `*.class` service parameters were replaced by its real values
22-
23-
## 2.5.0
24-
* Logging is now done to a specific channel (PR #50 @pkruithof)
25-
26-
## 2.4.0
27-
* Add CLI Command to display next ready job
28-
29-
## 2.3.0
30-
* PR #43 - StatsTube shows stats for all tube if no argument is given
31-
32-
## 2.2.0
33-
* Pull Request #41 Fix chainable methods to return proxy object
34-
35-
## 2.1.6
36-
* Add command to view the first ready/burried job in a certrain tube
37-
* Remove useless import
38-
* Add missing use
39-
* Add Scrutinizer Badge
40-
* Add link to LeezyPheanstalkBundleExtra
41-
42-
## 2.1.5
43-
* Fix #38
44-
45-
## 2.1.4
46-
* Fix install documentation.
47-
* Fix #29
48-
* Remove github analytics
49-
* Fixed FlushTube Command by catching the correct Exception
50-
* Pretty smal fixes to be more PSR2 compliant
51-
* Move connection definition from compiler pass to the extension
52-
53-
## 2.1.3
54-
* Fixed return value for Proxy::putInTube
55-
* CHANGELOG use markdown extension
56-
57-
## 2.1.2
58-
* Add KickJobCommand
59-
* Fix error management on command
60-
61-
## 2.1.1
62-
* Fix missing implementation of PheanstalkInterface::kickJob
63-
64-
## 2.1.0
65-
* Use pda/pheanstalk 2.1.0
66-
* Add KickCommand
67-
* Fix default name on Command
68-
69-
## 2.0.1
70-
* Set type hint for logger
71-
* Add few tests on PheanstalkLogListener
72-
73-
## 2.0.0
74-
* Add PheanstalkProxy
75-
* Allow user to define custom PheanstalkProxy
76-
* Fragment documentation
77-
* Events documentation
78-
* Change 'connection' name to 'pheanstalk'
79-
* Event integration
80-
* BC : Use 'pheanstalk' name instead of 'connection' to avoid confusion
81-
* Add more security on CLI
82-
* Logger integration
83-
* Add documentation on custom proxy
84-
85-
## 1.2.0
86-
* Add profilter integration, thanks @Maxwell2022
87-
* Add ConnectionLocator
88-
89-
## 1.1.0
90-
* Remove useless Tests/Fixtures/Entity/FakeMedia.php
91-
* Update composer to use symfony/framework-bundle instead of symfony/symfony
92-
* Remove requirement PHP >= 5.3.3. Use the PHP requirement of symfony/framework-bundle
93-
* Fix Travis-CI problem
94-
95-
## 1.0.4
96-
* Update to PSR-0 : https://github.com/pda/pheanstalk/commit/412ab5b7469538ab613efd8fb91b4adc84bf599f
97-
* Add warning about composer minimum-stability due to : https://github.com/armetiz/LeezyPheanstalkBundle/issues/8
98-
99-
## 1.0.3
100-
* Update code to pda/pheanstalk which is a PHP5.2 implementation.
101-
* BC still ok.
102-
103-
## 1.0.2
104-
* Add Unit Test
105-
* Throw exception when more than one connection have the default flag
106-
* Switch dependency from 'mrpoundsign/pheanstalk-5.3' to 'pda/pheanstalk'
107-
* Add TravisCI configuration
108-
109-
## 1.0.1
110-
* Fix dependency to pheanstalk-5.3. #4
111-
1121
## 1.0.0
1132
* Update README to be composer compliant.
1143
* First stable tag version.

README.md

Lines changed: 37 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,29 @@
1-
## LeezyPheanstalkBundle
1+
## PheanstalkBundle
22

33
[![Packagist Version](https://img.shields.io/packagist/v/pyrowman/pheanstalk-bundle)](https://packagist.org/packages/pyrowman/pheanstalk-bundle)
44
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/PyRowMan/pheanstalk-bundle/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/PyRowMan/pheanstalk-bundle/?branch=master)
55
[![Code Coverage](https://scrutinizer-ci.com/g/PyRowMan/pheanstalk-bundle/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/PyRowMan/pheanstalk-bundle/?branch=master)
66
[![Build Status](https://travis-ci.org/PyRowMan/pheanstalk-bundle.svg?branch=master)](https://travis-ci.org/PyRowMan/pheanstalk-bundle)
77

8-
[EvQueue workqueue](http://www.evqueue.net/) clients for Symfony2.
8+
[EvQueue workqueue](http://www.evqueue.net/) clients for Symfony3.
99

10-
The Pyrowman\LeezyPheanstalkBundle is a fork from [LeezyPheanstalkBundle](https://github.com/armetiz/LeezyPheanstalkBundle)
10+
The Pyrowman\PheanstalkBundle is a fork from [LeezyPheanstalkBundle](https://github.com/armetiz/LeezyPheanstalkBundle)
1111

12-
The Pyrowman\LeezyPheanstalkBundle is a Symfony2 Bundle that provides a [pheanstalk](https://github.com/pyrowman/pheanstalk) integration with the following features:
12+
The Pyrowman\PheanstalkBundle is a Symfony3 Bundle that provides a [pheanstalk](https://github.com/pyrowman/pheanstalk) integration with the following features:
1313
* Command Line Interface for manage the queues.
14-
* An integration to the Symfony2 event system.
15-
* An integration to the Symfony2 profiler system to monitor your beanstalk server.
16-
* An integration to the Symfony2 logger system.
14+
* An integration to the Symfony3 event system.
15+
* An integration to the Symfony3 profiler system to monitor your evqueue server.
16+
* An integration to the Symfony3 logger system.
1717
* A proxy system to customize the command features.
1818
* Auto-wiring: `PheanstalkInterface`
1919

2020

2121
Documentation :
22-
- [Installation](https://github.com/armetiz/LeezyPheanstalkBundle/blob/master/src/Resources/doc/1-installation.md)
23-
- [Configuration](https://github.com/armetiz/LeezyPheanstalkBundle/blob/master/src/Resources/doc/2-configuration.md)
24-
- [CLI Usage](https://github.com/armetiz/LeezyPheanstalkBundle/blob/master/src/Resources/doc/3-cli.md)
25-
- [Events](https://github.com/armetiz/LeezyPheanstalkBundle/blob/master/src/Resources/doc/4-events.md)
26-
- [Custom proxy](https://github.com/armetiz/LeezyPheanstalkBundle/blob/master/src/Resources/doc/5-custom-proxy.md)
27-
- [Extra - Beanstalk Manager](https://github.com/armetiz/LeezyPheanstalkBundle/blob/master/src/Resources/doc/6-extra-beanstalk-manager.md)
28-
- [Extra - Proxy to prefix tubes](https://github.com/h4cc/LeezyPheanstalkBundleExtra)
22+
- [Installation](https://github.com/PyRowMan/pheanstalk-bundle/blob/master/src/Resources/doc/1-installation.md)
23+
- [Configuration](https://github.com/PyRowMan/pheanstalk-bundle/blob/master/src/Resources/doc/2-configuration.md)
24+
- [CLI Usage](https://github.com/PyRowMan/pheanstalk-bundle/blob/master/src/Resources/doc/3-cli.md)
25+
- [Events](https://github.com/PyRowMan/pheanstalk-bundle/blob/master/src/Resources/doc/4-events.md)
26+
- [Custom proxy](https://github.com/PyRowMan/pheanstalk-bundle/blob/master/src/Resources/doc/5-custom-proxy.md)
2927

3028
## Usage example
3129

@@ -34,15 +32,20 @@ Documentation :
3432

3533
namespace Acme\DemoBundle\Controller;
3634

37-
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
35+
use Pheanstalk\Structure\Schedule;
36+
use Pheanstalk\Structure\TimeSchedule;
37+
use Pyrowman\PheanstalkBundle\Proxy\PheanstalkProxy;
38+
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
39+
use Symfony\Component\DependencyInjection\ContainerInterface;
3840

39-
class HomeController extends Controller {
41+
class HomeController extends AbstractController
42+
{
4043

4144
public function indexAction() {
4245

4346
$sc = $this->get('service_container');
4447
/** @var PheanstalkProxy $pheanstalk */
45-
$pheanstalk = $sc->get("leezy.pheanstalk");
48+
$pheanstalk = $sc->get("pheanstalk");
4649

4750
// Create a simple Worflow with one task inside
4851

@@ -59,8 +62,8 @@ class HomeController extends Controller {
5962

6063
//-----------------------------------------
6164
// Add a scheduler for the job (by default in continous)
62-
63-
$workflowSchedule = $pheanstalk->createSchedule($workflow, new TimeSchedule());
65+
$schedule = new Schedule($workflow->getId(), new TimeSchedule());
66+
$workflowSchedule = $pheanstalk->createSchedule($schedule);
6467

6568
//-----------------------------------------
6669
// Edit a workflow
@@ -97,8 +100,21 @@ class HomeController extends Controller {
97100
## Testing
98101

99102
```bash
100-
$ php composer.phar update
101-
$ phpunit
103+
# ensure you have Composer set up
104+
$ wget http://getcomposer.org/composer.phar
105+
$ php composer.phar install
106+
107+
$ bin/phpunit
108+
PHPUnit 7.1.2 by Sebastian Bergmann and contributors.
109+
110+
.......................................................... 58 / 58 (100%)
111+
112+
Time: 11.36 seconds, Memory: 16.00 MB
113+
114+
OK (58 tests, 98 assertions)
115+
116+
Generating code coverage report in HTML format ... done
117+
102118
```
103119

104120
## License

phpunit.xml.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<!--<log type="junit" target="build/logs/junit.xml"/>-->
1010
</logging>
1111
<testsuites>
12-
<testsuite name="LeezyPheanstalkBundle test suite">
12+
<testsuite name="PheanstalkBundle test suite">
1313
<directory suffix="Test.php">./tests</directory>
1414
</testsuite>
1515
</testsuites>

src/DependencyInjection/Configuration.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function getConfigTreeBuilder()
3939
->end()
4040
->scalarNode('port')
4141
->cannotBeEmpty()
42-
->defaultValue('11300')
42+
->defaultValue('5000')
4343
->end()
4444
->scalarNode('user')
4545
->cannotBeEmpty()

src/Resources/doc/1-installation.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22

33
Installation is a quick 3 step process:
44

5-
1. Download LeezyPheanstalkBundle using composer
5+
1. Download PheanstalkBundle using composer
66
2. Enable the Bundle
77
3. Configure your application's config.yml
88

9-
### Step 1: Require LeezyPheanstalkBundle
9+
### Step 1: Require PheanstalkBundle
1010

1111
Tell composer to require this bundle by running:
1212

1313
``` bash
14-
$ composer require leezy/pheanstalk-bundle
14+
$ composer require pyrowman/pheanstalk-bundle
1515
```
1616

1717
### Step 2: Enable the bundle
@@ -26,7 +26,7 @@ public function registerBundles()
2626
{
2727
$bundles = array(
2828
// ...
29-
new Leezy\PheanstalkBundle\LeezyPheanstalkBundle(),
29+
new Pyrowman\PheanstalkBundle\PheanstalkBundle(),
3030
);
3131
}
3232
```
@@ -37,9 +37,11 @@ Finally, add the following to your config.yml
3737

3838
``` yaml
3939
# app/config/config.yml
40-
leezy_pheanstalk:
40+
pheanstalk:
4141
pheanstalks:
4242
primary:
43-
server: beanstalkd.domain.tld
43+
server: evqueue.domain.tld
44+
user: my_awesome_login_from_env_file
45+
password: my_awesome_password_from_env_file
4446
default: true
4547
```

src/Resources/doc/2-configuration.md

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,49 +3,57 @@
33
This bundle can be configured, and this is the list of what you can do :
44
* Create many pheanstalk client.
55
* Define specific server / host for each connection.
6-
* Define specific port for each connection. This option is optional and default value is 11300.
6+
* Define specific port for each connection. This option is optional and default value is 5000.
77
* Define specific timeout for each connection. Timeout refere to the connection timeout. This option is optional and default value is 60.
88
* Use custom proxy for pheanstalk client.
99
* Disable this bundle. This options is optional and default value is true.
1010

1111
``` yaml
1212
# app/config/config.yml
13-
leezy_pheanstalk:
13+
pheanstalk:
1414
pheanstalks:
1515
primary:
16-
server: beanstalkd.domain.tld
16+
server: evqueue.domain.tld
17+
user: my_awesome_login_from_env_file
18+
password: my_awesome_password_from_env_file
1719
port: 11300
1820
timeout: 60
1921
secondary:
20-
server: beanstalkd-2.domain.tld
22+
server: evqueue-2.domain.tld
23+
user: my_awesome_login_from_env_file
24+
password: my_awesome_password_from_env_file
2125
default: true
2226
proxy: acme.pheanstalk
2327
profiler:
2428
enabled: true
25-
template: 'LeezyPheanstalkBundle:Profiler:pheanstalk.html.twig'
29+
template: 'PheanstalkBundle:Profiler:pheanstalk.html.twig'
2630
```
2731
28-
*acme.pheanstalk* is a custom proxy which implements the *Leezy\PheanstalkBundle\Proxy\PheanstalkProxyInterface* interface.
32+
*acme.pheanstalk* is a custom proxy which implements the *PyRowMan\PheanstalkBundle\Proxy\PheanstalkProxyInterface* interface.
2933
3034
**Note:**
3135
```
32-
You can retreive each pheanstalk using the container with "leezy.pheanstalk.[pheanstalk_name]".
33-
When you define a "default" pheanstalk. You can have a direct access to it with "leezy.pheanstalk".
36+
You can retreive each pheanstalk using the container with "pheanstalk.[pheanstalk_name]".
37+
When you define a "default" pheanstalk. You can have a direct access to it with "pheanstalk".
3438
```
3539

36-
``` php
40+
```php
3741
<?php
3842

3943
namespace Acme\DemoBundle\Controller;
4044

41-
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
45+
use Pheanstalk\Structure\Schedule;
46+
use Pheanstalk\Structure\TimeSchedule;
47+
use Pyrowman\PheanstalkBundle\Proxy\PheanstalkProxy;
48+
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
49+
use Symfony\Component\DependencyInjection\ContainerInterface;
4250

43-
class HomeController extends Controller
51+
class HomeController extends AbstractController
4452
{
4553
public function indexAction()
4654
{
47-
$pheanstalkPrimary = $this->get("leezy.pheanstalk.primary");
48-
$pheanstalkSecondary = $this->get("leezy.pheanstalk");
55+
$pheanstalkPrimary = $this->get("pheanstalk.primary");
56+
$pheanstalkSecondary = $this->get("pheanstalk");
4957

5058
// ----------------------------------------
5159
// producer (queues jobs) on beanstalk.domain.tld
@@ -68,7 +76,7 @@ class HomeController extends Controller
6876

6977
// ----------------------------------------
7078
// on each defined pheanstalks
71-
$pheanstalkLocator = $this->get("leezy.pheanstalk.pheanstalk_locator");
79+
$pheanstalkLocator = $this->get("pheanstalk.pheanstalk_locator");
7280

7381
foreach ($pheanstalkLocator->getPheanstalks() as $pheanstalk) {
7482
$pheanstalk

0 commit comments

Comments
 (0)