Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php: [ '8.1', '8.2', '8.3' ]
php: [ '8.2', '8.3', '8.4', '8.5' ]
strategy: [ 'highest' ]
sf_version: ['']

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
steps:
- uses: actions/checkout@master
- name: PHP-CS-Fixer
uses: docker://jakzal/phpqa:php8.1-alpine
uses: docker://jakzal/phpqa:php8.2-alpine
with:
args: php-cs-fixer fix --diff --dry-run -vvv

Expand All @@ -19,6 +19,6 @@ jobs:
steps:
- uses: actions/checkout@master
- name: PHPStan
uses: docker://jakzal/phpqa:php8.1-alpine
uses: docker://jakzal/phpqa:php8.2-alpine
with:
args: phpstan analyze --no-progress
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
/phpspec.yml
/phpunit.xml
/vendor/
/.php-cs-fixer.cache
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
.PHONY: cs-fix phpstan

DIR := ${CURDIR}
QA_IMAGE := jakzal/phpqa:php7.3-alpine
QA_IMAGE := jakzal/phpqa:php8.2-alpine

cs-lint:
@docker run --rm -v $(DIR):/project -w /project $(QA_IMAGE) php-cs-fixer fix --diff-format udiff --dry-run -vvv
@docker run --rm -v $(DIR):/project -w /project $(QA_IMAGE) php-cs-fixer fix --dry-run -vvv

cs-fix:
@docker run --rm -v $(DIR):/project -w /project $(QA_IMAGE) php-cs-fixer fix --diff-format udiff -vvv
@docker run --rm -v $(DIR):/project -w /project $(QA_IMAGE) php-cs-fixer fix -vvv

phpstan:
@docker run --rm -v $(DIR):/project -w /project $(QA_IMAGE) phpstan analyse
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@
}
],
"require": {
"php": "^8.1",
"php": "^8.2",
"nikic/php-parser": "^5.0",
"symfony/deprecation-contracts": "^2.5 || ^3.0",
"symfony/finder": "^5.4 || ^6.4 || ^7.0",
"symfony/finder": "^5.4 || ^6.4 || ^7.0 || ^8.0",
"twig/twig": "^2.0 || ^3.0",
"phpstan/phpdoc-parser": "^2.3"
},
"require-dev": {
"symfony/phpunit-bridge": "^5.4 || ^6.4 || ^7.0",
"symfony/translation": "^5.4 || ^6.4 || ^7.0",
"symfony/validator": "^5.4 || ^6.4 || ^7.0",
"symfony/twig-bridge": "^5.4 || ^6.4 || ^7.0",
"symfony/phpunit-bridge": "^5.4 || ^6.4 || ^7.0 || ^8.0",
"symfony/translation": "^5.4 || ^6.4 || ^7.0 || ^8.0",
"symfony/validator": "^5.4 || ^6.4 || ^7.0 || ^8.0",
"symfony/twig-bridge": "^5.4 || ^6.4 || ^7.0 || ^8.0",
"knplabs/knp-menu": "^3.1"
},
"autoload": {
Expand Down
6 changes: 3 additions & 3 deletions tests/Functional/BladeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ private function getSourceLocations($relativePath)
return $collection;
}

public function testExtractLang()
public function testExtractLang(): void
{
$collection = $this->getSourceLocations('Blade/lang.blade.php');

Expand All @@ -47,7 +47,7 @@ public function testExtractLang()
$this->assertEquals('foo.bar', $source->getMessage());
}

public function testExtractTrans()
public function testExtractTrans(): void
{
$collection = $this->getSourceLocations('Blade/trans.blade.php');

Expand All @@ -56,7 +56,7 @@ public function testExtractTrans()
$this->assertEquals('foo.bar', $source->getMessage());
}

public function testExtractTransChoice()
public function testExtractTransChoice(): void
{
$collection = $this->getSourceLocations('Blade/trans_choice.blade.php');

Expand Down
2 changes: 1 addition & 1 deletion tests/Functional/Visitor/Php/DescriptionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

final class DescriptionTest extends BasePHPVisitorTest
{
public function testExtract()
public function testExtract(): void
{
$collection = $this->getSourceLocations(new FormTypeLabelExplicit(), DescriptionType::class);

Expand Down
4 changes: 2 additions & 2 deletions tests/Functional/Visitor/Php/Knp/MenuTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

final class MenuTest extends BasePHPVisitorTest
{
public function testExtractOne()
public function testExtractOne(): void
{
$collection = $this->getSourceLocations(new ItemLabel(),
Resources\Php\Knp\Menu::class);
Expand All @@ -30,7 +30,7 @@ public function testExtractOne()
$this->assertEquals('foo.second.label', $collection->get(3)->getMessage());
}

public function testExtractTwo()
public function testExtractTwo(): void
{
$collection = $this->getSourceLocations(new LinkTitle(),
Resources\Php\Knp\Menu::class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*/
final class SourceLocationContainerExtractorTest extends BasePHPVisitorTest
{
public function testExtract()
public function testExtract(): void
{
$collection = $this->getSourceLocations(new SourceLocationContainerVisitor(), Resources\Php\SourceLocationContainer::class);

Expand Down
2 changes: 1 addition & 1 deletion tests/Functional/Visitor/Php/Symfony/ConstraintTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
*/
final class ConstraintTest extends BasePHPVisitorTest
{
public function testExtract()
public function testExtract(): void
{
$collection = $this->getSourceLocations(new Constraint(), Resources\Php\Symfony\Constraint::class);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
*/
final class ContainerAwareTransChoiceTest extends BasePHPVisitorTest
{
public function testExtract()
public function testExtract(): void
{
$collection = $this->getSourceLocations(new ContainerAwareTransChoice(), Resources\Php\Symfony\ContainerAwareTransChoice::class);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
*/
final class ContainerAwareTransTest extends BasePHPVisitorTest
{
public function testExtract()
public function testExtract(): void
{
$collection = $this->getSourceLocations(new ContainerAwareTrans(), Resources\Php\Symfony\ContainerAwareTrans::class);

Expand Down
2 changes: 1 addition & 1 deletion tests/Functional/Visitor/Php/Symfony/FlashMessageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
*/
final class FlashMessageTest extends BasePHPVisitorTest
{
public function testExtract()
public function testExtract(): void
{
$collection = $this->getSourceLocations(new FlashMessage(), Resources\Php\Symfony\FlashMessage::class);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
*/
class FormEmptyValueTest extends BasePHPVisitorTest
{
public function testExtract()
public function testExtract(): void
{
$collection = $this->getSourceLocations(new FormTypeEmptyValue(), Resources\Php\Symfony\EmptyValueType::class);

Expand Down
12 changes: 6 additions & 6 deletions tests/Functional/Visitor/Php/Symfony/FormTypeChoicesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*/
class FormTypeChoicesTest extends BasePHPVisitorTest
{
public function testSimpleSymfony3x()
public function testSimpleSymfony3x(): void
{
$collection = $this->getSourceLocations(new FormTypeChoices(), SimpleChoiceSymfony3xType::class);

Expand All @@ -28,7 +28,7 @@ public function testSimpleSymfony3x()
$this->assertEquals(10, $collection->get(0)->getLine());
}

public function testSimpleSymfony27()
public function testSimpleSymfony27(): void
{
$visitor = new FormTypeChoices();
$visitor->setSymfonyMajorVersion(2);
Expand All @@ -42,7 +42,7 @@ public function testSimpleSymfony27()
$this->assertEquals(12, $collection->get(0)->getLine());
}

public function testChainedChoice()
public function testChainedChoice(): void
{
$visitor = new FormTypeChoices();
$visitor->setSymfonyMajorVersion(3);
Expand All @@ -53,15 +53,15 @@ public function testChainedChoice()
$this->assertEquals('label2', $collection->get(1)->getMessage());
}

public function testExtractError()
public function testExtractError(): void
{
$collection = $this->getSourceLocations(new FormTypeChoices(), SimpleChoiceSymfony3xErrorType::class);

$errors = $collection->getErrors();
$this->assertCount(1, $errors);
}

public function testPassedChoices()
public function testPassedChoices(): void
{
$collection = $this->getSourceLocations(new FormTypeChoices(), SimpleChoicePassArrayType::class);

Expand All @@ -70,7 +70,7 @@ public function testPassedChoices()
$this->assertEquals(9, $collection->get(0)->getLine());
}

public function testChoiceTranslationDomain()
public function testChoiceTranslationDomain(): void
{
$collection = $this->getSourceLocations(new FormTypeChoices(), FormDomainChoiceType::class);

Expand Down
6 changes: 3 additions & 3 deletions tests/Functional/Visitor/Php/Symfony/FormTypeHelpTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

final class FormTypeHelpTest extends BasePHPVisitorTest
{
public function testExtract()
public function testExtract(): void
{
$collection = $this->getSourceLocations(new FormTypeHelp(),
Resources\Php\Symfony\HelpFormType::class);
Expand All @@ -28,7 +28,7 @@ public function testExtract()
$this->assertEquals('form.help.text.but.no.label', $collection->get(1)->getMessage());
}

public function testExtractError()
public function testExtractError(): void
{
$collection = $this->getSourceLocations(new FormTypeHelp(),
Resources\Php\Symfony\HelpFormErrorType::class);
Expand All @@ -37,7 +37,7 @@ public function testExtractError()
$this->assertCount(2, $errors);
}

public function testChildVisitationNotBlocked()
public function testChildVisitationNotBlocked(): void
{
$collection = $this->getSourceLocations(
[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
*/
class FormTypeInvalidMessageTest extends BasePHPVisitorTest
{
public function testExtract()
public function testExtract(): void
{
$collection = $this->getSourceLocations(new FormTypeInvalidMessage(), Resources\Php\Symfony\FormInvalidMessage::class);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
*/
class FormTypeLabelExplicitTest extends BasePHPVisitorTest
{
public function testExtract()
public function testExtract(): void
{
$collection = $this->getSourceLocations(new FormTypeLabelExplicit(), Resources\Php\Symfony\ExplicitLabelType::class);

Expand All @@ -35,13 +35,13 @@ public function testExtract()
$this->assertCount(4, $collection->getErrors());
}

public function testWillNotExtractTypeless()
public function testWillNotExtractTypeless(): void
{
$collection = $this->getSourceLocations(new FormTypeLabelExplicit(), Resources\Php\Symfony\ExplicitLabelTypeless::class);
$this->assertCount(0, $collection);
}

public function testWithLabelFalse()
public function testWithLabelFalse(): void
{
$collection = $this->getSourceLocations(new FormTypeLabelExplicit(), Resources\Php\Symfony\ExplicitLabelFalseType::class);
$this->assertEmpty($collection);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*/
class FormTypeLabelImplicitTest extends BasePHPVisitorTest
{
public function testExtract()
public function testExtract(): void
{
$collection = $this->getSourceLocations(new FormTypeLabelImplicit(), ImplicitLabelType::class);

Expand Down
2 changes: 1 addition & 1 deletion tests/Functional/Visitor/Php/Symfony/FormTypeLabelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function __construct()
parent::__construct();
}

public function testTranslationDomain()
public function testTranslationDomain(): void
{
$collection = $this->getSourceLocations($this->allFormVisitors, Resources\Php\Symfony\FormDomainType::class);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
*/
final class FormTypePlaceholderTest extends BasePHPVisitorTest
{
public function testExtract()
public function testExtract(): void
{
$collection = $this->getSourceLocations(new FormTypePlaceholder(),
Resources\Php\Symfony\PlaceholderFormType::class);
Expand All @@ -35,7 +35,7 @@ public function testExtract()
$this->assertEquals('form.date_placeholder.day', $collection->get(5)->getMessage());
}

public function testExtractError()
public function testExtractError(): void
{
$collection = $this->getSourceLocations(new FormTypePlaceholder(),
Resources\Php\Symfony\PlaceholderFormErrorType::class);
Expand All @@ -44,7 +44,7 @@ public function testExtractError()
$this->assertCount(3, $errors);
}

public function testChildVisitationNotBlocked()
public function testChildVisitationNotBlocked(): void
{
$collection = $this->getSourceLocations(
[
Expand Down
6 changes: 3 additions & 3 deletions tests/Functional/Visitor/Php/Symfony/FormTypeTitleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
*/
final class FormTypeTitleTest extends BasePHPVisitorTest
{
public function testExtract()
public function testExtract(): void
{
$collection = $this->getSourceLocations(new FormTypeTitle(),
Resources\Php\Symfony\TitleFormType::class);
Expand All @@ -30,7 +30,7 @@ public function testExtract()
$this->assertEquals('form.title.text', $collection->get(0)->getMessage());
}

public function testExtractError()
public function testExtractError(): void
{
$collection = $this->getSourceLocations(new FormTypeTitle(),
Resources\Php\Symfony\TitleFormErrorType::class);
Expand All @@ -39,7 +39,7 @@ public function testExtractError()
$this->assertCount(1, $errors);
}

public function testChildVisitationNotBlocked()
public function testChildVisitationNotBlocked(): void
{
$collection = $this->getSourceLocations(
[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
*/
final class ValidationAnnotationTest extends BasePHPVisitorTest
{
public function testExtractAnnotation()
public function testExtractAnnotation(): void
{
$factory = new LazyLoadingMetadataFactory(new AttributeLoader());
$extractor = new ValidationAnnotation($factory);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

final class TranslateAnnotationVisitorTest extends BasePHPVisitorTest
{
public function testExtract()
public function testExtract(): void
{
$collection = $this->getSourceLocations(new TranslateAnnotationVisitor(),
TestTranslateAnnotationFile::class);
Expand Down
Loading
Loading