fix: trashed backup before replace, byte-exact meta copy, partial rollback
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01At3V6SjwbMe6eMzVGW3Hs7
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace LIT\MCP\Integrations\WordPress\Status;
|
||||
|
||||
use RuntimeException;
|
||||
use Throwable;
|
||||
|
||||
/**
|
||||
* Thrown by PostCloner::replace(). $parts lists the parts of the original replace()
|
||||
* had started to write (post, meta, terms) – only those need to be restored.
|
||||
*/
|
||||
final class ReplaceFailed extends RuntimeException
|
||||
{
|
||||
/** @param list<string> $parts */
|
||||
public function __construct(public readonly array $parts, Throwable $previous)
|
||||
{
|
||||
parent::__construct($previous->getMessage(), 0, $previous);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user