diff --git a/CHANGELOG-3.x.md b/CHANGELOG-3.x.md index 63c673a..875f004 100644 --- a/CHANGELOG-3.x.md +++ b/CHANGELOG-3.x.md @@ -1,6 +1,11 @@ # Changelog -## [Unreleased](https://github.com/jn-jairo/laravel-ngrok/compare/v3.0.1...3.x) +## [Unreleased](https://github.com/jn-jairo/laravel-ngrok/compare/v3.0.2...3.x) + +## [v3.0.2 (2024-03-14)](https://github.com/jn-jairo/laravel-ngrok/compare/v3.0.1...v3.0.2) + +### Added +- Laravel 11 support ## [v3.0.1 (2023-04-12)](https://github.com/jn-jairo/laravel-ngrok/compare/v3.0.0...v3.0.1) diff --git a/Makefile b/Makefile index f11fb3a..46f2194 100644 --- a/Makefile +++ b/Makefile @@ -4,6 +4,9 @@ STABLE_DEPS += '8.1|9.0|7.0' STABLE_DEPS += '8.1|10.0|8.0' STABLE_DEPS += '8.2|9|7.0' STABLE_DEPS += '8.2|10.0|8.0' +STABLE_DEPS += '8.2|11.0|9.0' +STABLE_DEPS += '8.3|10.0|8.0' +STABLE_DEPS += '8.3|11.0|9.0' # php_version|laravel_version|orchestra_version LOWEST_DEPS += '8.1|8.83|6.24' @@ -11,6 +14,9 @@ LOWEST_DEPS += '8.1|9.0|7.0' LOWEST_DEPS += '8.1|10.0|8.0' LOWEST_DEPS += '8.2|9|7.0' LOWEST_DEPS += '8.2|10.0|8.0' +LOWEST_DEPS += '8.2|11.0|9.0' +LOWEST_DEPS += '8.3|10.0|8.0' +LOWEST_DEPS += '8.3|11.0|9.0' define show_title title=$1 ; \ @@ -28,6 +34,10 @@ define composer_update composer update --prefer-dist --no-interaction --prefer-stable endef +define clean_cache + (rm -r .phpunit.cache > /dev/null 2>&1 || true) ; +endef + define test_version versions="$1" ; \ composer_args=$2 ; \ @@ -36,6 +46,7 @@ define test_version orchestra_version=$$(echo $${versions} | cut -d'|' -f 3); \ if command -v php$${php_version} > /dev/null 2>&1 ; \ then \ + $(call clean_cache) \ $(call show_title,'PHP: '$${php_version}' LARAVEL: '$${laravel_version}' ORCHESTRA: '$${orchestra_version}) \ echo -n 'Updating dependencies... ' ; \ output_composer=$$(php$${php_version} $$(which composer) update --prefer-dist --no-interaction $${composer_args} --prefer-stable --with=laravel/framework:^$${laravel_version} --with=orchestra/testbench:^$${orchestra_version} --with=orchestra/testbench-core:^$${orchestra_version} 2>&1) ; \ @@ -56,6 +67,7 @@ define test_version continue ; \ fi; \ echo 'OK' ; \ + $(call clean_cache) \ fi; endef @@ -66,10 +78,10 @@ fast: parallel-test code-fix code-style slow: parallel-test code-fix code-style static-analysis .PHONY: coverage -coverage: test-coverage infection-test +coverage: test-coverage .PHONY: coverage-show -coverage-show: test-coverage infection-test show-coverage show-infection +coverage-show: test-coverage show-coverage .PHONY: composer-update composer-update: @@ -77,13 +89,16 @@ composer-update: .PHONY: test test: + @$(call clean_cache) @$(call show_title,'TEST') \ vendor/bin/pest \ --do-not-cache-result \ $(ARGS) + @$(call clean_cache) .PHONY: test-coverage test-coverage: clean-coverage + @$(call clean_cache) @$(call show_title,'TEST COVERAGE') \ XDEBUG_MODE=coverage \ php -d zend_extension=xdebug.so \ @@ -91,35 +106,42 @@ test-coverage: clean-coverage --configuration phpunit-coverage.xml \ --do-not-cache-result \ --coverage + @$(call clean_cache) .PHONY: test-stable test-stable: + @$(call clean_cache) @$(call show_title,'TEST STABLE') \ for versions in $(STABLE_DEPS) ; \ do \ $(call test_version,$${versions}) \ done; \ $(call composer_update) > /dev/null 2>&1 + @$(call clean_cache) .PHONY: test-lowest test-lowest: + @$(call clean_cache) @$(call show_title,'TEST LOWEST') \ for versions in $(LOWEST_DEPS) ; \ do \ $(call test_version,$${versions},--prefer-lowest) \ done; \ $(call composer_update) > /dev/null 2>&1 + @$(call clean_cache) .PHONY: parallel-test parallel-test: + @$(call clean_cache) @$(call show_title,'PARALLEL TEST') \ vendor/bin/pest \ --parallel \ - --processes=$(shell nproc) \ - --passthru="--do-not-cache-result" + --processes=$(shell nproc) + @$(call clean_cache) .PHONY: parallel-test-coverage parallel-test-coverage: clean-coverage + @$(call clean_cache) @$(call show_title,'PARALLEL TEST COVERAGE') \ XDEBUG_MODE=coverage \ php -d zend_extension=xdebug.so \ @@ -128,17 +150,19 @@ parallel-test-coverage: clean-coverage --processes=$(shell nproc) \ --configuration=phpunit-coverage.xml \ --passthru-php="-d zend_extension=xdebug.so" \ - --passthru="--do-not-cache-result" \ --coverage + @$(call clean_cache) .PHONY: infection-test infection-test: clean-infection + @$(call clean_cache) @$(call show_title,'INFECTION TEST') \ infection \ --threads=$(shell nproc) \ --coverage=build/coverage \ --skip-initial-tests \ --test-framework=pest + @$(call clean_cache) .PHONY: code-fix code-fix: @@ -165,14 +189,19 @@ show-infection: @xdg-open build/infection/infection.html > /dev/null 2>&1 .PHONY: clean -clean: clean-coverage clean-infection +clean: clean-cache clean-coverage clean-infection + +.PHONY: clean-cache +clean-cache: + @$(call show_title,'CLEAN CACHE') \ + (rm -r .phpunit.cache > /dev/null 2>&1 || true) .PHONY: clean-coverage clean-coverage: - @$(call show_title,'CLEAR COVERAGE') \ + @$(call show_title,'CLEAN COVERAGE') \ (rm -r build/coverage > /dev/null 2>&1 || true) .PHONY: clean-infection clean-infection: - @$(call show_title,'CLEAR INFECTION') \ + @$(call show_title,'CLEAN INFECTION') \ (rm -r build/infection > /dev/null 2>&1 || true) diff --git a/README.md b/README.md index 0422343..c0bb517 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,7 @@ This package allows you to share your Laravel application with [ngrok](https://n 8.x | 2.x 9.x | 2.x 10.x | 3.x + 11.x | 3.x ## Installation diff --git a/composer.json b/composer.json index 8e1a1c4..262f716 100644 --- a/composer.json +++ b/composer.json @@ -16,17 +16,16 @@ "require": { "php": "^8.1", "guzzlehttp/guzzle": "^6.5.8|^7.4.5", - "illuminate/console": "^8.83|^9.0|^10.0", - "illuminate/http": "^8.83|^9.0|^10.0", - "illuminate/pagination": "^8.83|^9.0|^10.0", - "illuminate/routing": "^8.83|^9.0|^10.0", - "illuminate/support": "^8.83|^9.0|^10.0", - "symfony/process": "^5.4|^6.0" + "illuminate/console": "^8.83|^9.0|^10.0|^11.0", + "illuminate/http": "^8.83|^9.0|^10.0|^11.0", + "illuminate/pagination": "^8.83|^9.0|^10.0|^11.0", + "illuminate/routing": "^8.83|^9.0|^10.0|^11.0", + "illuminate/support": "^8.83|^9.0|^10.0|^11.0", + "symfony/process": "^5.4|^6.0|^7.0" }, "require-dev": { - "orchestra/testbench": "^6.24|^7.0|^8.0", - "pestphp/pest": "^1.22", - "pestphp/pest-plugin-parallel": "^1.2", + "orchestra/testbench": "^6.24|^7.0|^8.0|^9.0", + "pestphp/pest": "^1.22|^2.34", "phpspec/prophecy": "^1.17", "phpspec/prophecy-phpunit": "^2.0", "webmozart/assert": "^1.11" diff --git a/phpstan.neon b/phpstan.neon index d27e998..22d20f9 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -4,7 +4,7 @@ parameters: - src - tests ignoreErrors: - - '#Call to an undefined method Pest\\Expectation\\|Pest\\Support\\Extendable::#' + - '#Call to an undefined method Pest\\PendingCalls\\TestCall\|Pest\\Support\\HigherOrderTapProxy::#' - '#Cannot access offset .* on mixed#' - '#Cannot call method .* on Illuminate\\Testing\\PendingCommand\|int#' - '#Cannot call method .* on mixed#' diff --git a/phpunit-coverage.xml b/phpunit-coverage.xml index 1eaa7af..14bae7b 100644 --- a/phpunit-coverage.xml +++ b/phpunit-coverage.xml @@ -1,25 +1,19 @@ - + tests - - - ./src - + @@ -29,4 +23,9 @@ + + + ./src + + diff --git a/phpunit.xml b/phpunit.xml index 65c91f6..27e7792 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,18 +1,15 @@ - + tests