diff --git a/.github/workflows/test-unit.yml b/.github/workflows/test-unit.yml index 71d1530c37..4a5a74533b 100644 --- a/.github/workflows/test-unit.yml +++ b/.github/workflows/test-unit.yml @@ -139,7 +139,7 @@ jobs: if [ -n "$LOG_COVERAGE" ]; then composer require --no-interaction --no-install phpunit/phpcov; fi composer update --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(); gc_collect_cycles(); $memDiffs = array_fill(0, '"$(if [ \"$GITHUB_EVENT_NAME\" == \"schedule\" ]; then echo 64; else echo 16; fi)"', 0); for ($i = -1; $i < count($memDiffs); ++$i) { $this->_runBare(); gc_collect_cycles(); gc_collect_cycles(); $mem = memory_get_usage(); if ($i !== -1) { $memDiffs[$i] = $mem - $memPrev; } $memPrev = $mem; rsort($memDiffs); if (array_sum($memDiffs) >= 4096 * 1024 || $memDiffs[2] > 0) { $this->onNotSuccessfulTest(new AssertionFailedError( "Memory leak detected! (" . implode(" + ", array_map(fn ($v) => number_format($v / 1024, 3, ".", " "), array_filter($memDiffs))) . " KB, " . ($i + 2) . " 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(); gc_collect_cycles(); $memDiffs = array_fill(0, '"$(if [ \"$GITHUB_EVENT_NAME\" == \"schedule\" ]; then echo 64; else echo 16; fi)"', 0); for ($i = -1; $i < count($memDiffs); ++$i) { $this->_runBare(); gc_collect_cycles(); gc_collect_cycles(); $mem = memory_get_usage(); if ($i !== -1) { $memDiffs[$i] = $mem - $memPrev; } $memPrev = $mem; rsort($memDiffs); if (array_sum($memDiffs) >= 4096 * 1024 || $memDiffs[2] > 0) { $this->onNotSuccessfulTest(new AssertionFailedError("Memory leak detected! (" . implode(" + ", array_map(static fn ($v) => number_format($v / 1024, 3, ".", " "), array_filter($memDiffs))) . " KB, " . ($i + 2) . " 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: | diff --git a/README.md b/README.md index 98020201e7..ac0e358343 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ Many companies use Agile Toolkit to implement admin interface and in some cases ### How does it work? -Download from https://github.com/atk4/ui/releases or install Agile UI with `composer require atk4/ui` +Download from [releases](https://github.com/atk4/ui/releases) or install Agile UI with `composer require atk4/ui` using composer. Create "index.php" file with: diff --git a/demos/_unit-test/stream.php b/demos/_unit-test/stream.php index cface0de2a..baf5074595 100644 --- a/demos/_unit-test/stream.php +++ b/demos/_unit-test/stream.php @@ -37,7 +37,7 @@ public function throwNotSupported(): void throw new Exception('Not implemented/supported'); } - public function __toString() + public function __toString(): string { $this->throwNotSupported(); } diff --git a/docs/form.md b/docs/form.md index 81176e8c26..d9894dd37a 100644 --- a/docs/form.md +++ b/docs/form.md @@ -357,7 +357,10 @@ and therefore Persistence typecasting will not modify it's value and it's stored The above code result in the following output: ``` -date1 = DateTime Object ( [date] => 2017-09-03 00:00:00 .. ) and date2 = September 3, 2017 +date1 = DateTime Object( + [date] => 2017-09-03 00:00:00 + ... +) and date2 = September 3, 2017 ``` ### Seeding Form Control from Model diff --git a/docs/js.md b/docs/js.md index f57b5eb61e..b7e0216fa0 100644 --- a/docs/js.md +++ b/docs/js.md @@ -354,7 +354,7 @@ $h2 = $leftBox2->js()->height(); $sum = new JsExpression('[] + []', [$h1, $h2]); -$rightBoxContainer->js(true)->height( $sum ); +$rightBoxContainer->js(true)->height($sum); ``` It is important to remember that the height of an element is a browser-side property and you