feat: v0.2.2 — CI hardening, remove dead stubs, strengthen tests
Address CTO audit findings for PRAutoBlogger: - CI pipeline now runs PHPCS (WordPress standards) and PHPUnit before deploy - Removed TikTok/Instagram/YouTube stub providers (dead code, not registered) - Rewrote PublisherTest with real behavioral assertions (post_status, metadata, taxonomy, log linking, hooks) instead of method-existence checks - Added cross-system LLM budget coordination docs to ARCHITECTURE.md - Bumped version to 0.2.2 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,39 +0,0 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* Instagram source provider — STUB for future implementation.
|
||||
*
|
||||
* Will integrate with Instagram's Graph API to collect post captions,
|
||||
* comments, and hashtag trends. Requires Meta developer app credentials.
|
||||
*
|
||||
* Triggered by: Source_Collector when 'instagram' is in enabled_sources.
|
||||
* Dependencies: TBD — Instagram Graph API credentials.
|
||||
*
|
||||
* @see interface-source-provider.php — Interface this class implements.
|
||||
*/
|
||||
class PRAutoBlogger_Instagram_Provider implements PRAutoBlogger_Source_Provider_Interface {
|
||||
|
||||
/**
|
||||
* @param array<string, mixed> $config
|
||||
* @return PRAutoBlogger_Source_Data[]
|
||||
* @throws \RuntimeException Always — not yet implemented.
|
||||
*/
|
||||
public function collect_data( array $config ): array {
|
||||
throw new \RuntimeException(
|
||||
__( 'Instagram source provider is not yet implemented. Remove "instagram" from enabled sources.', 'prautoblogger' )
|
||||
);
|
||||
}
|
||||
|
||||
public function get_source_type(): string {
|
||||
return 'instagram';
|
||||
}
|
||||
|
||||
public function validate_credentials(): bool {
|
||||
return false;
|
||||
}
|
||||
|
||||
public function get_rate_limit_status(): array {
|
||||
return [ 'remaining' => 0, 'limit' => 0, 'resets_at' => '' ];
|
||||
}
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* TikTok source provider — STUB for future implementation.
|
||||
*
|
||||
* Will integrate with TikTok's API to collect video descriptions, comments,
|
||||
* and trending topics. Requires TikTok developer app credentials.
|
||||
*
|
||||
* Triggered by: Source_Collector when 'tiktok' is in enabled_sources.
|
||||
* Dependencies: TBD — TikTok API credentials.
|
||||
*
|
||||
* @see interface-source-provider.php — Interface this class implements.
|
||||
* @see ARCHITECTURE.md — Planned source providers.
|
||||
*/
|
||||
class PRAutoBlogger_Tiktok_Provider implements PRAutoBlogger_Source_Provider_Interface {
|
||||
|
||||
/**
|
||||
* @param array<string, mixed> $config
|
||||
* @return PRAutoBlogger_Source_Data[]
|
||||
* @throws \RuntimeException Always — not yet implemented.
|
||||
*/
|
||||
public function collect_data( array $config ): array {
|
||||
throw new \RuntimeException(
|
||||
__( 'TikTok source provider is not yet implemented. Remove "tiktok" from enabled sources.', 'prautoblogger' )
|
||||
);
|
||||
}
|
||||
|
||||
public function get_source_type(): string {
|
||||
return 'tiktok';
|
||||
}
|
||||
|
||||
public function validate_credentials(): bool {
|
||||
return false;
|
||||
}
|
||||
|
||||
public function get_rate_limit_status(): array {
|
||||
return [ 'remaining' => 0, 'limit' => 0, 'resets_at' => '' ];
|
||||
}
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* YouTube source provider — STUB for future implementation.
|
||||
*
|
||||
* Will integrate with YouTube Data API v3 to collect video titles,
|
||||
* descriptions, comments, and trending topics. Requires Google API key.
|
||||
*
|
||||
* Triggered by: Source_Collector when 'youtube' is in enabled_sources.
|
||||
* Dependencies: TBD — YouTube Data API key.
|
||||
*
|
||||
* @see interface-source-provider.php — Interface this class implements.
|
||||
*/
|
||||
class PRAutoBlogger_Youtube_Provider implements PRAutoBlogger_Source_Provider_Interface {
|
||||
|
||||
/**
|
||||
* @param array<string, mixed> $config
|
||||
* @return PRAutoBlogger_Source_Data[]
|
||||
* @throws \RuntimeException Always — not yet implemented.
|
||||
*/
|
||||
public function collect_data( array $config ): array {
|
||||
throw new \RuntimeException(
|
||||
__( 'YouTube source provider is not yet implemented. Remove "youtube" from enabled sources.', 'prautoblogger' )
|
||||
);
|
||||
}
|
||||
|
||||
public function get_source_type(): string {
|
||||
return 'youtube';
|
||||
}
|
||||
|
||||
public function validate_credentials(): bool {
|
||||
return false;
|
||||
}
|
||||
|
||||
public function get_rate_limit_status(): array {
|
||||
return [ 'remaining' => 0, 'limit' => 0, 'resets_at' => '' ];
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* Contract for any social media source provider (Reddit, TikTok, Instagram, YouTube).
|
||||
* Contract for any social media source provider (e.g., Reddit).
|
||||
*
|
||||
* Any class implementing this interface can be registered as a data source.
|
||||
* The Source_Collector iterates through enabled providers and calls collect_data().
|
||||
|
||||
Reference in New Issue
Block a user