Skip to content

Commit

Permalink
Fix CI (#2127)
Browse files Browse the repository at this point in the history
  • Loading branch information
mvorisek authored Nov 9, 2023
1 parent 6b503a7 commit 7b2c2f5
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test-unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
2 changes: 1 addition & 1 deletion demos/_unit-test/stream.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function throwNotSupported(): void
throw new Exception('Not implemented/supported');
}

public function __toString()
public function __toString(): string
{
$this->throwNotSupported();
}
Expand Down
5 changes: 4 additions & 1 deletion docs/form.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/js.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7b2c2f5

Please sign in to comment.