Skip to content

Commit 0619a64

Browse files
jankonasenumag
authored andcommittedMay 31, 2019
Fix Latte 2.5 compatibility (#164)
* Remove Kdyby\StrictObjects\Scream trait from Kdyby\Translation\Latte\TranslateMacros since it's ancestor uses Tracy\Strict * Fix Kdyby\Monolog compatibility issue * Drop support for PHP < 7.1, add PHP 7.3 to tests * Move tests to the end of testing pipeline * Remove shortNoEscape (deprecated in Latte 2.4.0 and removed in Latte 2.5.0)
1 parent 6b0721c commit 0619a64

File tree

4 files changed

+8
-12
lines changed

4 files changed

+8
-12
lines changed
 

‎.travis.yml

+6-7
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,9 @@ cache:
77
- $HOME/.composer/cache
88

99
php:
10-
- 5.6
11-
- 7.0
1210
- 7.1
1311
- 7.2
12+
- 7.3
1413

1514
env:
1615
- # dev
@@ -20,14 +19,14 @@ env:
2019
matrix:
2120
fast_finish: true
2221
include:
23-
- php: 7.2
22+
- php: 7.3
2423
env: COMPOSER_EXTRA_ARGS="--prefer-stable" COVERAGE="--coverage ./coverage.xml --coverage-src ./src" TESTER_RUNTIME="phpdbg"
25-
- php: 7.2
24+
- php: 7.3
2625
env: COMPOSER_EXTRA_ARGS="--prefer-stable" PHPSTAN=1
27-
- php: 7.2
26+
- php: 7.3
2827
env: COMPOSER_EXTRA_ARGS="--prefer-stable" CODING_STANDARD=1
2928
exclude:
30-
- php: 7.2
29+
- php: 7.3
3130
env: COMPOSER_EXTRA_ARGS="--prefer-stable"
3231
allow_failures:
3332
- env:
@@ -40,10 +39,10 @@ install:
4039
- if [ "$COVERAGE" != "" ]; then travis_retry wget -O /tmp/coveralls.phar https://github.com/satooshi/php-coveralls/releases/download/v1.0.1/coveralls.phar; fi
4140

4241
script:
43-
- vendor/bin/tester $COVERAGE -s -p ${TESTER_RUNTIME:-php} -c ./tests/php.ini-unix ./tests/KdybyTests/
4442
- php /tmp/php-parallel-lint/parallel-lint.php -e php,phpt --exclude vendor .
4543
- if [ "$PHPSTAN" = "1" ]; then php vendor/phpstan/phpstan-shim/phpstan.phar analyse --ansi --no-progress -l7 -c phpstan.neon src tests/KdybyTests; fi
4644
- if [ "$CODING_STANDARD" = "1" ]; then php vendor/bin/phpcs --standard=ruleset.xml --encoding=utf-8 -sp src tests; fi
45+
- vendor/bin/tester $COVERAGE -s -p ${TESTER_RUNTIME:-php} -c ./tests/php.ini-unix ./tests/KdybyTests/
4746

4847
after_script:
4948
- if [ "$COVERAGE" != "" ]; then php /tmp/coveralls.phar --verbose --config tests/.coveralls.yml || true; fi

‎composer.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"issues": "https://github.com/kdyby/translation/issues"
1818
},
1919
"require": {
20-
"php": "^5.6 || ^7.0",
20+
"php": "^7.1",
2121
"kdyby/strict-objects": "^1.0",
2222
"latte/latte": "^2.4.6@dev",
2323
"nette/caching": "^2.5@dev",
@@ -45,7 +45,7 @@
4545
"nette/forms": "^2.4.6@dev",
4646
"tracy/tracy": "^2.4.9@dev",
4747
"kdyby/console": "^2.7.1@dev",
48-
"kdyby/monolog": "^1.3.2@dev",
48+
"kdyby/monolog": "^1.4.0@dev",
4949
"symfony/yaml": "^3.4 || ^4.0",
5050
"symfony/console": "^3.4 || ^4.0",
5151
"nette/tester": "^2.0",

‎src/Extractors/LatteExtractor.php

-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ public function extractFile($file, MessageCatalogue $catalogue)
4646
{
4747
$buffer = NULL;
4848
$parser = new Parser();
49-
$parser->shortNoEscape = TRUE;
5049

5150
foreach ($tokens = $parser->parse(file_get_contents($file)) as $token) {
5251
if ($token->type !== $token::MACRO_TAG || !in_array($token->name, ['_', '/_'], TRUE)) {

‎src/Latte/TranslateMacros.php

-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818
class TranslateMacros extends \Latte\Macros\MacroSet
1919
{
2020

21-
use \Kdyby\StrictObjects\Scream;
22-
2321
public static function install(Compiler $compiler)
2422
{
2523
$me = new static($compiler);

0 commit comments

Comments
 (0)