Skip to content

Commit

Permalink
Prepare release
Browse files Browse the repository at this point in the history
  • Loading branch information
sagikazarmark committed Jun 25, 2016
1 parent e0d7007 commit 5528f6c
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Change Log


## Unreleased
## 1.0.0 - 2016-06-25

- Initial release
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ $ composer require gravatarphp/twig-integration
## Usage

``` php
use Gravatar\UrlBuilder;
use Gravatar\Gravatar;
use Gravatar\Twig\GravatarExtension;

$extension = new GravatarExtension(new UrlBuilder());
$extension = new GravatarExtension(new Gravatar());

$environment->addExtension($extension);
```
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
],
"require": {
"php": ">=5.4",
"gravatarphp/gravatar": "^1.0@alpha",
"gravatarphp/gravatar": "^1.0",
"twig/twig": "^1.18"
},
"require-dev": {
Expand All @@ -31,7 +31,7 @@
},
"extra": {
"branch-alias": {
"dev-master": "0.1-dev"
"dev-master": "1.0-dev"
}
},
"prefer-stable": true,
Expand Down
20 changes: 10 additions & 10 deletions src/GravatarExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Gravatar\Twig;

use Gravatar\UrlBuilder;
use Gravatar\Gravatar;

/**
* Gravatar Twig extension.
Expand All @@ -12,16 +12,16 @@
class GravatarExtension extends \Twig_Extension
{
/**
* @var UrlBuilder
* @var Gravatar
*/
protected $urlBuilder;
protected $gravatar;

/**
* @param UrlBuilder $urlBuilder
* @param Gravatar $gravatar
*/
public function __construct(UrlBuilder $urlBuilder)
public function __construct(Gravatar $gravatar)
{
$this->urlBuilder = $urlBuilder;
$this->gravatar = $gravatar;
}

/**
Expand All @@ -30,10 +30,10 @@ public function __construct(UrlBuilder $urlBuilder)
public function getFilters()
{
return [
new \Twig_SimpleFilter('gravatar_avatar', [$this->urlBuilder, 'avatar']),
new \Twig_SimpleFilter('gravatar_profile', [$this->urlBuilder, 'profile']),
new \Twig_SimpleFilter('gravatar_vcard', [$this->urlBuilder, 'vcard']),
new \Twig_SimpleFilter('gravatar_qrCode', [$this->urlBuilder, 'qrCode']),
new \Twig_SimpleFilter('gravatar_avatar', [$this->gravatar, 'avatar']),
new \Twig_SimpleFilter('gravatar_profile', [$this->gravatar, 'profile']),
new \Twig_SimpleFilter('gravatar_vcard', [$this->gravatar, 'vcard']),
new \Twig_SimpleFilter('gravatar_qrCode', [$this->gravatar, 'qrCode']),
];
}

Expand Down
4 changes: 2 additions & 2 deletions tests/IntegrationTest.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?php

use Gravatar\UrlBuilder;
use Gravatar\Gravatar;
use Gravatar\Twig\GravatarExtension;

class IntegrationTest extends Twig_Test_IntegrationTestCase
{
public function getExtensions()
{
return [new GravatarExtension(new UrlBuilder())];
return [new GravatarExtension(new Gravatar())];
}

public function getFixturesDir()
Expand Down

0 comments on commit 5528f6c

Please sign in to comment.