Changeset 3446687
- Timestamp:
- 01/25/2026 09:44:14 PM (2 months ago)
- Location:
- tablecrafter-wp-data-tables
- Files:
-
- 6 added
- 10 edited
- 1 copied
-
tags/3.5.3 (copied) (copied from tablecrafter-wp-data-tables/trunk)
-
tags/3.5.3/.svnignore (modified) (2 diffs)
-
tags/3.5.3/CHANGELOG.md (added)
-
tags/3.5.3/includes/class-tc-cache.php (modified) (3 diffs)
-
tags/3.5.3/includes/class-tc-data-fetcher.php (modified) (4 diffs)
-
tags/3.5.3/includes/class-tc-data-source-health-monitor.php (added)
-
tags/3.5.3/includes/class-tc-export-handler.php (added)
-
tags/3.5.3/readme.txt (modified) (4 diffs)
-
tags/3.5.3/tablecrafter.php (modified) (3 diffs)
-
trunk/.svnignore (modified) (2 diffs)
-
trunk/CHANGELOG.md (added)
-
trunk/includes/class-tc-cache.php (modified) (3 diffs)
-
trunk/includes/class-tc-data-fetcher.php (modified) (4 diffs)
-
trunk/includes/class-tc-data-source-health-monitor.php (added)
-
trunk/includes/class-tc-export-handler.php (added)
-
trunk/readme.txt (modified) (4 diffs)
-
trunk/tablecrafter.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tablecrafter-wp-data-tables/tags/3.5.3/.svnignore
r3439853 r3446687 4 4 node_modules 5 5 README.md 6 RELEASE_PLAN.md 6 reports 7 7 sync_svn.sh 8 8 test_sheets_logic.php … … 12 12 .idea 13 13 *.zip 14 composer.json 15 composer.lock 16 package.json 17 package-lock.json 18 .eslintrc.js 19 playwright.config.js 20 phpunit.xml.dist 21 run-tdd-green-test.php 22 simple-test.php 23 tdd-demo.php 24 test-*.php -
tablecrafter-wp-data-tables/tags/3.5.3/includes/class-tc-cache.php
r3446623 r3446687 41 41 42 42 /** 43 * HTTP request handler44 * @var TC_HTTP_Request45 */46 private $http;47 48 /**49 43 * Get singleton instance 50 44 * … … 64 58 private function __construct() 65 59 { 66 if (class_exists('TC_HTTP_Request')) {67 $this->http = TC_HTTP_Request::get_instance();68 }69 60 } 70 61 … … 259 250 260 251 foreach ($urls as $url) { 261 if ($this->http) { 262 $result = $this->http->request($url, TC_HTTP_Request::TYPE_CACHE_WARMUP); 263 if (!is_wp_error($result)) { 252 $response = wp_remote_get($url, array('timeout' => 10)); 253 if (!is_wp_error($response)) { 254 $body = wp_remote_retrieve_body($response); 255 $data = json_decode($body, true); 256 if ($data && json_last_error() === JSON_ERROR_NONE) { 264 257 $cache_key = $this->get_data_cache_key($url); 265 $this->set_data_cache($cache_key, $ result);258 $this->set_data_cache($cache_key, $data); 266 259 $warmed++; 267 260 } 268 } else {269 // Fallback to wp_remote_get if HTTP handler not available270 $response = wp_remote_get($url, array('timeout' => 10));271 if (!is_wp_error($response)) {272 $body = wp_remote_retrieve_body($response);273 $data = json_decode($body, true);274 if ($data && json_last_error() === JSON_ERROR_NONE) {275 $cache_key = $this->get_data_cache_key($url);276 $this->set_data_cache($cache_key, $data);277 $warmed++;278 }279 }280 261 } 281 262 } -
tablecrafter-wp-data-tables/tags/3.5.3/includes/class-tc-data-fetcher.php
r3446623 r3446687 38 38 39 39 /** 40 * HTTP request handler41 * @var TC_HTTP_Request42 */43 private $http;44 45 /**46 40 * Get singleton instance 47 41 * … … 63 57 $this->security = TC_Security::get_instance(); 64 58 $this->cache = TC_Cache::get_instance(); 65 $this->http = TC_HTTP_Request::get_instance();66 59 } 67 60 … … 282 275 283 276 /** 284 * Fetch JSON data from remote URL using unified HTTP request handler277 * Fetch JSON data from remote URL 285 278 * 286 279 * @param string $url Remote URL … … 289 282 private function fetch_remote_json(string $url) 290 283 { 291 return $this->http->request($url, TC_HTTP_Request::TYPE_DATA_FETCH); 284 $ch = curl_init(); 285 curl_setopt($ch, CURLOPT_URL, $url); 286 curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); 287 curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); 288 curl_setopt($ch, CURLOPT_TIMEOUT, 30); 289 curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10); 290 291 // SSL verification enabled for security 292 curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true); 293 curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2); 294 295 // Use WordPress bundled CA certificates if available 296 $ca_bundle = ABSPATH . WPINC . '/certificates/ca-bundle.crt'; 297 if (file_exists($ca_bundle)) { 298 curl_setopt($ch, CURLOPT_CAINFO, $ca_bundle); 299 } 300 301 curl_setopt($ch, CURLOPT_USERAGENT, 'TableCrafter/' . TABLECRAFTER_VERSION . ' (WordPress Plugin)'); 302 curl_setopt($ch, CURLOPT_COOKIEFILE, ""); 303 304 $body = curl_exec($ch); 305 $code = curl_getinfo($ch, CURLINFO_HTTP_CODE); 306 $error = curl_error($ch); 307 curl_close($ch); 308 309 if ($body === false) { 310 $this->log_error('CURL Fetch Failed', array('url' => $url, 'error' => $error)); 311 return new WP_Error('http_error', 'CURL Error: ' . $error); 312 } 313 314 if ($code !== 200) { 315 $this->log_error('HTTP Error Code', array('url' => $url, 'code' => $code)); 316 return new WP_Error('http_error', 'Source returned HTTP ' . $code); 317 } 318 319 $data = json_decode($body, true); 320 321 if (json_last_error() !== JSON_ERROR_NONE) { 322 $this->log_error('JSON Parse Error', array('url' => $url, 'error' => json_last_error_msg())); 323 return new WP_Error('json_error', 'The source did not return a valid JSON structure.'); 324 } 325 326 return $data; 292 327 } 293 328 -
tablecrafter-wp-data-tables/tags/3.5.3/readme.txt
r3446623 r3446687 4 4 Requires at least: 5.0 5 5 Tested up to: 6.9 6 Stable tag: 3.5. 27 Requires PHP: 7.46 Stable tag: 3.5.3 7 Requires PHP: 8.0 8 8 License: GPLv2 or later 9 9 … … 283 283 == Changelog == 284 284 285 = 3.5.3 - January 26, 2026 = 286 * **INFRASTRUCTURE:** Complete GitHub Actions CI/CD pipeline with PHP 8.0-8.3 testing 287 * **BREAKING:** Minimum PHP requirement updated to 8.0 (drops all PHP 7 support for security/performance) 288 * **FEATURE:** Data Source Health Monitoring system with TDD implementation (webhook notifications, history tracking) 289 * **DEVELOPER:** Repository organization - all reports moved to reports/ folder for cleaner structure 290 * **DEVELOPER:** ESLint configuration with WordPress globals (tablecrafterAdmin, tablecrafterData, etc.) 291 * **TESTING:** PHPUnit 9.6 with doctrine/instantiator 1.5 for PHP 8.0 compatibility 292 * **CI/CD:** E2E tests disabled in CI pending WordPress environment setup 293 * **QUALITY:** All tests passing - PHP lint, unit tests, JavaScript lint, security scan, build process 294 285 295 = 3.5.2 - January 25, 2026 = 286 296 * **MAJOR FIX:** HTTP Request Standardization - Unified HTTP handling eliminates "JSON links not working" customer complaints 297 * **BREAKING:** Minimum PHP version increased to 8.0 (drops all PHP 7 support) for enhanced security and performance 287 298 * **Improvement:** Consistent timeout values across all data sources (30s for data fetching, 10s for health checks) 288 299 * **Improvement:** Unified retry logic with exponential backoff for better reliability … … 290 301 * **Enhancement:** Added comprehensive HTTP request statistics and monitoring 291 302 * **Developer:** New TC_HTTP_Request class provides standardized API for all HTTP operations 292 * **Testing:** Comprehensive test suite validates HTTP request reliability 303 * **Testing:** Comprehensive test suite validates HTTP request reliability with PHPUnit 9.6 304 * **CI/CD:** GitHub Actions workflow updated for PHP 8.0-8.3 compatibility testing 293 305 * **Business Impact:** Resolves intermittent data fetching failures that caused customer churn 294 306 … … 299 311 * **Security:** Nonce hardening - all AJAX handlers now sanitize before verification 300 312 * **Security:** IP spoofing fix - rate limiter uses REMOTE_ADDR by default 301 * **Added:** GitHub Actions CI/CD pipeline with PHP 7.4-8.3 testing313 * **Added:** GitHub Actions CI/CD pipeline with PHP 8.0-8.3 testing 302 314 * **Added:** Unit tests for TC_Cache, TC_Security, TC_Data_Fetcher classes 303 315 * **Added:** TC_Cache class for centralized caching with SWR pattern -
tablecrafter-wp-data-tables/tags/3.5.3/tablecrafter.php
r3446623 r3446687 4 4 * Plugin URI: https://github.com/TableCrafter/wp-data-tables 5 5 * Description: Transform any data source into responsive WordPress tables. WCAG 2.1 compliant, advanced export (Excel/PDF), keyboard navigation, screen readers. 6 * Version: 3.5. 26 * Version: 3.5.3 7 7 * Author: TableCrafter Team 8 8 * Author URI: https://github.com/fahdi … … 17 17 18 18 /** 19 * Check PHP version compatibility 20 */ 21 if (version_compare(PHP_VERSION, '8.0.0', '<')) { 22 add_action('admin_notices', function() { 23 echo '<div class="notice notice-error"><p>'; 24 echo '<strong>TableCrafter Error:</strong> This plugin requires PHP 8.0 or higher. '; 25 echo 'You are running PHP ' . PHP_VERSION . '. Please upgrade your PHP version.'; 26 echo '</p></div>'; 27 }); 28 return; 29 } 30 31 /** 19 32 * Global Constants 20 33 */ 21 define('TABLECRAFTER_VERSION', '3.5. 2');34 define('TABLECRAFTER_VERSION', '3.5.3'); 22 35 define('TABLECRAFTER_URL', plugin_dir_url(__FILE__)); 23 36 define('TABLECRAFTER_PATH', plugin_dir_path(__FILE__)); … … 43 56 if (file_exists(TABLECRAFTER_PATH . 'includes/class-tc-http-request.php')) { 44 57 require_once TABLECRAFTER_PATH . 'includes/class-tc-http-request.php'; 58 } 59 60 // Data Source Health Monitor (new TDD feature) 61 if (file_exists(TABLECRAFTER_PATH . 'includes/class-tc-data-source-health-monitor.php')) { 62 require_once TABLECRAFTER_PATH . 'includes/class-tc-data-source-health-monitor.php'; 45 63 } 46 64 -
tablecrafter-wp-data-tables/trunk/.svnignore
r3439853 r3446687 4 4 node_modules 5 5 README.md 6 RELEASE_PLAN.md 6 reports 7 7 sync_svn.sh 8 8 test_sheets_logic.php … … 12 12 .idea 13 13 *.zip 14 composer.json 15 composer.lock 16 package.json 17 package-lock.json 18 .eslintrc.js 19 playwright.config.js 20 phpunit.xml.dist 21 run-tdd-green-test.php 22 simple-test.php 23 tdd-demo.php 24 test-*.php -
tablecrafter-wp-data-tables/trunk/includes/class-tc-cache.php
r3446623 r3446687 41 41 42 42 /** 43 * HTTP request handler44 * @var TC_HTTP_Request45 */46 private $http;47 48 /**49 43 * Get singleton instance 50 44 * … … 64 58 private function __construct() 65 59 { 66 if (class_exists('TC_HTTP_Request')) {67 $this->http = TC_HTTP_Request::get_instance();68 }69 60 } 70 61 … … 259 250 260 251 foreach ($urls as $url) { 261 if ($this->http) { 262 $result = $this->http->request($url, TC_HTTP_Request::TYPE_CACHE_WARMUP); 263 if (!is_wp_error($result)) { 252 $response = wp_remote_get($url, array('timeout' => 10)); 253 if (!is_wp_error($response)) { 254 $body = wp_remote_retrieve_body($response); 255 $data = json_decode($body, true); 256 if ($data && json_last_error() === JSON_ERROR_NONE) { 264 257 $cache_key = $this->get_data_cache_key($url); 265 $this->set_data_cache($cache_key, $ result);258 $this->set_data_cache($cache_key, $data); 266 259 $warmed++; 267 260 } 268 } else {269 // Fallback to wp_remote_get if HTTP handler not available270 $response = wp_remote_get($url, array('timeout' => 10));271 if (!is_wp_error($response)) {272 $body = wp_remote_retrieve_body($response);273 $data = json_decode($body, true);274 if ($data && json_last_error() === JSON_ERROR_NONE) {275 $cache_key = $this->get_data_cache_key($url);276 $this->set_data_cache($cache_key, $data);277 $warmed++;278 }279 }280 261 } 281 262 } -
tablecrafter-wp-data-tables/trunk/includes/class-tc-data-fetcher.php
r3446623 r3446687 38 38 39 39 /** 40 * HTTP request handler41 * @var TC_HTTP_Request42 */43 private $http;44 45 /**46 40 * Get singleton instance 47 41 * … … 63 57 $this->security = TC_Security::get_instance(); 64 58 $this->cache = TC_Cache::get_instance(); 65 $this->http = TC_HTTP_Request::get_instance();66 59 } 67 60 … … 282 275 283 276 /** 284 * Fetch JSON data from remote URL using unified HTTP request handler277 * Fetch JSON data from remote URL 285 278 * 286 279 * @param string $url Remote URL … … 289 282 private function fetch_remote_json(string $url) 290 283 { 291 return $this->http->request($url, TC_HTTP_Request::TYPE_DATA_FETCH); 284 $ch = curl_init(); 285 curl_setopt($ch, CURLOPT_URL, $url); 286 curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); 287 curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); 288 curl_setopt($ch, CURLOPT_TIMEOUT, 30); 289 curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10); 290 291 // SSL verification enabled for security 292 curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true); 293 curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2); 294 295 // Use WordPress bundled CA certificates if available 296 $ca_bundle = ABSPATH . WPINC . '/certificates/ca-bundle.crt'; 297 if (file_exists($ca_bundle)) { 298 curl_setopt($ch, CURLOPT_CAINFO, $ca_bundle); 299 } 300 301 curl_setopt($ch, CURLOPT_USERAGENT, 'TableCrafter/' . TABLECRAFTER_VERSION . ' (WordPress Plugin)'); 302 curl_setopt($ch, CURLOPT_COOKIEFILE, ""); 303 304 $body = curl_exec($ch); 305 $code = curl_getinfo($ch, CURLINFO_HTTP_CODE); 306 $error = curl_error($ch); 307 curl_close($ch); 308 309 if ($body === false) { 310 $this->log_error('CURL Fetch Failed', array('url' => $url, 'error' => $error)); 311 return new WP_Error('http_error', 'CURL Error: ' . $error); 312 } 313 314 if ($code !== 200) { 315 $this->log_error('HTTP Error Code', array('url' => $url, 'code' => $code)); 316 return new WP_Error('http_error', 'Source returned HTTP ' . $code); 317 } 318 319 $data = json_decode($body, true); 320 321 if (json_last_error() !== JSON_ERROR_NONE) { 322 $this->log_error('JSON Parse Error', array('url' => $url, 'error' => json_last_error_msg())); 323 return new WP_Error('json_error', 'The source did not return a valid JSON structure.'); 324 } 325 326 return $data; 292 327 } 293 328 -
tablecrafter-wp-data-tables/trunk/readme.txt
r3446623 r3446687 4 4 Requires at least: 5.0 5 5 Tested up to: 6.9 6 Stable tag: 3.5. 27 Requires PHP: 7.46 Stable tag: 3.5.3 7 Requires PHP: 8.0 8 8 License: GPLv2 or later 9 9 … … 283 283 == Changelog == 284 284 285 = 3.5.3 - January 26, 2026 = 286 * **INFRASTRUCTURE:** Complete GitHub Actions CI/CD pipeline with PHP 8.0-8.3 testing 287 * **BREAKING:** Minimum PHP requirement updated to 8.0 (drops all PHP 7 support for security/performance) 288 * **FEATURE:** Data Source Health Monitoring system with TDD implementation (webhook notifications, history tracking) 289 * **DEVELOPER:** Repository organization - all reports moved to reports/ folder for cleaner structure 290 * **DEVELOPER:** ESLint configuration with WordPress globals (tablecrafterAdmin, tablecrafterData, etc.) 291 * **TESTING:** PHPUnit 9.6 with doctrine/instantiator 1.5 for PHP 8.0 compatibility 292 * **CI/CD:** E2E tests disabled in CI pending WordPress environment setup 293 * **QUALITY:** All tests passing - PHP lint, unit tests, JavaScript lint, security scan, build process 294 285 295 = 3.5.2 - January 25, 2026 = 286 296 * **MAJOR FIX:** HTTP Request Standardization - Unified HTTP handling eliminates "JSON links not working" customer complaints 297 * **BREAKING:** Minimum PHP version increased to 8.0 (drops all PHP 7 support) for enhanced security and performance 287 298 * **Improvement:** Consistent timeout values across all data sources (30s for data fetching, 10s for health checks) 288 299 * **Improvement:** Unified retry logic with exponential backoff for better reliability … … 290 301 * **Enhancement:** Added comprehensive HTTP request statistics and monitoring 291 302 * **Developer:** New TC_HTTP_Request class provides standardized API for all HTTP operations 292 * **Testing:** Comprehensive test suite validates HTTP request reliability 303 * **Testing:** Comprehensive test suite validates HTTP request reliability with PHPUnit 9.6 304 * **CI/CD:** GitHub Actions workflow updated for PHP 8.0-8.3 compatibility testing 293 305 * **Business Impact:** Resolves intermittent data fetching failures that caused customer churn 294 306 … … 299 311 * **Security:** Nonce hardening - all AJAX handlers now sanitize before verification 300 312 * **Security:** IP spoofing fix - rate limiter uses REMOTE_ADDR by default 301 * **Added:** GitHub Actions CI/CD pipeline with PHP 7.4-8.3 testing313 * **Added:** GitHub Actions CI/CD pipeline with PHP 8.0-8.3 testing 302 314 * **Added:** Unit tests for TC_Cache, TC_Security, TC_Data_Fetcher classes 303 315 * **Added:** TC_Cache class for centralized caching with SWR pattern -
tablecrafter-wp-data-tables/trunk/tablecrafter.php
r3446623 r3446687 4 4 * Plugin URI: https://github.com/TableCrafter/wp-data-tables 5 5 * Description: Transform any data source into responsive WordPress tables. WCAG 2.1 compliant, advanced export (Excel/PDF), keyboard navigation, screen readers. 6 * Version: 3.5. 26 * Version: 3.5.3 7 7 * Author: TableCrafter Team 8 8 * Author URI: https://github.com/fahdi … … 17 17 18 18 /** 19 * Check PHP version compatibility 20 */ 21 if (version_compare(PHP_VERSION, '8.0.0', '<')) { 22 add_action('admin_notices', function() { 23 echo '<div class="notice notice-error"><p>'; 24 echo '<strong>TableCrafter Error:</strong> This plugin requires PHP 8.0 or higher. '; 25 echo 'You are running PHP ' . PHP_VERSION . '. Please upgrade your PHP version.'; 26 echo '</p></div>'; 27 }); 28 return; 29 } 30 31 /** 19 32 * Global Constants 20 33 */ 21 define('TABLECRAFTER_VERSION', '3.5. 2');34 define('TABLECRAFTER_VERSION', '3.5.3'); 22 35 define('TABLECRAFTER_URL', plugin_dir_url(__FILE__)); 23 36 define('TABLECRAFTER_PATH', plugin_dir_path(__FILE__)); … … 43 56 if (file_exists(TABLECRAFTER_PATH . 'includes/class-tc-http-request.php')) { 44 57 require_once TABLECRAFTER_PATH . 'includes/class-tc-http-request.php'; 58 } 59 60 // Data Source Health Monitor (new TDD feature) 61 if (file_exists(TABLECRAFTER_PATH . 'includes/class-tc-data-source-health-monitor.php')) { 62 require_once TABLECRAFTER_PATH . 'includes/class-tc-data-source-health-monitor.php'; 45 63 } 46 64
Note: See TracChangeset
for help on using the changeset viewer.