Skip to content

Commit

Permalink
Update README for new release
Browse files Browse the repository at this point in the history
  • Loading branch information
mac-cain13 committed Apr 17, 2020
1 parent 5efd48c commit a5c62d4
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ Use composer to include it into your Symfony project:

### What version to use?
Symfony did make some breaking changes, so you should make sure to use a compatible bundle version:
* Version 2.1.* for Symfony 4.0 and higher
* Version 2.0.* for Symfony 3.0 - 3.4
* Version 1.3.* for Symfony 2.8
* Version 3.0.* for Symfony 4 and 5 and higher
* Version 2.0.* for Symfony 3
* Version 1.3.* for Symfony 2.8+

When upgrading, please consult the [changelog](Changelog.md) to see what could break your code.

Expand All @@ -36,7 +36,7 @@ class MinimalDemoCommand extends EndlessCommand
protected function configure()
{
$this->setName('acme:minimaldemo')
->setDescription('An EndlessCommand implementation example');
->setDescription('An EndlessCommand implementation example');
}

// Execute will be called in a endless loop
Expand Down Expand Up @@ -82,8 +82,6 @@ Memory usage is very important for long running processes. Symfony is not the sm
### How to prevent leaks?
Always start your command with the `-e prod --no-debug` flags. This disables all debugging features of Symfony that will eat up more and more memory.

Do not use Monolog in Symfony 2.2 and lower, there is a [bug in the MonologBundle](https://github.com/symfony/MonologBundle/issues/37) that starts the debughandler even though you disable the profiler. This eats up your memory. Note that this is [fixed](https://github.com/symfony/MonologBundle/commit/1fc0864a9344b15a04ed90612a91cf8e5b8fb305) in Symfony 2.3 and up.

Make sure you cleanup in the `execute`-method, make sure you're not appending data to an array every iteration or leave sockets/file handles open for example.

In case you are using the fingers-crossed handler in Monolog, this will also be a source of memory leaks. The idea of this handler is to keep all below-threshold log entries in memory and only flush those in case of an above-threshold entry. You can still use the fingers-crossed handler as long as you manually flush it at the end of the `execute`-method:
Expand Down

0 comments on commit a5c62d4

Please sign in to comment.