diff --git a/Makefile b/Makefile index e34003c..08f2308 100644 --- a/Makefile +++ b/Makefile @@ -28,23 +28,27 @@ ifeq ("$(IN_DOCKER)","TRUE") DOCKER_INTERACTIVE_SHELL:= else ifeq ($(DOCKER_AVAILABLE),0) - DOCKER_COMMON_OPS:=-v "`pwd`:`pwd`" -w "`pwd`" -v "${COMPOSER_CACHE_DIR}:${COMPOSER_CONTAINER_CACHE_DIR}" -e OTEL_PHP_FIBERS_ENABLED="${OTEL_PHP_FIBERS_ENABLED}" --ulimit nofile=1000000 + DOCKER_DEFAULT_SECURITY_OPS=--cap-drop=ALL --security-opt="no-new-privileges=true" --user="`id -u`:`id -g`" + DOCKER_COMMON_OPS:=-v "`pwd`:`pwd`" -w "`pwd`" -v "`pwd`/.git:`pwd`/.git:ro" -v "${COMPOSER_CACHE_DIR}:${COMPOSER_CONTAINER_CACHE_DIR}" -e OTEL_PHP_FIBERS_ENABLED="${OTEL_PHP_FIBERS_ENABLED}" --ulimit nofile=1000000 ifeq ("$(NEEDS_DOCKER_SOCKET)","TRUE") ifneq ("$(wildcard /var/run/docker.sock)","") + DOCKER_SECURITY_OPS:= DOCKER_SOCKET_OPS:=-v "/var/run/docker.sock:/var/run/docker.sock" DOCKER_SOCKET_CONTAINER_NAME_SUFFIX:=-root else + DOCKER_SECURITY_OPS:=${DOCKER_DEFAULT_SECURITY_OPS} DOCKER_SOCKET_OPS:= DOCKER_SOCKET_CONTAINER_NAME_SUFFIX:= endif else + DOCKER_SECURITY_OPS:=${DOCKER_DEFAULT_SECURITY_OPS} DOCKER_SOCKET_OPS:= DOCKER_SOCKET_CONTAINER_NAME_SUFFIX:= endif - DOCKER_RUN:=docker run --rm -i ${DOCKER_COMMON_OPS} "${CONTAINER_NAME}" - DOCKER_RUN_WITH_SOCKET:=docker run --rm -i ${DOCKER_COMMON_OPS} ${DOCKER_SOCKET_OPS} "${CONTAINER_NAME}${DOCKER_SOCKET_CONTAINER_NAME_SUFFIX}" - DOCKER_SHELL:=docker run --rm -it ${DOCKER_COMMON_OPS} "${CONTAINER_NAME}" - DOCKER_INTERACTIVE_SHELL:=docker run --rm -it ${DOCKER_COMMON_OPS} "${CONTAINER_NAME_INTERACTIVE_SHELL}" + DOCKER_RUN:=docker run --rm -i ${DOCKER_SECURITY_OPS} ${DOCKER_COMMON_OPS} "${CONTAINER_NAME}" + DOCKER_RUN_WITH_SOCKET:=docker run --rm -i ${DOCKER_SECURITY_OPS} ${DOCKER_COMMON_OPS} ${DOCKER_SOCKET_OPS} "${CONTAINER_NAME}${DOCKER_SOCKET_CONTAINER_NAME_SUFFIX}" + DOCKER_SHELL:=docker run --rm -it ${DOCKER_SECURITY_OPS} ${DOCKER_COMMON_OPS} "${CONTAINER_NAME}" + DOCKER_INTERACTIVE_SHELL:=docker run --rm -it ${DOCKER_SECURITY_OPS} ${DOCKER_COMMON_OPS} "${CONTAINER_NAME_INTERACTIVE_SHELL}" else DOCKER_RUN:= DOCKER_RUN_WITH_SOCKET:= @@ -92,7 +96,7 @@ migrations-docs-update-etc-readme-template-copyright-year-to-current: #### Updat ($(DOCKER_RUN) php -r '$$readmeFile = "etc/README.md.twig"; $$copyRight = "Copyright "; $$currentYear = date("Y"); if (!file_exists($$readmeFile)) {exit;} $$readmeContents = file_get_contents($$readmeFile); foreach (range(2000, 2100) as $$year) { $$readmeContents = str_replace($$copyRight . $$year, $$copyRight . $$currentYear, $$readmeContents); } file_put_contents($$readmeFile, $$readmeContents); ' || true) migrations-docs-create-license-when-it-doesnt-exists: #### Create license when it doesn't exists ##*I*## - ($(DOCKER_RUN) php -r '$$licenseFile = "LICENSE"; if (file_exists($$licenseFile)) {exit;} file_put_contents($$licenseFile, base64_decode("VGhlIE1JVCBMaWNlbnNlIChNSVQpCgpDb3B5cmlnaHQgKGMpIDIwMDEgQ2Vlcy1KYW4gS2lld2lldAoKUGVybWlzc2lvbiBpcyBoZXJlYnkgZ3JhbnRlZCwgZnJlZSBvZiBjaGFyZ2UsIHRvIGFueSBwZXJzb24gb2J0YWluaW5nIGEgY29weQpvZiB0aGlzIHNvZnR3YXJlIGFuZCBhc3NvY2lhdGVkIGRvY3VtZW50YXRpb24gZmlsZXMgKHRoZSAiU29mdHdhcmUiKSwgdG8gZGVhbAppbiB0aGUgU29mdHdhcmUgd2l0aG91dCByZXN0cmljdGlvbiwgaW5jbHVkaW5nIHdpdGhvdXQgbGltaXRhdGlvbiB0aGUgcmlnaHRzCnRvIHVzZSwgY29weSwgbW9kaWZ5LCBtZXJnZSwgcHVibGlzaCwgZGlzdHJpYnV0ZSwgc3VibGljZW5zZSwgYW5kL29yIHNlbGwKY29waWVzIG9mIHRoZSBTb2Z0d2FyZSwgYW5kIHRvIHBlcm1pdCBwZXJzb25zIHRvIHdob20gdGhlIFNvZnR3YXJlIGlzCmZ1cm5pc2hlZCB0byBkbyBzbywgc3ViamVjdCB0byB0aGUgZm9sbG93aW5nIGNvbmRpdGlvbnM6CgpUaGUgYWJvdmUgY29weXJpZ2h0IG5vdGljZSBhbmQgdGhpcyBwZXJtaXNzaW9uIG5vdGljZSBzaGFsbCBiZSBpbmNsdWRlZCBpbiBhbGwKY29waWVzIG9yIHN1YnN0YW50aWFsIHBvcnRpb25zIG9mIHRoZSBTb2Z0d2FyZS4KClRIRSBTT0ZUV0FSRSBJUyBQUk9WSURFRCAiQVMgSVMiLCBXSVRIT1VUIFdBUlJBTlRZIE9GIEFOWSBLSU5ELCBFWFBSRVNTIE9SCklNUExJRUQsIElOQ0xVRElORyBCVVQgTk9UIExJTUlURUQgVE8gVEhFIFdBUlJBTlRJRVMgT0YgTUVSQ0hBTlRBQklMSVRZLApGSVRORVNTIEZPUiBBIFBBUlRJQ1VMQVIgUFVSUE9TRSBBTkQgTk9OSU5GUklOR0VNRU5ULiBJTiBOTyBFVkVOVCBTSEFMTCBUSEUKQVVUSE9SUyBPUiBDT1BZUklHSFQgSE9MREVSUyBCRSBMSUFCTEUgRk9SIEFOWSBDTEFJTSwgREFNQUdFUyBPUiBPVEhFUgpMSUFCSUxJVFksIFdIRVRIRVIgSU4gQU4gQUNUSU9OIE9GIENPTlRSQUNULCBUT1JUIE9SIE9USEVSV0lTRSwgQVJJU0lORyBGUk9NLApPVVQgT0YgT1IgSU4gQ09OTkVDVElPTiBXSVRIIFRIRSBTT0ZUV0FSRSBPUiBUSEUgVVNFIE9SIE9USEVSIERFQUxJTkdTIElOIFRIRQpTT0ZUV0FSRS4K"));' || true) + ($(DOCKER_RUN) php -r '$$licenseFile = "LICENSE"; $$composerFIle = "composer.json"; if (file_exists($$licenseFile)) {exit;} if (file_exists($$composerFIle)) {$$json = json_decode(file_get_contents($$composerFIle), true); if (array_key_exists("license", $$json)) {if ($$json["license"] === "proprietary") {exit;}}} file_put_contents($$licenseFile, base64_decode("VGhlIE1JVCBMaWNlbnNlIChNSVQpCgpDb3B5cmlnaHQgKGMpIDIwMDEgQ2Vlcy1KYW4gS2lld2lldAoKUGVybWlzc2lvbiBpcyBoZXJlYnkgZ3JhbnRlZCwgZnJlZSBvZiBjaGFyZ2UsIHRvIGFueSBwZXJzb24gb2J0YWluaW5nIGEgY29weQpvZiB0aGlzIHNvZnR3YXJlIGFuZCBhc3NvY2lhdGVkIGRvY3VtZW50YXRpb24gZmlsZXMgKHRoZSAiU29mdHdhcmUiKSwgdG8gZGVhbAppbiB0aGUgU29mdHdhcmUgd2l0aG91dCByZXN0cmljdGlvbiwgaW5jbHVkaW5nIHdpdGhvdXQgbGltaXRhdGlvbiB0aGUgcmlnaHRzCnRvIHVzZSwgY29weSwgbW9kaWZ5LCBtZXJnZSwgcHVibGlzaCwgZGlzdHJpYnV0ZSwgc3VibGljZW5zZSwgYW5kL29yIHNlbGwKY29waWVzIG9mIHRoZSBTb2Z0d2FyZSwgYW5kIHRvIHBlcm1pdCBwZXJzb25zIHRvIHdob20gdGhlIFNvZnR3YXJlIGlzCmZ1cm5pc2hlZCB0byBkbyBzbywgc3ViamVjdCB0byB0aGUgZm9sbG93aW5nIGNvbmRpdGlvbnM6CgpUaGUgYWJvdmUgY29weXJpZ2h0IG5vdGljZSBhbmQgdGhpcyBwZXJtaXNzaW9uIG5vdGljZSBzaGFsbCBiZSBpbmNsdWRlZCBpbiBhbGwKY29waWVzIG9yIHN1YnN0YW50aWFsIHBvcnRpb25zIG9mIHRoZSBTb2Z0d2FyZS4KClRIRSBTT0ZUV0FSRSBJUyBQUk9WSURFRCAiQVMgSVMiLCBXSVRIT1VUIFdBUlJBTlRZIE9GIEFOWSBLSU5ELCBFWFBSRVNTIE9SCklNUExJRUQsIElOQ0xVRElORyBCVVQgTk9UIExJTUlURUQgVE8gVEhFIFdBUlJBTlRJRVMgT0YgTUVSQ0hBTlRBQklMSVRZLApGSVRORVNTIEZPUiBBIFBBUlRJQ1VMQVIgUFVSUE9TRSBBTkQgTk9OSU5GUklOR0VNRU5ULiBJTiBOTyBFVkVOVCBTSEFMTCBUSEUKQVVUSE9SUyBPUiBDT1BZUklHSFQgSE9MREVSUyBCRSBMSUFCTEUgRk9SIEFOWSBDTEFJTSwgREFNQUdFUyBPUiBPVEhFUgpMSUFCSUxJVFksIFdIRVRIRVIgSU4gQU4gQUNUSU9OIE9GIENPTlRSQUNULCBUT1JUIE9SIE9USEVSV0lTRSwgQVJJU0lORyBGUk9NLApPVVQgT0YgT1IgSU4gQ09OTkVDVElPTiBXSVRIIFRIRSBTT0ZUV0FSRSBPUiBUSEUgVVNFIE9SIE9USEVSIERFQUxJTkdTIElOIFRIRQpTT0ZUV0FSRS4K"));' || true) migrations-docs-update-license-copyright-c-year-to-current: #### Update license copyright year to current ##*I*## ($(DOCKER_RUN) php -r '$$licenseFile = "LICENSE"; $$copyRight = "Copyright (c) "; $$currentYear = date("Y"); if (!file_exists($$licenseFile)) {exit;} $$licenseContents = file_get_contents($$licenseFile); foreach (range(2000, 2100) as $$year) { $$licenseContents = str_replace($$copyRight . $$year, $$copyRight . $$currentYear, $$licenseContents); } file_put_contents($$licenseFile, $$licenseContents); ' || true) @@ -127,6 +131,15 @@ migrations-php-remove-old-phpunit-xml-dist-config: #### Make sure we remove phpu migrations-php-remove-old-phpunit-xml-config: #### Make sure we remove phpunit.xml ##*I*## ($(DOCKER_RUN) rm phpunit.xml || true) +migrations-php-remove-old-php-cs-fiver-config: #### Make sure we remove .php_cs ##*I*## + ($(DOCKER_RUN) rm .php_cs || true) + +migrations-php-remove-old-scrutinizer-yml-config: #### Make sure we remove .scrutinizer.yml ##*I*## + ($(DOCKER_RUN) rm .scrutinizer.yml || true) + +migrations-php-remove-old-appveyor-yml-config: #### Make sure we remove appveyor.yml ##*I*## + ($(DOCKER_RUN) rm appveyor.yml || true) + migrations-php-ensure-etc-ci-markdown-link-checker-json-exists: #### Make sure we have etc/ci/markdown-link-checker.json ##*I*## ($(DOCKER_RUN) php -r '$$markdownLinkCheckerFile = "etc/ci/markdown-link-checker.json"; $$json = json_decode("{\"httpHeaders\": [{\"urls\": [\"https://docs.github.com/\"],\"headers\": {\"Accept-Encoding\": \"zstd, br, gzip, deflate\"}}]}"); if (file_exists($$markdownLinkCheckerFile)) {exit;} file_put_contents($$markdownLinkCheckerFile, json_encode($$json, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) . "\r\n");' || true) @@ -269,16 +282,22 @@ migrations-inline-code-remove-line-internal: #### Remove all lines that contain ($(DOCKER_RUN) php -r '$$possibleDirectories = ["src", "tests", "etc", "examples"]; foreach ($$possibleDirectories as $$possibleDirectory) { if (!file_exists($$possibleDirectory)) {continue;} $$i = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($$possibleDirectory)); $$i->rewind(); while ($$i->valid()) { if (!is_file($$i->key()) || (is_file($$i->key()) && !str_ends_with($$i->key(), ".php"))) { $$i->next(); continue; } $$fileContents = explode("\n", file_get_contents($$i->key())); foreach ($$fileContents as $$lineNumber => $$lineContent) { if (str_contains($$lineContent, "@internal")) { unset($$fileContents[$$lineNumber]); } } file_put_contents($$i->key(), implode("\n", $$fileContents)); $$i->next(); } }' || true) migrations-supported-features-php-ensure-we-only-cs-check-and-fix-tests-if-unit-tests-is-enabled: #### Ensure we only cs check/fix tests/ if unit-tests is enabled ##*I*## - ($(DOCKER_RUN) php -r 'if (in_array("unit-tests", ["linux","macos","windows","zts"])) {exit;} $$phpCSCongifFIle = "etc/qa/phpcs.xml"; $$fileContents = explode("\n", file_get_contents($$phpCSCongifFIle)); foreach ($$fileContents as $$lineNumber => $$lineContent) { if (str_contains($$lineContent, "../../tests")) { unset($$fileContents[$$lineNumber]); } } file_put_contents($$phpCSCongifFIle, implode("\n", $$fileContents));' || true) + ($(DOCKER_RUN) php -r 'if (in_array("unit-tests", ["linux","zts"])) {exit;} $$phpCSCongifFIle = "etc/qa/phpcs.xml"; $$fileContents = explode("\n", file_get_contents($$phpCSCongifFIle)); foreach ($$fileContents as $$lineNumber => $$lineContent) { if (str_contains($$lineContent, "../../tests")) { unset($$fileContents[$$lineNumber]); } } file_put_contents($$phpCSCongifFIle, implode("\n", $$fileContents));' || true) migrations-supported-features-php-ensure-we-only-staticly-analyse-tests-with-phpstan-if-unit-tests-is-enabled: #### Ensure we only staticly analyse tests/ with PHPStan if unit-tests is enabled ##*I*## - ($(DOCKER_RUN) php -r 'if (in_array("unit-tests", ["linux","macos","windows","zts"])) {exit;} $$phpStanCongifFIle = "etc/qa/phpstan.neon"; $$fileContents = explode("\n", file_get_contents($$phpStanCongifFIle)); foreach ($$fileContents as $$lineNumber => $$lineContent) { if (str_contains($$lineContent, "- ../../tests")) { unset($$fileContents[$$lineNumber]); } } file_put_contents($$phpStanCongifFIle, implode("\n", $$fileContents));' || true) + ($(DOCKER_RUN) php -r 'if (in_array("unit-tests", ["linux","zts"])) {exit;} $$phpStanCongifFIle = "etc/qa/phpstan.neon"; $$fileContents = explode("\n", file_get_contents($$phpStanCongifFIle)); foreach ($$fileContents as $$lineNumber => $$lineContent) { if (str_contains($$lineContent, "- ../../tests")) { unset($$fileContents[$$lineNumber]); } } file_put_contents($$phpStanCongifFIle, implode("\n", $$fileContents));' || true) migrations-supported-features-php-ensure-no-phpunit-config-file-is-present-when-unit-tests-are-disabled: #### Ensure we remove the PHPUnit config file when unit-tests aren't enabled ##*I*## - ($(DOCKER_RUN) php -r 'if (in_array("unit-tests", ["linux","macos","windows","zts"])) {exit;} @unlink("etc/qa/phpunit.xml");' || true) + ($(DOCKER_RUN) php -r 'if (in_array("unit-tests", ["linux","zts"])) {exit;} @unlink("etc/qa/phpunit.xml");' || true) migrations-supported-features-php-ensure-no-infectionphp-config-file-is-present-when-unit-tests-are-disabled: #### Ensure we remove the InfectionPHP config file when unit-tests aren't enabled ##*I*## - ($(DOCKER_RUN) php -r 'if (in_array("unit-tests", ["linux","macos","windows","zts"])) {exit;} @unlink("etc/qa/infection.json5");' || true) + ($(DOCKER_RUN) php -r 'if (in_array("unit-tests", ["linux","zts"])) {exit;} @unlink("etc/qa/infection.json5");' || true) + +migrations-supported-features-php-ensure-no-rector-config-file-is-present-when-code-style-is-disabled: #### Ensure we remove the RectorPHP config file when code-style isn't enabled ##*I*## + ($(DOCKER_RUN) php -r 'if (in_array("code-style", ["linux","zts"])) {exit;} @unlink("etc/qa/rector.php");' || true) + +migrations-supported-features-php-ensure-no-phpcs-config-file-is-present-when-code-style-is-disabled: #### Ensure we remove the PHPCSS config file when code-style isn't enabled ##*I*## + ($(DOCKER_RUN) php -r 'if (in_array("code-style", ["linux","zts"])) {exit;} @unlink("etc/qa/phpcs.xml");' || true) migrations-php-make-sure-github-exists: #### Make sure .github/ exists ##*I*## ($(DOCKER_RUN) mkdir .github || true) @@ -342,7 +361,7 @@ migration-renovate-set-composer-constraint: #### Always keep renovate's constrai ## Our default jobs on-install-or-update: ## Tasks, like migrations, that specifically have be run after composer install or update. These will also run by self hosted Renovate #### - $(DOCKER_RUN) $(MAKE) migrations-git-enforce-gitattributes-contents migrations-git-make-sure-gitignore-exists migrations-git-make-sure-gitignore-ignores-var migrations-git-make-sure-gitignore-excludes-var-gitkeep migrations-docs-update-readme-copyright-c-year-to-current migrations-docs-update-readme-copyright-year-to-current migrations-docs-update-etc-readme-template-copyright-c-year-to-current migrations-docs-update-etc-readme-template-copyright-year-to-current migrations-docs-create-license-when-it-doesnt-exists migrations-docs-update-license-copyright-c-year-to-current migrations-docs-update-license-copyright-year-to-current migrations-php-make-sure-var-exists migrations-php-make-sure-var-gitkeep-exists migrations-php-make-sure-etc-exists migrations-php-make-sure-etc-ci-exists migrations-php-make-sure-etc-qa-exists migrations-php-move-psalm-xml-config-to-etc migrations-php-remove-psalm-xml-config migrations-php-remove-old-phpunit-xml-dist-config migrations-php-remove-old-phpunit-xml-config migrations-php-ensure-etc-ci-markdown-link-checker-json-exists migrations-php-move-infection-config-to-etc migrations-php-infection-create-config-if-not-exists migrations-php-remove-phpunit-config-dir-from-infection migrations-php-fix-logs-relative-paths-for-infection migrations-php-infection-ensure-log-text-has-the-correct-path migrations-php-infection-ensure-log-summary-has-the-correct-path migrations-php-infection-ensure-log-json-has-the-correct-path migrations-php-infection-ensure-log-per-mutator-has-the-correct-path migrations-php-add-github-true-to-for-infection migrations-php-make-paths-compatible-with-infection-0-32 migrations-php-set-phpunit-ensure-config-file-exists migrations-php-set-phpunit-xsd-path-to-local migrations-php-set-phpunit-make-sure-we-see-all-the-warnings-deprecations-etc-etc-that-will-make-phpunit-do-a-non-happy-exit migrations-php-move-phpstan migrations-php-set-phpstan-ensure-config-file-exists migrations-php-set-phpstan-uncomment-parameters migrations-php-set-phpstan-add-parameters-if-it-isnt-present-in-the-config-file migrations-php-set-phpstan-paths-in-config migrations-php-set-phpstan-level-max-in-config migrations-php-set-phpstan-resolve-ergebnis-noExtends-classesAllowedToBeExtended migrations-php-set-phpstan-drop-checkGenericClassInNonGenericObjectType migrations-php-phpstan-add-prefix-for-anything-that-starts-with-vendor-in-a-list migrations-php-set-phpstan-drop-include-test-utilities-rules migrations-php-set-phpstan-drop-include-async-test-utilities-rules migrations-php-set-rector-create-config-if-not-exists migrations-php-composer-unused-create-config-if-not-exists migrations-php-composer-unused-drop-commented-out-line-scattered-across-my-repos migrations-php-move-phpcs migrations-php-move-phpcs-not-dist migrations-php-set-phpcs-ensure-config-file-exists migrations-php-phpcs-make-basepath-is-correct-relatively migrations-php-phpcs-make-cache-is-correct-relatively migrations-php-phpcs-make-sure-config-has-correct-relative-path-for-etc migrations-php-phpcs-make-sure-etc-has-no-trailing-slash migrations-php-phpcs-make-sure-config-has-correct-relative-path-for-src migrations-php-phpcs-make-sure-src-has-no-trailing-slash migrations-php-phpcs-make-sure-config-has-correct-relative-path-for-tests migrations-php-phpcs-make-sure-tests-has-no-trailing-slash migrations-php-phpcs-make-sure-etc-is-ran-through migrations-phpcs-include-examples-directory-when-present migrations-php-move-composer-require-checker migrations-php-composer-require-checker-create-config-if-not-exists migrations-inline-code-phpstan-remove-line-phpstan-ignore-next-line migrations-inline-code-phpstan-remove-rest-of-line-phpstan-ignore-line migrations-inline-code-psalm-remove-line-psalm-suppress migrations-inline-code-remove-line-internal migrations-supported-features-php-ensure-we-only-cs-check-and-fix-tests-if-unit-tests-is-enabled migrations-supported-features-php-ensure-we-only-staticly-analyse-tests-with-phpstan-if-unit-tests-is-enabled migrations-supported-features-php-ensure-no-phpunit-config-file-is-present-when-unit-tests-are-disabled migrations-supported-features-php-ensure-no-infectionphp-config-file-is-present-when-unit-tests-are-disabled migrations-php-make-sure-github-exists migrations-github-codeowners migrations-php-make-sure-github-workflows-exists migrations-github-actions-remove-composer-diff migrations-github-actions-remove-markdown-check-links migrations-github-actions-remove-markdown-craft-release migrations-github-actions-remove-set-milestone-on-pr migrations-github-actions-move-ci migrations-github-actions-remove-ci-if-its-old-style-php-ci-workflow migrations-github-actions-create-ci-if-not-exists migrations-github-actions-move-release-management migrations-github-actions-fix-management-in-release-management-referenced-workflow-file migrations-github-actions-create-release-management-if-not-exists migrations-renovate-remove-dependabot-config migrations-renovate-move-config migrations-renovate-create-config-if-not-exists migrations-renovate-point-at-correct-config migration-renovate-set-php-constraint migration-renovate-set-composer-constraint composer-validate syntax-php composer-normalize ## Count: 93 + $(DOCKER_RUN) $(MAKE) migrations-git-enforce-gitattributes-contents migrations-git-make-sure-gitignore-exists migrations-git-make-sure-gitignore-ignores-var migrations-git-make-sure-gitignore-excludes-var-gitkeep migrations-docs-update-readme-copyright-c-year-to-current migrations-docs-update-readme-copyright-year-to-current migrations-docs-update-etc-readme-template-copyright-c-year-to-current migrations-docs-update-etc-readme-template-copyright-year-to-current migrations-docs-create-license-when-it-doesnt-exists migrations-docs-update-license-copyright-c-year-to-current migrations-docs-update-license-copyright-year-to-current migrations-php-make-sure-var-exists migrations-php-make-sure-var-gitkeep-exists migrations-php-make-sure-etc-exists migrations-php-make-sure-etc-ci-exists migrations-php-make-sure-etc-qa-exists migrations-php-move-psalm-xml-config-to-etc migrations-php-remove-psalm-xml-config migrations-php-remove-old-phpunit-xml-dist-config migrations-php-remove-old-phpunit-xml-config migrations-php-remove-old-scrutinizer-yml-config migrations-php-remove-old-appveyor-yml-config migrations-php-ensure-etc-ci-markdown-link-checker-json-exists migrations-php-move-infection-config-to-etc migrations-php-infection-create-config-if-not-exists migrations-php-remove-phpunit-config-dir-from-infection migrations-php-fix-logs-relative-paths-for-infection migrations-php-infection-ensure-log-text-has-the-correct-path migrations-php-infection-ensure-log-summary-has-the-correct-path migrations-php-infection-ensure-log-json-has-the-correct-path migrations-php-infection-ensure-log-per-mutator-has-the-correct-path migrations-php-add-github-true-to-for-infection migrations-php-make-paths-compatible-with-infection-0-32 migrations-php-set-phpunit-ensure-config-file-exists migrations-php-set-phpunit-xsd-path-to-local migrations-php-set-phpunit-make-sure-we-see-all-the-warnings-deprecations-etc-etc-that-will-make-phpunit-do-a-non-happy-exit migrations-php-move-phpstan migrations-php-set-phpstan-ensure-config-file-exists migrations-php-set-phpstan-uncomment-parameters migrations-php-set-phpstan-add-parameters-if-it-isnt-present-in-the-config-file migrations-php-set-phpstan-paths-in-config migrations-php-set-phpstan-level-max-in-config migrations-php-set-phpstan-resolve-ergebnis-noExtends-classesAllowedToBeExtended migrations-php-set-phpstan-drop-checkGenericClassInNonGenericObjectType migrations-php-phpstan-add-prefix-for-anything-that-starts-with-vendor-in-a-list migrations-php-set-phpstan-drop-include-test-utilities-rules migrations-php-set-phpstan-drop-include-async-test-utilities-rules migrations-php-set-rector-create-config-if-not-exists migrations-php-composer-unused-create-config-if-not-exists migrations-php-composer-unused-drop-commented-out-line-scattered-across-my-repos migrations-php-move-phpcs migrations-php-move-phpcs-not-dist migrations-php-set-phpcs-ensure-config-file-exists migrations-php-phpcs-make-basepath-is-correct-relatively migrations-php-phpcs-make-cache-is-correct-relatively migrations-php-phpcs-make-sure-config-has-correct-relative-path-for-etc migrations-php-phpcs-make-sure-etc-has-no-trailing-slash migrations-php-phpcs-make-sure-config-has-correct-relative-path-for-src migrations-php-phpcs-make-sure-src-has-no-trailing-slash migrations-php-phpcs-make-sure-config-has-correct-relative-path-for-tests migrations-php-phpcs-make-sure-tests-has-no-trailing-slash migrations-php-phpcs-make-sure-etc-is-ran-through migrations-phpcs-include-examples-directory-when-present migrations-php-move-composer-require-checker migrations-php-composer-require-checker-create-config-if-not-exists migrations-inline-code-phpstan-remove-line-phpstan-ignore-next-line migrations-inline-code-phpstan-remove-rest-of-line-phpstan-ignore-line migrations-inline-code-psalm-remove-line-psalm-suppress migrations-inline-code-remove-line-internal migrations-supported-features-php-ensure-we-only-cs-check-and-fix-tests-if-unit-tests-is-enabled migrations-supported-features-php-ensure-we-only-staticly-analyse-tests-with-phpstan-if-unit-tests-is-enabled migrations-supported-features-php-ensure-no-phpunit-config-file-is-present-when-unit-tests-are-disabled migrations-supported-features-php-ensure-no-infectionphp-config-file-is-present-when-unit-tests-are-disabled migrations-supported-features-php-ensure-no-rector-config-file-is-present-when-code-style-is-disabled migrations-supported-features-php-ensure-no-phpcs-config-file-is-present-when-code-style-is-disabled migrations-php-make-sure-github-exists migrations-github-codeowners migrations-php-make-sure-github-workflows-exists migrations-github-actions-remove-composer-diff migrations-github-actions-remove-markdown-check-links migrations-github-actions-remove-markdown-craft-release migrations-github-actions-remove-set-milestone-on-pr migrations-github-actions-move-ci migrations-github-actions-remove-ci-if-its-old-style-php-ci-workflow migrations-github-actions-create-ci-if-not-exists migrations-github-actions-move-release-management migrations-github-actions-fix-management-in-release-management-referenced-workflow-file migrations-github-actions-create-release-management-if-not-exists migrations-renovate-remove-dependabot-config migrations-renovate-move-config migrations-renovate-create-config-if-not-exists migrations-renovate-point-at-correct-config migration-renovate-set-php-constraint migration-renovate-set-composer-constraint composer-validate syntax-php composer-normalize ## Count: 97 composer-validate: ## Ensure we don't require any package we don't use in this package directly ##*IC*## $(DOCKER_SHELL) composer validate @@ -402,6 +421,9 @@ install: ### Install dependencies #### composer-require: ### Require passed dependencies #### $(DOCKER_INTERACTIVE_SHELL) composer require -W $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS)) +composer-why: ### Show why a specific dependency is loaded #### + $(DOCKER_INTERACTIVE_SHELL) composer why $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS)) + update: ### Update dependencies #### $(DOCKER_SHELL) composer update -W @@ -437,5 +459,5 @@ task-list-ci-high: ## CI: Generate a JSON array of jobs to run against the highe @echo "[\"syntax-php\"]" ## Count: 1 supported-features: ## CI: List the features this package supports - @echo "[\"linux\",\"macos\",\"windows\",\"zts\"]" ## Count: 4 + @echo "[\"linux\",\"zts\"]" ## Count: 2 diff --git a/composer.json b/composer.json index 09e7294..8484800 100644 --- a/composer.json +++ b/composer.json @@ -15,8 +15,8 @@ "ext-parallel": "*" }, "require-dev": { - "wyrihaximus/async-test-utilities": "^13.1.0", - "wyrihaximus/makefiles": "^0.11.0" + "wyrihaximus/async-test-utilities": "^13.2.0", + "wyrihaximus/makefiles": "^0.12.1" }, "config": { "allow-plugins": { diff --git a/composer.lock b/composer.lock index 5efabf7..823e1f0 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "32189a77dc5d2d2f60b7b604acb911f7", + "content-hash": "01ad607453763ade6a82fd32dfc4b3ad", "packages": [], "packages-dev": [ { @@ -2133,16 +2133,16 @@ }, { "name": "infection/infection", - "version": "0.33.2", + "version": "0.33.3", "source": { "type": "git", "url": "https://github.com/infection/infection.git", - "reference": "c0250ea5c1082e26798a236b05d1cb319175ab3e" + "reference": "cc789bb58df7c649c4533ab860d98283fe270215" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/infection/infection/zipball/c0250ea5c1082e26798a236b05d1cb319175ab3e", - "reference": "c0250ea5c1082e26798a236b05d1cb319175ab3e", + "url": "https://api.github.com/repos/infection/infection/zipball/cc789bb58df7c649c4533ab860d98283fe270215", + "reference": "cc789bb58df7c649c4533ab860d98283fe270215", "shasum": "" }, "require": { @@ -2163,16 +2163,16 @@ "ondram/ci-detector": "^4.1.0", "php": "^8.3", "psr/log": "^2.0 || ^3.0", - "sanmai/di-container": "^0.1.12", + "sanmai/di-container": "^0.1.16", "sanmai/duoclock": "^0.1.0", "sanmai/later": "^0.1.7", "sanmai/pipeline": "^7.2", "sebastian/diff": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0", - "symfony/console": "^6.4 || ^7.0 || ^8.0", - "symfony/filesystem": "^6.4 || ^7.0 || ^8.0", - "symfony/finder": "^6.4 || ^7.0 || ^8.0", + "symfony/console": "^6.4 || ^7.4 || ^8.0", + "symfony/filesystem": "^6.4 || ^7.4 || ^8.0", + "symfony/finder": "^6.4 || ^7.4 || ^8.0", "symfony/polyfill-php85": "^1.33", - "symfony/process": "^6.4 || ^7.0 || ^8.0", + "symfony/process": "^6.4 || ^7.4 || ^8.0", "thecodingmachine/safe": "^v3.0", "webmozart/assert": "^1.11 || ^2.0" }, @@ -2197,7 +2197,7 @@ "shipmonk/dead-code-detector": "^0.15", "shipmonk/name-collision-detector": "^2.1", "sidz/phpstan-rules": "^0.5.1", - "symfony/yaml": "^6.4 || ^7.0 || ^8.0", + "symfony/yaml": "^6.4 || ^7.4 || ^8.0", "thecodingmachine/phpstan-safe-rule": "^1.4", "webmozarts/strict-phpunit": "^7.15" }, @@ -2255,7 +2255,7 @@ ], "support": { "issues": "https://github.com/infection/infection/issues", - "source": "https://github.com/infection/infection/tree/0.33.2" + "source": "https://github.com/infection/infection/tree/0.33.3" }, "funding": [ { @@ -2267,7 +2267,7 @@ "type": "open_collective" } ], - "time": "2026-05-20T07:03:50+00:00" + "time": "2026-06-18T07:45:54+00:00" }, { "name": "infection/mutator", @@ -4550,21 +4550,21 @@ }, { "name": "rector/rector", - "version": "2.4.5", + "version": "2.5.2", "source": { "type": "git", "url": "https://github.com/rectorphp/rector.git", - "reference": "cbd86024be5014d3c14d9f0b3f7aae8ecbffd62c" + "reference": "49ff6339174bdbdf50b0b35ecbcff14a05ac9e24" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/rectorphp/rector/zipball/cbd86024be5014d3c14d9f0b3f7aae8ecbffd62c", - "reference": "cbd86024be5014d3c14d9f0b3f7aae8ecbffd62c", + "url": "https://api.github.com/repos/rectorphp/rector/zipball/49ff6339174bdbdf50b0b35ecbcff14a05ac9e24", + "reference": "49ff6339174bdbdf50b0b35ecbcff14a05ac9e24", "shasum": "" }, "require": { "php": "^7.4|^8.0", - "phpstan/phpstan": "^2.1.56" + "phpstan/phpstan": "^2.2.2" }, "conflict": { "rector/rector-doctrine": "*", @@ -4598,7 +4598,7 @@ ], "support": { "issues": "https://github.com/rectorphp/rector/issues", - "source": "https://github.com/rectorphp/rector/tree/2.4.5" + "source": "https://github.com/rectorphp/rector/tree/2.5.2" }, "funding": [ { @@ -4606,7 +4606,7 @@ "type": "github" } ], - "time": "2026-05-26T21:03:22+00:00" + "time": "2026-06-22T11:39:33+00:00" }, { "name": "revolt/event-loop", @@ -9122,16 +9122,16 @@ }, { "name": "wyrihaximus/async-test-utilities", - "version": "13.1.0", + "version": "13.2.0", "source": { "type": "git", "url": "https://github.com/WyriHaximus/php-async-test-utilities.git", - "reference": "65cbbd82500dd4da040fdc06f1513364f91e136f" + "reference": "348547244e3b36033d813f8675ff10fd4156b096" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/WyriHaximus/php-async-test-utilities/zipball/65cbbd82500dd4da040fdc06f1513364f91e136f", - "reference": "65cbbd82500dd4da040fdc06f1513364f91e136f", + "url": "https://api.github.com/repos/WyriHaximus/php-async-test-utilities/zipball/348547244e3b36033d813f8675ff10fd4156b096", + "reference": "348547244e3b36033d813f8675ff10fd4156b096", "shasum": "" }, "require": { @@ -9142,14 +9142,14 @@ "react/promise": "^3.3.0", "wyrihaximus/phpstan-react": "^2.0.0", "wyrihaximus/react-phpunit-run-tests-in-fiber": "^4.0.0", - "wyrihaximus/test-utilities": "^13.1.0" + "wyrihaximus/test-utilities": "^13.2.0" }, "conflict": { "composer/compoer": "<2.6.0" }, "require-dev": { "react/promise-timer": "^1.11.0", - "wyrihaximus/makefiles": "^0.10.6" + "wyrihaximus/makefiles": "^0.11.1" }, "type": "library", "extra": { @@ -9177,7 +9177,7 @@ "description": "Test utilities for api-clients packages", "support": { "issues": "https://github.com/WyriHaximus/php-async-test-utilities/issues", - "source": "https://github.com/WyriHaximus/php-async-test-utilities/tree/13.1.0" + "source": "https://github.com/WyriHaximus/php-async-test-utilities/tree/13.2.0" }, "funding": [ { @@ -9185,7 +9185,7 @@ "type": "github" } ], - "time": "2026-06-09T08:34:11+00:00" + "time": "2026-06-20T21:11:32+00:00" }, { "name": "wyrihaximus/coding-standard", @@ -9228,16 +9228,16 @@ }, { "name": "wyrihaximus/makefiles", - "version": "0.11.0", + "version": "0.12.1", "source": { "type": "git", "url": "https://github.com/WyriHaximus/Makefiles.git", - "reference": "776126bd353f26c556a7fb3b20643eaa9d7f72aa" + "reference": "d16de82cf4a31c0cf710068f4235e393b0b2834d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/WyriHaximus/Makefiles/zipball/776126bd353f26c556a7fb3b20643eaa9d7f72aa", - "reference": "776126bd353f26c556a7fb3b20643eaa9d7f72aa", + "url": "https://api.github.com/repos/WyriHaximus/Makefiles/zipball/d16de82cf4a31c0cf710068f4235e393b0b2834d", + "reference": "d16de82cf4a31c0cf710068f4235e393b0b2834d", "shasum": "" }, "require": { @@ -9249,7 +9249,7 @@ "infection/infection": "<0.32.0" }, "require-dev": { - "wyrihaximus/test-utilities": "^13.1.0" + "wyrihaximus/test-utilities": "^13.2.0" }, "type": "composer-plugin", "extra": { @@ -9278,7 +9278,7 @@ "description": "🧱 Makefile building blocks", "support": { "issues": "https://github.com/WyriHaximus/Makefiles/issues", - "source": "https://github.com/WyriHaximus/Makefiles/tree/0.11.0" + "source": "https://github.com/WyriHaximus/Makefiles/tree/0.12.1" }, "funding": [ { @@ -9286,7 +9286,61 @@ "type": "github" } ], - "time": "2026-06-13T00:33:51+00:00" + "time": "2026-06-25T18:18:24+00:00" + }, + { + "name": "wyrihaximus/phpstan-no-safe", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/WyriHaximus/phpstan-no-safe.git", + "reference": "f9bed3bbba6cf617e25b3753ecbb09ad4d2c4813" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/WyriHaximus/phpstan-no-safe/zipball/f9bed3bbba6cf617e25b3753ecbb09ad4d2c4813", + "reference": "f9bed3bbba6cf617e25b3753ecbb09ad4d2c4813", + "shasum": "" + }, + "require": { + "php": "^8.4" + }, + "require-dev": { + "jawira/case-converter": "^3.6", + "nikic/php-parser": "^5.6.1", + "phpstan/phpdoc-parser": "^2.2.0", + "wyrihaximus/makefiles": "^0.11.1", + "wyrihaximus/test-utilities": "^13.1.0" + }, + "type": "library", + "extra": { + "phpstan": { + "includes": [ + "extension.neon" + ] + } + }, + "autoload": { + "psr-4": { + "WyriHaximus\\PHPStan\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "⛔🔐 PHPStan extension that detects and blocks any usage of `thecodingmachine/safe`", + "support": { + "issues": "https://github.com/WyriHaximus/phpstan-no-safe/issues", + "source": "https://github.com/WyriHaximus/phpstan-no-safe/tree/1.0.0" + }, + "funding": [ + { + "url": "https://github.com/WyriHaximus", + "type": "github" + } + ], + "time": "2026-06-19T23:15:39+00:00" }, { "name": "wyrihaximus/phpstan-react", @@ -9344,16 +9398,16 @@ }, { "name": "wyrihaximus/phpstan-rules-wrapper", - "version": "13.1.0", + "version": "14.0.0", "source": { "type": "git", "url": "https://github.com/WyriHaximus/php-phpstan-rules-wrapper.git", - "reference": "38449f0fc35fce570d26f1841606bbef51710365" + "reference": "a06a7d45b26704dc422db617e696267441e9d69b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/WyriHaximus/php-phpstan-rules-wrapper/zipball/38449f0fc35fce570d26f1841606bbef51710365", - "reference": "38449f0fc35fce570d26f1841606bbef51710365", + "url": "https://api.github.com/repos/WyriHaximus/php-phpstan-rules-wrapper/zipball/a06a7d45b26704dc422db617e696267441e9d69b", + "reference": "a06a7d45b26704dc422db617e696267441e9d69b", "shasum": "" }, "require": { @@ -9365,11 +9419,12 @@ "phpstan/phpstan-mockery": "^2.0.0", "phpstan/phpstan-phpunit": "^2.0.16", "phpstan/phpstan-strict-rules": "^2.0.11", - "shipmonk/dead-code-detector": "^1.2.0", + "shipmonk/dead-code-detector": "^1.2.1", "shipmonk/phpstan-rules": "^4.4.0", "staabm/phpstan-psr3": "^1.0.3", "symplify/phpstan-extensions": "^12.0.2", "tomasvotruba/type-coverage": "^2.2.2", + "wyrihaximus/phpstan-no-safe": "^1.0.0", "yamadashy/phpstan-friendly-formatter": "^1.4.0" }, "type": "library", @@ -9393,7 +9448,7 @@ "description": "🌯 PHPStan rules wrapper", "support": { "issues": "https://github.com/WyriHaximus/php-phpstan-rules-wrapper/issues", - "source": "https://github.com/WyriHaximus/php-phpstan-rules-wrapper/tree/13.1.0" + "source": "https://github.com/WyriHaximus/php-phpstan-rules-wrapper/tree/14.0.0" }, "funding": [ { @@ -9401,7 +9456,7 @@ "type": "github" } ], - "time": "2026-06-08T13:27:51+00:00" + "time": "2026-06-19T23:25:20+00:00" }, { "name": "wyrihaximus/react-phpunit-run-tests-in-fiber", @@ -9462,16 +9517,16 @@ }, { "name": "wyrihaximus/test-utilities", - "version": "13.1.0", + "version": "13.2.0", "source": { "type": "git", "url": "https://github.com/WyriHaximus/php-test-utilities.git", - "reference": "e4980b68709db0c7a03d8fbd4905eec62dd9b102" + "reference": "a83f92c89d8ba3cd10931867599d8ecc9e93f639" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/WyriHaximus/php-test-utilities/zipball/e4980b68709db0c7a03d8fbd4905eec62dd9b102", - "reference": "e4980b68709db0c7a03d8fbd4905eec62dd9b102", + "url": "https://api.github.com/repos/WyriHaximus/php-test-utilities/zipball/a83f92c89d8ba3cd10931867599d8ecc9e93f639", + "reference": "a83f92c89d8ba3cd10931867599d8ecc9e93f639", "shasum": "" }, "require": { @@ -9481,7 +9536,7 @@ "ext-hash": "^8.4", "ext-json": "^8.4", "icanhazstring/composer-unused": "^0.9.6", - "infection/infection": "^0.33.2", + "infection/infection": "^0.33.3", "maglnet/composer-require-checker": "^4.20.0", "mockery/mockery": "^1.6.12", "php": "^8.4", @@ -9489,11 +9544,11 @@ "php-parallel-lint/php-parallel-lint": "^1.4.0", "phpstan/phpstan": "^2.2.2", "phpunit/phpunit": "^13.1.13", - "rector/rector": "^2.4.5", + "rector/rector": "^2.4.6", "roave/backward-compatibility-check": "^8.19.0", "squizlabs/php_codesniffer": "^4.0.1", "wyrihaximus/coding-standard": "^4.0.0", - "wyrihaximus/phpstan-rules-wrapper": "^13.1.0" + "wyrihaximus/phpstan-rules-wrapper": "^14.0.0" }, "conflict": { "composer-unused/symbol-parser": "<0.3.3", @@ -9501,7 +9556,7 @@ "wyrihaximus/makefiles": "<0.5.0" }, "require-dev": { - "wyrihaximus/makefiles": "^0.10.6" + "wyrihaximus/makefiles": "^0.11.1" }, "suggest": { "wyrihaximus/async-test-utilities": "The recommended addition to this package when building ReactPHP packages and projects.", @@ -9534,7 +9589,7 @@ "description": "🛠️ Test utilities for api-clients packages", "support": { "issues": "https://github.com/WyriHaximus/php-test-utilities/issues", - "source": "https://github.com/WyriHaximus/php-test-utilities/tree/13.1.0" + "source": "https://github.com/WyriHaximus/php-test-utilities/tree/13.2.0" }, "funding": [ { @@ -9542,7 +9597,7 @@ "type": "github" } ], - "time": "2026-06-08T22:56:10+00:00" + "time": "2026-06-20T14:44:52+00:00" }, { "name": "yamadashy/phpstan-friendly-formatter", diff --git a/etc/qa/phpcs.xml b/etc/qa/phpcs.xml deleted file mode 100644 index 9ecccf9..0000000 --- a/etc/qa/phpcs.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - ../../stubs - - - diff --git a/etc/qa/rector.php b/etc/qa/rector.php deleted file mode 100644 index 16b1c00..0000000 --- a/etc/qa/rector.php +++ /dev/null @@ -1 +0,0 @@ -