From e7fc23ccdbbc770760a1d3b143533450fedd1618 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Vo=C5=99=C3=AD=C5=A1ek?= Date: Fri, 4 Dec 2020 02:04:09 +0100 Subject: [PATCH 1/3] Requiring atk4/data is enought --- composer.json | 4 ---- 1 file changed, 4 deletions(-) diff --git a/composer.json b/composer.json index 9cac1f4f5c..8dd03d95bf 100644 --- a/composer.json +++ b/composer.json @@ -58,14 +58,10 @@ }, "require": { "php": ">=7.3.0", - "ext-json": "*", - "atk4/core": "dev-develop", "atk4/data": "dev-develop" }, "require-release": { "php": ">=7.3.0", - "ext-json": "*", - "atk4/core": "~2.3.0", "atk4/data": "~2.3.0" }, "require-dev": { From 9f2166e87d709e1af3961f6578d41176331796cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Vo=C5=99=C3=AD=C5=A1ek?= Date: Fri, 4 Dec 2020 12:56:58 +0100 Subject: [PATCH 2/3] fix codefresh --- .codefresh/ui-build-deploy.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.codefresh/ui-build-deploy.yml b/.codefresh/ui-build-deploy.yml index 5670a2b58a..ebb0589e2d 100644 --- a/.codefresh/ui-build-deploy.yml +++ b/.codefresh/ui-build-deploy.yml @@ -13,15 +13,11 @@ steps: inject_hashes: stage: clone - title: Inject dependency SHA to bypass Packagist cache and add HEAD to footer + title: Add HEAD hash to version/footer image: alpine commands: - - apk add bash jq git openssh + - apk add bash - sed -E "s/(public \\\$version = ')(.*)(')/\\1\\2 - $(git rev-parse --short HEAD)\\3/" -i src/App.php - - > - cat composer.json | - jq '.require["atk4/core"]=.require["atk4/core"]+"#'`git ls-remote https://github.com/atk4/core/ develop | cut -f1`'"' | - jq '.require["atk4/data"]=.require["atk4/data"]+"#'`git ls-remote https://github.com/atk4/data/ develop | cut -f1`'"' > composer.tmp.json && mv composer.tmp.json composer.json build: type: build From 3c1618a9725bb15fe03b275c4e1aec1ecac80262 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Vo=C5=99=C3=AD=C5=A1ek?= Date: Fri, 4 Dec 2020 12:59:00 +0100 Subject: [PATCH 3/3] fix burn testing --- .github/workflows/test-unit.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-unit.yml b/.github/workflows/test-unit.yml index 5022d5b867..fad2e6a412 100644 --- a/.github/workflows/test-unit.yml +++ b/.github/workflows/test-unit.yml @@ -144,7 +144,7 @@ jobs: if [ "${{ matrix.php }}" == "8.0" ]; then composer config platform.php 7.4.5 ; fi composer install --no-suggest --ansi --prefer-dist --no-interaction --no-progress --optimize-autoloader if [ "${{ matrix.type }}" == "Phpunit Lowest" ]; then composer update --ansi --prefer-dist --prefer-lowest --prefer-stable --no-interaction --no-progress --optimize-autoloader ; fi - if [ "${{ matrix.type }}" == "Phpunit Burn" ]; then sed -i 's/ *public function runBare(): void/public function runBare(): void { gc_collect_cycles(); $mem0 = memory_get_usage(); for ($i = 0; $i < '"$(if [ \"$GITHUB_EVENT_NAME\" == \"schedule\" ]; then echo 5; else echo 5; fi)"'; ++$i) { $this->_runBare(); if ($i === 0) { gc_collect_cycles(); $mem1 = memory_get_usage(); } } gc_collect_cycles(); $mem2 = memory_get_usage(); if ($mem2 - 3072 * 1024 > $mem0 || $mem2 - 768 * 1024 > $mem1) { $this->onNotSuccessfulTest(new AssertionFailedError("Memory leak detected! (" . round($mem0 \/ (1024 * 1024), 3) . " + " . round(($mem1 - $mem0) \/ (1024 * 1024), 3) . " + " . round(($mem2 - $mem1) \/ (1024 * 1024), 3) . " MB, " . $i . " iterations)")); } } private function _runBare(): void/' vendor/phpunit/phpunit/src/Framework/TestCase.php && cat vendor/phpunit/phpunit/src/Framework/TestCase.php | grep '_runBare(' ; fi + if [ "${{ matrix.type }}" == "Phpunit Burn" ]; then sed -i 's/ *public function runBare(): void/public function runBare(): void { gc_collect_cycles(); $mem0 = memory_get_usage(); for ($i = 0; $i < '"$(if [ \"$GITHUB_EVENT_NAME\" == \"schedule\" ]; then echo 5; else echo 5; fi)"'; ++$i) { $this->_runBare(); if ($i === 0) { gc_collect_cycles(); $mem1 = memory_get_usage(); } } gc_collect_cycles(); $mem2 = memory_get_usage(); if ($mem2 - 3072 * 1024 > $mem0 || $mem2 - 1536 * 1024 > $mem1) { $this->onNotSuccessfulTest(new AssertionFailedError("Memory leak detected! (" . round($mem0 \/ (1024 * 1024), 3) . " + " . round(($mem1 - $mem0) \/ (1024 * 1024), 3) . " + " . round(($mem2 - $mem1) \/ (1024 * 1024), 3) . " MB, " . $i . " iterations)")); } } private function _runBare(): void/' vendor/phpunit/phpunit/src/Framework/TestCase.php && cat vendor/phpunit/phpunit/src/Framework/TestCase.php | grep '_runBare(' ; fi - name: Init run: |