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

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
28 changes: 2 additions & 26 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 @@ -41,30 +41,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

- 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 @@ -77,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
23 changes: 14 additions & 9 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,34 +30,39 @@ jobs:
strategy:
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 @@ Sonata twig extensions

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

[![Total Downloads](https://poser.pugx.org/sonata-project/twig-extensions/downloads)](https://packagist.org/packages/sonata-project/twig-extensions)
Expand Down
33 changes: 18 additions & 15 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,33 +21,36 @@
],
"homepage": "https://docs.sonata-project.org/projects/twig-extensions",
"require": {
"php": "^8.1",
"symfony/config": "^6.4 || ^7.1",
"symfony/twig-bridge": "^6.4 || ^7.1",
"php": "^8.2",
"symfony/config": "^6.4 || ^7.3 || ^8.0",
"symfony/twig-bridge": "^6.4 || ^7.3 || ^8.0",
"twig/twig": "^3.13"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.4",
"matthiasnoback/symfony-config-test": "^6.1",
"matthiasnoback/symfony-dependency-injection-test": "^6.1",
"matthiasnoback/symfony-dependency-injection-test": "dev-ci-updates as 6.1.0.1",
"phpstan/extension-installer": "^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",
"symfony/browser-kit": "^6.4 || ^7.1",
"symfony/dependency-injection": "^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/translation": "^6.4 || ^7.1",
"symfony/twig-bundle": "^6.4 || ^7.1",
"vimeo/psalm": "^5.0 || ^6.10"
"symfony/browser-kit": "^6.4 || ^7.3 || ^8.0",
"symfony/dependency-injection": "^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/translation": "^6.4 || ^7.3 || ^8.0",
"symfony/twig-bundle": "^6.4 || ^7.3 || ^8.0"
},
"repositories": [
{
"type": "git",
"url": "git@github.com:dmaicher/SymfonyDependencyInjectionTest.git"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

forked the changes from SymfonyTest/SymfonyDependencyInjectionTest#165 as there seems to be no movement 😢 let's revert this after compatibility was added

}
],
"minimum-stability": "dev",
"prefer-stable": true,
"autoload": {
Expand Down
20 changes: 0 additions & 20 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/Bridge/Symfony/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ public function getConfigTreeBuilder(): TreeBuilder

/**
* Returns configuration for flash messages.
*
* @psalm-suppress UndefinedInterfaceMethod
*/
private function addFlashMessageSection(ArrayNodeDefinition $node): void
{
Expand Down
4 changes: 0 additions & 4 deletions src/TokenParser/TemplateBoxTokenParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@
use Twig\Token;
use Twig\TokenParser\AbstractTokenParser;

/**
* @psalm-suppress PropertyNotSetInConstructor $this->parser is set by twig using setParser.
*/
final class TemplateBoxTokenParser extends AbstractTokenParser
{
/**
Expand All @@ -36,7 +33,6 @@ public function parse(Token $token): TemplateBoxNode
if (method_exists($this->parser, 'parseExpression')) {
$message = $this->parser->parseExpression();
} else {
/** @psalm-suppress DeprecatedClass, DeprecatedMethod */
$message = $this->parser->getExpressionParser()->parseExpression();
}
} else {
Expand Down
1 change: 0 additions & 1 deletion tests/App/AppKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ protected function configureContainer(ContainerBuilder $containerBuilder, Loader

$containerBuilder->loadFromExtension('twig', [
'strict_variables' => '%kernel.debug%',
'exception_controller' => null,
'paths' => ['%kernel.project_dir%/templates'],
]);
}
Expand Down
5 changes: 0 additions & 5 deletions tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,5 @@
}

if (file_exists($file = __DIR__.'/custom_bootstrap.php')) {
/**
* @psalm-suppress MissingFile,UnusedPsalmSuppress
*
* @see https://github.com/vimeo/psalm/issues/3886
*/
require_once $file;
}