Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
fisharebest committed Feb 20, 2025
1 parent 787ea1f commit aaeae37
Show file tree
Hide file tree
Showing 441 changed files with 3,750 additions and 17,523 deletions.
2 changes: 1 addition & 1 deletion app/Http/RequestHandlers/AccountUpdate.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public function handle(ServerRequestInterface $request): ResponseInterface
// Switch to the new language now
Session::put('language', $language);

FlashMessages::addMessage(I18N::translate('The details for “%s” have been updated.', e($user->username())), 'success');
FlashMessages::addMessage(I18N::translate('The details for “%s” have been updated.', e($user->userName())), 'success');

return redirect(route(HomePage::class, ['tree' => $tree instanceof Tree ? $tree->name() : null]));
}
Expand Down
4 changes: 2 additions & 2 deletions app/Http/RequestHandlers/ManageMediaData.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public function handle(ServerRequestInterface $request): ResponseInterface
$path = $row->media_folder . $row->multimedia_file_refn;

try {
$mime_type = Registry::filesystem()->data()->getMimeType($path) ?: Mime::DEFAULT_TYPE;
$mime_type = Registry::filesystem()->data()->getMimetype($path) ?: Mime::DEFAULT_TYPE;

if (str_starts_with($mime_type, 'image/')) {
$url = route(AdminMediaFileThumbnail::class, ['path' => $path]);
Expand Down Expand Up @@ -206,7 +206,7 @@ public function handle(ServerRequestInterface $request): ResponseInterface
$sort_columns = [0 => 0];

$callback = function (array $row) use ($data_filesystem, $media_trees): array {
$mime_type = $data_filesystem->getMimeType($row[0]) ?: Mime::DEFAULT_TYPE;
$mime_type = $data_filesystem->getMimetype($row[0]) ?: Mime::DEFAULT_TYPE;

if (str_starts_with($mime_type, 'image/')) {
$url = route(AdminMediaFileThumbnail::class, ['path' => $row[0]]);
Expand Down
22 changes: 11 additions & 11 deletions app/Report/PdfRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ public function setCurrentStyle(string $s): void
{
$this->currentStyle = $s;
$style = $this->wt_report->getStyle($s);
$this->tcpdf->SetFont($style['font'], $style['style'], $style['size']);
$this->tcpdf->setFont($style['font'], $style['style'], $style['size']);
}

/**
Expand Down Expand Up @@ -319,7 +319,7 @@ public function addMarginX(float $x): float
} else {
$x += $m['left'];
}
$this->tcpdf->SetX($x);
$this->tcpdf->setX($x);

return $x;
}
Expand Down Expand Up @@ -453,19 +453,19 @@ public function setup(): void
self::DISK_CACHE
);

$this->tcpdf->SetMargins($this->left_margin, $this->top_margin, $this->right_margin);
$this->tcpdf->setMargins($this->left_margin, $this->top_margin, $this->right_margin);
$this->tcpdf->setHeaderMargin($this->header_margin);
$this->tcpdf->setFooterMargin($this->footer_margin);
$this->tcpdf->SetAutoPageBreak(true, $this->bottom_margin);
$this->tcpdf->setAutoPageBreak(true, $this->bottom_margin);
$this->tcpdf->setFontSubsetting(self::SUBSETTING);
$this->tcpdf->SetCompression(self::COMPRESSION);
$this->tcpdf->setCompression(self::COMPRESSION);
$this->tcpdf->setRTL($this->rtl);
$this->tcpdf->SetCreator(Webtrees::NAME . ' ' . Webtrees::VERSION);
$this->tcpdf->SetAuthor($this->rauthor);
$this->tcpdf->SetTitle($this->title);
$this->tcpdf->SetSubject($this->rsubject);
$this->tcpdf->SetKeywords($this->rkeywords);
$this->tcpdf->SetHeaderData('', 0, $this->title);
$this->tcpdf->setCreator(Webtrees::NAME . ' ' . Webtrees::VERSION);
$this->tcpdf->setAuthor($this->rauthor);
$this->tcpdf->setTitle($this->title);
$this->tcpdf->setSubject($this->rsubject);
$this->tcpdf->setKeywords($this->rkeywords);
$this->tcpdf->setHeaderData('', 0, $this->title);
$this->tcpdf->setHeaderFont([$this->default_font, '', $this->default_font_size]);

$this->setReport($this);
Expand Down
14 changes: 7 additions & 7 deletions app/Report/ReportPdfCell.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public function render($renderer): void
$r = hexdec($match[1]);
$g = hexdec($match[2]);
$b = hexdec($match[3]);
$renderer->tcpdf->SetFillColor($r, $g, $b);
$renderer->tcpdf->setFillColor($r, $g, $b);
}
} else {
// If no color set then don't fill
Expand All @@ -79,17 +79,17 @@ public function render($renderer): void
$r = hexdec($match[1]);
$g = hexdec($match[2]);
$b = hexdec($match[3]);
$renderer->tcpdf->SetDrawColor($r, $g, $b);
$renderer->tcpdf->setDrawColor($r, $g, $b);
}

// Paint the text color or they might use inherited colors by the previous function
if (preg_match('/#?(..)(..)(..)/', $this->tcolor, $match)) {
$r = hexdec($match[1]);
$g = hexdec($match[2]);
$b = hexdec($match[3]);
$renderer->tcpdf->SetTextColor($r, $g, $b);
$renderer->tcpdf->setTextColor($r, $g, $b);
} else {
$renderer->tcpdf->SetTextColor(0, 0, 0);
$renderer->tcpdf->setTextColor(0, 0, 0);
}

// If current position (left)
Expand All @@ -108,7 +108,7 @@ public function render($renderer): void
if ($this->top === ReportBaseElement::CURRENT_POSITION) {
$this->top = $renderer->tcpdf->GetY();
} else {
$renderer->tcpdf->SetY($this->top);
$renderer->tcpdf->setY($this->top);
}

// Check the last cell height and adjust the current cell height if needed
Expand Down Expand Up @@ -160,7 +160,7 @@ public function render($renderer): void
$renderer->tcpdf->Link($cX, $this->top, $this->width, $this->height, $this->url);
}
// Reset the border and the text color to black or they will be inherited
$renderer->tcpdf->SetDrawColor(0, 0, 0);
$renderer->tcpdf->SetTextColor(0, 0, 0);
$renderer->tcpdf->setDrawColor(0, 0, 0);
$renderer->tcpdf->setTextColor(0, 0, 0);
}
}
2 changes: 1 addition & 1 deletion app/Report/ReportPdfFootnote.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function renderFootnote($renderer): void
}
$temptext = str_replace('#PAGENUM#', (string) $renderer->tcpdf->PageNo(), $this->text);
// Set the link to this y/page position
$renderer->tcpdf->SetLink($this->addlink, -1, -1);
$renderer->tcpdf->setLink($this->addlink, -1, -1);
// Print first the source number
// working
if ($renderer->tcpdf->getRTL()) {
Expand Down
8 changes: 4 additions & 4 deletions app/Report/ReportPdfImage.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,16 @@ public function render($renderer): void
} else {
// For static position add margin
$this->x = $renderer->addMarginX($this->x);
$renderer->tcpdf->SetX($curx);
$renderer->tcpdf->setX($curx);
}
if ($this->y === ReportBaseElement::CURRENT_POSITION) {
//-- first check for a collision with the last picture
if ($lastpicbottom !== null && $renderer->tcpdf->PageNo() === $lastpicpage && $lastpicbottom >= $renderer->tcpdf->GetY() && $this->x >= $lastpicleft && $this->x <= $lastpicright) {
$renderer->tcpdf->SetY($lastpicbottom + 5);
$renderer->tcpdf->setY($lastpicbottom + 5);
}
$this->y = $renderer->tcpdf->GetY();
} else {
$renderer->tcpdf->SetY($this->y);
$renderer->tcpdf->setY($this->y);
}
if ($renderer->tcpdf->getRTL()) {
$renderer->tcpdf->Image(
Expand Down Expand Up @@ -95,7 +95,7 @@ public function render($renderer): void
$lastpicbottom = $this->y + $this->height;
// Setup for the next line
if ($this->line === 'N') {
$renderer->tcpdf->SetY($lastpicbottom);
$renderer->tcpdf->setY($lastpicbottom);
}
}
}
6 changes: 3 additions & 3 deletions app/Report/ReportPdfText.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ public function render($renderer): void
$r = hexdec($match[1]);
$g = hexdec($match[2]);
$b = hexdec($match[3]);
$renderer->tcpdf->SetTextColor($r, $g, $b);
$renderer->tcpdf->setTextColor($r, $g, $b);
} else {
$renderer->tcpdf->SetTextColor(0, 0, 0);
$renderer->tcpdf->setTextColor(0, 0, 0);
}
$temptext = FunctionsRtl::spanLtrRtl($temptext);
$temptext = str_replace(
Expand All @@ -91,7 +91,7 @@ public function render($renderer): void
''
); //change height - line break etc. - the form is mirror on rtl pages
// Reset the text color to black or it will be inherited
$renderer->tcpdf->SetTextColor(0, 0, 0);
$renderer->tcpdf->setTextColor(0, 0, 0);
}

/**
Expand Down
36 changes: 18 additions & 18 deletions app/Report/ReportPdfTextBox.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public function render($renderer): void
$cY = $renderer->tcpdf->GetY();
} else {
$cY = $this->top;
$renderer->tcpdf->SetY($cY);
$renderer->tcpdf->setY($cY);
}

// Check the width if set to page wide OR set by xml to larger then page width (margin)
Expand Down Expand Up @@ -246,7 +246,7 @@ public function render($renderer): void
$r = hexdec($match[1]);
$g = hexdec($match[2]);
$b = hexdec($match[3]);
$renderer->tcpdf->SetFillColor($r, $g, $b);
$renderer->tcpdf->setFillColor($r, $g, $b);
}
}
// Clean up a bit
Expand All @@ -264,36 +264,36 @@ public function render($renderer): void
if ($this->padding) {
if ($cHT > 0) {
if (is_array($cM['cell'])) {
$renderer->tcpdf->SetY($cY + $cM['padding_top']);
$renderer->tcpdf->setY($cY + $cM['padding_top']);
} else {
$renderer->tcpdf->SetY($cY + $cM['cell']);
$renderer->tcpdf->setY($cY + $cM['cell']);
}
}
}
// Change the margins X, Width
if (!$renderer->tcpdf->getRTL()) {
if ($this->padding) {
if (is_array($cM['cell'])) {
$renderer->tcpdf->SetLeftMargin($cX + $cM['padding_left']);
$renderer->tcpdf->setLeftMargin($cX + $cM['padding_left']);
} else {
$renderer->tcpdf->SetLeftMargin($cX + $cM['cell']);
$renderer->tcpdf->setLeftMargin($cX + $cM['cell']);
}
$renderer->tcpdf->SetRightMargin($renderer->getRemainingWidthPDF() - $cW + $cM['right']);
$renderer->tcpdf->setRightMargin($renderer->getRemainingWidthPDF() - $cW + $cM['right']);
} else {
$renderer->tcpdf->SetLeftMargin($cX);
$renderer->tcpdf->SetRightMargin($renderer->getRemainingWidthPDF() - $cW + $cM['right']);
$renderer->tcpdf->setLeftMargin($cX);
$renderer->tcpdf->setRightMargin($renderer->getRemainingWidthPDF() - $cW + $cM['right']);
}
} else {
if ($this->padding) {
if (is_array($cM['cell'])) {
$renderer->tcpdf->SetRightMargin($cX + $cM['padding_right']);
$renderer->tcpdf->setRightMargin($cX + $cM['padding_right']);
} else {
$renderer->tcpdf->SetRightMargin($cX + $cM['cell']);
$renderer->tcpdf->setRightMargin($cX + $cM['cell']);
}
$renderer->tcpdf->SetLeftMargin($renderer->getRemainingWidthPDF() - $cW + $cM['left']);
$renderer->tcpdf->setLeftMargin($renderer->getRemainingWidthPDF() - $cW + $cM['left']);
} else {
$renderer->tcpdf->SetRightMargin($cX);
$renderer->tcpdf->SetLeftMargin($renderer->getRemainingWidthPDF() - $cW + $cM['left']);
$renderer->tcpdf->setRightMargin($cX);
$renderer->tcpdf->setLeftMargin($renderer->getRemainingWidthPDF() - $cW + $cM['left']);
}
}
// Save the current page number
Expand All @@ -310,8 +310,8 @@ public function render($renderer): void
}
}
// Restore the margins
$renderer->tcpdf->SetLeftMargin($cM['left']);
$renderer->tcpdf->SetRightMargin($cM['right']);
$renderer->tcpdf->setLeftMargin($cM['left']);
$renderer->tcpdf->setRightMargin($cM['right']);

// This will be mostly used to trick the multiple images last height
if ($this->reseth) {
Expand All @@ -323,12 +323,12 @@ public function render($renderer): void
}
// New line and some clean up
if (!$this->newline) {
$renderer->tcpdf->SetXY($cX + $cW, $cY);
$renderer->tcpdf->setXY($cX + $cW, $cY);
$renderer->lastCellHeight = $cH;
} else {
// addMarginX() also updates X
$renderer->addMarginX(0);
$renderer->tcpdf->SetY($cY + $cH);
$renderer->tcpdf->setY($cY + $cH);
$renderer->lastCellHeight = 0;
}
}
Expand Down
12 changes: 4 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@
"league/flysystem-cached-adapter": "1.1.0",
"league/flysystem-ziparchive": "1.0.3",
"middlewares/client-ip": "1.3.0",
"mlocati/ip-lib": "1.18.1",
"nesbot/carbon": "2.72.5",
"mlocati/ip-lib": "1.20.0",
"nesbot/carbon": "2.73.0",
"nyholm/psr7": "1.6.1",
"nyholm/psr7-server": "1.1.0",
"oscarotero/middleland": "1.0.1",
"oscarotero/middleland": "1.0.2",
"psr/cache": "1.0.1",
"psr/http-message": "1.0.1",
"psr/http-server-handler": "1.0.2",
Expand All @@ -79,7 +79,7 @@
"symfony/expression-language": "4.4.47",
"symfony/polyfill-mbstring": "v1.30.0",
"symfony/polyfill-php80": "1.30.0",
"tecnickcom/tcpdf": "6.8.0"
"tecnickcom/tcpdf": "6.8.2"
},
"require-dev": {
"ext-dom": "*",
Expand Down Expand Up @@ -139,9 +139,6 @@
"webtrees:lang": [
"Fisharebest\\Webtrees\\Console\\ComposerScripts::languageFiles"
],
"webtrees:missing-tests": [
"Fisharebest\\Webtrees\\Console\\ComposerScripts::missingTests"
],
"webtrees:po": [
"sed -i.bak -e 's/\\(I18N::[^)]*[)]\\)/<?php echo \\1; ?>/g' resources/xml/reports/*.xml",
"git grep -I --name-only --fixed-strings -e I18N:: -- '*.php' '*.phtml' '*.xml' | xargs xgettext --package-name=webtrees --package-version=1.0 --output=resources/lang/webtrees.pot --no-wrap --language=PHP --add-comments=I18N --from-code=utf-8 --keyword --keyword=translate:1 --keyword=translateContext:1c,2 --keyword=plural:1,2",
Expand All @@ -163,7 +160,6 @@
},
"scripts-descriptions": {
"webtrees:build": "Create a distribution file (webtrees.zip)",
"webtrees:check": "Run various static analysis tools",
"webtrees:coverage": "Generate test coverage report",
"webtrees:lang": "Compile the language files (messages.php)",
"webtrees:po": "Update the language (webtrees.pot, *.po)"
Expand Down
Loading

0 comments on commit aaeae37

Please sign in to comment.