Skip to content

Commit b0b5c77

Browse files
committed
Merge branch 'master' of github.com:php-translation/extractor into delete-travis-config
2 parents 487424f + e986aa9 commit b0b5c77

File tree

8 files changed

+77
-26
lines changed

8 files changed

+77
-26
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.

composer.json

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,15 @@
1111
"require": {
1212
"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/Worker.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
*/
2828
final class Worker
2929
{
30-
const UNDEFINED_DOMAIN = 'messages';
30+
public const UNDEFINED_DOMAIN = 'messages';
3131

3232
private $stack = [];
3333

0 commit comments

Comments
 (0)