Skip to content

Commit 94820ac

Browse files
committed
Merge branch 'master' of github.com:php-translation/extractor into label-concat
2 parents f807230 + 0ffd4e1 commit 94820ac

File tree

77 files changed

+1267
-871
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+1267
-871
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: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
on: [push, pull_request]
2+
3+
name: Static analysis
4+
5+
jobs:
6+
php-cs-fixer:
7+
name: PHP-CS-Fixer
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@master
11+
- name: PHP-CS-Fixer
12+
uses: docker://jakzal/phpqa:php7.3-alpine
13+
with:
14+
args: php-cs-fixer fix --diff --dry-run -vvv
15+
16+
phpstan:
17+
name: PHPStan
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@master
21+
- name: PHPStan
22+
uses: docker://jakzal/phpqa:php7.3-alpine
23+
with:
24+
args: phpstan analyze --no-progress

.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 & 13 deletions
This file was deleted.

.styleci.yml

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

.travis.yml

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

Changelog.md

Lines changed: 59 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,56 @@
11
# Change Log
22

3-
The change log describes what is "Added", "Removed", "Changed" or "Fixed" between each release.
3+
The change log describes what is "Added", "Removed", "Changed" or "Fixed" between each release.
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+
23+
## 2.0.2
24+
25+
### Fixed
26+
27+
- Update image used in github actions to fix CS errors #153
28+
- Fixed error when using variable in transChoice() #151
29+
30+
### Added
31+
32+
- Knp menu extractors #152
33+
34+
## 2.0.1
35+
36+
### Fixed
37+
38+
- Avoid exception when calling `trans` with a variable.
39+
40+
### Added
41+
42+
- Added extractor for form field titles
43+
44+
## 2.0.0
45+
46+
- Add support of Symfony ^5.0
47+
- Add strict type hinting
48+
- Added `PHPFileExtractor::supportsExtension(): bool`
49+
- Removed `PHPFileExtractor::getType()`
50+
- Remove support of Twig 1.x (`Twig2Visitor` and `TwigVisitorFactory`)
51+
- Remove support of PHP < 7.2
52+
- Remove support of Symfony < 3.4
53+
754
## 1.7.1
855

956
### Fixed
@@ -14,16 +61,16 @@ The change log describes what is "Added", "Removed", "Changed" or "Fixed" betwee
1461

1562
### Added
1663

17-
- Support for `@translate` annotation.
64+
- Support for `@translate` annotation.
1865
- Better handle `@ignore` annotation on FormTypeChoices
1966

2067
## 1.6.0
2168

2269
### Added
2370

24-
- Support for Symfony form help.
71+
- Support for Symfony form help.
2572

26-
### Fixed
73+
### Fixed
2774

2875
- Fixed issue where using the `@ignore` annotation ignored the wrong property.
2976
- Do not run the Twig worker if we are not extracting.
@@ -32,20 +79,20 @@ The change log describes what is "Added", "Removed", "Changed" or "Fixed" betwee
3279

3380
### Fixed
3481

35-
- Fixed Fatal Error in FormTypeImplicit when using method call from variable
82+
- Fixed Fatal Error in FormTypeImplicit when using method call from variable
3683

3784
## 1.5.1
3885

3986
### Fixed
4087

41-
- Fixed bug where form option key `attr` is not an array.
88+
- Fixed bug where form option key `attr` is not an array.
4289

4390
## 1.5.0
4491

4592
### Added
4693

4794
- Support for `nikic/php-parser:^4`
48-
- Support for `array_*` callback in `SourceLocation::createHere`
95+
- Support for `array_*` callback in `SourceLocation::createHere`
4996
- Support for global 'translation_domain' in forms
5097
- Support for `@Ignore` annotation in $builder->add to prevent implicit label
5198

@@ -67,7 +114,7 @@ The change log describes what is "Added", "Removed", "Changed" or "Fixed" betwee
67114
### Fixed
68115

69116
- Respect `"label" => false`
70-
- Form type extractors will only operate on form type classes.
117+
- Form type extractors will only operate on form type classes.
71118

72119
## 1.3.1
73120

@@ -94,7 +141,7 @@ The change log describes what is "Added", "Removed", "Changed" or "Fixed" betwee
94141

95142
### Changed
96143

97-
- Added TwigVisitorFactory to create a TwigVisitor. TwigVisitor::create has been deprecated.
144+
- Added TwigVisitorFactory to create a TwigVisitor. TwigVisitor::create has been deprecated.
98145

99146
## 1.1.2
100147

@@ -104,7 +151,7 @@ The change log describes what is "Added", "Removed", "Changed" or "Fixed" betwee
104151

105152
### Added
106153

107-
- More test to prove correctness.
154+
- More test to prove correctness.
108155

109156
## 1.1.1
110157

@@ -122,14 +169,14 @@ The change log describes what is "Added", "Removed", "Changed" or "Fixed" betwee
122169

123170
### Deprecated
124171

125-
- `Twig\TranslationBlock` and `Twig\TranslationFilter`. Use `Twig\Twig1Visitor` instead.
172+
- `Twig\TranslationBlock` and `Twig\TranslationFilter`. Use `Twig\Twig1Visitor` instead.
126173

127174
## 1.0.0
128175

129176
## Added
130177

131178
- Extractor for classes implementing `TranslationSourceLocationContainer`
132-
- Made classes final
179+
- Made classes final
133180

134181
## 0.1.1
135182

@@ -142,4 +189,3 @@ The change log describes what is "Added", "Removed", "Changed" or "Fixed" betwee
142189

143190
Init release
144191

145-

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) PHP Translation team <[email protected]>
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

Makefile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
.PHONY: cs-fix phpstan
2+
3+
DIR := ${CURDIR}
4+
QA_IMAGE := jakzal/phpqa:php7.3-alpine
5+
6+
cs-lint:
7+
@docker run --rm -v $(DIR):/project -w /project $(QA_IMAGE) php-cs-fixer fix --diff-format udiff --dry-run -vvv
8+
9+
cs-fix:
10+
@docker run --rm -v $(DIR):/project -w /project $(QA_IMAGE) php-cs-fixer fix --diff-format udiff -vvv
11+
12+
phpstan:
13+
@docker run --rm -v $(DIR):/project -w /project $(QA_IMAGE) phpstan analyse

0 commit comments

Comments
 (0)