76c01e44df
對齊 A v3.2.0。型別強制會把隱式轉換變成 TypeError,所以一次全檔加入 並跑完整測試(unit 451 / integration 398 全綠,無迴歸)。 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TbG1keQQ7XBa7qMQY16KCY
33 lines
1.1 KiB
PHP
33 lines
1.1 KiB
PHP
<?php
|
|
/**
|
|
* Backward-compat interface alias.
|
|
*
|
|
* PHP class_alias() does NOT support interfaces. This file declares
|
|
* `WPDO_Entity_Adapter_Interface` as a child of `TMDO_Entity_Adapter_Interface`
|
|
* (no new methods), which allows sister plugins that type-hint against the old
|
|
* name to keep working: the four TMDO adapters implement this interface, so
|
|
* `instanceof WPDO_Entity_Adapter_Interface` returns true for all of them.
|
|
*
|
|
* Loaded by `class-tmdo-back-compat.php` after the real interface is loaded.
|
|
*
|
|
* @package TMDO
|
|
* @since 0.1.0
|
|
*/
|
|
|
|
declare(strict_types=1);
|
|
|
|
if ( ! defined( 'ABSPATH' ) ) {
|
|
exit;
|
|
}
|
|
|
|
if ( ! interface_exists( 'WPDO_Entity_Adapter_Interface', false ) && interface_exists( 'TMDO_Entity_Adapter_Interface', false ) ) {
|
|
/**
|
|
* Backward-compat alias interface. Any class implementing
|
|
* `WPDO_Entity_Adapter_Interface` automatically satisfies
|
|
* `TMDO_Entity_Adapter_Interface` and vice-versa.
|
|
*
|
|
* Will emit `_doing_it_wrong()` notice in v0.2.0+.
|
|
*/
|
|
interface WPDO_Entity_Adapter_Interface extends TMDO_Entity_Adapter_Interface {}
|
|
}
|