Skip to content

Commit

Permalink
Explicitly register commands (#33)
Browse files Browse the repository at this point in the history
* ISSUE-32:
- Register `cronos:dump` and `cronos:replace` in the service container.
- Added `.idea` into `.gitignore`.
- Little correction for the documentation.

* ISSUE-32:
- Fixed problem with Symfony 2

* ISSUE-32:
- Removed `.idea` from the `.gitignore` according to the code review.
  • Loading branch information
adrenalinkin authored and gavinlove committed Nov 27, 2018
1 parent 9e28d42 commit 6ad70bf
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,21 @@ Uses the [Cronos](https://github.com/mybuilder/cronos) library to do the actual

## Installation

**Note:** If you use Symfony 3 or higher you should replace `app/console` with `bin/console`.

### Install with composer

Run the composer require command:

``` bash
```bash
$ php composer.phar require mybuilder/cronos-bundle
```

### Enable the bundle

Enable the bundle in the `app/AppKernel.php`:

``` php
```php
public function registerBundles() {
$bundles = array(
new MyBuilder\Bundle\CronosBundle\MyBuilderCronosBundle(),
Expand Down
11 changes: 10 additions & 1 deletion Resources/config/services.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
services:

mybuilder.cronos_bundle.annotation_cron_exporter:
class: MyBuilder\Bundle\CronosBundle\Exporter\AnnotationCronExporter
public: true
Expand All @@ -8,6 +7,16 @@ services:
calls:
- [ setConfig, ["%mybuilder.cronos_bundle.exporter_config%"] ]

mybuilder.cronos_bundle.command.dump:
class: MyBuilder\Bundle\CronosBundle\Command\DumpCommand
tags:
- { name: 'console.command' }

mybuilder.cronos_bundle.command.replace:
class: MyBuilder\Bundle\CronosBundle\Command\ReplaceCommand
tags:
- { name: 'console.command' }

mybuilder.cronos_bundle.cron_process_updater:
class: MyBuilder\Cronos\Updater\CronUpdater
public: true
Expand Down

0 comments on commit 6ad70bf

Please sign in to comment.