Skip to content

Commit

Permalink
allow symfony 7
Browse files Browse the repository at this point in the history
  • Loading branch information
jgrygierek committed Mar 28, 2024
1 parent ecfbe84 commit fad608a
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 20 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
![Tests](https://github.com/jgrygierek/BatchEntityImportBundle/workflows/Tests/badge.svg)
![Code Coverage](https://img.shields.io/codecov/c/github/jgrygierek/BatchEntityImportBundle/master)
![PHP Versions](https://img.shields.io/badge/PHP->=8.1-blue)
![Symfony Versions](https://img.shields.io/badge/Symfony-5.4--6.*-blue)
![Symfony Versions](https://img.shields.io/badge/Symfony-5.4--7.*-blue)
[![SymfonyInsight](https://insight.symfony.com/projects/ad63558e-3612-434f-a93d-0fc5fce2dd20/mini.svg)](https://insight.symfony.com/projects/ad63558e-3612-434f-a93d-0fc5fce2dd20)

Importing entities with preview and edit features for Symfony.
Expand Down
28 changes: 14 additions & 14 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,18 @@
"require": {
"php": ">=8.1.0",
"doctrine/annotations": "^1.14",
"doctrine/lexer": "^1.2.1",
"doctrine/lexer": "^1.2.1|^2.0",
"doctrine/orm": "^2.9",
"phpoffice/phpspreadsheet": "^1.22.0",
"symfony/config": "^5.4|^6.0",
"symfony/dependency-injection": "^5.4|^6.0",
"symfony/doctrine-bridge": "^5.4|^6.0",
"symfony/form": "^5.4|^6.0",
"symfony/framework-bundle": "^5.4|^6.0",
"symfony/property-access": "^5.4|^6.0",
"symfony/translation": "^5.4|^6.0",
"symfony/twig-bundle": "^5.4|^6.0",
"symfony/validator": "^5.4|^6.0",
"symfony/config": "^5.4|^6.0|^7.0",
"symfony/dependency-injection": "^5.4|^6.0|^7.0",
"symfony/doctrine-bridge": "^5.4|^6.0|^7.0",
"symfony/form": "^5.4|^6.0|^7.0",
"symfony/framework-bundle": "^5.4|^6.0|^7.0",
"symfony/property-access": "^5.4|^6.0|^7.0",
"symfony/translation": "^5.4|^6.0|^7.0",
"symfony/twig-bundle": "^5.4|^6.0|^7.0",
"symfony/validator": "^5.4|^6.0|^7.0",
"twig/twig": "^2.14|^3.0"
},
"require-dev": {
Expand All @@ -50,10 +50,10 @@
"phpstan/phpstan-symfony": "^1.2",
"rector/rector": "^0.15.0",
"roave/security-advisories": "dev-latest",
"symfony/browser-kit": "^5.4|^6.0",
"symfony/dom-crawler": "^5.4|^6.0",
"symfony/phpunit-bridge": "^5.4|^6.0",
"symfony/security-bundle": "^5.4|^6.0"
"symfony/browser-kit": "^5.4|^6.0|^7.0",
"symfony/dom-crawler": "^5.4|^6.0|^7.0",
"symfony/phpunit-bridge": "^5.4|^6.0|^7.0",
"symfony/security-bundle": "^5.4|^6.0|^7.0"
},
"config": {
"sort-packages": true
Expand Down
4 changes: 2 additions & 2 deletions src/Form/Type/MatrixRecordType.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ function (FormEvent $event) use ($fieldDefinitions): void {
$this->addField($fieldDefinitions, $columnName, $event);
}
}
}
},
);
}

Expand Down Expand Up @@ -82,7 +82,7 @@ private function addEntityField(FormBuilderInterface $builder, string $entityCla

return $qb;
},
]
],
);
}

Expand Down
12 changes: 9 additions & 3 deletions tests/AbstractValidationTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,15 @@ class AbstractValidationTestCase extends TestCase

protected function setUp(): void
{
$builder = Validation::createValidatorBuilder()
->enableAnnotationMapping()
->addDefaultDoctrineAnnotationReader();
$builder = Validation::createValidatorBuilder();

if (\property_exists($builder, 'enableAnnotationMapping')) {
$builder
->enableAnnotationMapping()
->addDefaultDoctrineAnnotationReader();
} else {
$builder->enableAttributeMapping();
}

$this->validator = $builder->getValidator();
}
Expand Down
5 changes: 5 additions & 0 deletions tests/config/config_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,8 @@ doctrine:
type: attribute
prefix: JG\BatchEntityImportBundle\Tests\Fixtures\Entity
dir: '%kernel.project_dir%/tests/Fixtures/Entity/'

security:
firewalls:
main:
security: false

0 comments on commit fad608a

Please sign in to comment.