Skip to content

Commit

Permalink
Merge pull request #29 from umpirsky/feature/update-dependencies
Browse files Browse the repository at this point in the history
Update dependencies
  • Loading branch information
umpirsky committed Oct 25, 2015
2 parents a2cdf86 + b52504f commit 943de9c
Show file tree
Hide file tree
Showing 10 changed files with 35 additions and 885 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
bin
vendor
phpunit.xml
composer.lock
13 changes: 9 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
language: php

before_script:
- curl -s http://getcomposer.org/installer | php
- php composer.phar install --dev

php:
- 5.3
- 5.4
- 5.5
- 5.6
- 7.0
- hhvm

before_script:
- composer install --dev

script:
- phpunit
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) Саша Стаменковић <umpirsky@gmail.com>
Copyright (c) Saša Stamenković <umpirsky@gmail.com>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
12 changes: 0 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,3 @@ Now you may add your custom extensions [here](https://github.com/umpirsky/Twig-G
$twig->addFunction(new \Twig_SimpleFunction('myCustomExtension', true));
$twig->addFunction(new \Twig_SimpleFunction('myCustomExtension2', true));
```

## Tests

To run the test suite, you need [composer](http://getcomposer.org) and
[PHPUnit](https://github.com/sebastianbergmann/phpunit).

$ composer install --dev
$ phpunit

## License

Twig Gettext Extractor is licensed under the MIT license.
8 changes: 4 additions & 4 deletions Twig/Gettext/Extractor.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/**
* This file is part of the Twig Gettext utility.
*
* (c) Саша Стаменковић <umpirsky@gmail.com>
* (c) Saša Stamenković <umpirsky@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
Expand All @@ -16,7 +16,7 @@
/**
* Extracts translations from twig templates.
*
* @author Саша Стаменковић <umpirsky@gmail.com>
* @author Saša Stamenković <umpirsky@gmail.com>
*/
class Extractor
{
Expand Down Expand Up @@ -70,8 +70,8 @@ public function setGettextParameters(array $parameters)
public function extract()
{
$command = 'xgettext';
$command .= ' '.join(' ', $this->parameters);
$command .= ' '.join(' ', $this->templates);
$command .= ' '.implode(' ', $this->parameters);
$command .= ' '.implode(' ', $this->templates);

$error = 0;
$output = system($command, $error);
Expand Down
4 changes: 2 additions & 2 deletions Twig/Gettext/Loader/Filesystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/**
* This file is part of the Twig Gettext utility.
*
* (c) Саша Стаменковић <umpirsky@gmail.com>
* (c) Saša Stamenković <umpirsky@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
Expand All @@ -14,7 +14,7 @@
/**
* Loads template from the filesystem.
*
* @author Саша Стаменковић <umpirsky@gmail.com>
* @author Saša Stamenković <umpirsky@gmail.com>
*/
class Filesystem extends \Twig_Loader_Filesystem
{
Expand Down
4 changes: 2 additions & 2 deletions Twig/Gettext/Routing/Generator/UrlGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/**
* This file is part of the Twig Gettext utility.
*
* (c) Саша Стаменковић <umpirsky@gmail.com>
* (c) Saša Stamenković <umpirsky@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
Expand All @@ -17,7 +17,7 @@
/**
* Dummy url generator.
*
* @author Саша Стаменковић <umpirsky@gmail.com>
* @author Saša Stamenković <umpirsky@gmail.com>
*/
class UrlGenerator implements UrlGeneratorInterface
{
Expand Down
8 changes: 4 additions & 4 deletions Twig/Gettext/Test/ExtractorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/**
* This file is part of the Twig Gettext utility.
*
* (c) Саша Стаменковић <umpirsky@gmail.com>
* (c) Saša Stamenković <umpirsky@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
Expand All @@ -16,7 +16,7 @@
use Symfony\Component\Translation\Loader\PoFileLoader;

/**
* @author Саша Стаменковић <umpirsky@gmail.com>
* @author Saša Stamenković <umpirsky@gmail.com>
*/
class ExtractorTest extends \PHPUnit_Framework_TestCase
{
Expand All @@ -33,8 +33,8 @@ class ExtractorTest extends \PHPUnit_Framework_TestCase
protected function setUp()
{
$this->twig = new \Twig_Environment(new Filesystem('/'), array(
'cache' => '/tmp/cache/'.uniqid(),
'auto_reload' => true
'cache' => '/tmp/cache/'.uniqid(),
'auto_reload' => true,
));
$this->twig->addExtension(new \Twig_Extensions_Extension_I18n());

Expand Down
18 changes: 11 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,21 @@
"php": ">=5.3.3",
"twig/twig": "~1.2",
"twig/extensions": "~1.0",
"symfony/twig-bridge": "~2.0",
"symfony/routing": "~2.0",
"symfony/filesystem": "~2.0",
"symfony/translation": "~2.0",
"symfony/form": "~2.0"
"symfony/twig-bridge": "~2.7",
"symfony/routing": "~2.7",
"symfony/filesystem": "~2.7",
"symfony/translation": "~2.7",
"symfony/form": "~2.7"
},
"require-dev": {
"symfony/config": "2.1.*"
"symfony/config": "~2.7",
"phpunit/phpunit": "~4.8"
},
"autoload": {
"psr-0": { "Twig\\Gettext": "." }
},
"bin": ["twig-gettext-extractor"]
"bin": ["twig-gettext-extractor"],
"config": {
"bin-dir": "bin"
}
}
Loading

0 comments on commit 943de9c

Please sign in to comment.