Skip to content

Commit 8f58bb9

Browse files
Merge branch 'php-translation:master' into symfony-placeholder-as-array
2 parents 3bf89ca + 0ffd4e1 commit 8f58bb9

File tree

11 files changed

+95
-93
lines changed

11 files changed

+95
-93
lines changed

.github/workflows/ci.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
build:
8+
name: Test
9+
runs-on: ubuntu-latest
10+
strategy:
11+
fail-fast: false
12+
matrix:
13+
php: [ '7.2', '7.3', '7.4', '8.0', '8.1' ]
14+
strategy: [ 'highest' ]
15+
sf_version: ['']
16+
include:
17+
- php: 7.4
18+
strategy: 'lowest'
19+
- php: 7.3
20+
sf_version: '4.*'
21+
22+
steps:
23+
- name: Checkout code
24+
uses: actions/checkout@v2
25+
26+
- name: Set up PHP
27+
uses: shivammathur/setup-php@v2
28+
with:
29+
php-version: ${{ matrix.php }}
30+
coverage: none
31+
tools: flex
32+
33+
- name: Download dependencies
34+
uses: ramsey/composer-install@v1
35+
env:
36+
SYMFONY_REQUIRE: ${{ matrix.sf_version }}
37+
with:
38+
dependency-versions: ${{ matrix.strategy }}
39+
composer-options: --no-interaction --prefer-dist --optimize-autoloader
40+
41+
- name: Install PHPUnit
42+
run: ./vendor/bin/simple-phpunit install
43+
44+
- name: Run tests
45+
run: ./vendor/bin/simple-phpunit

.github/workflows/static.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
- name: PHP-CS-Fixer
1212
uses: docker://jakzal/phpqa:php7.3-alpine
1313
with:
14-
args: php-cs-fixer fix --dry-run --diff-format udiff -vvv
14+
args: php-cs-fixer fix --diff --dry-run -vvv
1515

1616
phpstan:
1717
name: PHPStan

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/.phpunit.result.cache
12
/behat.yml
23
/build/
34
/composer.lock

.php-cs-fixer.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?php
2+
$finder = PhpCsFixer\Finder::create()
3+
->in(__DIR__.'/src')
4+
->in(__DIR__.'/tests')
5+
->exclude('Resources')
6+
->name('*.php')
7+
;
8+
9+
$config = new PhpCsFixer\Config();
10+
$config
11+
->setRiskyAllowed(true)
12+
->setRules([
13+
'@Symfony' => true,
14+
'@Symfony:risky' => true,
15+
])
16+
->setFinder($finder)
17+
;
18+
19+
return $config;

.php_cs

Lines changed: 0 additions & 18 deletions
This file was deleted.

.travis.yml

Lines changed: 0 additions & 65 deletions
This file was deleted.

Changelog.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,22 @@ The change log describes what is "Added", "Removed", "Changed" or "Fixed" betwee
44

55
## UNRELEASED
66

7+
## 2.0.4
8+
9+
### Added
10+
* Add GitHub Actions CI config by @bocharsky-bw in https://github.com/php-translation/extractor/pull/164
11+
* Add return type to fix deprecation by @gimler in https://github.com/php-translation/extractor/pull/161
12+
13+
### Removed
14+
* Remove phpcs-fixer --diff-fomat option by @gimler in https://github.com/php-translation/extractor/pull/163
15+
* Delete Travis config - repo migrated to GitHub Actions by @bocharsky-bw in https://github.com/php-translation/extractor/pull/162
16+
17+
## 2.0.3
18+
19+
### Added
20+
21+
- Add support for PHP 8 #157
22+
723
## 2.0.2
824

925
### Fixed

composer.json

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,17 @@
99
}
1010
],
1111
"require": {
12-
"php": "^7.2",
12+
"php": "^7.2 || ^8.0",
1313
"nikic/php-parser": "^3.0 || ^4.0",
14-
"symfony/finder": "^3.4 || ^4.3 || ^5.0",
14+
"symfony/finder": "^3.4 || ^4.4 || ^5.0",
1515
"twig/twig": "^2.0 || ^3.0",
16-
"doctrine/annotations": "^1.2"
16+
"doctrine/annotations": "^1.7"
1717
},
1818
"require-dev": {
1919
"symfony/phpunit-bridge": "^5.0",
20-
"symfony/translation": "^3.4 || ^4.3 || ^5.0",
21-
"symfony/validator": "^3.4 || ^4.3 || ^5.0",
22-
"symfony/twig-bridge": "^3.4 || ^4.3 || ^5.0",
23-
"phpunit/phpunit": "^8.4",
20+
"symfony/translation": "^3.4 || ^4.4 || ^5.0",
21+
"symfony/validator": "^3.4 || ^4.4 || ^5.0",
22+
"symfony/twig-bridge": "^3.4 || ^4.4 || ^5.0",
2423
"knplabs/knp-menu": "^3.1"
2524
},
2625
"autoload": {

phpunit.xml.dist

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@
1111
bootstrap="./tests/bootstrap.php"
1212
>
1313

14+
<php>
15+
<env name="SYMFONY_PHPUNIT_VERSION" value="8.5" />
16+
<env name="SYMFONY_DEPRECATIONS_HELPER" value="verbose=1" />
17+
</php>
18+
1419
<listeners>
1520
<listener class="Symfony\Bridge\PhpUnit\SymfonyTestsListener"/>
1621
</listeners>

src/Visitor/Twig/TwigVisitor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public function leaveNode(Node $node, Environment $env): ?Node
5959
/**
6060
* {@inheritdoc}
6161
*/
62-
public function getPriority()
62+
public function getPriority(): int
6363
{
6464
return 0;
6565
}

0 commit comments

Comments
 (0)