Skip to content

Commit

Permalink
Symfony 3
Browse files Browse the repository at this point in the history
  • Loading branch information
eschmar committed Jan 19, 2019
1 parent 1cf2099 commit c86c838
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,24 @@ Uses a range of +-7 days, after that, the actual date is returned.
## Install
Composer (<a href="https://packagist.org/packages/eschmar/time-ago-bundle" target="_blank">Packagist</a>):
```sh
composer require eschmar/time-ago-bundle ~v0.4
composer require eschmar/time-ago-bundle ~v0.4.0 # Symfony ^2.8
composer require eschmar/time-ago-bundle ~v0.5.0 # Symfony ^3.4
```

app/Appkernel.php:
```php
new Eschmar\TimeAgoBundle\EschmarTimeAgoBundle(),
```

Make sure that a translator is enabled in `config.yml`.
```yml
parameters:
locale: en

framework:
translator: { fallbacks: ['%locale%'] }
```
## Usage
```php
$now = new \DateTime();
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
},
"target-dir": "Eschmar/TimeAgoBundle",
"require": {
"php": ">=5.3.3",
"symfony/symfony": ">2.7"
"php": ">=5.6.0",
"symfony/symfony": ">=3.4.0"
}
}

0 comments on commit c86c838

Please sign in to comment.