Skip to content

Commit f7bd579

Browse files
authored
Adds documentation for maxLogs option in updater
Includes a new optional parameter, `$maxLogs`, in the updater documentation to specify the maximum number of log files to maintain, defaulting to 30. Clarifies user instructions for handling automatic updates.
1 parent 6807bfe commit f7bd579

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@ To initialize the Updater class and start the update process, follow these steps
7878
> `$releaseExclusions` (Optional) An array of directories or files in the release to exclude from the update.<br>
7979
> `$clear` (Optional) Clear the downloaded file after the update has completed if set to true.<br>
8080
> `$dir` (Optional) Set the directory of the update. Default to current working dir.<br>
81-
> `$autoUpdate` (Optional) Whether or not to automatically update the project. Defaults to true.
81+
> `$autoUpdate` (Optional) Whether or not to automatically update the project. Defaults to true.<br>
82+
> `$maxLogs` (Optional) Maximum number of log file to maintain. Defaults to 30.
8283
8384
> The exclusions array keys:
8485

src/Updater.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,10 @@ final class Updater
4646
* @param bool $clear (Optional) Whether or not to clear the downloaded file. Defaults to true.
4747
* @param string $dir (Optional) The directory where the update will occur. Defaults to current working directory.
4848
* @param bool $autoUpdate (Optional) Whether or not to automatically update the project. Defaults to true.
49+
* @param int $maxLogs (Optional) Maximum number of log file to maintain. Defaults to 30.
4950
* @return void
5051
*/
51-
public function __construct(string $username, string $repository, string $token, string $version, string|null $admin = '', string|null $mailer = '', array|null $sourceExclusions = ['path' => [], 'filename' => []], array|null $releaseExclusions = ['path' => [], 'filename' => []], bool $clear = true, $dir = "", $autoUpdate = true, $maxLogs = 30)
52+
public function __construct(string $username, string $repository, string $token, string $version, string|null $admin = '', string|null $mailer = '', array|null $sourceExclusions = ['path' => [], 'filename' => []], array|null $releaseExclusions = ['path' => [], 'filename' => []], bool $clear = true, string $dir = "", bool $autoUpdate = true, int $maxLogs = 30)
5253
{
5354
if ($admin == null) {
5455
$this->admin = '';

0 commit comments

Comments
 (0)