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
6 changes: 3 additions & 3 deletions .github/workflows/analysis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ jobs:
parallel-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- run: composer update --no-interaction --no-progress --prefer-dist --ansi
- run: ./vendor/bin/parallel-lint --colors ./src ./tests
phpcs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- run: composer update --no-interaction --no-progress --prefer-dist --ansi
- run: ./vendor/bin/phpcs --colors
phpstan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- run: composer update --no-interaction --no-progress --prefer-dist --ansi
- run: ./vendor/bin/phpstan analyse --no-progress --ansi
10 changes: 7 additions & 3 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,14 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php-version: [8.1]
composer-flags: [null, --prefer-lowest]
php-version: ["8.2", "8.3", "8.4"]
composer-flags: [null]
include:
# The lowest allowed dependency set only needs to hold on the lowest supported PHP.
- php-version: "8.2"
composer-flags: --prefer-lowest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
Expand Down
15 changes: 14 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
_In progress…_

## [2.1.0] - 2026-09-21
### Added
- Support for Symfony 7.

### Changed
- Minimum supported versions are now PHP 8.2 and Symfony 6.4.

## [2.0.0] - 2022-08-29
### Changed
- Support Symfony 6 and PHP 8, dropping Symfony 4/5 and PHP 7.

## [1.1.1] - 2021-07-16
### Fixed
- Add missing support for `replace` in the configuration.
Expand All @@ -19,7 +30,9 @@ _In progress…_
## [1.0.0] - 2020-10-02
First release.

[Unreleased]: https://github.com/BatchLabs/headers-bundle/compare/v1.1.1...HEAD
[Unreleased]: https://github.com/BatchLabs/headers-bundle/compare/2.1.0...HEAD
[2.1.0]: https://github.com/BatchLabs/headers-bundle/compare/2.0.0...2.1.0
[2.0.0]: https://github.com/BatchLabs/headers-bundle/compare/1.1.1...2.0.0
[1.1.1]: https://github.com/BatchLabs/headers-bundle/compare/v1.1.0...v1.1.1
[1.1.0]: https://github.com/BatchLabs/headers-bundle/compare/v1.0.0...v1.1.0
[1.0.0]: https://github.com/BatchLabs/headers-bundle/releases/tag/v1.0.0
10 changes: 5 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
"description": "A Symfony bundle to easily add headers to your responses.",
"type": "symfony-bundle",
"require": {
"php": "^8.0",
"symfony/http-kernel": "^6.0",
"symfony/dependency-injection": "^6.0",
"symfony/config": "^6.0",
"symfony/expression-language": "^6.0",
"php": "^8.2",
"symfony/http-kernel": "^6.4 || ^7.0",
"symfony/dependency-injection": "^6.4 || ^7.0",
"symfony/config": "^6.4 || ^7.0",
"symfony/expression-language": "^6.4 || ^7.0",
"psr/cache": "^3.0"
},
"require-dev": {
Expand Down
4 changes: 2 additions & 2 deletions phpcs.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
<config name="installed_paths" value="../../slevomat/coding-standard"/><!-- relative path from PHPCS source location -->
<rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes">
<properties>
<property name="newlinesCountBetweenOpenTagAndDeclare" value="2"/>
<property name="newlinesCountAfterDeclare" value="2"/>
<property name="linesCountBeforeDeclare" value="1"/>
<property name="linesCountAfterDeclare" value="1"/>
<property name="spacesCountAroundEqualsSign" value="0"/>
</properties>
</rule>
Expand Down
1 change: 1 addition & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ parameters:
checkMissingIterableValueType: false
checkGenericClassInNonGenericObjectType: false
inferPrivatePropertyTypeFromConstructor: true
treatPhpDocTypesAsCertain: false
6 changes: 4 additions & 2 deletions src/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace Batch\HeadersBundle\DependencyInjection;

use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;

Expand All @@ -12,9 +13,10 @@ final class Configuration implements ConfigurationInterface
public function getConfigTreeBuilder(): TreeBuilder
{
$treeBuilder = new TreeBuilder('batch_headers');
$rootNode = $treeBuilder->getRootNode();
\assert($rootNode instanceof ArrayNodeDefinition);

// @phpstan-ignore-next-line
$treeBuilder->getRootNode()
$rootNode
->children()
->arrayNode('headers')
->arrayPrototype()
Expand Down
Loading