From 0489a41e25fa7678ff7840238b82a20e5451f126 Mon Sep 17 00:00:00 2001 From: Olivier Laviale Date: Fri, 29 Nov 2024 16:58:34 +0100 Subject: [PATCH] Update boilerplate --- .editorconfig | 5 +++- .github/workflows/code-style.yml | 2 +- .github/workflows/static-analysis.yml | 2 +- .github/workflows/test.yml | 3 +- .gitignore | 2 +- CHANGELOG.md | 2 +- Dockerfile | 6 ++-- LICENSE | 43 +++++++++++---------------- Makefile | 18 +++++------ README.md | 26 ++++++---------- composer.json | 14 ++++----- docker-compose.yaml | 23 ++++++++++---- phpcs.xml | 2 +- phpstan.neon | 1 + phpunit.xml | 8 +++-- src/Config.php | 9 ------ src/ConfigBuilder.php | 11 ++----- src/ContainerFactory.php | 11 +------ src/ContainerPathname.php | 9 ------ src/EventListener.php | 9 ------ src/ExtensionWithFactory.php | 9 ------ src/ServiceAccessor.php | 9 ------ tests/bootstrap.php | 9 ------ tests/src/Acme/FakeCompilerPass.php | 9 ------ tests/src/Acme/FakeExtension.php | 9 ------ tests/src/Acme/SampleCompilerPass.php | 9 ------ tests/src/Acme/ServiceA.php | 9 ------ tests/src/Acme/ServiceB.php | 9 ------ tests/src/Acme/ServiceC.php | 9 ------ tests/src/ConfigBuilderTest.php | 14 ++------- tests/src/ConfigTest.php | 9 ------ tests/src/EventListener.php | 9 ------ tests/src/IntegrationTest.php | 3 +- tests/src/ServiceAccessorTest.php | 4 +-- tests/src/SetStateHelper.php | 9 ------ 35 files changed, 88 insertions(+), 247 deletions(-) diff --git a/.editorconfig b/.editorconfig index fafef05..c11eed3 100644 --- a/.editorconfig +++ b/.editorconfig @@ -11,5 +11,8 @@ indent_size = 4 [{*.yaml,*.yml,*.neon,*.json}] indent_size = 2 -[Dockerfile] +[*.md] +max_line_length = 100 + +[{Dockerfile,Makefile}] indent_style = tab diff --git a/.github/workflows/code-style.yml b/.github/workflows/code-style.yml index 66a1b3d..ca5ce00 100644 --- a/.github/workflows/code-style.yml +++ b/.github/workflows/code-style.yml @@ -14,7 +14,7 @@ jobs: uses: shivammathur/setup-php@v2 with: coverage: none - php-version: "8.3" + php-version: "8.2" ini-values: memory_limit=-1 tools: phpcs, cs2pr - name: Run PHP Code Sniffer diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index 6a87b5e..81f7cd9 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -14,7 +14,7 @@ jobs: - name: Install PHP uses: shivammathur/setup-php@v2 with: - php-version: "8.3" + php-version: "8.2" ini-values: memory_limit=-1 tools: composer:v2 - name: Cache dependencies diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0446d81..ba60a0a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,6 +13,7 @@ jobs: php-version: - "8.2" - "8.3" + - "8.4" steps: - name: Checkout uses: actions/checkout@v4 @@ -40,7 +41,7 @@ jobs: run: make test-coveralls - name: Upload code coverage - if: ${{ matrix.php-version == '8.3' }} + if: ${{ matrix.php-version == '8.2' }} env: COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | diff --git a/.gitignore b/.gitignore index 14010f5..4edb3d9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -.phpunit.cache +.phpunit.result.cache build composer.lock vendor diff --git a/CHANGELOG.md b/CHANGELOG.md index 23fd969..3f487ec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # CHANGELOG -# v5.0 to v6.0 +# v5.x to v6.0 ### New requirements diff --git a/Dockerfile b/Dockerfile index 09cc22c..40061cf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,8 @@ -ARG PHP_VERSION +ARG PHP_VERSION=8.2 FROM php:${PHP_VERSION}-cli-bookworm RUN <<-EOF - apt-get update + apt-get update apt-get install -y autoconf pkg-config pecl channel-update pecl.php.net pecl install xdebug @@ -35,6 +35,8 @@ RUN <<-EOF SHELL EOF +RUN composer global require squizlabs/php_codesniffer + # package specifics RUN <<-EOF diff --git a/LICENSE b/LICENSE index 6ffa4f5..32c7803 100644 --- a/LICENSE +++ b/LICENSE @@ -1,30 +1,21 @@ -The icanboogie/bind-symfony-dependency-injection package is free software. -It is released under the terms of the following BSD License. +MIT License -Copyright (c) 2017-present by Olivier Laviale -All rights reserved. +Copyright (c) 2017 Olivier LAVIALE -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - * Neither the name of Olivier Laviale nor the names of its - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/Makefile b/Makefile index 9f102f0..f148a54 100644 --- a/Makefile +++ b/Makefile @@ -1,14 +1,9 @@ # customization -PACKAGE_NAME = icanboogie/bind-symfony-dependency-injection PHPUNIT = vendor/bin/phpunit # do not edit the following lines -.PHONY: usage -usage: - @echo "test: Runs the test suite.\ndoc: Creates the documentation.\nclean: Removes the documentation, the dependencies and the Composer files." - vendor: @composer install @@ -40,13 +35,18 @@ test-container: test-container-82 .PHONY: test-container-82 test-container-82: - @-docker-compose run --rm app82 bash - @docker-compose down -v + @-docker compose run --rm app82 bash + @docker compose down -v .PHONY: test-container-83 test-container-83: - @-docker-compose run --rm app83 bash - @docker-compose down -v + @-docker compose run --rm app83 bash + @docker compose down -v + +.PHONY: test-container-84 +test-container-84: + @-docker compose run --rm app84 bash + @docker compose down -v .PHONY: lint lint: diff --git a/README.md b/README.md index 1e4c5b6..5f3c6fd 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,8 @@ # bind-symfony-dependency-injection -[![Release](https://img.shields.io/packagist/v/ICanBoogie/bind-symfony-dependency-injection.svg)](https://packagist.org/packages/ICanBoogie/bind-symfony-dependency-injection) -[![Code Quality](https://img.shields.io/scrutinizer/g/ICanBoogie/bind-symfony-dependency-injection.svg)](https://scrutinizer-ci.com/g/ICanBoogie/bind-symfony-dependency-injection) -[![Code Coverage](https://img.shields.io/coveralls/ICanBoogie/bind-symfony-dependency-injection.svg)](https://coveralls.io/r/ICanBoogie/bind-symfony-dependency-injection) -[![Packagist](https://img.shields.io/packagist/dt/ICanBoogie/bind-symfony-dependency-injection.svg)](https://packagist.org/packages/ICanBoogie/bind-symfony-dependency-injection) +[![Release](https://img.shields.io/packagist/v/icanboogie/.svg)](https://packagist.org/packages/icanboogie/) +[![Code Coverage](https://coveralls.io/repos/github/ICanBoogie//badge.svg?branch=6.0)](https://coveralls.io/r/ICanBoogie/?branch=6.0) +[![Downloads](https://img.shields.io/packagist/dt/icanboogie/.svg)](https://packagist.org/packages/icanboogie/) Together with [icanboogie/service][], this package binds [symfony/dependency-injection][] to [ICanBoogie][] and allows the container to be used to provide services. @@ -131,31 +130,24 @@ return fn(ConfigBuilder $config) => $config ## Continuous Integration -The project is continuously tested by [GitHub actions](https://github.com/ICanBoogie/bind-symfony-dependency-injection/actions). +The project is continuously tested by [GitHub actions](https://github.com/ICanBoogie//actions). -[![Tests](https://github.com/ICanBoogie/bind-symfony-dependency-injection/workflows/test/badge.svg)](https://github.com/ICanBoogie/bind-symfony-dependency-injection/actions?query=workflow%3Atest) -[![Static Analysis](https://github.com/ICanBoogie/bind-symfony-dependency-injection/workflows/static-analysis/badge.svg)](https://github.com/ICanBoogie/bind-symfony-dependency-injection/actions?query=workflow%3Astatic-analysis) -[![Code Style](https://github.com/ICanBoogie/bind-symfony-dependency-injection/workflows/code-style/badge.svg)](https://github.com/ICanBoogie/bind-symfony-dependency-injection/actions?query=workflow%3Acode-style) +[![Tests](https://github.com/ICanBoogie//actions/workflows/test.yml/badge.svg?branch=6.0)](https://github.com/ICanBoogie//actions/workflows/test.yml) +[![Static Analysis](https://github.com/ICanBoogie//actions/workflows/static-analysis.yml/badge.svg?branch=6.0)](https://github.com/ICanBoogie//actions/workflows/static-analysis.yml) +[![Code Style](https://github.com/ICanBoogie//actions/workflows/code-style.yml/badge.svg?branch=6.0)](https://github.com/ICanBoogie//actions/workflows/code-style.yml) ## Code of Conduct This project adheres to a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). By participating in -this project and its community, you are expected to uphold this code. +this project and its community, you're expected to uphold this code. ## Contributing -Please see [CONTRIBUTING](CONTRIBUTING.md) for details. - - - -## License - -**icanboogie/bind-symfony-dependency-injection** is released under the [BSD-3-Clause](LICENSE). - +See [CONTRIBUTING](CONTRIBUTING.md) for details. diff --git a/composer.json b/composer.json index cfb1b23..1d1b365 100644 --- a/composer.json +++ b/composer.json @@ -8,7 +8,7 @@ "injection" ], "homepage": "https://icanboogie.org/", - "license": "BSD-3-Clause", + "license": "MIT", "authors": [ { "name": "Olivier Laviale", @@ -22,7 +22,10 @@ "source": "https://github.com/ICanBoogie/bind-symfony-dependency-injection" }, "config": { - "sort-packages": true + "sort-packages": true, + "allow-plugins": { + "icanboogie/autoconfig": true + } }, "minimum-stability": "dev", "prefer-stable": true, @@ -34,8 +37,8 @@ "symfony/yaml": "^7.0" }, "require-dev": { - "phpstan/phpstan": "^1.10", - "phpunit/phpunit": "^10.5" + "phpstan/phpstan": "^2.0", + "phpunit/phpunit": "^11.4" }, "autoload": { "psr-4": { @@ -47,9 +50,6 @@ "Test\\ICanBoogie\\Binding\\SymfonyDependencyInjection\\": "tests/src" } }, - "scripts": { - "post-autoload-dump": "ICanBoogie\\Autoconfig\\Hooks::on_autoload_dump" - }, "extra": { "icanboogie": { "config-path": "config", diff --git a/docker-compose.yaml b/docker-compose.yaml index c61b622..f13cb79 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -6,10 +6,10 @@ services: args: PHP_VERSION: "8.2" environment: - PHP_IDE_CONFIG: 'serverName=icanboogie-bind-symfony-dependency-injection' + PHP_IDE_CONFIG: 'serverName=icanboogie-bind-symfony-dependency-injection' volumes: - - .:/app:delegated - - ~/.composer:/root/.composer:delegated + - .:/app:delegated + - ~/.composer:/root/.composer:delegated working_dir: /app app83: build: @@ -17,8 +17,19 @@ services: args: PHP_VERSION: "8.3" environment: - PHP_IDE_CONFIG: 'serverName=icanboogie-bind-symfony-dependency-injection' + PHP_IDE_CONFIG: 'serverName=icanboogie-bind-symfony-dependency-injection' volumes: - - .:/app:delegated - - ~/.composer:/root/.composer:delegated + - .:/app:delegated + - ~/.composer:/root/.composer:delegated + working_dir: /app + app84: + build: + context: . + args: + PHP_VERSION: "8.4" + environment: + PHP_IDE_CONFIG: 'serverName=icanboogie-bind-symfony-dependency-injection' + volumes: + - .:/app:delegated + - ~/.composer:/root/.composer:delegated working_dir: /app diff --git a/phpcs.xml b/phpcs.xml index adc9f47..35133b9 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -6,7 +6,7 @@ tests/sandbox/* tests/var/* - + diff --git a/phpstan.neon b/phpstan.neon index a7c64bd..54666fa 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -1,3 +1,4 @@ +# $schema: https://phpstan.olvlvl.com/schema.json parameters: level: 8 paths: diff --git a/phpunit.xml b/phpunit.xml index 626489e..6834824 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,17 +1,19 @@ - ./tests/src + tests/src diff --git a/src/Config.php b/src/Config.php index 16b26c9..a562553 100644 --- a/src/Config.php +++ b/src/Config.php @@ -1,14 +1,5 @@ - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - namespace ICanBoogie\Binding\SymfonyDependencyInjection; use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; diff --git a/src/ConfigBuilder.php b/src/ConfigBuilder.php index 400b88c..d449418 100644 --- a/src/ConfigBuilder.php +++ b/src/ConfigBuilder.php @@ -1,14 +1,5 @@ - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - namespace ICanBoogie\Binding\SymfonyDependencyInjection; use ICanBoogie\Config\Builder; @@ -49,6 +40,7 @@ public function build(): Config */ public function add_compiler_pass(string $compiler_pass_class): self { + // @phpstan-ignore-next-line if (!is_subclass_of($compiler_pass_class, CompilerPassInterface::class)) { throw new InvalidArgumentException("Compiler pass must implement " . CompilerPassInterface::class); } @@ -68,6 +60,7 @@ public function add_compiler_pass(string $compiler_pass_class): self */ public function add_extension(string $extension_class): self { + // @phpstan-ignore-next-line if (!is_subclass_of($extension_class, ExtensionInterface::class)) { throw new InvalidArgumentException("Extension must implement " . ExtensionInterface::class); } diff --git a/src/ContainerFactory.php b/src/ContainerFactory.php index 45d6b73..4fab447 100644 --- a/src/ContainerFactory.php +++ b/src/ContainerFactory.php @@ -1,14 +1,5 @@ - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - namespace ICanBoogie\Binding\SymfonyDependencyInjection; use ICanBoogie\Application; @@ -62,7 +53,7 @@ private function instantiate_container(): ContainerInterface $app = $this->app; $pathname = ContainerPathname::from($app); /** @var class-string $class */ - $class = 'ApplicationContainer'; + $class = 'ApplicationContainer'; // @phpstan-ignore varTag.nativeType if (!$this->config->use_caching || !file_exists($pathname)) { $builder = $this->create_container_builder(); diff --git a/src/ContainerPathname.php b/src/ContainerPathname.php index e8c0d8f..a957b83 100644 --- a/src/ContainerPathname.php +++ b/src/ContainerPathname.php @@ -1,14 +1,5 @@ - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - namespace ICanBoogie\Binding\SymfonyDependencyInjection; use ICanBoogie\Application; diff --git a/src/EventListener.php b/src/EventListener.php index 6a12bbd..f2e76ff 100644 --- a/src/EventListener.php +++ b/src/EventListener.php @@ -1,14 +1,5 @@ - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - namespace ICanBoogie\Binding\SymfonyDependencyInjection; use ICanBoogie\Application\ClearCacheEvent; diff --git a/src/ExtensionWithFactory.php b/src/ExtensionWithFactory.php index e6fe3ef..43ed8f1 100644 --- a/src/ExtensionWithFactory.php +++ b/src/ExtensionWithFactory.php @@ -1,14 +1,5 @@ - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - namespace ICanBoogie\Binding\SymfonyDependencyInjection; use ICanBoogie\Application; diff --git a/src/ServiceAccessor.php b/src/ServiceAccessor.php index bea7776..14dc5d0 100644 --- a/src/ServiceAccessor.php +++ b/src/ServiceAccessor.php @@ -1,14 +1,5 @@ - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - namespace ICanBoogie\Binding\SymfonyDependencyInjection; use ICanBoogie\Application; diff --git a/tests/bootstrap.php b/tests/bootstrap.php index e62d5a1..100d4b2 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -1,14 +1,5 @@ - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - namespace ICanBoogie; chdir(__DIR__); diff --git a/tests/src/Acme/FakeCompilerPass.php b/tests/src/Acme/FakeCompilerPass.php index 26777ba..15d563c 100644 --- a/tests/src/Acme/FakeCompilerPass.php +++ b/tests/src/Acme/FakeCompilerPass.php @@ -1,14 +1,5 @@ - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - namespace Test\ICanBoogie\Binding\SymfonyDependencyInjection\Acme; use LogicException; diff --git a/tests/src/Acme/FakeExtension.php b/tests/src/Acme/FakeExtension.php index a8c88eb..d052e6e 100644 --- a/tests/src/Acme/FakeExtension.php +++ b/tests/src/Acme/FakeExtension.php @@ -1,14 +1,5 @@ - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - namespace Test\ICanBoogie\Binding\SymfonyDependencyInjection\Acme; use LogicException; diff --git a/tests/src/Acme/SampleCompilerPass.php b/tests/src/Acme/SampleCompilerPass.php index 6a3f8cc..a636909 100644 --- a/tests/src/Acme/SampleCompilerPass.php +++ b/tests/src/Acme/SampleCompilerPass.php @@ -1,14 +1,5 @@ - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - namespace Test\ICanBoogie\Binding\SymfonyDependencyInjection\Acme; use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; diff --git a/tests/src/Acme/ServiceA.php b/tests/src/Acme/ServiceA.php index 064adac..34ecd00 100644 --- a/tests/src/Acme/ServiceA.php +++ b/tests/src/Acme/ServiceA.php @@ -1,14 +1,5 @@ - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - namespace Test\ICanBoogie\Binding\SymfonyDependencyInjection\Acme; class ServiceA diff --git a/tests/src/Acme/ServiceB.php b/tests/src/Acme/ServiceB.php index c4cec64..a098ddc 100644 --- a/tests/src/Acme/ServiceB.php +++ b/tests/src/Acme/ServiceB.php @@ -1,14 +1,5 @@ - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - namespace Test\ICanBoogie\Binding\SymfonyDependencyInjection\Acme; class ServiceB diff --git a/tests/src/Acme/ServiceC.php b/tests/src/Acme/ServiceC.php index 8f10c0b..b4989e2 100644 --- a/tests/src/Acme/ServiceC.php +++ b/tests/src/Acme/ServiceC.php @@ -1,14 +1,5 @@ - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - namespace Test\ICanBoogie\Binding\SymfonyDependencyInjection\Acme; class ServiceC diff --git a/tests/src/ConfigBuilderTest.php b/tests/src/ConfigBuilderTest.php index d2e020d..50c14a0 100644 --- a/tests/src/ConfigBuilderTest.php +++ b/tests/src/ConfigBuilderTest.php @@ -1,28 +1,18 @@ - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - namespace Test\ICanBoogie\Binding\SymfonyDependencyInjection; use ICanBoogie\Binding\SymfonyDependencyInjection\Config; use ICanBoogie\Binding\SymfonyDependencyInjection\ConfigBuilder; use InvalidArgumentException; +use PHPUnit\Framework\Attributes\Group; use PHPUnit\Framework\TestCase; use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; use Symfony\Component\DependencyInjection\Extension\ExtensionInterface; use function uniqid; -/** - * @group unit - */ +#[Group('unit')] final class ConfigBuilderTest extends TestCase { public function test_fail_on_invalid_extensions(): void diff --git a/tests/src/ConfigTest.php b/tests/src/ConfigTest.php index d79b25d..813bb84 100644 --- a/tests/src/ConfigTest.php +++ b/tests/src/ConfigTest.php @@ -1,14 +1,5 @@ - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - namespace Test\ICanBoogie\Binding\SymfonyDependencyInjection; use ICanBoogie\Binding\SymfonyDependencyInjection\Config; diff --git a/tests/src/EventListener.php b/tests/src/EventListener.php index b6a65bd..a0a211b 100644 --- a/tests/src/EventListener.php +++ b/tests/src/EventListener.php @@ -1,14 +1,5 @@ - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - namespace Test\ICanBoogie\Binding\SymfonyDependencyInjection; use ICanBoogie\Binding\SymfonyDependencyInjection\ContainerPathname; diff --git a/tests/src/IntegrationTest.php b/tests/src/IntegrationTest.php index d7b94aa..a3b6f72 100644 --- a/tests/src/IntegrationTest.php +++ b/tests/src/IntegrationTest.php @@ -17,10 +17,9 @@ final class IntegrationTest extends TestCase { /** - * @dataProvider provideService - * * @param class-string $class */ + #[DataProvider('provideService')] public function testService(string $id, string $class): void { $actual = app()->service_for_id($id, $class); diff --git a/tests/src/ServiceAccessorTest.php b/tests/src/ServiceAccessorTest.php index 5bd3a8c..e89178a 100644 --- a/tests/src/ServiceAccessorTest.php +++ b/tests/src/ServiceAccessorTest.php @@ -4,6 +4,7 @@ use ICanBoogie\ConfigProvider; use ICanBoogie\Storage\Storage; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; use function ICanBoogie\app; @@ -11,10 +12,9 @@ final class ServiceAccessorTest extends TestCase { /** - * @dataProvider provide_service - * * @param class-string $class */ + #[DataProvider('provide_service')] public function test_service(string $id, string $class): void { $service = app()->service_for_id($id, $class); diff --git a/tests/src/SetStateHelper.php b/tests/src/SetStateHelper.php index 49c1b85..b0c55f2 100644 --- a/tests/src/SetStateHelper.php +++ b/tests/src/SetStateHelper.php @@ -1,14 +1,5 @@ - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - namespace Test\ICanBoogie\Binding\SymfonyDependencyInjection; use function file_put_contents;