diff --git a/.github/workflows/CI 7.0.yml b/.github/workflows/CI 7.0.yml index 4a61f34a..aa38de0a 100644 --- a/.github/workflows/CI 7.0.yml +++ b/.github/workflows/CI 7.0.yml @@ -18,8 +18,8 @@ jobs: strategy: fail-fast: false matrix: - php-version: [ '8.0.2', '8.1', '8.1' ] - symfony-version: [ '6.0', '6.1', '6.2', '6.3' ] + php-version: [ '8.0.2', '8.1', '8.1', '8.2', '8.3' ] + symfony-version: [ '6.0', '6.1', '6.2', '6.3', '6.4', '7.0', '7.1' ] steps: - name: Setup PHP, with composer and extensions uses: shivammathur/setup-php@v2 diff --git a/Command/FixturesLoadCommand.php b/Command/FixturesLoadCommand.php index 92f49679..89405f6f 100644 --- a/Command/FixturesLoadCommand.php +++ b/Command/FixturesLoadCommand.php @@ -109,7 +109,7 @@ protected function configure(): void /** * {@inheritdoc} */ - protected function execute(InputInterface $input, OutputInterface $output) + protected function execute(InputInterface $input, OutputInterface $output): int { $this->filesystem = new Filesystem(); diff --git a/Form/EventListener/TranslationFormListener.php b/Form/EventListener/TranslationFormListener.php index 06733578..d2287062 100644 --- a/Form/EventListener/TranslationFormListener.php +++ b/Form/EventListener/TranslationFormListener.php @@ -36,7 +36,7 @@ public function __construct(array $columns, string $dataClass) $this->dataClass = $dataClass; } - public static function getSubscribedEvents() + public static function getSubscribedEvents(): array { return array( FormEvents::PRE_SET_DATA => array('preSetData', 1), diff --git a/Form/FormBuilder.php b/Form/FormBuilder.php index cee95471..9fa1eb3e 100644 --- a/Form/FormBuilder.php +++ b/Form/FormBuilder.php @@ -69,4 +69,4 @@ protected function buildFormFields(Table $table) return $buildCode; } -} \ No newline at end of file +} diff --git a/Form/PropelExtension.php b/Form/PropelExtension.php index 3298dc57..3b9d7564 100644 --- a/Form/PropelExtension.php +++ b/Form/PropelExtension.php @@ -11,6 +11,7 @@ namespace Propel\Bundle\PropelBundle\Form; +use Symfony\Component\Form\FormTypeGuesserInterface; use Symfony\Component\Form\AbstractExtension; use Symfony\Component\Form\ChoiceList\Factory\ChoiceListFactoryInterface; use Symfony\Component\Form\ChoiceList\Factory\DefaultChoiceListFactory; @@ -48,7 +49,7 @@ public function __construct(PropertyAccessorInterface $propertyAccessor = null, $this->choiceListFactory = $choiceListFactory ?: new PropertyAccessDecorator(new DefaultChoiceListFactory(), $this->propertyAccessor); } - protected function loadTypes() + protected function loadTypes(): array { return array( new Type\ModelType($this->propertyAccessor, $this->choiceListFactory), @@ -57,7 +58,7 @@ protected function loadTypes() ); } - protected function loadTypeGuesser() + protected function loadTypeGuesser(): ?FormTypeGuesserInterface { return new TypeGuesser(); } diff --git a/Form/Type/ModelType.php b/Form/Type/ModelType.php index 349c391c..98626afd 100644 --- a/Form/Type/ModelType.php +++ b/Form/Type/ModelType.php @@ -248,15 +248,12 @@ public function configureOptions(OptionsResolver $resolver): void $resolver->setAllowedTypes('query', ['null', 'Propel\Runtime\ActiveQuery\ModelCriteria']); } - /** - * {@inheritdoc} - */ - public function getBlockPrefix() + public function getBlockPrefix(): string { return 'model'; } - public function getParent() + public function getParent(): ?string { return 'Symfony\Component\Form\Extension\Core\Type\ChoiceType'; } diff --git a/Form/Type/TranslationCollectionType.php b/Form/Type/TranslationCollectionType.php index 9f0d2132..ae194a47 100644 --- a/Form/Type/TranslationCollectionType.php +++ b/Form/Type/TranslationCollectionType.php @@ -61,18 +61,12 @@ public function configureOptions(OptionsResolver $resolver): void )); } - /** - * {@inheritdoc} - */ - public function getParent() + public function getParent(): ?string { return CollectionType::class; } - /** - * {@inheritdoc} - */ - public function getBlockPrefix() + public function getBlockPrefix(): string { return 'propel_translation_collection'; } diff --git a/Form/Type/TranslationType.php b/Form/Type/TranslationType.php index 278524d2..e9893f62 100644 --- a/Form/Type/TranslationType.php +++ b/Form/Type/TranslationType.php @@ -45,10 +45,7 @@ public function configureOptions(OptionsResolver $resolver): void )); } - /** - * {@inheritdoc} - */ - public function getBlockPrefix() + public function getBlockPrefix(): string { return 'propel_translation'; } diff --git a/README.markdown b/README.markdown index 7edc8e9f..ceebaad7 100644 --- a/README.markdown +++ b/README.markdown @@ -20,6 +20,7 @@ As `Propel2` will be released in the near future, we are migrating the branching * The `5.0` branch contains `Propel2`(branch **2.0.0-beta1**) integration for Symfony **4.x|5.x** and PHP **7.2** - **8.0**. * The `5.1` branch contains `Propel2`(branch **2.0.0-beta2**) integration for Symfony **4.x|5.x|6.x** and PHP **7.4** - **8.1**. * The `6.0` branch contains `Propel2`(branch **2.0.0-beta2**) integration for Symfony **6.x**. and PHP **8.0.2+** +* The `7.0` branch contains `Propel2`(branch **2.0.0-beta2**, **2.0.0-beta3**, **2.0.0-beta4**) integration for Symfony **6.x|7.x**. and PHP **8.0.2+** ## Version 6.0 Changes @@ -29,11 +30,11 @@ As `Propel2` will be released in the near future, we are migrating the branching - propel/propel ### Composer command -- composer require propel/propel "2.0.0-beta2" +- composer require propel/propel "2.0.0-beta4" - composer require skyfox/propel-bundle "6.0.1"(or newer tag/release) or "6.0.x-dev" ### composer.json -> add in "require" -- "propel/propel": "2.0.0-beta2" +- "propel/propel": "2.0.0-beta4" - "skyfox/propel-bundle": "6.0.1"(or newer tag/release) or "6.0.x-dev" ## Features diff --git a/Request/ParamConverter/PropelParamConverter.php b/Request/ParamConverter/PropelParamConverter.php index 88a2973d..8cfd2582 100644 --- a/Request/ParamConverter/PropelParamConverter.php +++ b/Request/ParamConverter/PropelParamConverter.php @@ -69,7 +69,7 @@ class PropelParamConverter implements ParamConverterInterface * @throws NotFoundHttpException * @throws \Exception */ - public function apply(Request $request, ParamConverter $configuration) + public function apply(Request $request, ParamConverter $configuration): bool { $class = $configuration->getClass(); $classQuery = $class . 'Query'; diff --git a/Tests/Fixtures/Model/User.php b/Tests/Fixtures/Model/User.php index 1d60b46c..391e1784 100644 --- a/Tests/Fixtures/Model/User.php +++ b/Tests/Fixtures/Model/User.php @@ -7,7 +7,7 @@ class User extends BaseUser implements UserInterface { - public function eraseCredentials() + public function eraseCredentials(): void { } diff --git a/Twig/Extension/SyntaxExtension.php b/Twig/Extension/SyntaxExtension.php index 29669d9e..087574b0 100644 --- a/Twig/Extension/SyntaxExtension.php +++ b/Twig/Extension/SyntaxExtension.php @@ -19,7 +19,7 @@ */ class SyntaxExtension extends \Twig\Extension\AbstractExtension { - public function getFilters() + public function getFilters(): array { return [ new \Twig\TwigFilter('format_sql', [$this, 'formatSQL'], ['is_safe' => ['html']]), diff --git a/Validator/Constraints/UniqueObject.php b/Validator/Constraints/UniqueObject.php index c58926bd..2757903d 100644 --- a/Validator/Constraints/UniqueObject.php +++ b/Validator/Constraints/UniqueObject.php @@ -59,18 +59,12 @@ public function __construct($options = null) } } - /** - * {@inheritDoc} - */ - public function getRequiredOptions() + public function getRequiredOptions(): array { return array('fields'); } - /** - * {@inheritDoc} - */ - public function getTargets() + public function getTargets(): array|string { return self::CLASS_CONSTRAINT; } diff --git a/composer.json b/composer.json index 943cd579..3e8c2e40 100644 --- a/composer.json +++ b/composer.json @@ -15,12 +15,12 @@ }, "require": { "php": ">=8.0.2", - "propel/propel": "2.0.0-beta2||2.0.0-beta3", - "symfony/console": "^5.0||^6.0", - "symfony/dependency-injection": "^6.0", - "symfony/framework-bundle": "^6.0", - "symfony/security-bundle": "^6.0", - "symfony/yaml": "^5.0||^6.0" + "propel/propel": "2.0.0-beta2||2.0.0-beta3||2.0.0-beta4", + "symfony/console": "^5.0||^6.0||^7.0", + "symfony/dependency-injection": "^6.0||^7.0", + "symfony/framework-bundle": "^6.0||^7.0", + "symfony/security-bundle": "^6.0||^7.0", + "symfony/yaml": "^5.0||^6.0||^7.0" }, "require-dev": { "ext-json": "*",