Skip to content
Open
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/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: Install PHP with extensions
uses: shivammathur/setup-php@v2
with:
php-version: '8.4'
php-version: '8.5'
coverage: none
tools: composer:v2

Expand All @@ -53,7 +53,7 @@ jobs:
- name: Install PHP with extensions
uses: shivammathur/setup-php@v2
with:
php-version: '8.4'
php-version: '8.5'
coverage: none
tools: composer:v2, composer-normalize:2
env:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/qa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: Install PHP with extensions
uses: shivammathur/setup-php@v2
with:
php-version: '8.4'
php-version: '8.5'
coverage: none
tools: composer:v2

Expand All @@ -53,7 +53,7 @@ jobs:
- name: Install PHP with extensions
uses: shivammathur/setup-php@v2
with:
php-version: '8.4'
php-version: '8.5'
coverage: none
tools: composer:v2

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/symfony-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: Install PHP with extensions
uses: shivammathur/setup-php@v2
with:
php-version: '8.4'
php-version: '8.5'
coverage: none
tools: composer:v2

Expand All @@ -53,7 +53,7 @@ jobs:
- name: Install PHP with extensions
uses: shivammathur/setup-php@v2
with:
php-version: '8.4'
php-version: '8.5'
coverage: none
tools: composer:v2

Expand All @@ -77,7 +77,7 @@ jobs:
- name: Install PHP with extensions
uses: shivammathur/setup-php@v2
with:
php-version: '8.4'
php-version: '8.5'
coverage: none
tools: composer:v2

Expand All @@ -101,7 +101,7 @@ jobs:
- name: Install PHP with extensions
uses: shivammathur/setup-php@v2
with:
php-version: '8.4'
php-version: '8.5'
coverage: none
tools: composer:v2

Expand Down
21 changes: 14 additions & 7 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,13 @@ jobs:
SYMFONY_REQUIRE: ${{matrix.symfony-require}}

strategy:
fail-fast: false
matrix:
php-version:
- '8.2'
- '8.3'
- '8.4'
- '8.5'
dependencies: [highest]
allowed-to-fail: [false]
symfony-require: ['']
Expand All @@ -42,21 +44,26 @@ jobs:
dependencies: lowest
allowed-to-fail: false
variant: normal
- php-version: '8.4'
- php-version: '8.5'
dependencies: highest
allowed-to-fail: false
symfony-require: 6.4.*
variant: symfony/symfony:"6.4.*"
- php-version: '8.4'
- php-version: '8.5'
dependencies: highest
allowed-to-fail: false
symfony-require: 7.1.*
variant: symfony/symfony:"7.1.*"
- php-version: '8.4'
symfony-require: 7.3.*
variant: symfony/symfony:"7.3.*"
- php-version: '8.5'
dependencies: highest
allowed-to-fail: false
symfony-require: 7.2.*
variant: symfony/symfony:"7.2.*"
symfony-require: 7.4.*
variant: symfony/symfony:"7.4.*"
- php-version: '8.5'
dependencies: highest
allowed-to-fail: false
symfony-require: 8.0.*
variant: symfony/symfony:"8.0.*"

steps:
- name: Checkout
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ composer.lock
phpunit.xml
phpstan.neon
/.phpunit.result.cache
tests/App/config/reference.php
/docs/_build/
/drivers
/tests/App/public/bundles
tests/App/config/reference.php
npm-debug.log
3 changes: 2 additions & 1 deletion .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
->setFinder($finder)
->setRiskyAllowed(true)
->setRules($rules)
->setUsingCache(true);
->setUsingCache(true)
->setParallelConfig(PhpCsFixer\Runner\Parallel\ParallelConfigFactory::detect());

return $config;
52 changes: 24 additions & 28 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,26 +33,26 @@
"sonata-project/seo-bundle": "^3.4",
"sonata-project/twig-extensions": "^1.3 || ^2.0",
"symfony-cmf/routing-bundle": "^2.1 || ^3.0",
"symfony/config": "^6.4 || ^7.1",
"symfony/console": "^6.4 || ^7.1",
"symfony/dependency-injection": "^6.4 || ^7.1",
"symfony/config": "^6.4 || ^7.3 || ^8.0",
"symfony/console": "^6.4 || ^7.3 || ^8.0",
"symfony/dependency-injection": "^6.4 || ^7.3 || ^8.0",
"symfony/deprecation-contracts": "^3.0.0",
"symfony/form": "^6.4 || ^7.1",
"symfony/framework-bundle": "^6.4 || ^7.1",
"symfony/http-foundation": "^6.4 || ^7.1",
"symfony/http-kernel": "^6.4 || ^7.1",
"symfony/intl": "^6.4 || ^7.1",
"symfony/options-resolver": "^6.4 || ^7.1",
"symfony/process": "^6.4 || ^7.1",
"symfony/property-access": "^6.4 || ^7.1",
"symfony/property-info": "^6.4 || ^7.1",
"symfony/routing": "^6.4 || ^7.1",
"symfony/runtime": "^6.4 || ^7.1",
"symfony/security-core": "^6.4 || ^7.1",
"symfony/security-http": "^6.4 || ^7.1",
"symfony/serializer": "^6.4 || ^7.1",
"symfony/string": "^6.4 || ^7.1",
"symfony/validator": "^6.4 || ^7.1",
"symfony/form": "^6.4 || ^7.3 || ^8.0",
"symfony/framework-bundle": "^6.4 || ^7.3 || ^8.0",
"symfony/http-foundation": "^6.4 || ^7.3 || ^8.0",
"symfony/http-kernel": "^6.4 || ^7.3 || ^8.0",
"symfony/intl": "^6.4 || ^7.3 || ^8.0",
"symfony/options-resolver": "^6.4 || ^7.3 || ^8.0",
"symfony/process": "^6.4 || ^7.3 || ^8.0",
"symfony/property-access": "^6.4 || ^7.3 || ^8.0",
"symfony/property-info": "^6.4 || ^7.3 || ^8.0",
"symfony/routing": "^6.4 || ^7.3 || ^8.0",
"symfony/runtime": "^6.4 || ^7.3 || ^8.0",
"symfony/security-core": "^6.4 || ^7.3 || ^8.0",
"symfony/security-http": "^6.4 || ^7.3 || ^8.0",
"symfony/serializer": "^6.4 || ^7.3 || ^8.0",
"symfony/string": "^6.4 || ^7.3 || ^8.0",
"symfony/validator": "^6.4 || ^7.3 || ^8.0",
"twig/string-extra": "^3.0",
"twig/twig": "^3.0"
},
Expand All @@ -68,20 +68,16 @@
"phpstan/phpstan-strict-rules": "^1.3 || ^2.0",
"phpstan/phpstan-symfony": "^1.0 || ^2.0",
"phpunit/phpunit": "^11.5.38 || ^12.3.10",
"psalm/plugin-phpunit": "^0.19",
"psalm/plugin-symfony": "^5.0",
"rector/rector": "^1.1 || ^2.0",
"symfony/browser-kit": "^6.4 || ^7.1",
"symfony/css-selector": "^6.4 || ^7.1",
"symfony/filesystem": "^6.4 || ^7.1",
"symfony/browser-kit": "^6.4 || ^7.3 || ^8.0",
"symfony/css-selector": "^6.4 || ^7.3 || ^8.0",
"symfony/filesystem": "^6.4 || ^7.3 || ^8.0",
"symfony/panther": "^2.2",
"symfony/yaml": "^6.4 || ^7.1",
"vimeo/psalm": "^5.0 || ^6.10"
"symfony/yaml": "^6.4 || ^7.3 || ^8.0"
},
"conflict": {
"doctrine/dbal": "<3.4",
"doctrine/orm": "<2.14",
"symfony/dom-crawler": ">7.4"
"doctrine/orm": "<2.14"
},
"suggest": {
"twig/extra-bundle": "Auto configures the Twig Intl extension"
Expand Down
5 changes: 0 additions & 5 deletions src/Admin/SharedBlockAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,6 @@ protected function generateBaseRouteName(bool $isChildAdmin = false): string
return \sprintf('%s_%s', parent::generateBaseRouteName($isChildAdmin), 'shared');
}

/**
* @psalm-suppress LessSpecificReturnStatement, MoreSpecificReturnType
*
* @see https://github.com/vimeo/psalm/issues/8429
*/
protected function configureQuery(ProxyQueryInterface $query): ProxyQueryInterface
{
\assert($query instanceof ORMProxyQueryInterface);
Expand Down
4 changes: 0 additions & 4 deletions src/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@
final class Configuration implements ConfigurationInterface
{
/**
* @psalm-suppress UndefinedInterfaceMethod
*
* @see https://github.com/psalm/psalm-plugin-symfony/issues/174
*
* @return TreeBuilder<'array'>
*/
public function getConfigTreeBuilder(): TreeBuilder
Expand Down
1 change: 0 additions & 1 deletion src/Entity/Transformer.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ public function create(PageInterface $page, ?SnapshotInterface $snapshot = null)
$content = array_filter($data, static fn ($v): bool => null !== $v);
}

/** @psalm-suppress ArgumentTypeCoercion */
$snapshot->setContent($content);

return $snapshot;
Expand Down
3 changes: 0 additions & 3 deletions src/Form/Type/PageSelectorType.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@

/**
* @author Thomas Rabaix <thomas.rabaix@sonata-project.org>
*
* @psalm-suppress MissingTemplateParam
*/
final class PageSelectorType extends AbstractType
{
Expand Down Expand Up @@ -71,7 +69,6 @@ public function getBlockPrefix(): string
* hierarchy: string
* }
* }> $options
* @psalm-param Options $options
*/
private function getChoices(Options $options): array
{
Expand Down
2 changes: 0 additions & 2 deletions src/Form/Type/PageTypeChoiceType.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@

/**
* @author Olivier Paradis <paradis.olivier@gmail.com>
*
* @psalm-suppress MissingTemplateParam
*/
final class PageTypeChoiceType extends AbstractType
{
Expand Down
2 changes: 0 additions & 2 deletions src/Form/Type/TemplateChoiceType.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@

/**
* @author Thomas Rabaix <thomas.rabaix@sonata-project.org>
*
* @psalm-suppress MissingTemplateParam
*/
final class TemplateChoiceType extends AbstractType
{
Expand Down
2 changes: 0 additions & 2 deletions src/Model/Page.php
Original file line number Diff line number Diff line change
Expand Up @@ -543,8 +543,6 @@ public function isInternal(): bool

/**
* @return array<string, string>
*
* @psalm-suppress PossiblyUndefinedArrayOffset
*/
private function getHeadersAsArray(string $rawHeaders): array
{
Expand Down
2 changes: 0 additions & 2 deletions src/Model/SnapshotChildrenCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
*
* @author Thomas Rabaix <thomas.rabaix@sonata-project.org>
*
* @psalm-suppress PropertyNotSetInConstructor
*
* @see $collection property is initialized in the doInitialize method
*/
final class SnapshotChildrenCollection extends AbstractLazyCollection
Expand Down
1 change: 1 addition & 0 deletions src/Resources/config/routing/exceptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
return static function (RoutingConfigurator $routes) {
foreach (debug_backtrace() as $trace) {
if (isset($trace['object'], $trace['args'])
/* @phpstan-ignore class.notFound */
&& $trace['object'] instanceof XmlFileLoader
&& $trace['args'][0] === __DIR__.'/exceptions.php'
&& $trace['args'][3] === __DIR__.'/exceptions.xml'
Expand Down
3 changes: 0 additions & 3 deletions src/Serializer/BlockTypeExtractor.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@
use Symfony\Component\PropertyInfo\Type as LegacyType;
use Symfony\Component\TypeInfo\Type;

/**
* @psalm-suppress DeprecatedClass
*/
final class BlockTypeExtractor implements PropertyTypeExtractorInterface
{
public const NULLABLE_STRINGS = [
Expand All @@ -41,20 +38,20 @@
*
* @return LegacyType[]|null
*/
public function getTypes(string $class, string $property, array $context = []): ?array

Check failure on line 41 in src/Serializer/BlockTypeExtractor.php

View workflow job for this annotation

GitHub Actions / PHPStan

Method Sonata\PageBundle\Serializer\BlockTypeExtractor::getTypes() has invalid return type Symfony\Component\PropertyInfo\Type.
{
if ($class !== $this->blockClass) {
return null;
}
if ('position' === $property) {
return [
new LegacyType(LegacyType::BUILTIN_TYPE_INT, true),

Check failure on line 48 in src/Serializer/BlockTypeExtractor.php

View workflow job for this annotation

GitHub Actions / PHPStan

Instantiated class Symfony\Component\PropertyInfo\Type not found.

Check failure on line 48 in src/Serializer/BlockTypeExtractor.php

View workflow job for this annotation

GitHub Actions / PHPStan

Access to constant BUILTIN_TYPE_INT on an unknown class Symfony\Component\PropertyInfo\Type.
new LegacyType(LegacyType::BUILTIN_TYPE_STRING, true),

Check failure on line 49 in src/Serializer/BlockTypeExtractor.php

View workflow job for this annotation

GitHub Actions / PHPStan

Instantiated class Symfony\Component\PropertyInfo\Type not found.

Check failure on line 49 in src/Serializer/BlockTypeExtractor.php

View workflow job for this annotation

GitHub Actions / PHPStan

Access to constant BUILTIN_TYPE_STRING on an unknown class Symfony\Component\PropertyInfo\Type.
];
}
if ('enabled' === $property) {
return [
new LegacyType(LegacyType::BUILTIN_TYPE_BOOL, true),

Check failure on line 54 in src/Serializer/BlockTypeExtractor.php

View workflow job for this annotation

GitHub Actions / PHPStan

Instantiated class Symfony\Component\PropertyInfo\Type not found.

Check failure on line 54 in src/Serializer/BlockTypeExtractor.php

View workflow job for this annotation

GitHub Actions / PHPStan

Access to constant BUILTIN_TYPE_BOOL on an unknown class Symfony\Component\PropertyInfo\Type.
new LegacyType(LegacyType::BUILTIN_TYPE_INT, true),
new LegacyType(LegacyType::BUILTIN_TYPE_STRING, true),
];
Expand Down
3 changes: 0 additions & 3 deletions src/Serializer/InterfaceTypeExtractor.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@
use Symfony\Component\PropertyInfo\Type as LegacyType;
use Symfony\Component\TypeInfo\Type;

/**
* @psalm-suppress DeprecatedClass
*/
final class InterfaceTypeExtractor implements PropertyTypeExtractorInterface
{
/**
Expand Down
2 changes: 0 additions & 2 deletions src/Template/Matrix/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@
final class Parser
{
/**
* @psalm-suppress InvalidOperand
*
* @param array<string> $mapping
*
* @throws \InvalidArgumentException
Expand Down
3 changes: 0 additions & 3 deletions tests/App/Entity/SonataPageBlock.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@
use Doctrine\ORM\Mapping as ORM;
use Sonata\PageBundle\Entity\BaseBlock;

/**
* @psalm-suppress ClassMustBeFinal
*/
#[ORM\Entity]
#[ORM\Table(name: 'page__block')]
class SonataPageBlock extends BaseBlock
Expand Down
3 changes: 0 additions & 3 deletions tests/App/Entity/SonataPagePage.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@
use Doctrine\ORM\Mapping as ORM;
use Sonata\PageBundle\Entity\BasePage;

/**
* @psalm-suppress ClassMustBeFinal
*/
#[ORM\Entity]
#[ORM\Table(name: 'page__page')]
#[ORM\HasLifecycleCallbacks]
Expand Down
3 changes: 0 additions & 3 deletions tests/App/Entity/SonataPageSite.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@
use Doctrine\ORM\Mapping as ORM;
use Sonata\PageBundle\Entity\BaseSite;

/**
* @psalm-suppress ClassMustBeFinal
*/
#[ORM\Entity]
#[ORM\Table(name: 'page__site')]
#[ORM\HasLifecycleCallbacks]
Expand Down
3 changes: 0 additions & 3 deletions tests/App/Entity/SonataPageSnapshot.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@
use Doctrine\ORM\Mapping as ORM;
use Sonata\PageBundle\Entity\BaseSnapshot;

/**
* @psalm-suppress ClassMustBeFinal
*/
#[ORM\Entity]
#[ORM\Table(name: 'page__snapshot')]
#[ORM\Index(name: 'idx_snapshot_dates_enabled', columns: ['publication_date_start', 'publication_date_end', 'enabled'])]
Expand Down
3 changes: 1 addition & 2 deletions tests/Entity/SnapshotManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,7 @@ public function testEnableSnapshots(): void
if (class_exists(FieldMapping::class)) {
$classMetadata->addInheritedFieldMapping(FieldMapping::fromMappingArray($fieldMapping));
} else {
/**
* @psalm-suppress InvalidArgument
/*
* @phpstan-ignore-next-line
*/
$classMetadata->addInheritedFieldMapping($fieldMapping);
Expand Down
2 changes: 0 additions & 2 deletions tests/Request/RequestFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@

/**
* NEXT_MAJOR: Remove this class.
*
* @psalm-suppress DeprecatedClass,DeprecatedMethod
*/
#[IgnoreDeprecations]
final class RequestFactoryTest extends TestCase
Expand Down
Loading