Merge remote-tracking branch 'origin/develop'

This commit is contained in:
snipe
2025-09-29 11:05:45 +01:00
2 changed files with 21 additions and 3 deletions
@@ -23,23 +23,39 @@ class CheckoutAcceptanceFactory extends Factory
'assigned_to_id' => User::factory(),
];
}
protected static bool $skipActionLog = false;
public function withoutActionLog(): static
{
// turn off for this create() call
static::$skipActionLog = true;
// ensure it turns back on AFTER creating
return $this->afterCreating(function () {
static::$skipActionLog = false;
});
}
public function configure(): static
{
return $this->afterCreating(function (CheckoutAcceptance $acceptance) {
if (static::$skipActionLog) {
return; // short-circuit
}
if ($acceptance->checkoutable instanceof Asset) {
$this->createdAssociatedActionLogEntry($acceptance);
}
if ($acceptance->checkoutable instanceof Asset && $acceptance->assignedTo instanceof User) {
$acceptance->checkoutable->update([
'assigned_to' => $acceptance->assigned_to_id,
'assigned_type' => get_class($acceptance->assignedTo),
'assigned_to' => $acceptance->assigned_to_id,
'assigned_type'=> get_class($acceptance->assignedTo),
]);
}
});
}
public function forAccessory()
{
return $this->state([
+3 -1
View File
@@ -62,6 +62,7 @@ if ($argc > 1){
break;
case '--no-interactive':
$no_interactive = true;
putenv("COMPOSER_NO_INTERACTION=1"); //put composer in non-interactive mode aswell
break;
default: // for legacy support from before we started using --branch
$branch = $argv[$arg];
@@ -443,7 +444,8 @@ if ((strpos('git version', $git_version)) === false) {
echo $git_fetch;
echo '-- '.$git_stash;
echo '-- '.$git_checkout;
echo '-- '.$git_pull."\n";
echo '-- '.$git_pull;
echo "\n";
} else {
echo "Git is NOT installed. You can still use this upgrade script to run common \n";
echo "migration commands, but you will have to manually download the updated files. \n\n";