Skip to content
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
2 changes: 0 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,3 @@ rector.php export-ignore
phpstan.neon.dist export-ignore
phpstan-baseline.neon export-ignore
phpstan-console-application.php export-ignore
psalm.xml export-ignore
psalm-baseline.xml export-ignore
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
extensions: mongodb
Expand All @@ -54,7 +54,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
29 changes: 2 additions & 27 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
extensions: mongodb
Expand All @@ -42,31 +42,6 @@ jobs:
- name: PHPStan
run: vendor/bin/phpstan --no-progress --memory-limit=1G analyse --error-format=github

psalm:
name: Psalm

runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install PHP with extensions
uses: shivammathur/setup-php@v2
with:
php-version: '8.4'
coverage: none
tools: composer:v2
extensions: mongodb

- name: Install Composer dependencies (highest)
uses: ramsey/composer-install@v3
with:
dependency-versions: highest

- name: Psalm
run: vendor/bin/psalm --no-progress --show-info=false --stats --output-format=github --threads=$(nproc) --shepherd --php-version=8.4

rector:
name: Rector

Expand All @@ -79,7 +54,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
extensions: mongodb
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
24 changes: 15 additions & 9 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,36 +34,42 @@ jobs:
- 27017:27017

strategy:
fail-fast: false
matrix:
php-version:
- '8.1'
- '8.2'
- '8.3'
- '8.4'
- '8.5'
dependencies: [highest]
allowed-to-fail: [false]
symfony-require: ['']
variant: [normal]
include:
- php-version: '8.1'
- php-version: '8.2'
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ composer.lock
phpunit.xml
phpstan.neon
/.phpunit.result.cache
tests/App/config/reference.php
/docs/_build/
4 changes: 0 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,6 @@ phpstan:
vendor/bin/phpstan --memory-limit=1G analyse
.PHONY: phpstan

psalm:
vendor/bin/psalm --php-version=8.4
.PHONY: psalm

rector:
vendor/bin/rector
.PHONY: rector
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ Symfony SonataClassificationBundle

[![Latest Stable Version](https://poser.pugx.org/sonata-project/classification-bundle/v/stable)](https://packagist.org/packages/sonata-project/classification-bundle)
[![Latest Unstable Version](https://poser.pugx.org/sonata-project/classification-bundle/v/unstable)](https://packagist.org/packages/sonata-project/classification-bundle)
[![Psalm Type Coverage][shepherd_stable_badge]][shepherd_stable_link]
[![License](https://poser.pugx.org/sonata-project/classification-bundle/license)](https://packagist.org/packages/sonata-project/classification-bundle)

[![Total Downloads](https://poser.pugx.org/sonata-project/classification-bundle/downloads)](https://packagist.org/packages/sonata-project/classification-bundle)
Expand Down
55 changes: 26 additions & 29 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,23 @@
],
"homepage": "https://docs.sonata-project.org/projects/SonataClassificationBundle",
"require": {
"php": "^8.1",
"php": "^8.2",
"cocur/slugify": "^4.0",
"doctrine/collections": "^1.6 || ^2.0",
"doctrine/persistence": "^3.0.2 || ^4.0",
"sonata-project/doctrine-extensions": "^1.13 || ^2.0",
"sonata-project/form-extensions": "^1.4 || ^2.0",
"symfony/config": "^6.4 || ^7.1",
"symfony/console": "^6.4 || ^7.1",
"symfony/dependency-injection": "^6.4 || ^7.1",
"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/options-resolver": "^6.4 || ^7.1",
"symfony/routing": "^6.4 || ^7.1",
"symfony/translation": "^6.4 || ^7.1",
"symfony/validator": "^6.4 || ^7.1",
"sonata-project/doctrine-extensions": "^2.0",
"sonata-project/form-extensions": "^2.0",
"symfony/config": "^6.4 || ^7.3",
"symfony/console": "^6.4 || ^7.3",
"symfony/dependency-injection": "^6.4 || ^7.3",
"symfony/form": "^6.4 || ^7.3",
"symfony/framework-bundle": "^6.4 || ^7.3",
"symfony/http-foundation": "^6.4 || ^7.3",
"symfony/http-kernel": "^6.4 || ^7.3",
"symfony/options-resolver": "^6.4 || ^7.3",
"symfony/routing": "^6.4 || ^7.3",
"symfony/translation": "^6.4 || ^7.3",
"symfony/validator": "^6.4 || ^7.3",
"twig/twig": "^3.0"
},
"require-dev": {
Expand All @@ -50,34 +50,31 @@
"knplabs/knp-menu-bundle": "^3.0",
"masterminds/html5": "^2.7",
"matthiasnoback/symfony-config-test": "^6.1",
"matthiasnoback/symfony-dependency-injection-test": "^6.1",
"matthiasnoback/symfony-dependency-injection-test": "^6.2",
"phpstan/extension-installer": "^1.0",
"phpstan/phpdoc-parser": "^1.0",
"phpstan/phpstan": "^1.0 || ^2.0",
"phpstan/phpstan-phpunit": "^1.0 || ^2.0",
"phpstan/phpstan-strict-rules": "^1.0 || ^2.0",
"phpstan/phpstan-symfony": "^1.0 || ^2.0",
"phpunit/phpunit": "^10.5.54 || ^11.5.38 || ^12.3.10",
"psalm/plugin-phpunit": "^0.18 || ^0.19",
"psalm/plugin-symfony": "^5.0",
"phpunit/phpunit": "^11.5.38 || ^12.3.10",
"rector/rector": "^1.1 || ^2.0",
"sonata-project/admin-bundle": "^4.35.4",
"sonata-project/block-bundle": "^4.11 || ^5.0",
"sonata-project/admin-bundle": "^4.39",
"sonata-project/block-bundle": "^5.0",
"sonata-project/doctrine-orm-admin-bundle": "^4.0",
"symfony/asset": "^6.4 || ^7.1",
"symfony/browser-kit": "^6.4 || ^7.1",
"symfony/filesystem": "^6.4 || ^7.1",
"symfony/security-bundle": "^6.4 || ^7.1",
"symfony/security-csrf": "^6.4 || ^7.1",
"symfony/twig-bundle": "^6.4 || ^7.1",
"symfony/yaml": "^6.4 || ^7.1",
"vimeo/psalm": "^5.0 || ^6.10"
"symfony/asset": "^6.4 || ^7.3",
"symfony/browser-kit": "^6.4 || ^7.3",
"symfony/filesystem": "^6.4 || ^7.3",
"symfony/security-bundle": "^6.4 || ^7.3",
"symfony/security-csrf": "^6.4 || ^7.3",
"symfony/twig-bundle": "^6.4 || ^7.3",
"symfony/yaml": "^6.4 || ^7.3"
},
"conflict": {
"doctrine/mongodb-odm": "<2.4",
"doctrine/orm": "<2.14",
"sonata-project/admin-bundle": "<4.14",
"sonata-project/block-bundle": "<4.11",
"sonata-project/block-bundle": "<5.0",
"sonata-project/doctrine-orm-admin-bundle": "<4.0"
},
"suggest": {
Expand Down
18 changes: 0 additions & 18 deletions psalm.xml

This file was deleted.

2 changes: 1 addition & 1 deletion rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
]);

$rectorConfig->sets([
LevelSetList::UP_TO_PHP_81,
LevelSetList::UP_TO_PHP_82,
PHPUnitSetList::PHPUNIT_100,
PHPUnitSetList::PHPUNIT_CODE_QUALITY,
]);
Expand Down
2 changes: 0 additions & 2 deletions src/Admin/Filter/CategoryFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@ public function getFormOptions(): array
}

/**
* @psalm-suppress DeprecatedClass
*
* NEXT_MAJOR: Remove this method.
*/
public function getRenderSettings(): array
Expand Down
2 changes: 0 additions & 2 deletions src/Admin/Filter/CollectionFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@ public function getFormOptions(): array
}

/**
* @psalm-suppress DeprecatedClass
*
* NEXT_MAJOR: Remove this method.
*/
public function getRenderSettings(): array
Expand Down
5 changes: 0 additions & 5 deletions src/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,6 @@
*/
final class Configuration implements ConfigurationInterface
{
/**
* @psalm-suppress UndefinedInterfaceMethod
*
* @see https://github.com/psalm/psalm-plugin-symfony/issues/174
*/
public function getConfigTreeBuilder(): TreeBuilder
{
$treeBuilder = new TreeBuilder('sonata_classification');
Expand Down
2 changes: 0 additions & 2 deletions src/Form/Type/CategorySelectorType.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@

/**
* @author Thomas Rabaix <thomas.rabaix@sonata-project.org>
*
* @psalm-suppress MissingTemplateParam https://github.com/phpstan/phpstan-symfony/issues/320
*/
final class CategorySelectorType extends AbstractType
{
Expand Down
4 changes: 2 additions & 2 deletions tests/Admin/AdminTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ final class AdminTest extends TestCase

protected function setUp(): void
{
$this->contextManager = $this->createMock(ContextManagerInterface::class);
$this->contextManager = static::createStub(ContextManagerInterface::class);
}

public function testAbstractAdminChildren(): void
{
$contextAwareAdmin = $this->createMock(ContextAwareAdmin::class);
$contextAwareAdmin = static::createStub(ContextAwareAdmin::class);
static::assertInstanceOf(AbstractAdmin::class, $contextAwareAdmin);
$contextAdmin = new ContextAdmin();
static::assertInstanceOf(AbstractAdmin::class, $contextAdmin);
Expand Down
3 changes: 0 additions & 3 deletions tests/App/Entity/Category.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\ClassificationBundle\Entity\BaseCategory;

/**
* @psalm-suppress ClassMustBeFinal
*/
#[ORM\Entity]
#[ORM\Table(name: 'classification__category')]
class Category extends BaseCategory
Expand Down
3 changes: 0 additions & 3 deletions tests/App/Entity/Collection.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\ClassificationBundle\Entity\BaseCollection;

/**
* @psalm-suppress ClassMustBeFinal
*/
#[ORM\Entity]
#[ORM\Table(name: 'classification__collection')]
class Collection extends BaseCollection
Expand Down
3 changes: 0 additions & 3 deletions tests/App/Entity/Context.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\ClassificationBundle\Entity\BaseContext;

/**
* @psalm-suppress ClassMustBeFinal
*/
#[ORM\Entity]
#[ORM\Table(name: 'classification__context')]
class Context extends BaseContext
Expand Down
3 changes: 0 additions & 3 deletions tests/App/Entity/Tag.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\ClassificationBundle\Entity\BaseTag;

/**
* @psalm-suppress ClassMustBeFinal
*/
#[ORM\Entity]
#[ORM\Table(name: 'classification__tag')]
class Tag extends BaseTag
Expand Down
Loading
Loading