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
38 lines
1.1 KiB
PHP
38 lines
1.1 KiB
PHP
<?php
|
|
/**
|
|
* Backward-compat trait alias.
|
|
*
|
|
* PHP class_alias() does NOT support traits or interfaces. This file declares
|
|
* a thin wrapper trait `WPDO_Anti_EAV_Aware` that simply `use`s the new
|
|
* `TMDO_Anti_EAV_Aware` trait, preserving binary compatibility for sister
|
|
* plugins (2meet-brandcards, hub-core extensions, etc.) that still reference
|
|
* the old trait name.
|
|
*
|
|
* Loaded by `class-tmdo-back-compat.php` after the new trait is loaded.
|
|
*
|
|
* @package TMDO
|
|
* @since 0.1.0
|
|
*/
|
|
|
|
declare(strict_types=1);
|
|
|
|
if ( ! defined( 'ABSPATH' ) ) {
|
|
exit;
|
|
}
|
|
|
|
if ( ! trait_exists( 'WPDO_Anti_EAV_Aware', false ) && trait_exists( 'TMDO_Anti_EAV_Aware', false ) ) {
|
|
/**
|
|
* Backward-compat alias trait. Sister plugins using `use WPDO_Anti_EAV_Aware;`
|
|
* inherit all methods from `TMDO_Anti_EAV_Aware` transparently.
|
|
*
|
|
* Will emit `_doing_it_wrong()` notice in v0.2.0+.
|
|
*/
|
|
trait WPDO_Anti_EAV_Aware {
|
|
use TMDO_Anti_EAV_Aware;
|
|
}
|
|
}
|
|
|
|
// NOTE: WPDO_Entity_Adapter_Interface is declared in
|
|
// back-compat/interface-wpdo-entity-adapter-alias.php — it used to be duplicated
|
|
// here, which made composer's classmap ambiguous.
|