From 97028e3cc38251e1ca9b4239d9c5b0faf2f1dd8e Mon Sep 17 00:00:00 2001 From: kafkiansky Date: Mon, 24 Jun 2024 09:47:34 +0300 Subject: [PATCH 1/3] chore: bump dependencies; cleanup gitattributes; add php8.3 in workflows --- .gitattributes | 4 +++- .github/workflows/security.yml | 2 +- .github/workflows/static-analysis.yml | 2 +- .github/workflows/test.yml | 2 +- composer.json | 7 ++++++- 5 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.gitattributes b/.gitattributes index c54d546..ff4022c 100644 --- a/.gitattributes +++ b/.gitattributes @@ -6,4 +6,6 @@ LICENSE.md export-ignore tests export-ignore phpunit.xml export-ignore .scrutinizer.yml export-ignore -codeception.yml export-ignore \ No newline at end of file +codeception.yml export-ignore +phpcs.xml export-ignore +psalm.xml export-ignore \ No newline at end of file diff --git a/.github/workflows/security.yml b/.github/workflows/security.yml index 025a4b6..3bf7a83 100644 --- a/.github/workflows/security.yml +++ b/.github/workflows/security.yml @@ -11,7 +11,7 @@ jobs: strategy: fail-fast: false matrix: - php: [8.1, 8.2 ] + php: [8.1, 8.2, 8.3] os: [ubuntu-latest] steps: - name: Checkout diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index 89b963b..dc51bd8 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -11,7 +11,7 @@ jobs: strategy: fail-fast: false matrix: - php: [8.1, 8.2] + php: [8.1, 8.2, 8.3] os: [ubuntu-latest] steps: - name: Checkout diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 872d628..ab524a2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,7 +15,7 @@ jobs: strategy: fail-fast: true matrix: - php: [8.1] + php: [8.1, 8.2] stability: [prefer-lowest, prefer-stable] name: PHP ${{ matrix.php }} / ${{ matrix.stability }} diff --git a/composer.json b/composer.json index 4883631..c37e1fb 100644 --- a/composer.json +++ b/composer.json @@ -3,6 +3,11 @@ "description": "Psalm plugin for Laravel that interrupt service locator calls.", "license": "MIT", "type": "psalm-plugin", + "keywords": [ + "laravel", + "psalm", + "plugin" + ], "authors": [ { "name": "v.zanfir", @@ -17,7 +22,7 @@ }, "require-dev": { "ergebnis/composer-normalize": "^2.31", - "laravel/framework": "^10.13", + "laravel/framework": "^11.0", "phpunit/phpunit": "^10.2", "squizlabs/php_codesniffer": "^3.7", "weirdan/codeception-psalm-module": "^0.14.0" From 9cbc8be4e8fa4bdbf7b9ebe5d8c3b8331012197f Mon Sep 17 00:00:00 2001 From: kafkiansky Date: Mon, 24 Jun 2024 09:49:06 +0300 Subject: [PATCH 2/3] bump php version --- .github/workflows/security.yml | 2 +- .github/workflows/static-analysis.yml | 2 +- .github/workflows/test.yml | 2 +- composer.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/security.yml b/.github/workflows/security.yml index 3bf7a83..c5561e4 100644 --- a/.github/workflows/security.yml +++ b/.github/workflows/security.yml @@ -11,7 +11,7 @@ jobs: strategy: fail-fast: false matrix: - php: [8.1, 8.2, 8.3] + php: [8.2, 8.3] os: [ubuntu-latest] steps: - name: Checkout diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index dc51bd8..561a573 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -11,7 +11,7 @@ jobs: strategy: fail-fast: false matrix: - php: [8.1, 8.2, 8.3] + php: [8.2, 8.3] os: [ubuntu-latest] steps: - name: Checkout diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ab524a2..bb816eb 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,7 +15,7 @@ jobs: strategy: fail-fast: true matrix: - php: [8.1, 8.2] + php: [8.2, 8.3] stability: [prefer-lowest, prefer-stable] name: PHP ${{ matrix.php }} / ${{ matrix.stability }} diff --git a/composer.json b/composer.json index c37e1fb..e70dd2c 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,7 @@ } ], "require": { - "php": "^8.1", + "php": "^8.2", "ext-simplexml": "*", "vimeo/psalm": "^5.12" }, From 52c106204ffec03bebb071607a8fcc13ead2b249 Mon Sep 17 00:00:00 2001 From: kafkiansky Date: Mon, 24 Jun 2024 09:59:27 +0300 Subject: [PATCH 3/3] fix README --- README.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f81dded..164c5ca 100644 --- a/README.md +++ b/README.md @@ -56,12 +56,20 @@ Install this package with Composer: composer require kafkiansky/service-locator-interrupter "^4.0" --dev + + + PHP ^8.2 && Laravel ^11.x + + + composer require kafkiansky/service-locator-interrupter "^5.0" --dev + + ## WHY Laravel-like developers prefer to use some kinds of ioc bad practices. -In example: facades, helpers method, container injection and container instances creation anywhere: controllers, services, routes and even in models (wtf?). +In example: facades, helpers method, container injection and container instances creation anywhere: controllers, services, routes and even in models. You need inject necessary services in method and constructor, not call container to do it for you. Any services **must has** it own contract, container injection - it's not legal contract, it's hack.