Skip to content

Commit

Permalink
DevKit updates for 4.x branch (#8133)
Browse files Browse the repository at this point in the history
Co-authored-by: Jordi Sala Morales <jordism91@gmail.com>
Co-authored-by: Vincent Langlet <vincentlanglet@hotmail.fr>
  • Loading branch information
3 people committed Dec 8, 2023
1 parent d327aa0 commit 4f71371
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 22 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/test.yaml
Expand Up @@ -50,13 +50,18 @@ jobs:
- php-version: '8.2'
dependencies: highest
allowed-to-fail: false
symfony-require: 6.2.*
variant: symfony/symfony:"6.2.*"
symfony-require: 6.3.*
variant: symfony/symfony:"6.3.*"
- php-version: '8.2'
dependencies: highest
allowed-to-fail: false
symfony-require: 6.3.*
variant: symfony/symfony:"6.3.*"
symfony-require: 6.4.*
variant: symfony/symfony:"6.4.*"
- php-version: '8.2'
dependencies: highest
allowed-to-fail: false
symfony-require: 7.0.*
variant: symfony/symfony:"7.0.*"

steps:
- name: Checkout
Expand Down
2 changes: 0 additions & 2 deletions rector.php
Expand Up @@ -19,7 +19,6 @@

use Rector\Config\RectorConfig;
use Rector\Php70\Rector\FunctionLike\ExceptionHandlerTypehintRector;
use Rector\Php71\Rector\FuncCall\CountOnNullRector;
use Rector\PHPUnit\CodeQuality\Rector\Class_\AddSeeTestAnnotationRector;
use Rector\PHPUnit\CodeQuality\Rector\Class_\PreferPHPUnitThisCallRector;
use Rector\PHPUnit\Set\PHPUnitLevelSetList;
Expand All @@ -41,7 +40,6 @@
$rectorConfig->importNames();
$rectorConfig->importShortClasses(false);
$rectorConfig->skip([
CountOnNullRector::class,
ExceptionHandlerTypehintRector::class,
AddSeeTestAnnotationRector::class,
PreferPHPUnitThisCallRector::class,
Expand Down
6 changes: 3 additions & 3 deletions src/ArgumentResolver/CompatibleValueResolverInterface.php
Expand Up @@ -17,14 +17,14 @@
use Symfony\Component\HttpKernel\Controller\ValueResolverInterface;

// TODO: Remove this interface when dropping support of Symfony < 6.2 and replace its usage with ValueResolverInterface
if (interface_exists(ValueResolverInterface::class)) {
if (interface_exists(ArgumentValueResolverInterface::class)) {
/** @internal */
interface CompatibleValueResolverInterface extends ValueResolverInterface
interface CompatibleValueResolverInterface extends ArgumentValueResolverInterface
{
}
} else {
/** @internal */
interface CompatibleValueResolverInterface extends ArgumentValueResolverInterface
interface CompatibleValueResolverInterface extends ValueResolverInterface
{
}
}
2 changes: 1 addition & 1 deletion src/DependencyInjection/Configuration.php
Expand Up @@ -173,7 +173,7 @@
final class Configuration implements ConfigurationInterface
{
/**
* @psalm-suppress PossiblyNullReference, UndefinedInterfaceMethod
* @psalm-suppress UndefinedInterfaceMethod
*
* @see https://github.com/psalm/psalm-plugin-symfony/issues/174
*/
Expand Down
2 changes: 2 additions & 0 deletions src/Route/AdminPoolLoader.php
Expand Up @@ -20,6 +20,8 @@

/**
* @author Thomas Rabaix <thomas.rabaix@sonata-project.org>
*
* @psalm-suppress PropertyNotSetInConstructor
*/
final class AdminPoolLoader extends Loader
{
Expand Down
19 changes: 7 additions & 12 deletions tests/Form/Widget/FormChoiceWidgetTest.php
Expand Up @@ -15,7 +15,6 @@

use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Component\Form\FormTypeInterface;
use Symfony\Component\HttpKernel\Kernel;

final class FormChoiceWidgetTest extends BaseWidgetTest
{
Expand All @@ -41,17 +40,13 @@ public function testLabelRendering(): void

$html = $this->renderWidget($choice->createView());

if (0 !== preg_match("/7\..\../", Kernel::VERSION)) {
static::assertStringContainsString(
'<li><div class="checkbox"><label><input type="checkbox" id="choice_0" name="choice[]" value="0"><span class="control-label__text">[trans]some[/trans]</span></label></div></li>',
$this->cleanHtmlWhitespace($html)
);
} else {
static::assertStringContainsString(
'<li><div class="checkbox"><label><input type="checkbox" id="choice_0" name="choice[]" value="0" /><span class="control-label__text">[trans]some[/trans]</span></label></div></li>',
$this->cleanHtmlWhitespace($html)
);
}
// TODO: Remove this adapter when dropping support for Symfony < 7.
$html = str_replace('value="0" />', 'value="0">', $html);

static::assertStringContainsString(
'<li><div class="checkbox"><label><input type="checkbox" id="choice_0" name="choice[]" value="0"><span class="control-label__text">[trans]some[/trans]</span></label></div></li>',
$this->cleanHtmlWhitespace($html)
);
}

public function testDefaultValueRendering(): void
Expand Down

0 comments on commit 4f71371

Please sign in to comment.