From 2404d00904daccab014701918f486bbfaa143e74 Mon Sep 17 00:00:00 2001 From: Sergei Predvoditelev Date: Thu, 30 Jul 2026 00:04:08 +0300 Subject: [PATCH 1/5] Replace StyleCI to PHP CS Fixer --- .github/workflows/rector-cs.yml | 27 ++++++ .github/workflows/rector.yml | 24 ------ .php-cs-fixer.dist.php | 22 +++++ .styleci.yml | 85 ------------------- CHANGELOG.md | 2 + composer.json | 4 + rector.php | 31 ++----- runtime/.gitignore | 2 + src/CurrentUser.php | 2 +- src/Event/AfterLogin.php | 4 +- src/Event/AfterLogout.php | 4 +- src/Event/BeforeLogin.php | 4 +- src/Event/BeforeLogout.php | 4 +- src/Guest/GuestIdentityInterface.php | 4 +- src/Login/Cookie/CookieLogin.php | 10 ++- src/Login/Cookie/CookieLoginMiddleware.php | 9 +- src/Login/LoginMiddleware.php | 5 +- src/Method/ApiAuth.php | 4 +- src/Method/WebAuth.php | 5 +- src/UserAuth.php | 7 +- tests/ConfigTest.php | 5 +- tests/CurrentUserTest.php | 6 +- .../Cookie/CookieLoginMiddlewareTest.php | 4 +- tests/Login/Cookie/CookieLoginTest.php | 2 +- tests/Login/LoginMiddlewareTest.php | 4 +- tests/Support/AccessCheckerStub.php | 6 +- tests/Support/MockArraySessionStorage.php | 4 +- tests/Support/MockIdentity.php | 4 +- tests/Support/MockIdentityRepository.php | 4 +- 29 files changed, 105 insertions(+), 193 deletions(-) create mode 100644 .github/workflows/rector-cs.yml delete mode 100644 .github/workflows/rector.yml create mode 100644 .php-cs-fixer.dist.php delete mode 100644 .styleci.yml create mode 100644 runtime/.gitignore diff --git a/.github/workflows/rector-cs.yml b/.github/workflows/rector-cs.yml new file mode 100644 index 0000000..1421ff6 --- /dev/null +++ b/.github/workflows/rector-cs.yml @@ -0,0 +1,27 @@ +name: Rector + PHP CS Fixer + +on: + pull_request: + paths: + - 'src/**' + - 'tests/**' + - 'config/**' + - '.php-cs-fixer.dist.php' + - 'rector.php' + - 'composer.json' + - '.github/workflows/rector-cs.yml' + +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + rector-cs: + permissions: + contents: write # Required to commit formatting fixes back to the PR + uses: yiisoft/actions/.github/workflows/rector-cs.yml@master + with: + php: '8.1' diff --git a/.github/workflows/rector.yml b/.github/workflows/rector.yml deleted file mode 100644 index 7314d24..0000000 --- a/.github/workflows/rector.yml +++ /dev/null @@ -1,24 +0,0 @@ -on: - pull_request: - paths-ignore: - - 'docs/**' - - 'README.md' - - 'CHANGELOG.md' - - '.gitignore' - - '.gitattributes' - - 'infection.json.dist' - - 'psalm.xml' - -name: rector - -permissions: - contents: read - -jobs: - rector: - uses: yiisoft/actions/.github/workflows/rector.yml@master - with: - os: >- - ['ubuntu-latest'] - php: >- - ['8.4'] diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php new file mode 100644 index 0000000..0e03959 --- /dev/null +++ b/.php-cs-fixer.dist.php @@ -0,0 +1,22 @@ +in([ + __DIR__ . '/src', + __DIR__ . '/tests', +]); + +return ConfigBuilder::build() + ->setCacheFile(__DIR__ . '/runtime/.php-cs-fixer.cache') + ->setRiskyAllowed(true) + ->setParallelConfig(ParallelConfigFactory::detect()) + ->setRules([ + '@Yiisoft/Core' => true, + '@Yiisoft/Core:risky' => true, + ]) + ->setFinder($finder); diff --git a/.styleci.yml b/.styleci.yml deleted file mode 100644 index 1ab379b..0000000 --- a/.styleci.yml +++ /dev/null @@ -1,85 +0,0 @@ -preset: psr12 -risky: true - -version: 8.1 - -finder: - exclude: - - docs - - vendor - -enabled: - - alpha_ordered_traits - - array_indentation - - array_push - - combine_consecutive_issets - - combine_consecutive_unsets - - combine_nested_dirname - - declare_strict_types - - dir_constant - - fully_qualified_strict_types - - function_to_constant - - hash_to_slash_comment - - is_null - - logical_operators - - magic_constant_casing - - magic_method_casing - - method_separation - - modernize_types_casting - - native_function_casing - - native_function_type_declaration_casing - - no_alias_functions - - no_empty_comment - - no_empty_phpdoc - - no_empty_statement - - no_extra_block_blank_lines - - no_short_bool_cast - - no_superfluous_elseif - - no_unneeded_control_parentheses - - no_unneeded_curly_braces - - no_unneeded_final_method - - no_unset_cast - - no_unused_imports - - no_unused_lambda_imports - - no_useless_else - - no_useless_return - - normalize_index_brace - - php_unit_dedicate_assert - - php_unit_dedicate_assert_internal_type - - php_unit_expectation - - php_unit_mock - - php_unit_mock_short_will_return - - php_unit_namespaced - - php_unit_no_expectation_annotation - - phpdoc_no_empty_return - - phpdoc_no_useless_inheritdoc - - phpdoc_order - - phpdoc_property - - phpdoc_scalar - - phpdoc_singular_inheritdoc - - phpdoc_trim - - phpdoc_trim_consecutive_blank_line_separation - - phpdoc_type_to_var - - phpdoc_types - - phpdoc_types_order - - print_to_echo - - regular_callable_call - - return_assignment - - self_accessor - - self_static_accessor - - set_type_to_cast - - short_array_syntax - - short_list_syntax - - simplified_if_return - - single_quote - - standardize_not_equals - - ternary_to_null_coalescing - - trailing_comma_in_multiline_array - - unalign_double_arrow - - unalign_equals - - empty_loop_body_braces - - integer_literal_case - - union_type_without_spaces - -disabled: - - function_declaration diff --git a/CHANGELOG.md b/CHANGELOG.md index e1204f7..90dafdc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ ## 2.3.3 under development - no changes in this release. +- Enh #XX: Replace StyleCI with PHP CS Fixer (@vjik) +- Enh #XX: Explicitly import classes and constants in "use" section. ## 2.3.2 December 23, 2025 diff --git a/composer.json b/composer.json index ce82bf9..53725f5 100644 --- a/composer.json +++ b/composer.json @@ -44,7 +44,9 @@ "httpsoft/http-message": "^1.1.6", "maglnet/composer-require-checker": "^4.7.1", "phpunit/phpunit": "^10.5.45", + "friendsofphp/php-cs-fixer": "^3.64", "rector/rector": "^2.0.10", + "yiisoft/code-style": "^1.1", "roave/infection-static-analysis-plugin": "^1.35", "spatie/phpunit-watcher": "^1.24", "vimeo/psalm": "^5.26.1 || ^6.8.8", @@ -79,6 +81,8 @@ } }, "scripts": { + "cs-fix": "php-cs-fixer fix", + "rector": "rector", "test": "phpunit --testdox --no-interaction", "test-watch": "phpunit-watcher watch" } diff --git a/rector.php b/rector.php index 8a9320a..3a21a43 100644 --- a/rector.php +++ b/rector.php @@ -2,32 +2,15 @@ declare(strict_types=1); -use Rector\CodeQuality\Rector\Class_\InlineConstructorDefaultToPropertyRector; use Rector\Config\RectorConfig; -use Rector\Php74\Rector\Closure\ClosureToArrowFunctionRector; -use Rector\Php81\Rector\ClassMethod\NewInInitializerRector; -use Rector\Php81\Rector\Property\ReadOnlyPropertyRector; -use Rector\Php81\Rector\FuncCall\NullToStrictStringFuncCallArgRector; -use Rector\Set\ValueObject\LevelSetList; +use Yiisoft\CodeStyle\Rector\SetList; -return static function (RectorConfig $rectorConfig): void { - $rectorConfig->paths([ +return RectorConfig::configure() + ->withPaths([ __DIR__ . '/src', __DIR__ . '/tests', + ]) + ->withPhpSets(php81: true) + ->withSets([ + SetList::YII_CORE, ]); - - // register a single rule - $rectorConfig->rule(InlineConstructorDefaultToPropertyRector::class); - - // define sets of rules - $rectorConfig->sets([ - LevelSetList::UP_TO_PHP_81, - ]); - - $rectorConfig->skip([ - ClosureToArrowFunctionRector::class, - ReadOnlyPropertyRector::class, - NullToStrictStringFuncCallArgRector::class, - NewInInitializerRector::class, - ]); -}; diff --git a/runtime/.gitignore b/runtime/.gitignore new file mode 100644 index 0000000..d6b7ef3 --- /dev/null +++ b/runtime/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/src/CurrentUser.php b/src/CurrentUser.php index 45d3230..66cf8d0 100644 --- a/src/CurrentUser.php +++ b/src/CurrentUser.php @@ -42,7 +42,7 @@ final class CurrentUser public function __construct( private IdentityRepositoryInterface $identityRepository, private EventDispatcherInterface $eventDispatcher, - ?GuestIdentityFactoryInterface $guestIdentityFactory = null + ?GuestIdentityFactoryInterface $guestIdentityFactory = null, ) { $this->guestIdentityFactory = $guestIdentityFactory ?? new GuestIdentityFactory(); } diff --git a/src/Event/AfterLogin.php b/src/Event/AfterLogin.php index d3c4055..4665b8e 100644 --- a/src/Event/AfterLogin.php +++ b/src/Event/AfterLogin.php @@ -8,9 +8,7 @@ final class AfterLogin { - public function __construct(private IdentityInterface $identity) - { - } + public function __construct(private IdentityInterface $identity) {} public function getIdentity(): IdentityInterface { diff --git a/src/Event/AfterLogout.php b/src/Event/AfterLogout.php index bfe45de..55e383c 100644 --- a/src/Event/AfterLogout.php +++ b/src/Event/AfterLogout.php @@ -8,9 +8,7 @@ final class AfterLogout { - public function __construct(private IdentityInterface $identity) - { - } + public function __construct(private IdentityInterface $identity) {} public function getIdentity(): IdentityInterface { diff --git a/src/Event/BeforeLogin.php b/src/Event/BeforeLogin.php index f0d2910..4b53a33 100644 --- a/src/Event/BeforeLogin.php +++ b/src/Event/BeforeLogin.php @@ -10,9 +10,7 @@ final class BeforeLogin { private bool $isValid = true; - public function __construct(private IdentityInterface $identity) - { - } + public function __construct(private IdentityInterface $identity) {} public function invalidate(): void { diff --git a/src/Event/BeforeLogout.php b/src/Event/BeforeLogout.php index 06f8126..e0f8348 100644 --- a/src/Event/BeforeLogout.php +++ b/src/Event/BeforeLogout.php @@ -10,9 +10,7 @@ final class BeforeLogout { private bool $isValid = true; - public function __construct(private IdentityInterface $identity) - { - } + public function __construct(private IdentityInterface $identity) {} public function invalidate(): void { diff --git a/src/Guest/GuestIdentityInterface.php b/src/Guest/GuestIdentityInterface.php index 52133d4..a9bef96 100644 --- a/src/Guest/GuestIdentityInterface.php +++ b/src/Guest/GuestIdentityInterface.php @@ -9,6 +9,4 @@ /** * Identity interface for a guest non-authenticated user. */ -interface GuestIdentityInterface extends IdentityInterface -{ -} +interface GuestIdentityInterface extends IdentityInterface {} diff --git a/src/Login/Cookie/CookieLogin.php b/src/Login/Cookie/CookieLogin.php index 3dd1563..946678b 100644 --- a/src/Login/Cookie/CookieLogin.php +++ b/src/Login/Cookie/CookieLogin.php @@ -12,6 +12,10 @@ use function json_encode; +use const JSON_THROW_ON_ERROR; +use const JSON_UNESCAPED_SLASHES; +use const JSON_UNESCAPED_UNICODE; + /** * The service is used to send or remove auto-login cookie. * @@ -26,9 +30,7 @@ final class CookieLogin * @param DateInterval|null $duration Interval until the auto-login cookie expires. If it isn't set it means * the auto-login cookie is session cookie that expires when browser is closed. */ - public function __construct(private ?DateInterval $duration = null) - { - } + public function __construct(private ?DateInterval $duration = null) {} /** * Returns a new instance with the specified auto-login cookie name. @@ -59,7 +61,7 @@ public function withCookieName(string $name): self public function addCookie( CookieLoginIdentityInterface $identity, ResponseInterface $response, - DateInterval|null|false $duration = false, + DateInterval|false|null $duration = false, ): ResponseInterface { $duration = $duration === false ? $this->duration : $duration; diff --git a/src/Login/Cookie/CookieLoginMiddleware.php b/src/Login/Cookie/CookieLoginMiddleware.php index fda8c6f..c3b45c9 100644 --- a/src/Login/Cookie/CookieLoginMiddleware.php +++ b/src/Login/Cookie/CookieLoginMiddleware.php @@ -22,6 +22,8 @@ use function sprintf; use function time; +use const JSON_THROW_ON_ERROR; + /** * `CookieLoginMiddleware` automatically logs user in based on cookie. */ @@ -39,9 +41,8 @@ public function __construct( private IdentityRepositoryInterface $identityRepository, private LoggerInterface $logger, private CookieLogin $cookieLogin, - private bool $forceAddCookie = false - ) { - } + private bool $forceAddCookie = false, + ) {} /** * {@inheritDoc} @@ -122,7 +123,7 @@ private function authenticateUserByCookieFromRequest(ServerRequestInterface $req sprintf( 'Identity repository must return an instance of %s in order for auto-login to function.', CookieLoginIdentityInterface::class, - ) + ), ); } diff --git a/src/Login/LoginMiddleware.php b/src/Login/LoginMiddleware.php index 5064cf8..b6ea1ef 100644 --- a/src/Login/LoginMiddleware.php +++ b/src/Login/LoginMiddleware.php @@ -30,8 +30,7 @@ final class LoginMiddleware implements MiddlewareInterface public function __construct( private CurrentUser $currentUser, private LoggerInterface $logger, - ) { - } + ) {} /** * {@inheritDoc} @@ -59,7 +58,7 @@ public function process(ServerRequestInterface $request, RequestHandlerInterface $token = 'of type ' . get_debug_type($identity); } $this->logger->debug( - sprintf('Unable to authenticate user by token %s. Identity not found.', $token) + sprintf('Unable to authenticate user by token %s. Identity not found.', $token), ); } diff --git a/src/Method/ApiAuth.php b/src/Method/ApiAuth.php index b2b844f..e43fe8a 100644 --- a/src/Method/ApiAuth.php +++ b/src/Method/ApiAuth.php @@ -15,9 +15,7 @@ */ final class ApiAuth implements AuthenticationMethodInterface { - public function __construct(private readonly CurrentUser $currentUser) - { - } + public function __construct(private readonly CurrentUser $currentUser) {} public function authenticate(ServerRequestInterface $request): ?IdentityInterface { diff --git a/src/Method/WebAuth.php b/src/Method/WebAuth.php index 8fe602f..90097b6 100644 --- a/src/Method/WebAuth.php +++ b/src/Method/WebAuth.php @@ -21,9 +21,8 @@ final class WebAuth implements AuthenticationMethodInterface public function __construct( private readonly CurrentUser $currentUser, - private readonly ResponseFactoryInterface $responseFactory - ) { - } + private readonly ResponseFactoryInterface $responseFactory, + ) {} public function authenticate(ServerRequestInterface $request): ?IdentityInterface { diff --git a/src/UserAuth.php b/src/UserAuth.php index e027eb2..a473a4b 100644 --- a/src/UserAuth.php +++ b/src/UserAuth.php @@ -10,19 +10,18 @@ use Yiisoft\Auth\AuthenticationMethodInterface; use Yiisoft\Auth\IdentityInterface; use Yiisoft\Http\Status; +use Yiisoft\User\Method\WebAuth; /** * Implementation of the authentication interface for the user. * - * @deprecated Use {@see \Yiisoft\User\Method\WebAuth}. This class will be removed in the next major version. + * @deprecated Use {@see WebAuth}. This class will be removed in the next major version. */ final class UserAuth implements AuthenticationMethodInterface { private string $authUrl = '/login'; - public function __construct(private CurrentUser $currentUser, private ResponseFactoryInterface $responseFactory) - { - } + public function __construct(private CurrentUser $currentUser, private ResponseFactoryInterface $responseFactory) {} public function authenticate(ServerRequestInterface $request): ?IdentityInterface { diff --git a/tests/ConfigTest.php b/tests/ConfigTest.php index 81c84fe..ecfe8ef 100644 --- a/tests/ConfigTest.php +++ b/tests/ConfigTest.php @@ -90,13 +90,12 @@ private function createContainer(?array $params = null): Container return new Container( ContainerConfig::create()->withDefinitions( $this->getDiConfig($params) - + - [ + + [ EventDispatcherInterface::class => SimpleEventDispatcher::class, IdentityRepositoryInterface::class => MockIdentityRepository::class, ResponseFactoryInterface::class => ResponseFactory::class, LoggerInterface::class => SimpleLogger::class, - ] + ], ), ); } diff --git a/tests/CurrentUserTest.php b/tests/CurrentUserTest.php index 7d7459a..786ea4b 100644 --- a/tests/CurrentUserTest.php +++ b/tests/CurrentUserTest.php @@ -203,9 +203,7 @@ public function testClear(): void { $id = 'test-id'; $identity = new class ($id) implements IdentityInterface { - public function __construct(private ?string $id) - { - } + public function __construct(private ?string $id) {} public function getId(): ?string { @@ -386,7 +384,7 @@ public static function dataCan(): iterable public function testCan( bool $expected, string|BackedEnum $permissionName, - ?AccessCheckerInterface $accessChecker + ?AccessCheckerInterface $accessChecker, ): void { $currentUser = new CurrentUser($this->createIdentityRepository(), $this->createEventDispatcher()); if ($accessChecker !== null) { diff --git a/tests/Login/Cookie/CookieLoginMiddlewareTest.php b/tests/Login/Cookie/CookieLoginMiddlewareTest.php index f4aaaea..b306a9f 100644 --- a/tests/Login/Cookie/CookieLoginMiddlewareTest.php +++ b/tests/Login/Cookie/CookieLoginMiddlewareTest.php @@ -27,6 +27,8 @@ use function json_encode; use function time; +use const JSON_THROW_ON_ERROR; + final class CookieLoginMiddlewareTest extends TestCase { private LastMessageLogger $logger; @@ -428,7 +430,7 @@ private function getIdentityRepository(IdentityInterface $identity): IdentityRep private function getRequestWithAutoLoginCookie( string $authKey = CookieLoginIdentity::KEY_CORRECT, - ?int $expires = null + ?int $expires = null, ): ServerRequestInterface { return $this->getRequestWithCookies([ 'autoLogin' => json_encode([CookieLoginIdentity::ID, $authKey, $expires ?? time() + 3600], JSON_THROW_ON_ERROR), diff --git a/tests/Login/Cookie/CookieLoginTest.php b/tests/Login/Cookie/CookieLoginTest.php index 62fbcfa..ecb4f69 100644 --- a/tests/Login/Cookie/CookieLoginTest.php +++ b/tests/Login/Cookie/CookieLoginTest.php @@ -108,7 +108,7 @@ public static function dataAddCookieWithCustomDuration(): array } #[DataProvider('dataAddCookieWithCustomDuration')] - public function testAddCookieWithCustomDuration(string $expectedRegExp, DateInterval|null|false $duration): void + public function testAddCookieWithCustomDuration(string $expectedRegExp, DateInterval|false|null $duration): void { $cookieLogin = (new CookieLogin(new DateInterval('P1W')))->withCookieName('testName'); diff --git a/tests/Login/LoginMiddlewareTest.php b/tests/Login/LoginMiddlewareTest.php index 2b5b30a..2759b9f 100644 --- a/tests/Login/LoginMiddlewareTest.php +++ b/tests/Login/LoginMiddlewareTest.php @@ -106,12 +106,12 @@ public function testUnableToAuthenticateUserDebugMessage(string $expectedType, m $middleware->process( (new ServerRequest())->withAttribute(Authentication::class, $identity), - $this->createRequestHandler() + $this->createRequestHandler(), ); $this->assertSame( 'Unable to authenticate user by token ' . $expectedType . '. Identity not found.', - $this->logger->getLastMessage() + $this->logger->getLastMessage(), ); } diff --git a/tests/Support/AccessCheckerStub.php b/tests/Support/AccessCheckerStub.php index 3bb2db3..92c1802 100644 --- a/tests/Support/AccessCheckerStub.php +++ b/tests/Support/AccessCheckerStub.php @@ -6,11 +6,11 @@ use Yiisoft\Access\AccessCheckerInterface; +use function in_array; + final class AccessCheckerStub implements AccessCheckerInterface { - public function __construct(private array $allowPermissions = []) - { - } + public function __construct(private array $allowPermissions = []) {} public function userHasPermission($userId, string $permissionName, array $parameters = []): bool { diff --git a/tests/Support/MockArraySessionStorage.php b/tests/Support/MockArraySessionStorage.php index 69d9dd1..e9dd45d 100644 --- a/tests/Support/MockArraySessionStorage.php +++ b/tests/Support/MockArraySessionStorage.php @@ -19,9 +19,7 @@ final class MockArraySessionStorage implements SessionInterface private bool $closed = false; - public function __construct(private array $data = []) - { - } + public function __construct(private array $data = []) {} public function get(string $key, $default = null) { diff --git a/tests/Support/MockIdentity.php b/tests/Support/MockIdentity.php index 21bde0f..ebe4a5a 100644 --- a/tests/Support/MockIdentity.php +++ b/tests/Support/MockIdentity.php @@ -8,9 +8,7 @@ final class MockIdentity implements IdentityInterface { - public function __construct(private string $id) - { - } + public function __construct(private string $id) {} public function getId(): ?string { diff --git a/tests/Support/MockIdentityRepository.php b/tests/Support/MockIdentityRepository.php index e56db14..380684a 100644 --- a/tests/Support/MockIdentityRepository.php +++ b/tests/Support/MockIdentityRepository.php @@ -12,9 +12,7 @@ final class MockIdentityRepository implements IdentityRepositoryInterface { private bool $withException = false; - public function __construct(private ?IdentityInterface $identity = null) - { - } + public function __construct(private ?IdentityInterface $identity = null) {} public function findIdentity(string $id): ?IdentityInterface { From 7e2ce4a85cd0b7981385e7219c318f56a05cda86 Mon Sep 17 00:00:00 2001 From: Sergei Predvoditelev Date: Thu, 30 Jul 2026 00:07:56 +0300 Subject: [PATCH 2/5] changelog --- CHANGELOG.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 90dafdc..5901754 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,8 +3,7 @@ ## 2.3.3 under development - no changes in this release. -- Enh #XX: Replace StyleCI with PHP CS Fixer (@vjik) -- Enh #XX: Explicitly import classes and constants in "use" section. +- Enh #120: Explicitly import classes and constants in "use" section (@vjik) ## 2.3.2 December 23, 2025 From fe92bdc4968388e6e47e247536f864f50ac33c4b Mon Sep 17 00:00:00 2001 From: Sergei Predvoditelev Date: Thu, 30 Jul 2026 00:08:55 +0300 Subject: [PATCH 3/5] changelog --- CHANGELOG.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5901754..b016b76 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,6 @@ ## 2.3.3 under development -- no changes in this release. - Enh #120: Explicitly import classes and constants in "use" section (@vjik) ## 2.3.2 December 23, 2025 From dcb32df53a779a4bc3e2c750a9bb92635c40ec52 Mon Sep 17 00:00:00 2001 From: Sergei Predvoditelev Date: Thu, 30 Jul 2026 00:33:02 +0300 Subject: [PATCH 4/5] fix --- composer.json | 14 ++++++++++---- tools/.gitignore | 2 ++ tools/composer-require-checker/composer.json | 5 +++++ 3 files changed, 17 insertions(+), 4 deletions(-) create mode 100644 tools/.gitignore create mode 100644 tools/composer-require-checker/composer.json diff --git a/composer.json b/composer.json index 53725f5..13b0a82 100644 --- a/composer.json +++ b/composer.json @@ -41,15 +41,15 @@ "yiisoft/http": "^1.2" }, "require-dev": { + "bamarni/composer-bin-plugin": "^1.9.1", + "friendsofphp/php-cs-fixer": "^3.64", "httpsoft/http-message": "^1.1.6", - "maglnet/composer-require-checker": "^4.7.1", "phpunit/phpunit": "^10.5.45", - "friendsofphp/php-cs-fixer": "^3.64", "rector/rector": "^2.0.10", - "yiisoft/code-style": "^1.1", "roave/infection-static-analysis-plugin": "^1.35", "spatie/phpunit-watcher": "^1.24", "vimeo/psalm": "^5.26.1 || ^6.8.8", + "yiisoft/code-style": "^1.1", "yiisoft/di": "^1.3", "yiisoft/test-support": "^3.0.2" }, @@ -70,6 +70,11 @@ "config-plugin": { "params": "params.php", "di-web": "di-web.php" + }, + "bamarni-bin": { + "bin-links": true, + "target-directory": "tools", + "forward-command": true } }, "config": { @@ -77,7 +82,8 @@ "bump-after-update": "dev", "allow-plugins": { "infection/extension-installer": true, - "composer/package-versions-deprecated": true + "composer/package-versions-deprecated": true, + "bamarni/composer-bin-plugin": true } }, "scripts": { diff --git a/tools/.gitignore b/tools/.gitignore new file mode 100644 index 0000000..cf452dc --- /dev/null +++ b/tools/.gitignore @@ -0,0 +1,2 @@ +/*/vendor +/*/composer.lock diff --git a/tools/composer-require-checker/composer.json b/tools/composer-require-checker/composer.json new file mode 100644 index 0000000..0992a90 --- /dev/null +++ b/tools/composer-require-checker/composer.json @@ -0,0 +1,5 @@ +{ + "require-dev": { + "maglnet/composer-require-checker": "^4.7.1" + } +} From f91694bee160d239cf41e142d7233563a1b5fcbf Mon Sep 17 00:00:00 2001 From: Sergei Predvoditelev Date: Thu, 30 Jul 2026 00:35:22 +0300 Subject: [PATCH 5/5] fix --- .github/workflows/bc.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/bc.yml b/.github/workflows/bc.yml index b269391..42610fd 100644 --- a/.github/workflows/bc.yml +++ b/.github/workflows/bc.yml @@ -33,4 +33,4 @@ jobs: os: >- ['ubuntu-latest'] php: >- - ['8.1'] + ['8.5']