Compare commits

..

1 Commits

Author SHA1 Message Date
Jephté Clain 1cd546cdd8 maj deps php8.2 2024-11-29 08:50:54 +04:00
7 changed files with 19 additions and 53 deletions

View File

@ -6,6 +6,9 @@
<Configuration>
<option name="path" value="$PROJECT_DIR$/tests" />
</Configuration>
<Configuration>
<option name="path" value="$PROJECT_DIR$/tests" />
</Configuration>
</list>
</option>
</component>

View File

@ -42,10 +42,6 @@
<path value="$PROJECT_DIR$/vendor/sebastian/code-unit" />
<path value="$PROJECT_DIR$/vendor/sebastian/code-unit-reverse-lookup" />
<path value="$PROJECT_DIR$/vendor/theseer/tokenizer" />
<path value="$PROJECT_DIR$/vendor/mur/tests" />
<path value="$PROJECT_DIR$/vendor/symfony/deprecation-contracts" />
<path value="$PROJECT_DIR$/vendor/symfony/yaml" />
<path value="$PROJECT_DIR$/vendor/symfony/polyfill-ctype" />
</include_path>
</component>
<component name="PhpProjectSharedConfiguration" php_language_level="7.4" />

View File

@ -5,6 +5,9 @@
<PhpSpecSuiteConfiguration>
<option name="myPath" value="$PROJECT_DIR$" />
</PhpSpecSuiteConfiguration>
<PhpSpecSuiteConfiguration>
<option name="myPath" value="$PROJECT_DIR$" />
</PhpSpecSuiteConfiguration>
</suites>
</component>
</project>

View File

@ -1,32 +0,0 @@
#!/bin/bash
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
mydir="$(cd "$(dirname -- "$0")"; pwd)"
myself="$mydir/$(basename -- "$0")"
cwd="$(pwd)"
if [ "$mydir" == "$cwd" -o "${mydir#$cwd/}" != "$mydir" ]; then
cp "$myself" /tmp/merge2php82.sh
exec /tmp/merge2php82.sh "$mydir" "$mydir"
else
nulibdir="${2:-$mydir}"
source "$nulibdir/load.sh" || exit 1
fi
args=(
"description"
#"usage"
)
parse_args "$@"; set -- "${args[@]}"
projdir="${1:-.}"
cd "$projdir" || die
edebug "mydir=$mydir, nulibdir=$nulibdir, projdir=$projdir"
git checkout php82
git rebase master ||
die "Le rebase automatique a échoué. Après avoir résolu les conflits, faire
git checkout master
pp -af
"
git checkout master
pp -af

View File

@ -17,7 +17,7 @@ class CsvBuilder extends AbstractBuilder {
parent::__construct($output, $params);
}
protected function _write(array $row, ?array $colsStyle=null, ?array $rowStyle=null): void {
protected function _write(array $row): void {
$this->fputcsv($row);
}

View File

@ -33,7 +33,6 @@ abstract class AbstractBuilder extends TempStream implements IBuilder {
$rows = $params["rows"] ?? null;
if (is_callable($rows)) $rows = $rows();
$this->rows = $rows;
$this->index = 0;
$cookFunc = $params["cook_func"] ?? null;
$cookCtx = $cookArgs = null;
if ($cookFunc !== null) {
@ -56,8 +55,6 @@ abstract class AbstractBuilder extends TempStream implements IBuilder {
protected ?iterable $rows;
protected int $index;
protected ?string $output;
protected ?array $cookCtx;
@ -72,7 +69,7 @@ abstract class AbstractBuilder extends TempStream implements IBuilder {
$this->headers = $headers;
}
protected abstract function _write(array $row, ?array $colsStyle=null, ?array $rowStyle=null): void;
protected abstract function _write(array $row): void;
protected bool $wroteHeaders = false;
@ -92,27 +89,26 @@ abstract class AbstractBuilder extends TempStream implements IBuilder {
$row = nur_func::_call($this->cookCtx, $args);
}
if ($row !== null) {
foreach ($row as &$col) {
foreach ($row as &$value) {
# formatter les dates
if ($col instanceof DateTime) {
$col = $col->format();
} elseif ($col instanceof DateTimeInterface) {
$col = DateTime::with($col)->format();
if ($value instanceof DateTime) {
$value = $value->format();
} elseif ($value instanceof DateTimeInterface) {
$value = DateTime::with($value)->format();
}
}; unset($col);
}; unset($value);
}
return $row;
}
function write(?array $row, ?array $colsStyle=null, ?array $rowStyle=null): void {
function write(?array $row): void {
$row = $this->cookRow($row);
if ($row === null) return;
$this->writeHeaders(array_keys($row));
$this->_write($row, $colsStyle, $rowStyle);
$this->index++;
$this->_write($row);
}
function writeAll(?iterable $rows=null, ?array $rowStyle=null): void {
function writeAll(?iterable $rows=null): void {
$unsetRows = false;
if ($rows === null) {
$rows = $this->rows;
@ -120,7 +116,7 @@ abstract class AbstractBuilder extends TempStream implements IBuilder {
}
if ($rows !== null) {
foreach ($rows as $row) {
$this->write(cl::with($row), null, $rowStyle);
$this->write(cl::with($row));
}
}
if ($unsetRows) $this->rows = null;

View File

@ -1,6 +1,6 @@
#!/bin/bash
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
source "$(dirname -- "$0")/../../load.sh" || exit 1
source /etc/nulib.sh || exit 1
declare -A DESTDIRS=(
[template-_bg_launcher.php]=sbin