Skip to content

Commit 943de9c

Browse files
committed
Merge pull request #29 from umpirsky/feature/update-dependencies
Update dependencies
2 parents a2cdf86 + b52504f commit 943de9c

File tree

10 files changed

+35
-885
lines changed

10 files changed

+35
-885
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1+
bin
12
vendor
23
phpunit.xml
4+
composer.lock

.travis.yml

+9-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
language: php
22

3-
before_script:
4-
- curl -s http://getcomposer.org/installer | php
5-
- php composer.phar install --dev
6-
73
php:
84
- 5.3
95
- 5.4
6+
- 5.5
7+
- 5.6
8+
- 7.0
9+
- hhvm
10+
11+
before_script:
12+
- composer install --dev
1013

14+
script:
15+
- phpunit

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) Саша Стаменковић <[email protected]>
1+
Copyright (c) Saša Stamenković <[email protected]>
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

README.md

-12
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,3 @@ Now you may add your custom extensions [here](https://github.com/umpirsky/Twig-G
4646
$twig->addFunction(new \Twig_SimpleFunction('myCustomExtension', true));
4747
$twig->addFunction(new \Twig_SimpleFunction('myCustomExtension2', true));
4848
```
49-
50-
## Tests
51-
52-
To run the test suite, you need [composer](http://getcomposer.org) and
53-
[PHPUnit](https://github.com/sebastianbergmann/phpunit).
54-
55-
$ composer install --dev
56-
$ phpunit
57-
58-
## License
59-
60-
Twig Gettext Extractor is licensed under the MIT license.

Twig/Gettext/Extractor.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/**
44
* This file is part of the Twig Gettext utility.
55
*
6-
* (c) Саша Стаменковић <[email protected]>
6+
* (c) Saša Stamenković <[email protected]>
77
*
88
* For the full copyright and license information, please view the LICENSE
99
* file that was distributed with this source code.
@@ -16,7 +16,7 @@
1616
/**
1717
* Extracts translations from twig templates.
1818
*
19-
* @author Саша Стаменковић <[email protected]>
19+
* @author Saša Stamenković <[email protected]>
2020
*/
2121
class Extractor
2222
{
@@ -70,8 +70,8 @@ public function setGettextParameters(array $parameters)
7070
public function extract()
7171
{
7272
$command = 'xgettext';
73-
$command .= ' '.join(' ', $this->parameters);
74-
$command .= ' '.join(' ', $this->templates);
73+
$command .= ' '.implode(' ', $this->parameters);
74+
$command .= ' '.implode(' ', $this->templates);
7575

7676
$error = 0;
7777
$output = system($command, $error);

Twig/Gettext/Loader/Filesystem.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/**
44
* This file is part of the Twig Gettext utility.
55
*
6-
* (c) Саша Стаменковић <[email protected]>
6+
* (c) Saša Stamenković <[email protected]>
77
*
88
* For the full copyright and license information, please view the LICENSE
99
* file that was distributed with this source code.
@@ -14,7 +14,7 @@
1414
/**
1515
* Loads template from the filesystem.
1616
*
17-
* @author Саша Стаменковић <[email protected]>
17+
* @author Saša Stamenković <[email protected]>
1818
*/
1919
class Filesystem extends \Twig_Loader_Filesystem
2020
{

Twig/Gettext/Routing/Generator/UrlGenerator.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/**
44
* This file is part of the Twig Gettext utility.
55
*
6-
* (c) Саша Стаменковић <[email protected]>
6+
* (c) Saša Stamenković <[email protected]>
77
*
88
* For the full copyright and license information, please view the LICENSE
99
* file that was distributed with this source code.
@@ -17,7 +17,7 @@
1717
/**
1818
* Dummy url generator.
1919
*
20-
* @author Саша Стаменковић <[email protected]>
20+
* @author Saša Stamenković <[email protected]>
2121
*/
2222
class UrlGenerator implements UrlGeneratorInterface
2323
{

Twig/Gettext/Test/ExtractorTest.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/**
44
* This file is part of the Twig Gettext utility.
55
*
6-
* (c) Саша Стаменковић <[email protected]>
6+
* (c) Saša Stamenković <[email protected]>
77
*
88
* For the full copyright and license information, please view the LICENSE
99
* file that was distributed with this source code.
@@ -16,7 +16,7 @@
1616
use Symfony\Component\Translation\Loader\PoFileLoader;
1717

1818
/**
19-
* @author Саша Стаменковић <[email protected]>
19+
* @author Saša Stamenković <[email protected]>
2020
*/
2121
class ExtractorTest extends \PHPUnit_Framework_TestCase
2222
{
@@ -33,8 +33,8 @@ class ExtractorTest extends \PHPUnit_Framework_TestCase
3333
protected function setUp()
3434
{
3535
$this->twig = new \Twig_Environment(new Filesystem('/'), array(
36-
'cache' => '/tmp/cache/'.uniqid(),
37-
'auto_reload' => true
36+
'cache' => '/tmp/cache/'.uniqid(),
37+
'auto_reload' => true,
3838
));
3939
$this->twig->addExtension(new \Twig_Extensions_Extension_I18n());
4040

composer.json

+11-7
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,21 @@
1313
"php": ">=5.3.3",
1414
"twig/twig": "~1.2",
1515
"twig/extensions": "~1.0",
16-
"symfony/twig-bridge": "~2.0",
17-
"symfony/routing": "~2.0",
18-
"symfony/filesystem": "~2.0",
19-
"symfony/translation": "~2.0",
20-
"symfony/form": "~2.0"
16+
"symfony/twig-bridge": "~2.7",
17+
"symfony/routing": "~2.7",
18+
"symfony/filesystem": "~2.7",
19+
"symfony/translation": "~2.7",
20+
"symfony/form": "~2.7"
2121
},
2222
"require-dev": {
23-
"symfony/config": "2.1.*"
23+
"symfony/config": "~2.7",
24+
"phpunit/phpunit": "~4.8"
2425
},
2526
"autoload": {
2627
"psr-0": { "Twig\\Gettext": "." }
2728
},
28-
"bin": ["twig-gettext-extractor"]
29+
"bin": ["twig-gettext-extractor"],
30+
"config": {
31+
"bin-dir": "bin"
32+
}
2933
}

0 commit comments

Comments
 (0)