Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dependency upgrade to propel 2.0.0-beta4 and symfony 7 #41

Merged
merged 6 commits into from
Sep 4, 2024
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
4 changes: 2 additions & 2 deletions .github/workflows/CI 7.0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Command/FixturesLoadCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
2 changes: 1 addition & 1 deletion Form/EventListener/TranslationFormListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion Form/FormBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,4 @@ protected function buildFormFields(Table $table)

return $buildCode;
}
}
}
5 changes: 3 additions & 2 deletions Form/PropelExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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),
Expand All @@ -57,7 +58,7 @@ protected function loadTypes()
);
}

protected function loadTypeGuesser()
protected function loadTypeGuesser(): ?FormTypeGuesserInterface
{
return new TypeGuesser();
}
Expand Down
7 changes: 2 additions & 5 deletions Form/Type/ModelType.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
}
Expand Down
10 changes: 2 additions & 8 deletions Form/Type/TranslationCollectionType.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
}
Expand Down
5 changes: 1 addition & 4 deletions Form/Type/TranslationType.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,7 @@ public function configureOptions(OptionsResolver $resolver): void
));
}

/**
* {@inheritdoc}
*/
public function getBlockPrefix()
public function getBlockPrefix(): string
{
return 'propel_translation';
}
Expand Down
5 changes: 3 additions & 2 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Request/ParamConverter/PropelParamConverter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion Tests/Fixtures/Model/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class User extends BaseUser implements UserInterface
{
public function eraseCredentials()
public function eraseCredentials(): void
{
}

Expand Down
2 changes: 1 addition & 1 deletion Twig/Extension/SyntaxExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']]),
Expand Down
10 changes: 2 additions & 8 deletions Validator/Constraints/UniqueObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "*",
Expand Down
Loading