diff --git a/.gitattributes b/.gitattributes index 553a9d0c993..39203b0e2f3 100644 --- a/.gitattributes +++ b/.gitattributes @@ -41,8 +41,6 @@ phpcs.xml export-ignore phpstan.neon.dist export-ignore phpstan-baseline.neon export-ignore phpunit.xml.dist export-ignore -psalm.xml export-ignore -psalm-baseline.xml export-ignore # Split package files src/Validation/.gitattributes export-ignore diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8c848f18749..d56d6e747a4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,6 +35,7 @@ jobs: db-type: 'mysql' - php-version: '8.4' db-type: 'mysql' + dependencies: highest services: redis: @@ -47,8 +48,12 @@ jobs: - 11211/tcp steps: + - name: Setup MySQL 8.4 + if: matrix.db-type == 'mysql' && matrix.dependencies == 'highest' + run: docker run --rm --name=mysqld -e MYSQL_ROOT_PASSWORD=root -e MYSQL_DATABASE=cakephp -p 3306:3306 -d mysql:8.4 + - name: Setup MySQL 8.0 - if: matrix.db-type == 'mysql' && matrix.dependencies != 'lowest' + if: matrix.db-type == 'mysql' && matrix.dependencies == '' run: | sudo service mysql start mysql -h 127.0.0.1 -u root -proot -e 'CREATE DATABASE cakephp;' @@ -218,10 +223,6 @@ jobs: if: always() run: vendor/bin/phpcs --report=checkstyle | cs2pr - - name: Run psalm - if: always() - run: tools/psalm --output-format=github - - name: Run phpstan if: always() run: tools/phpstan analyse --error-format=github diff --git a/.phive/phars.xml b/.phive/phars.xml index c70ff296ea2..f12d3af06d0 100644 --- a/.phive/phars.xml +++ b/.phive/phars.xml @@ -1,5 +1,4 @@ - - + diff --git a/Makefile b/Makefile index 2abbe90dd87..b668dd31ebc 100644 --- a/Makefile +++ b/Makefile @@ -174,6 +174,7 @@ components-next: exit 0; \ fi; make CURRENT_BRANCH=$(NEXT_BRANCH) components + make clean-components-branches .PHONY: components-next component-%: @@ -190,6 +191,13 @@ tag-component-%: component-% guard-VERSION guard-GITHUB_TOKEN git checkout $* curl $(AUTH) -XPOST $(API_HOST)/repos/$(OWNER)/$*/git/refs -d '{"ref": "refs\/tags\/$(VERSION)", "sha": "$(shell git rev-parse $*)"}' git checkout $(CURRENT_BRANCH) > /dev/null + make clean-component-branch-$* + +# Task for cleaning up branches and remotes after updating split packages +clean-components-branches: $(foreach component, $(COMPONENTS), clean-component-branch-$(component)) +.PHONY: clean-component-branches + +clean-component-branch-%: git branch -D $* git remote rm $* @@ -199,6 +207,7 @@ clean-component-%: - (git remote add $* git@github.com:$(OWNER)/$*.git -f 2> /dev/null) - (git branch -D $* 2> /dev/null) - git push -f $* :$(CURRENT_BRANCH) +.PHONY: components-clean # Top level alias for doing a release. release: guard-VERSION tag-release components-tag package publish components-next diff --git a/VERSION.txt b/VERSION.txt index 0a841b122e0..267b25296ab 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -16,4 +16,4 @@ // @license https://opensource.org/licenses/mit-license.php MIT License // +--------------------------------------------------------------------------------------------+ // //////////////////////////////////////////////////////////////////////////////////////////////////// -5.2.0 +5.2.5 diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index a9726915c67..1effdca07ab 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -114,12 +114,6 @@ parameters: count: 1 path: src/Datasource/QueryInterface.php - - - message: '#^Method Cake\\Error\\ErrorLogger\:\:log\(\) has parameter \$level with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: src/Error/ErrorLogger.php - - message: '#^Constructor of class Cake\\Error\\Renderer\\ConsoleExceptionRenderer has an unused parameter \$request\.$#' identifier: constructor.unusedParameter @@ -264,12 +258,6 @@ parameters: count: 1 path: src/ORM/Query/SelectQuery.php - - - message: '#^PHPDoc tag @return with type Cake\\ORM\\Query\\SelectQuery\ is not subtype of native type static\(Cake\\ORM\\Query\\SelectQuery\\)\.$#' - identifier: return.phpDocType - count: 1 - path: src/ORM/Query/SelectQuery.php - - message: '#^Call to function method_exists\(\) with Cake\\Datasource\\EntityInterface and ''patch'' will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -294,6 +282,36 @@ parameters: count: 1 path: src/Routing/RouteBuilder.php + - + message: '#^Instantiation of internal class PHPUnit\\Framework\\AssertionFailedError\.$#' + identifier: new.internalClass + count: 1 + path: src/TestSuite/Constraint/EventFired.php + + - + message: '#^Instantiation of internal class PHPUnit\\Framework\\AssertionFailedError\.$#' + identifier: new.internalClass + count: 2 + path: src/TestSuite/Constraint/EventFiredWith.php + + - + message: '#^Instantiation of internal class PHPUnit\\Framework\\AssertionFailedError\.$#' + identifier: new.internalClass + count: 1 + path: src/TestSuite/Constraint/Response/ResponseBase.php + + - + message: '#^Call to method toString\(\) of internal interface PHPUnit\\Framework\\SelfDescribing from outside its root namespace PHPUnit\.$#' + identifier: method.internalInterface + count: 1 + path: src/TestSuite/Constraint/Response/StatusCodeBase.php + + - + message: '#^Instantiation of internal class PHPUnit\\Framework\\AssertionFailedError\.$#' + identifier: new.internalClass + count: 1 + path: src/TestSuite/Constraint/Session/FlashParamEquals.php + - message: '#^Trait Cake\\TestSuite\\EmailTrait is used zero times and is not analysed\.$#' identifier: trait.unused @@ -431,9 +449,3 @@ parameters: identifier: function.alreadyNarrowedType count: 1 path: src/View/Widget/DateTimeWidget.php - - - - message: '#^PHPDoc tag @var with type array\\|bool\|int\|string\|null is not subtype of native type mixed\.$#' - identifier: varTag.nativeType - count: 1 - path: src/View/XmlView.php diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 6fefe8afb74..04bcf0c5ff4 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -4,6 +4,8 @@ includes: parameters: level: 8 treatPhpDocTypesAsCertain: false + featureToggles: + internalTag: true bootstrapFiles: - tests/bootstrap.php paths: diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 9da2efe15eb..9ad79b8ffdc 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,8 +1,10 @@ - @@ -45,7 +47,7 @@ -