Changeset 2770818
- Timestamp:
- 08/16/2022 02:09:23 AM (4 years ago)
- Location:
- sophi
- Files:
-
- 2 added
- 2 deleted
- 24 edited
- 1 copied
-
tags/1.2.0 (copied) (copied from sophi/trunk)
-
tags/1.2.0/includes/blocks/site-automation-block/register.php (modified) (3 diffs)
-
tags/1.2.0/includes/classes/SiteAutomation/Auth.php (deleted)
-
tags/1.2.0/includes/classes/SiteAutomation/Request.php (modified) (9 diffs)
-
tags/1.2.0/includes/classes/SiteAutomation/Services.php (modified) (1 diff)
-
tags/1.2.0/includes/functions/post-type.php (added)
-
tags/1.2.0/includes/functions/settings.php (modified) (5 diffs)
-
tags/1.2.0/readme.txt (modified) (6 diffs)
-
tags/1.2.0/sophi.php (modified) (4 diffs)
-
tags/1.2.0/vendor/autoload.php (modified) (1 diff)
-
tags/1.2.0/vendor/composer/InstalledVersions.php (modified) (7 diffs)
-
tags/1.2.0/vendor/composer/autoload_real.php (modified) (3 diffs)
-
tags/1.2.0/vendor/composer/autoload_static.php (modified) (2 diffs)
-
tags/1.2.0/vendor/composer/installed.json (modified) (3 diffs)
-
tags/1.2.0/vendor/composer/installed.php (modified) (7 diffs)
-
trunk/includes/blocks/site-automation-block/register.php (modified) (3 diffs)
-
trunk/includes/classes/SiteAutomation/Auth.php (deleted)
-
trunk/includes/classes/SiteAutomation/Request.php (modified) (9 diffs)
-
trunk/includes/classes/SiteAutomation/Services.php (modified) (1 diff)
-
trunk/includes/functions/post-type.php (added)
-
trunk/includes/functions/settings.php (modified) (5 diffs)
-
trunk/readme.txt (modified) (6 diffs)
-
trunk/sophi.php (modified) (4 diffs)
-
trunk/vendor/autoload.php (modified) (1 diff)
-
trunk/vendor/composer/InstalledVersions.php (modified) (7 diffs)
-
trunk/vendor/composer/autoload_real.php (modified) (3 diffs)
-
trunk/vendor/composer/autoload_static.php (modified) (2 diffs)
-
trunk/vendor/composer/installed.json (modified) (3 diffs)
-
trunk/vendor/composer/installed.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
sophi/tags/1.2.0/includes/blocks/site-automation-block/register.php
r2725617 r2770818 41 41 $widget_name = sanitize_title( $attributes['widgetName'] ); 42 42 43 $curated_posts_transient_key = 'sophi_curated_posts_' . $page_name . '_' . $widget_name;44 45 43 /** 46 44 * Whether to bypass caching. … … 57 55 $bypass_cache = apply_filters( 'sophi_bypass_curated_posts_cache', false, $page_name, $widget_name ); 58 56 59 $curated_posts = get_transient( $curated_posts_transient_key );57 $curated_posts = false; 60 58 61 if ( $bypass_cache || false === $curated_posts ) { 59 if ( ! $bypass_cache ) { 60 $sophi_cached_response = new \WP_Query( 61 [ 62 'post_name__in' => [ "sophi-site-automation-data-{$page_name}-{$widget_name}" ], 63 'post_type' => 'sophi-response', 64 'post_status' => 'any', 65 'posts_per_page' => 1, 66 'fields' => 'ids', 67 'no_found_rows' => true, 68 'update_post_term_cache' => false 69 ] 70 ); 71 72 if ( $sophi_cached_response->have_posts() ) { 73 $last_update = get_post_meta( $sophi_cached_response->posts[0], 'sophi_site_automation_last_updated', true ); 74 75 if ( $last_update + 5 * MINUTE_IN_SECONDS > time() ) { 76 $curated_posts = get_post_meta( $sophi_cached_response->posts[0], 'sophi_site_automation_data', true ); 77 } 78 } 79 } 80 81 if ( $bypass_cache || ! $curated_posts ) { 82 62 83 // phpcs:ignore WordPressVIPMinimum.Functions.RestrictedFunctions.get_posts_get_posts 63 84 $curated_posts = get_posts( … … 72 93 } 73 94 74 set_transient( $curated_posts_transient_key, $curated_posts, 5 * MINUTE_IN_SECONDS );75 95 } 76 96 -
sophi/tags/1.2.0/includes/classes/SiteAutomation/Request.php
r2732874 r2770818 16 16 17 17 /** 18 * Auth object which manages access_token.19 *20 * @var Auth $auth21 */22 private $auth;23 24 /**25 18 * Site Automation API URL. 26 19 * … … 53 46 * Class constructor. 54 47 * 55 * @param Auth $auth Authentication object. 56 */ 57 public function __construct( $auth ) { 58 $this->auth = $auth; 59 48 */ 49 public function __construct() { 60 50 add_action( 61 51 'sophi_retry_get_curated_data', … … 82 72 $this->status = $this->get_status(); 83 73 $site_automation_data = false; 74 $post_id = false; 84 75 85 76 /** … … 98 89 99 90 if ( ! $bypass_cache ) { 100 $site_automation_data = get_option( "sophi_site_automation_data_{$page}_{$widget}" ); 91 $query = new \WP_Query( 92 [ 93 'post_name__in' => [ "sophi-site-automation-data-{$page}-{$widget}" ], 94 'post_type' => 'sophi-response', 95 'posts_per_page' => 1, 96 'fields' => 'ids', 97 'post_status' => 'any', 98 'no_found_rows' => true, 99 'update_post_term_cache' => false 100 ] 101 ); 102 103 if ( $query->have_posts() ) { 104 $post_id = $query->posts[0]; 105 $last_update = get_post_meta( $post_id, 'sophi_site_automation_last_updated', true ); 106 107 if ( $last_update + 5 * MINUTE_IN_SECONDS > time() ) { 108 $site_automation_data = get_post_meta( $post_id, 'sophi_site_automation_data', true ); 109 } 110 } 101 111 } 102 112 … … 126 136 127 137 $this->set_status( [ 'success' => true ] ); 128 return $this->process( $response, $bypass_cache );138 return $this->process( $response, $bypass_cache, $post_id ); 129 139 } 130 140 … … 194 204 */ 195 205 private function request( $timeout ) { 196 $access_token = $this->auth->get_access_token();197 198 if ( is_wp_error( $access_token ) ) {199 return $access_token;200 }201 206 202 207 $args = [ 203 208 'headers' => [ 204 209 'Content-Type' => 'application/json', 205 ' Authorization' => 'Bearer ' . $access_token,210 'Cache-Control' => 'no-cache', 206 211 ], 207 212 ]; … … 255 260 * Process response from Sophi. 256 261 * 257 * @param array $response Response of Site Automation API. 258 * @param bool $bypass_cache Whether to bypass cache or not. 262 * @param array $response Response of Site Automation API. 263 * @param bool $bypass_cache Whether to bypass cache or not. 264 * @param int|bool $post_id The post id to update the post meta with response or false. 259 265 * 260 266 * @return array 261 267 */ 262 private function process( $response, $bypass_cache ) {268 private function process( $response, $bypass_cache, $post_id ) { 263 269 if ( ! $response ) { 264 270 return []; … … 266 272 267 273 if ( ! $bypass_cache ) { 268 update_option( "sophi_site_automation_data_{$this->page}_{$this->widget}", $response ); 274 if ( ! $post_id ) { 275 $post_id = wp_insert_post( 276 [ 277 'post_type' => 'sophi-response', 278 'post_title' => "sophi-site-automation-data-{$this->page}-{$this->widget}", 279 'post_name' => "sophi-site-automation-data-{$this->page}-{$this->widget}", 280 ] 281 ); 282 } 283 update_post_meta( $post_id, 'sophi_site_automation_data', $response ); 284 update_post_meta( $post_id, 'sophi_site_automation_last_updated', time() ); 269 285 } 270 286 return $response; … … 279 295 * @return string 280 296 */ 281 private function set_api_url( $page , $widget) {297 private function set_api_url( $page = '', $widget = '' ) { 282 298 $site_automation_url = get_sophi_settings( 'site_automation_url' ); 283 299 $site_automation_url = untrailingslashit( $site_automation_url ); 284 285 $host = wp_parse_url( get_home_url(), PHP_URL_HOST ); 286 287 return sprintf( '%1$s/curatedHosts/%2$s/curator?page=%3$s&widget=%4$s', $site_automation_url, $host, $page, $widget ); 300 $host = get_sophi_settings( 'host' ); 301 $tenant_id = get_sophi_settings( 'tenant_id' ); 302 303 $url = sprintf( 304 '%1$s/%2$s/hosts/%3$s/pages/%4$s', 305 $site_automation_url, 306 $tenant_id, 307 $host, 308 $page 309 ); 310 311 if ( ! empty ( $widget ) ) { 312 $url = sprintf( 313 '%1$s/widgets/%2$s', 314 $url, 315 $widget 316 ); 317 } 318 319 return $url . '.json'; 288 320 } 289 321 -
sophi/tags/1.2.0/includes/classes/SiteAutomation/Services.php
r2521616 r2770818 23 23 */ 24 24 public function register() { 25 $this->auth = new Auth(); 26 $this->request = new Request( $this->auth ); 25 $this->request = new Request(); 27 26 $this->integration = new Integration( $this->request ); 28 27 } -
sophi/tags/1.2.0/includes/functions/settings.php
r2648442 r2770818 8 8 namespace SophiWP\Settings; 9 9 10 use SophiWP\SiteAutomation\Auth;11 10 use function SophiWP\Utils\get_domain; 12 11 use function SophiWP\Utils\is_configured; … … 157 156 158 157 add_settings_field( 159 ' client_id',160 __( ' Client ID', 'sophi-wp' ),158 'host', 159 __( 'Host', 'sophi-wp' ), 161 160 __NAMESPACE__ . '\render_input', 162 161 SETTINGS_GROUP, 163 162 'sophi_api', 164 163 [ 165 'label_for' => ' client_id',166 ] 167 ); 168 169 add_settings_field( 170 ' client_secret',171 __( ' Client Secret', 'sophi-wp' ),164 'label_for' => 'host', 165 ] 166 ); 167 168 add_settings_field( 169 'tenant_id', 170 __( 'Tenant ID', 'sophi-wp' ), 172 171 __NAMESPACE__ . '\render_input', 173 172 SETTINGS_GROUP, 174 173 'sophi_api', 175 174 [ 176 'label_for' => ' client_secret',175 'label_for' => 'tenant_id', 177 176 ] 178 177 ); … … 233 232 'collector_url' => 'collector.sophi.io', 234 233 'tracker_client_id' => get_domain(), 235 ' client_id'=> '',236 ' client_secret'=> '',234 'host' => '', 235 'tenant_id' => '', 237 236 'site_automation_url' => '', 238 237 'query_integration' => 1, … … 258 257 if ( empty( $settings['query_integration'] ) ) { 259 258 $settings['query_integration'] = 0; 260 }261 262 $prev_settings = get_option( SETTINGS_GROUP );263 264 // Delete the option that holds the access token when the environment is changed265 if ( ! empty( $prev_settings['environment'] ) && ! empty( $settings['environment'] ) && $prev_settings['environment'] !== $settings['environment'] ) {266 delete_option( 'sophi_site_automation_access_token' );267 }268 269 if ( ! empty( $settings['client_id'] && ! empty( $settings['client_secret'] ) ) ) {270 $auth = new Auth();271 $auth->set_environment( $settings['environment'] );272 $response = $auth->request_access_token( $settings['client_id'], $settings['client_secret'] );273 if ( is_wp_error( $response ) ) {274 add_settings_error(275 SETTINGS_GROUP,276 SETTINGS_GROUP,277 $response->get_error_message()278 );279 }280 } else {281 add_settings_error(282 SETTINGS_GROUP,283 SETTINGS_GROUP,284 __( 'Both Client ID and Client Secret are required for Site Automation integration.', 'sophi-wp' )285 );286 259 } 287 260 … … 311 284 312 285 $settings['collector_url'] = $url; 286 } 287 288 if ( empty( $settings['host'] ) || empty( $settings['tenant_id'] ) ) { 289 add_settings_error( 290 SETTINGS_GROUP, 291 SETTINGS_GROUP, 292 __( 'Both Host and Tenant ID are required for Site Automation integration.', 'sophi-wp' ) 293 ); 294 } 295 296 if ( isset( $settings['client_id'] ) ) { 297 unset( $settings['client_id'] ); 298 } 299 300 if ( isset( $settings['client_secret'] ) ) { 301 unset( $settings['client_secret'] ); 313 302 } 314 303 -
sophi/tags/1.2.0/readme.txt
r2732874 r2770818 3 3 Tags: Sophi, Site Automation, Curator, Collector, AI, Artifical Intelligence, ML, Machine Learning, Content Curation 4 4 Tested up to: 6.0 5 Stable tag: 1. 1.35 Stable tag: 1.2.0 6 6 License: GPLv2 or later 7 7 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 51 51 == Usage == 52 52 53 There are two potential ways to integrate Sophi Site Automation results with your WordPress site. The default approach includes a Sophi Site Automation block that integrates with ` WP_Query` by injecting Posts IDs via the `posts_pre_query` filter that gets fetched later to return the actual Posts. In the same fashion, you can integrate Sophi results with your `WP_Query` object by setting the `sophi_curated_page` and `sophi_curated_widget` query parameters.53 There are two potential ways to integrate Sophi Site Automation results with your WordPress site. The default approach includes a Sophi Site Automation block that integrates with `get_posts` by injecting Posts IDs via the `posts_pre_query` filter that gets fetched later to return the actual Posts. In the same fashion, you can integrate Sophi results with your `WP_Query` object by setting the `sophi_curated_page` and `sophi_curated_widget` query parameters. 54 54 55 55 More details on each of these two options are described below. If you are not certain on the best integration approach, considering the following: … … 110 110 == Caveats == 111 111 112 === WordPress VIP and `WP_Query` === 113 112 114 While the above query integration works just fine, it has been observed on [WordPress VIP](https://wpvip.com/) infrastructure that `WP_Query` may return latest posts instead of the posts curated by Sophi due to the [Advanced Post Cache](https://github.com/Automattic/advanced-post-cache) plugin used by the VIP platform. A workaround for this is to use [`get_posts()`](https://developer.wordpress.org/reference/functions/get_posts/) instead and as good practice to add a comment explaining the usage of it so that developers new to it don't swap it for `WP_Query`. Also remember to whitelist `get_posts` by adding the following inline comment so that PHPCS doesn't throw a warning: 113 115 … … 145 147 Object caching is encouraged, as the plugin saves Sophi data as a transient. If you do not have object caching, then the data will be saved as a transient in the options table but note that these will eventually expire. 146 148 149 The default caching period is five minutes. This can be modified with the `sophi_cache_duration` hook. 150 151 = Sophi API empty response = 152 153 If the Sophi API returns an empty Post ID array, the plugin will result in a "no results" response. The `sophi_curated_post_list` filter can be used to modify the Sophi API response to allow manual posts to be injected into the final array previous to returning the filterable value from `posts_pre_query` (e.g., via a fallback method to inject posts that would be a good fit). 154 147 155 == Documentation == 148 156 … … 179 187 == Changelog == 180 188 189 = 1.2.0 - 2022-08-15 = 190 * **Added:** New Curator API (props [@Sidsector9](https://github.com/Sidsector9), [@dinhtungdu](https://github.com/dinhtungdu) via [#310](https://github.com/globeandmail/sophi-for-wordpress/pull/310). 191 * **Added:** Documentation on default handling of Sophi API empty array response (props [@jeffpaul](https://github.com/jeffpaul), [@oscarssanchez](https://github.com/oscarssanchez) via [#307](https://github.com/globeandmail/sophi-for-wordpress/pull/307). 192 * **Added:** New tutorial sections added to the documentation site (props [@dkotter](https://github.com/dkotter), [@YMufleh](https://github.com/YMufleh) via [#318](https://github.com/globeandmail/sophi-for-wordpress/pull/318). 193 * **Changed:** Instead of storing responses from Sophi in an option, store that in a new CPT, `sophi-response` (props [@oscarssanchez](https://github.com/oscarssanchez), [@cadic](https://github.com/cadic), [@felipeelia](https://github.com/felipeelia) via [#298](https://github.com/globeandmail/sophi-for-wordpress/pull/298). 194 * **Changed:** Replaces `WP_Query` with `get_posts` in details about the Sophi Automation block (props [@Sidsector9](https://github.com/Sidsector9), [@jeffpaul](https://github.com/jeffpaul) via [#300](https://github.com/globeandmail/sophi-for-wordpress/pull/300). 195 * **Removed:** Dependency on Auth0 and replaced with the new Curator API (props [@Sidsector9](https://github.com/Sidsector9), [@dinhtungdu](https://github.com/dinhtungdu) via [#310](https://github.com/globeandmail/sophi-for-wordpress/pull/310). 196 * **Fixed:** Ensure we are properly getting cached responses (props [@oscarssanchez](https://github.com/oscarssanchez), [@Sidsector9](https://github.com/Sidsector9), [@felipeelia](https://github.com/felipeelia) via [#305](https://github.com/globeandmail/sophi-for-wordpress/pull/305). 197 * **Security:** Added PHP compatibility checker (props [@Sidsector9](https://github.com/Sidsector9), [@dkotter](https://github.com/dkotter) via [#317](https://github.com/globeandmail/sophi-for-wordpress/pull/317). 198 * **Security:** Update dependency `10up-toolkit` from v4.0.0 to v4.1.2 (props [@renovate](https://github.com/apps/renovate), [@Sidsector9](https://github.com/Sidsector9) via [#299](https://github.com/globeandmail/sophi-for-wordpress/pull/299), [#303](https://github.com/globeandmail/sophi-for-wordpress/pull/303). 199 * **Security:** Update dependency `phpunit/phpunit` from v8.5.26 to v8.5.27 (props [@renovate](https://github.com/apps/renovate) via [#304](https://github.com/globeandmail/sophi-for-wordpress/pull/304). 200 181 201 = 1.1.3 - 2022-05-27 = 182 * **Added: WordPress and Sophi plugin versions to Javascript and AMP Tracking (props [@oscarssanchez](https://github.com/oscarssanchez), [@jeffpaul](https://github.com/jeffpaul), [@YMufleh](https://github.com/YMufleh) via [#287](https://github.com/globeandmail/sophi-for-wordpress/pull/287)).183 * **Added: Documentation for `sophi_cache_duration` filter (props [@Sidsector9](https://github.com/Sidsector9), [@barryceelen](https://github.com/barryceelen), [@jeffpaul](https://github.com/jeffpaul) via [#285](https://github.com/globeandmail/sophi-for-wordpress/pull/285)).184 * **Added: Unit tests (props [@cadic](https://github.com/cadic) via [#291](https://github.com/globeandmail/sophi-for-wordpress/pull/291)).202 * **Added:** WordPress and Sophi plugin versions to Javascript and AMP Tracking (props [@oscarssanchez](https://github.com/oscarssanchez), [@jeffpaul](https://github.com/jeffpaul), [@YMufleh](https://github.com/YMufleh) via [#287](https://github.com/globeandmail/sophi-for-wordpress/pull/287)). 203 * **Added:** Documentation for `sophi_cache_duration` filter (props [@Sidsector9](https://github.com/Sidsector9), [@barryceelen](https://github.com/barryceelen), [@jeffpaul](https://github.com/jeffpaul) via [#285](https://github.com/globeandmail/sophi-for-wordpress/pull/285)). 204 * **Added:** Unit tests (props [@cadic](https://github.com/cadic) via [#291](https://github.com/globeandmail/sophi-for-wordpress/pull/291)). 185 205 * **Changed:** Reverted response saving back to options table from post meta field (props [@oscarssanchez](https://github.com/oscarssanchez) via [#280](https://github.com/globeandmail/sophi-for-wordpress/pull/280)). 186 206 * **Changed:** Replace deprecated `block_categories` filter with `block_categories_all` (props [@Sidsector9](https://github.com/Sidsector9), [@cadic](https://github.com/cadic), [@jeffpaul](https://github.com/jeffpaul) via [#292](https://github.com/globeandmail/sophi-for-wordpress/pull/292)). … … 242 262 = 1.0.9 - 2022-02-18 = 243 263 * **Added:** `hostname` and `path` fields to schema (props [@Rahmon](https://github.com/Rahmon), [@dinhtungdu](https://github.com/dinhtungdu)). 244 * **Fixed:** Return empty post list from Sophi response (props [@oscarssanchez](https://github.com/oscarssanchez), [@barryceelen](https://github.com/barryceelen), [@felipeelia](https://github.com/felipeelia)). 264 * **Added:** - `sophi_curated_post_list` filter to modify the Sophi API response to allow manual posts to be injected previous to returning the filterable value from `posts_pre_query` (e.g., via a fallback method to inject posts that would be a good fit) (props [@oscarssanchez](https://github.com/oscarssanchez), [@barryceelen](https://github.com/barryceelen), [@felipeelia](https://github.com/felipeelia)). 265 * **Fixed:** Sophi API empty Post ID array response changed from using `WP_Query` default results to a "no results" response (props [@oscarssanchez](https://github.com/oscarssanchez), [@barryceelen](https://github.com/barryceelen), [@felipeelia](https://github.com/felipeelia)). 245 266 * **Security:** Update dependency `phpunit/phpunit` from 8.5.21 to 8.5.23 (props [@renovate](https://github.com/apps/renovate)). 246 267 * **Security:** Update dependency `prop-types` from 15.8.0 to 15.8.1 (props [@renovate](https://github.com/apps/renovate)). -
sophi/tags/1.2.0/sophi.php
r2732874 r2770818 4 4 * Plugin URI: https://github.com/globeandmail/sophi-for-wordpress 5 5 * Description: WordPress VIP-compatible plugin for the Sophi.io Site Automation service. 6 * Version: 1. 1.36 * Version: 1.2.0 7 7 * Requires at least: 5.6 8 8 * Requires PHP: 7.4 … … 17 17 18 18 // Useful global constants. 19 define( 'SOPHI_WP_VERSION', '1. 1.3' );19 define( 'SOPHI_WP_VERSION', '1.2.0' ); 20 20 define( 'SOPHI_WP_URL', plugin_dir_url( __FILE__ ) ); 21 21 define( 'SOPHI_WP_PATH', plugin_dir_path( __FILE__ ) ); … … 36 36 require_once SOPHI_WP_INC . 'functions/content-sync.php'; 37 37 require_once SOPHI_WP_INC . 'functions/blocks.php'; 38 require_once SOPHI_WP_INC . 'functions/post-type.php'; 38 39 39 40 // phpcs:enable WordPressVIPMinimum.Files.IncludingFile.UsingCustomConstant … … 61 62 SophiWP\Core\setup(); 62 63 SophiWP\Settings\setup(); 64 SophiWP\PostType\setup(); 63 65 64 66 if ( ! SophiWP\Utils\is_configured() ) { -
sophi/tags/1.2.0/vendor/autoload.php
r2732874 r2770818 10 10 require_once __DIR__ . '/composer/autoload_real.php'; 11 11 12 return ComposerAutoloaderInit bf93bab2113570afc5e28efe35def6f9::getLoader();12 return ComposerAutoloaderInit31b3b6f4e914ea7285135ebc79ce32d5::getLoader(); -
sophi/tags/1.2.0/vendor/composer/InstalledVersions.php
r2712442 r2770818 29 29 /** 30 30 * @var mixed[]|null 31 * @psalm-var array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}|array{}|null31 * @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}|array{}|null 32 32 */ 33 33 private static $installed; … … 40 40 /** 41 41 * @var array[] 42 * @psalm-var array<string, array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>42 * @psalm-var array<string, array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}> 43 43 */ 44 44 private static $installedByVendor = array(); … … 244 244 /** 245 245 * @return array 246 * @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}246 * @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool} 247 247 */ 248 248 public static function getRootPackage() … … 258 258 * @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect. 259 259 * @return array[] 260 * @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}260 * @psalm-return array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} 261 261 */ 262 262 public static function getRawData() … … 281 281 * 282 282 * @return array[] 283 * @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>283 * @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}> 284 284 */ 285 285 public static function getAllRawData() … … 304 304 * @return void 305 305 * 306 * @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>} $data306 * @psalm-param array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $data 307 307 */ 308 308 public static function reload($data) … … 314 314 /** 315 315 * @return array[] 316 * @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>316 * @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}> 317 317 */ 318 318 private static function getInstalled() -
sophi/tags/1.2.0/vendor/composer/autoload_real.php
r2732874 r2770818 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit bf93bab2113570afc5e28efe35def6f95 class ComposerAutoloaderInit31b3b6f4e914ea7285135ebc79ce32d5 6 6 { 7 7 private static $loader; … … 25 25 require __DIR__ . '/platform_check.php'; 26 26 27 spl_autoload_register(array('ComposerAutoloaderInit bf93bab2113570afc5e28efe35def6f9', 'loadClassLoader'), true, true);27 spl_autoload_register(array('ComposerAutoloaderInit31b3b6f4e914ea7285135ebc79ce32d5', 'loadClassLoader'), true, true); 28 28 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); 29 spl_autoload_unregister(array('ComposerAutoloaderInit bf93bab2113570afc5e28efe35def6f9', 'loadClassLoader'));29 spl_autoload_unregister(array('ComposerAutoloaderInit31b3b6f4e914ea7285135ebc79ce32d5', 'loadClassLoader')); 30 30 31 31 require __DIR__ . '/autoload_static.php'; 32 call_user_func(\Composer\Autoload\ComposerStaticInit bf93bab2113570afc5e28efe35def6f9::getInitializer($loader));32 call_user_func(\Composer\Autoload\ComposerStaticInit31b3b6f4e914ea7285135ebc79ce32d5::getInitializer($loader)); 33 33 34 34 $loader->register(true); 35 35 36 $includeFiles = \Composer\Autoload\ComposerStaticInit bf93bab2113570afc5e28efe35def6f9::$files;36 $includeFiles = \Composer\Autoload\ComposerStaticInit31b3b6f4e914ea7285135ebc79ce32d5::$files; 37 37 foreach ($includeFiles as $fileIdentifier => $file) { 38 composerRequire bf93bab2113570afc5e28efe35def6f9($fileIdentifier, $file);38 composerRequire31b3b6f4e914ea7285135ebc79ce32d5($fileIdentifier, $file); 39 39 } 40 40 … … 48 48 * @return void 49 49 */ 50 function composerRequire bf93bab2113570afc5e28efe35def6f9($fileIdentifier, $file)50 function composerRequire31b3b6f4e914ea7285135ebc79ce32d5($fileIdentifier, $file) 51 51 { 52 52 if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { -
sophi/tags/1.2.0/vendor/composer/autoload_static.php
r2732874 r2770818 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit bf93bab2113570afc5e28efe35def6f97 class ComposerStaticInit31b3b6f4e914ea7285135ebc79ce32d5 8 8 { 9 9 public static $files = array ( … … 81 81 { 82 82 return \Closure::bind(function () use ($loader) { 83 $loader->prefixLengthsPsr4 = ComposerStaticInit bf93bab2113570afc5e28efe35def6f9::$prefixLengthsPsr4;84 $loader->prefixDirsPsr4 = ComposerStaticInit bf93bab2113570afc5e28efe35def6f9::$prefixDirsPsr4;85 $loader->classMap = ComposerStaticInit bf93bab2113570afc5e28efe35def6f9::$classMap;83 $loader->prefixLengthsPsr4 = ComposerStaticInit31b3b6f4e914ea7285135ebc79ce32d5::$prefixLengthsPsr4; 84 $loader->prefixDirsPsr4 = ComposerStaticInit31b3b6f4e914ea7285135ebc79ce32d5::$prefixDirsPsr4; 85 $loader->classMap = ComposerStaticInit31b3b6f4e914ea7285135ebc79ce32d5::$classMap; 86 86 87 87 }, null, ClassLoader::class); -
sophi/tags/1.2.0/vendor/composer/installed.json
r2698689 r2770818 304 304 { 305 305 "name": "symfony/polyfill-ctype", 306 "version": "v1.2 5.0",307 "version_normalized": "1.2 5.0.0",306 "version": "v1.26.0", 307 "version_normalized": "1.26.0.0", 308 308 "source": { 309 309 "type": "git", 310 310 "url": "https://github.com/symfony/polyfill-ctype.git", 311 "reference": " 30885182c981ab175d4d034db0f6f469898070ab"312 }, 313 "dist": { 314 "type": "zip", 315 "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ 30885182c981ab175d4d034db0f6f469898070ab",316 "reference": " 30885182c981ab175d4d034db0f6f469898070ab",311 "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4" 312 }, 313 "dist": { 314 "type": "zip", 315 "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4", 316 "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4", 317 317 "shasum": "" 318 318 }, … … 326 326 "ext-ctype": "For best performance" 327 327 }, 328 "time": "202 1-10-20T20:35:02+00:00",328 "time": "2022-05-24T11:49:31+00:00", 329 329 "type": "library", 330 330 "extra": { 331 331 "branch-alias": { 332 "dev-main": "1.2 3-dev"332 "dev-main": "1.26-dev" 333 333 }, 334 334 "thanks": { … … 369 369 ], 370 370 "support": { 371 "source": "https://github.com/symfony/polyfill-ctype/tree/v1.2 5.0"371 "source": "https://github.com/symfony/polyfill-ctype/tree/v1.26.0" 372 372 }, 373 373 "funding": [ -
sophi/tags/1.2.0/vendor/composer/installed.php
r2732874 r2770818 1 1 <?php return array( 2 2 'root' => array( 3 'pretty_version' => '1.1.3', 4 'version' => '1.1.3.0', 3 'name' => 'globeandmail/sophi-for-wordpress', 4 'pretty_version' => '1.2.0', 5 'version' => '1.2.0.0', 6 'reference' => 'b2d273ae1e4bc8dd95dd47158f41e40d9f161a89', 5 7 'type' => 'wordpress-plugin', 6 8 'install_path' => __DIR__ . '/../../', 7 9 'aliases' => array(), 8 'reference' => '1f21f00d23cad5ee77de7e7ef50050134f15dcb8',9 'name' => 'globeandmail/sophi-for-wordpress',10 10 'dev' => false, 11 11 ), … … 14 14 'pretty_version' => '0.9.3', 15 15 'version' => '0.9.3.0', 16 'reference' => 'ca57d18f028f84f777b2168cd1911b0dee2343ae', 16 17 'type' => 'library', 17 18 'install_path' => __DIR__ . '/../brick/math', 18 19 'aliases' => array(), 19 'reference' => 'ca57d18f028f84f777b2168cd1911b0dee2343ae',20 20 'dev_requirement' => false, 21 21 ), 22 22 'globeandmail/sophi-for-wordpress' => array( 23 'pretty_version' => '1.1.3', 24 'version' => '1.1.3.0', 23 'pretty_version' => '1.2.0', 24 'version' => '1.2.0.0', 25 'reference' => 'b2d273ae1e4bc8dd95dd47158f41e40d9f161a89', 25 26 'type' => 'wordpress-plugin', 26 27 'install_path' => __DIR__ . '/../../', 27 28 'aliases' => array(), 28 'reference' => '1f21f00d23cad5ee77de7e7ef50050134f15dcb8',29 29 'dev_requirement' => false, 30 30 ), … … 32 32 'pretty_version' => '1.2.2', 33 33 'version' => '1.2.2.0', 34 'reference' => 'cccc74ee5e328031b15640b51056ee8d3bb66c0a', 34 35 'type' => 'library', 35 36 'install_path' => __DIR__ . '/../ramsey/collection', 36 37 'aliases' => array(), 37 'reference' => 'cccc74ee5e328031b15640b51056ee8d3bb66c0a',38 38 'dev_requirement' => false, 39 39 ), … … 41 41 'pretty_version' => '4.2.3', 42 42 'version' => '4.2.3.0', 43 'reference' => 'fc9bb7fb5388691fd7373cd44dcb4d63bbcf24df', 43 44 'type' => 'library', 44 45 'install_path' => __DIR__ . '/../ramsey/uuid', 45 46 'aliases' => array(), 46 'reference' => 'fc9bb7fb5388691fd7373cd44dcb4d63bbcf24df',47 47 'dev_requirement' => false, 48 48 ), … … 56 56 'pretty_version' => '0.5.0', 57 57 'version' => '0.5.0.0', 58 'reference' => '32a08e9a7c25d1c51621751e1cdfcffcdef6cfe5', 58 59 'type' => 'library', 59 60 'install_path' => __DIR__ . '/../snowplow/snowplow-tracker', 60 61 'aliases' => array(), 61 'reference' => '32a08e9a7c25d1c51621751e1cdfcffcdef6cfe5',62 62 'dev_requirement' => false, 63 63 ), 64 64 'symfony/polyfill-ctype' => array( 65 'pretty_version' => 'v1.25.0', 66 'version' => '1.25.0.0', 65 'pretty_version' => 'v1.26.0', 66 'version' => '1.26.0.0', 67 'reference' => '6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4', 67 68 'type' => 'library', 68 69 'install_path' => __DIR__ . '/../symfony/polyfill-ctype', 69 70 'aliases' => array(), 70 'reference' => '30885182c981ab175d4d034db0f6f469898070ab',71 71 'dev_requirement' => false, 72 72 ), … … 74 74 'pretty_version' => 'v1.24.0', 75 75 'version' => '1.24.0.0', 76 'reference' => '57b712b08eddb97c762a8caa32c84e037892d2e9', 76 77 'type' => 'library', 77 78 'install_path' => __DIR__ . '/../symfony/polyfill-php80', 78 79 'aliases' => array(), 79 'reference' => '57b712b08eddb97c762a8caa32c84e037892d2e9',80 80 'dev_requirement' => false, 81 81 ), … … 83 83 'pretty_version' => 'v1.24.0', 84 84 'version' => '1.24.0.0', 85 'reference' => '5de4ba2d41b15f9bd0e19b2ab9674135813ec98f', 85 86 'type' => 'library', 86 87 'install_path' => __DIR__ . '/../symfony/polyfill-php81', 87 88 'aliases' => array(), 88 'reference' => '5de4ba2d41b15f9bd0e19b2ab9674135813ec98f',89 89 'dev_requirement' => false, 90 90 ), -
sophi/trunk/includes/blocks/site-automation-block/register.php
r2725617 r2770818 41 41 $widget_name = sanitize_title( $attributes['widgetName'] ); 42 42 43 $curated_posts_transient_key = 'sophi_curated_posts_' . $page_name . '_' . $widget_name;44 45 43 /** 46 44 * Whether to bypass caching. … … 57 55 $bypass_cache = apply_filters( 'sophi_bypass_curated_posts_cache', false, $page_name, $widget_name ); 58 56 59 $curated_posts = get_transient( $curated_posts_transient_key );57 $curated_posts = false; 60 58 61 if ( $bypass_cache || false === $curated_posts ) { 59 if ( ! $bypass_cache ) { 60 $sophi_cached_response = new \WP_Query( 61 [ 62 'post_name__in' => [ "sophi-site-automation-data-{$page_name}-{$widget_name}" ], 63 'post_type' => 'sophi-response', 64 'post_status' => 'any', 65 'posts_per_page' => 1, 66 'fields' => 'ids', 67 'no_found_rows' => true, 68 'update_post_term_cache' => false 69 ] 70 ); 71 72 if ( $sophi_cached_response->have_posts() ) { 73 $last_update = get_post_meta( $sophi_cached_response->posts[0], 'sophi_site_automation_last_updated', true ); 74 75 if ( $last_update + 5 * MINUTE_IN_SECONDS > time() ) { 76 $curated_posts = get_post_meta( $sophi_cached_response->posts[0], 'sophi_site_automation_data', true ); 77 } 78 } 79 } 80 81 if ( $bypass_cache || ! $curated_posts ) { 82 62 83 // phpcs:ignore WordPressVIPMinimum.Functions.RestrictedFunctions.get_posts_get_posts 63 84 $curated_posts = get_posts( … … 72 93 } 73 94 74 set_transient( $curated_posts_transient_key, $curated_posts, 5 * MINUTE_IN_SECONDS );75 95 } 76 96 -
sophi/trunk/includes/classes/SiteAutomation/Request.php
r2732874 r2770818 16 16 17 17 /** 18 * Auth object which manages access_token.19 *20 * @var Auth $auth21 */22 private $auth;23 24 /**25 18 * Site Automation API URL. 26 19 * … … 53 46 * Class constructor. 54 47 * 55 * @param Auth $auth Authentication object. 56 */ 57 public function __construct( $auth ) { 58 $this->auth = $auth; 59 48 */ 49 public function __construct() { 60 50 add_action( 61 51 'sophi_retry_get_curated_data', … … 82 72 $this->status = $this->get_status(); 83 73 $site_automation_data = false; 74 $post_id = false; 84 75 85 76 /** … … 98 89 99 90 if ( ! $bypass_cache ) { 100 $site_automation_data = get_option( "sophi_site_automation_data_{$page}_{$widget}" ); 91 $query = new \WP_Query( 92 [ 93 'post_name__in' => [ "sophi-site-automation-data-{$page}-{$widget}" ], 94 'post_type' => 'sophi-response', 95 'posts_per_page' => 1, 96 'fields' => 'ids', 97 'post_status' => 'any', 98 'no_found_rows' => true, 99 'update_post_term_cache' => false 100 ] 101 ); 102 103 if ( $query->have_posts() ) { 104 $post_id = $query->posts[0]; 105 $last_update = get_post_meta( $post_id, 'sophi_site_automation_last_updated', true ); 106 107 if ( $last_update + 5 * MINUTE_IN_SECONDS > time() ) { 108 $site_automation_data = get_post_meta( $post_id, 'sophi_site_automation_data', true ); 109 } 110 } 101 111 } 102 112 … … 126 136 127 137 $this->set_status( [ 'success' => true ] ); 128 return $this->process( $response, $bypass_cache );138 return $this->process( $response, $bypass_cache, $post_id ); 129 139 } 130 140 … … 194 204 */ 195 205 private function request( $timeout ) { 196 $access_token = $this->auth->get_access_token();197 198 if ( is_wp_error( $access_token ) ) {199 return $access_token;200 }201 206 202 207 $args = [ 203 208 'headers' => [ 204 209 'Content-Type' => 'application/json', 205 ' Authorization' => 'Bearer ' . $access_token,210 'Cache-Control' => 'no-cache', 206 211 ], 207 212 ]; … … 255 260 * Process response from Sophi. 256 261 * 257 * @param array $response Response of Site Automation API. 258 * @param bool $bypass_cache Whether to bypass cache or not. 262 * @param array $response Response of Site Automation API. 263 * @param bool $bypass_cache Whether to bypass cache or not. 264 * @param int|bool $post_id The post id to update the post meta with response or false. 259 265 * 260 266 * @return array 261 267 */ 262 private function process( $response, $bypass_cache ) {268 private function process( $response, $bypass_cache, $post_id ) { 263 269 if ( ! $response ) { 264 270 return []; … … 266 272 267 273 if ( ! $bypass_cache ) { 268 update_option( "sophi_site_automation_data_{$this->page}_{$this->widget}", $response ); 274 if ( ! $post_id ) { 275 $post_id = wp_insert_post( 276 [ 277 'post_type' => 'sophi-response', 278 'post_title' => "sophi-site-automation-data-{$this->page}-{$this->widget}", 279 'post_name' => "sophi-site-automation-data-{$this->page}-{$this->widget}", 280 ] 281 ); 282 } 283 update_post_meta( $post_id, 'sophi_site_automation_data', $response ); 284 update_post_meta( $post_id, 'sophi_site_automation_last_updated', time() ); 269 285 } 270 286 return $response; … … 279 295 * @return string 280 296 */ 281 private function set_api_url( $page , $widget) {297 private function set_api_url( $page = '', $widget = '' ) { 282 298 $site_automation_url = get_sophi_settings( 'site_automation_url' ); 283 299 $site_automation_url = untrailingslashit( $site_automation_url ); 284 285 $host = wp_parse_url( get_home_url(), PHP_URL_HOST ); 286 287 return sprintf( '%1$s/curatedHosts/%2$s/curator?page=%3$s&widget=%4$s', $site_automation_url, $host, $page, $widget ); 300 $host = get_sophi_settings( 'host' ); 301 $tenant_id = get_sophi_settings( 'tenant_id' ); 302 303 $url = sprintf( 304 '%1$s/%2$s/hosts/%3$s/pages/%4$s', 305 $site_automation_url, 306 $tenant_id, 307 $host, 308 $page 309 ); 310 311 if ( ! empty ( $widget ) ) { 312 $url = sprintf( 313 '%1$s/widgets/%2$s', 314 $url, 315 $widget 316 ); 317 } 318 319 return $url . '.json'; 288 320 } 289 321 -
sophi/trunk/includes/classes/SiteAutomation/Services.php
r2521616 r2770818 23 23 */ 24 24 public function register() { 25 $this->auth = new Auth(); 26 $this->request = new Request( $this->auth ); 25 $this->request = new Request(); 27 26 $this->integration = new Integration( $this->request ); 28 27 } -
sophi/trunk/includes/functions/settings.php
r2648442 r2770818 8 8 namespace SophiWP\Settings; 9 9 10 use SophiWP\SiteAutomation\Auth;11 10 use function SophiWP\Utils\get_domain; 12 11 use function SophiWP\Utils\is_configured; … … 157 156 158 157 add_settings_field( 159 ' client_id',160 __( ' Client ID', 'sophi-wp' ),158 'host', 159 __( 'Host', 'sophi-wp' ), 161 160 __NAMESPACE__ . '\render_input', 162 161 SETTINGS_GROUP, 163 162 'sophi_api', 164 163 [ 165 'label_for' => ' client_id',166 ] 167 ); 168 169 add_settings_field( 170 ' client_secret',171 __( ' Client Secret', 'sophi-wp' ),164 'label_for' => 'host', 165 ] 166 ); 167 168 add_settings_field( 169 'tenant_id', 170 __( 'Tenant ID', 'sophi-wp' ), 172 171 __NAMESPACE__ . '\render_input', 173 172 SETTINGS_GROUP, 174 173 'sophi_api', 175 174 [ 176 'label_for' => ' client_secret',175 'label_for' => 'tenant_id', 177 176 ] 178 177 ); … … 233 232 'collector_url' => 'collector.sophi.io', 234 233 'tracker_client_id' => get_domain(), 235 ' client_id'=> '',236 ' client_secret'=> '',234 'host' => '', 235 'tenant_id' => '', 237 236 'site_automation_url' => '', 238 237 'query_integration' => 1, … … 258 257 if ( empty( $settings['query_integration'] ) ) { 259 258 $settings['query_integration'] = 0; 260 }261 262 $prev_settings = get_option( SETTINGS_GROUP );263 264 // Delete the option that holds the access token when the environment is changed265 if ( ! empty( $prev_settings['environment'] ) && ! empty( $settings['environment'] ) && $prev_settings['environment'] !== $settings['environment'] ) {266 delete_option( 'sophi_site_automation_access_token' );267 }268 269 if ( ! empty( $settings['client_id'] && ! empty( $settings['client_secret'] ) ) ) {270 $auth = new Auth();271 $auth->set_environment( $settings['environment'] );272 $response = $auth->request_access_token( $settings['client_id'], $settings['client_secret'] );273 if ( is_wp_error( $response ) ) {274 add_settings_error(275 SETTINGS_GROUP,276 SETTINGS_GROUP,277 $response->get_error_message()278 );279 }280 } else {281 add_settings_error(282 SETTINGS_GROUP,283 SETTINGS_GROUP,284 __( 'Both Client ID and Client Secret are required for Site Automation integration.', 'sophi-wp' )285 );286 259 } 287 260 … … 311 284 312 285 $settings['collector_url'] = $url; 286 } 287 288 if ( empty( $settings['host'] ) || empty( $settings['tenant_id'] ) ) { 289 add_settings_error( 290 SETTINGS_GROUP, 291 SETTINGS_GROUP, 292 __( 'Both Host and Tenant ID are required for Site Automation integration.', 'sophi-wp' ) 293 ); 294 } 295 296 if ( isset( $settings['client_id'] ) ) { 297 unset( $settings['client_id'] ); 298 } 299 300 if ( isset( $settings['client_secret'] ) ) { 301 unset( $settings['client_secret'] ); 313 302 } 314 303 -
sophi/trunk/readme.txt
r2732874 r2770818 3 3 Tags: Sophi, Site Automation, Curator, Collector, AI, Artifical Intelligence, ML, Machine Learning, Content Curation 4 4 Tested up to: 6.0 5 Stable tag: 1. 1.35 Stable tag: 1.2.0 6 6 License: GPLv2 or later 7 7 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 51 51 == Usage == 52 52 53 There are two potential ways to integrate Sophi Site Automation results with your WordPress site. The default approach includes a Sophi Site Automation block that integrates with ` WP_Query` by injecting Posts IDs via the `posts_pre_query` filter that gets fetched later to return the actual Posts. In the same fashion, you can integrate Sophi results with your `WP_Query` object by setting the `sophi_curated_page` and `sophi_curated_widget` query parameters.53 There are two potential ways to integrate Sophi Site Automation results with your WordPress site. The default approach includes a Sophi Site Automation block that integrates with `get_posts` by injecting Posts IDs via the `posts_pre_query` filter that gets fetched later to return the actual Posts. In the same fashion, you can integrate Sophi results with your `WP_Query` object by setting the `sophi_curated_page` and `sophi_curated_widget` query parameters. 54 54 55 55 More details on each of these two options are described below. If you are not certain on the best integration approach, considering the following: … … 110 110 == Caveats == 111 111 112 === WordPress VIP and `WP_Query` === 113 112 114 While the above query integration works just fine, it has been observed on [WordPress VIP](https://wpvip.com/) infrastructure that `WP_Query` may return latest posts instead of the posts curated by Sophi due to the [Advanced Post Cache](https://github.com/Automattic/advanced-post-cache) plugin used by the VIP platform. A workaround for this is to use [`get_posts()`](https://developer.wordpress.org/reference/functions/get_posts/) instead and as good practice to add a comment explaining the usage of it so that developers new to it don't swap it for `WP_Query`. Also remember to whitelist `get_posts` by adding the following inline comment so that PHPCS doesn't throw a warning: 113 115 … … 145 147 Object caching is encouraged, as the plugin saves Sophi data as a transient. If you do not have object caching, then the data will be saved as a transient in the options table but note that these will eventually expire. 146 148 149 The default caching period is five minutes. This can be modified with the `sophi_cache_duration` hook. 150 151 = Sophi API empty response = 152 153 If the Sophi API returns an empty Post ID array, the plugin will result in a "no results" response. The `sophi_curated_post_list` filter can be used to modify the Sophi API response to allow manual posts to be injected into the final array previous to returning the filterable value from `posts_pre_query` (e.g., via a fallback method to inject posts that would be a good fit). 154 147 155 == Documentation == 148 156 … … 179 187 == Changelog == 180 188 189 = 1.2.0 - 2022-08-15 = 190 * **Added:** New Curator API (props [@Sidsector9](https://github.com/Sidsector9), [@dinhtungdu](https://github.com/dinhtungdu) via [#310](https://github.com/globeandmail/sophi-for-wordpress/pull/310). 191 * **Added:** Documentation on default handling of Sophi API empty array response (props [@jeffpaul](https://github.com/jeffpaul), [@oscarssanchez](https://github.com/oscarssanchez) via [#307](https://github.com/globeandmail/sophi-for-wordpress/pull/307). 192 * **Added:** New tutorial sections added to the documentation site (props [@dkotter](https://github.com/dkotter), [@YMufleh](https://github.com/YMufleh) via [#318](https://github.com/globeandmail/sophi-for-wordpress/pull/318). 193 * **Changed:** Instead of storing responses from Sophi in an option, store that in a new CPT, `sophi-response` (props [@oscarssanchez](https://github.com/oscarssanchez), [@cadic](https://github.com/cadic), [@felipeelia](https://github.com/felipeelia) via [#298](https://github.com/globeandmail/sophi-for-wordpress/pull/298). 194 * **Changed:** Replaces `WP_Query` with `get_posts` in details about the Sophi Automation block (props [@Sidsector9](https://github.com/Sidsector9), [@jeffpaul](https://github.com/jeffpaul) via [#300](https://github.com/globeandmail/sophi-for-wordpress/pull/300). 195 * **Removed:** Dependency on Auth0 and replaced with the new Curator API (props [@Sidsector9](https://github.com/Sidsector9), [@dinhtungdu](https://github.com/dinhtungdu) via [#310](https://github.com/globeandmail/sophi-for-wordpress/pull/310). 196 * **Fixed:** Ensure we are properly getting cached responses (props [@oscarssanchez](https://github.com/oscarssanchez), [@Sidsector9](https://github.com/Sidsector9), [@felipeelia](https://github.com/felipeelia) via [#305](https://github.com/globeandmail/sophi-for-wordpress/pull/305). 197 * **Security:** Added PHP compatibility checker (props [@Sidsector9](https://github.com/Sidsector9), [@dkotter](https://github.com/dkotter) via [#317](https://github.com/globeandmail/sophi-for-wordpress/pull/317). 198 * **Security:** Update dependency `10up-toolkit` from v4.0.0 to v4.1.2 (props [@renovate](https://github.com/apps/renovate), [@Sidsector9](https://github.com/Sidsector9) via [#299](https://github.com/globeandmail/sophi-for-wordpress/pull/299), [#303](https://github.com/globeandmail/sophi-for-wordpress/pull/303). 199 * **Security:** Update dependency `phpunit/phpunit` from v8.5.26 to v8.5.27 (props [@renovate](https://github.com/apps/renovate) via [#304](https://github.com/globeandmail/sophi-for-wordpress/pull/304). 200 181 201 = 1.1.3 - 2022-05-27 = 182 * **Added: WordPress and Sophi plugin versions to Javascript and AMP Tracking (props [@oscarssanchez](https://github.com/oscarssanchez), [@jeffpaul](https://github.com/jeffpaul), [@YMufleh](https://github.com/YMufleh) via [#287](https://github.com/globeandmail/sophi-for-wordpress/pull/287)).183 * **Added: Documentation for `sophi_cache_duration` filter (props [@Sidsector9](https://github.com/Sidsector9), [@barryceelen](https://github.com/barryceelen), [@jeffpaul](https://github.com/jeffpaul) via [#285](https://github.com/globeandmail/sophi-for-wordpress/pull/285)).184 * **Added: Unit tests (props [@cadic](https://github.com/cadic) via [#291](https://github.com/globeandmail/sophi-for-wordpress/pull/291)).202 * **Added:** WordPress and Sophi plugin versions to Javascript and AMP Tracking (props [@oscarssanchez](https://github.com/oscarssanchez), [@jeffpaul](https://github.com/jeffpaul), [@YMufleh](https://github.com/YMufleh) via [#287](https://github.com/globeandmail/sophi-for-wordpress/pull/287)). 203 * **Added:** Documentation for `sophi_cache_duration` filter (props [@Sidsector9](https://github.com/Sidsector9), [@barryceelen](https://github.com/barryceelen), [@jeffpaul](https://github.com/jeffpaul) via [#285](https://github.com/globeandmail/sophi-for-wordpress/pull/285)). 204 * **Added:** Unit tests (props [@cadic](https://github.com/cadic) via [#291](https://github.com/globeandmail/sophi-for-wordpress/pull/291)). 185 205 * **Changed:** Reverted response saving back to options table from post meta field (props [@oscarssanchez](https://github.com/oscarssanchez) via [#280](https://github.com/globeandmail/sophi-for-wordpress/pull/280)). 186 206 * **Changed:** Replace deprecated `block_categories` filter with `block_categories_all` (props [@Sidsector9](https://github.com/Sidsector9), [@cadic](https://github.com/cadic), [@jeffpaul](https://github.com/jeffpaul) via [#292](https://github.com/globeandmail/sophi-for-wordpress/pull/292)). … … 242 262 = 1.0.9 - 2022-02-18 = 243 263 * **Added:** `hostname` and `path` fields to schema (props [@Rahmon](https://github.com/Rahmon), [@dinhtungdu](https://github.com/dinhtungdu)). 244 * **Fixed:** Return empty post list from Sophi response (props [@oscarssanchez](https://github.com/oscarssanchez), [@barryceelen](https://github.com/barryceelen), [@felipeelia](https://github.com/felipeelia)). 264 * **Added:** - `sophi_curated_post_list` filter to modify the Sophi API response to allow manual posts to be injected previous to returning the filterable value from `posts_pre_query` (e.g., via a fallback method to inject posts that would be a good fit) (props [@oscarssanchez](https://github.com/oscarssanchez), [@barryceelen](https://github.com/barryceelen), [@felipeelia](https://github.com/felipeelia)). 265 * **Fixed:** Sophi API empty Post ID array response changed from using `WP_Query` default results to a "no results" response (props [@oscarssanchez](https://github.com/oscarssanchez), [@barryceelen](https://github.com/barryceelen), [@felipeelia](https://github.com/felipeelia)). 245 266 * **Security:** Update dependency `phpunit/phpunit` from 8.5.21 to 8.5.23 (props [@renovate](https://github.com/apps/renovate)). 246 267 * **Security:** Update dependency `prop-types` from 15.8.0 to 15.8.1 (props [@renovate](https://github.com/apps/renovate)). -
sophi/trunk/sophi.php
r2732874 r2770818 4 4 * Plugin URI: https://github.com/globeandmail/sophi-for-wordpress 5 5 * Description: WordPress VIP-compatible plugin for the Sophi.io Site Automation service. 6 * Version: 1. 1.36 * Version: 1.2.0 7 7 * Requires at least: 5.6 8 8 * Requires PHP: 7.4 … … 17 17 18 18 // Useful global constants. 19 define( 'SOPHI_WP_VERSION', '1. 1.3' );19 define( 'SOPHI_WP_VERSION', '1.2.0' ); 20 20 define( 'SOPHI_WP_URL', plugin_dir_url( __FILE__ ) ); 21 21 define( 'SOPHI_WP_PATH', plugin_dir_path( __FILE__ ) ); … … 36 36 require_once SOPHI_WP_INC . 'functions/content-sync.php'; 37 37 require_once SOPHI_WP_INC . 'functions/blocks.php'; 38 require_once SOPHI_WP_INC . 'functions/post-type.php'; 38 39 39 40 // phpcs:enable WordPressVIPMinimum.Files.IncludingFile.UsingCustomConstant … … 61 62 SophiWP\Core\setup(); 62 63 SophiWP\Settings\setup(); 64 SophiWP\PostType\setup(); 63 65 64 66 if ( ! SophiWP\Utils\is_configured() ) { -
sophi/trunk/vendor/autoload.php
r2732874 r2770818 10 10 require_once __DIR__ . '/composer/autoload_real.php'; 11 11 12 return ComposerAutoloaderInit bf93bab2113570afc5e28efe35def6f9::getLoader();12 return ComposerAutoloaderInit31b3b6f4e914ea7285135ebc79ce32d5::getLoader(); -
sophi/trunk/vendor/composer/InstalledVersions.php
r2712442 r2770818 29 29 /** 30 30 * @var mixed[]|null 31 * @psalm-var array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}|array{}|null31 * @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}|array{}|null 32 32 */ 33 33 private static $installed; … … 40 40 /** 41 41 * @var array[] 42 * @psalm-var array<string, array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>42 * @psalm-var array<string, array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}> 43 43 */ 44 44 private static $installedByVendor = array(); … … 244 244 /** 245 245 * @return array 246 * @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}246 * @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool} 247 247 */ 248 248 public static function getRootPackage() … … 258 258 * @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect. 259 259 * @return array[] 260 * @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}260 * @psalm-return array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} 261 261 */ 262 262 public static function getRawData() … … 281 281 * 282 282 * @return array[] 283 * @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>283 * @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}> 284 284 */ 285 285 public static function getAllRawData() … … 304 304 * @return void 305 305 * 306 * @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>} $data306 * @psalm-param array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $data 307 307 */ 308 308 public static function reload($data) … … 314 314 /** 315 315 * @return array[] 316 * @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>316 * @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}> 317 317 */ 318 318 private static function getInstalled() -
sophi/trunk/vendor/composer/autoload_real.php
r2732874 r2770818 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit bf93bab2113570afc5e28efe35def6f95 class ComposerAutoloaderInit31b3b6f4e914ea7285135ebc79ce32d5 6 6 { 7 7 private static $loader; … … 25 25 require __DIR__ . '/platform_check.php'; 26 26 27 spl_autoload_register(array('ComposerAutoloaderInit bf93bab2113570afc5e28efe35def6f9', 'loadClassLoader'), true, true);27 spl_autoload_register(array('ComposerAutoloaderInit31b3b6f4e914ea7285135ebc79ce32d5', 'loadClassLoader'), true, true); 28 28 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); 29 spl_autoload_unregister(array('ComposerAutoloaderInit bf93bab2113570afc5e28efe35def6f9', 'loadClassLoader'));29 spl_autoload_unregister(array('ComposerAutoloaderInit31b3b6f4e914ea7285135ebc79ce32d5', 'loadClassLoader')); 30 30 31 31 require __DIR__ . '/autoload_static.php'; 32 call_user_func(\Composer\Autoload\ComposerStaticInit bf93bab2113570afc5e28efe35def6f9::getInitializer($loader));32 call_user_func(\Composer\Autoload\ComposerStaticInit31b3b6f4e914ea7285135ebc79ce32d5::getInitializer($loader)); 33 33 34 34 $loader->register(true); 35 35 36 $includeFiles = \Composer\Autoload\ComposerStaticInit bf93bab2113570afc5e28efe35def6f9::$files;36 $includeFiles = \Composer\Autoload\ComposerStaticInit31b3b6f4e914ea7285135ebc79ce32d5::$files; 37 37 foreach ($includeFiles as $fileIdentifier => $file) { 38 composerRequire bf93bab2113570afc5e28efe35def6f9($fileIdentifier, $file);38 composerRequire31b3b6f4e914ea7285135ebc79ce32d5($fileIdentifier, $file); 39 39 } 40 40 … … 48 48 * @return void 49 49 */ 50 function composerRequire bf93bab2113570afc5e28efe35def6f9($fileIdentifier, $file)50 function composerRequire31b3b6f4e914ea7285135ebc79ce32d5($fileIdentifier, $file) 51 51 { 52 52 if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { -
sophi/trunk/vendor/composer/autoload_static.php
r2732874 r2770818 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit bf93bab2113570afc5e28efe35def6f97 class ComposerStaticInit31b3b6f4e914ea7285135ebc79ce32d5 8 8 { 9 9 public static $files = array ( … … 81 81 { 82 82 return \Closure::bind(function () use ($loader) { 83 $loader->prefixLengthsPsr4 = ComposerStaticInit bf93bab2113570afc5e28efe35def6f9::$prefixLengthsPsr4;84 $loader->prefixDirsPsr4 = ComposerStaticInit bf93bab2113570afc5e28efe35def6f9::$prefixDirsPsr4;85 $loader->classMap = ComposerStaticInit bf93bab2113570afc5e28efe35def6f9::$classMap;83 $loader->prefixLengthsPsr4 = ComposerStaticInit31b3b6f4e914ea7285135ebc79ce32d5::$prefixLengthsPsr4; 84 $loader->prefixDirsPsr4 = ComposerStaticInit31b3b6f4e914ea7285135ebc79ce32d5::$prefixDirsPsr4; 85 $loader->classMap = ComposerStaticInit31b3b6f4e914ea7285135ebc79ce32d5::$classMap; 86 86 87 87 }, null, ClassLoader::class); -
sophi/trunk/vendor/composer/installed.json
r2698689 r2770818 304 304 { 305 305 "name": "symfony/polyfill-ctype", 306 "version": "v1.2 5.0",307 "version_normalized": "1.2 5.0.0",306 "version": "v1.26.0", 307 "version_normalized": "1.26.0.0", 308 308 "source": { 309 309 "type": "git", 310 310 "url": "https://github.com/symfony/polyfill-ctype.git", 311 "reference": " 30885182c981ab175d4d034db0f6f469898070ab"312 }, 313 "dist": { 314 "type": "zip", 315 "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ 30885182c981ab175d4d034db0f6f469898070ab",316 "reference": " 30885182c981ab175d4d034db0f6f469898070ab",311 "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4" 312 }, 313 "dist": { 314 "type": "zip", 315 "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4", 316 "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4", 317 317 "shasum": "" 318 318 }, … … 326 326 "ext-ctype": "For best performance" 327 327 }, 328 "time": "202 1-10-20T20:35:02+00:00",328 "time": "2022-05-24T11:49:31+00:00", 329 329 "type": "library", 330 330 "extra": { 331 331 "branch-alias": { 332 "dev-main": "1.2 3-dev"332 "dev-main": "1.26-dev" 333 333 }, 334 334 "thanks": { … … 369 369 ], 370 370 "support": { 371 "source": "https://github.com/symfony/polyfill-ctype/tree/v1.2 5.0"371 "source": "https://github.com/symfony/polyfill-ctype/tree/v1.26.0" 372 372 }, 373 373 "funding": [ -
sophi/trunk/vendor/composer/installed.php
r2732874 r2770818 1 1 <?php return array( 2 2 'root' => array( 3 'pretty_version' => '1.1.3', 4 'version' => '1.1.3.0', 3 'name' => 'globeandmail/sophi-for-wordpress', 4 'pretty_version' => '1.2.0', 5 'version' => '1.2.0.0', 6 'reference' => 'b2d273ae1e4bc8dd95dd47158f41e40d9f161a89', 5 7 'type' => 'wordpress-plugin', 6 8 'install_path' => __DIR__ . '/../../', 7 9 'aliases' => array(), 8 'reference' => '1f21f00d23cad5ee77de7e7ef50050134f15dcb8',9 'name' => 'globeandmail/sophi-for-wordpress',10 10 'dev' => false, 11 11 ), … … 14 14 'pretty_version' => '0.9.3', 15 15 'version' => '0.9.3.0', 16 'reference' => 'ca57d18f028f84f777b2168cd1911b0dee2343ae', 16 17 'type' => 'library', 17 18 'install_path' => __DIR__ . '/../brick/math', 18 19 'aliases' => array(), 19 'reference' => 'ca57d18f028f84f777b2168cd1911b0dee2343ae',20 20 'dev_requirement' => false, 21 21 ), 22 22 'globeandmail/sophi-for-wordpress' => array( 23 'pretty_version' => '1.1.3', 24 'version' => '1.1.3.0', 23 'pretty_version' => '1.2.0', 24 'version' => '1.2.0.0', 25 'reference' => 'b2d273ae1e4bc8dd95dd47158f41e40d9f161a89', 25 26 'type' => 'wordpress-plugin', 26 27 'install_path' => __DIR__ . '/../../', 27 28 'aliases' => array(), 28 'reference' => '1f21f00d23cad5ee77de7e7ef50050134f15dcb8',29 29 'dev_requirement' => false, 30 30 ), … … 32 32 'pretty_version' => '1.2.2', 33 33 'version' => '1.2.2.0', 34 'reference' => 'cccc74ee5e328031b15640b51056ee8d3bb66c0a', 34 35 'type' => 'library', 35 36 'install_path' => __DIR__ . '/../ramsey/collection', 36 37 'aliases' => array(), 37 'reference' => 'cccc74ee5e328031b15640b51056ee8d3bb66c0a',38 38 'dev_requirement' => false, 39 39 ), … … 41 41 'pretty_version' => '4.2.3', 42 42 'version' => '4.2.3.0', 43 'reference' => 'fc9bb7fb5388691fd7373cd44dcb4d63bbcf24df', 43 44 'type' => 'library', 44 45 'install_path' => __DIR__ . '/../ramsey/uuid', 45 46 'aliases' => array(), 46 'reference' => 'fc9bb7fb5388691fd7373cd44dcb4d63bbcf24df',47 47 'dev_requirement' => false, 48 48 ), … … 56 56 'pretty_version' => '0.5.0', 57 57 'version' => '0.5.0.0', 58 'reference' => '32a08e9a7c25d1c51621751e1cdfcffcdef6cfe5', 58 59 'type' => 'library', 59 60 'install_path' => __DIR__ . '/../snowplow/snowplow-tracker', 60 61 'aliases' => array(), 61 'reference' => '32a08e9a7c25d1c51621751e1cdfcffcdef6cfe5',62 62 'dev_requirement' => false, 63 63 ), 64 64 'symfony/polyfill-ctype' => array( 65 'pretty_version' => 'v1.25.0', 66 'version' => '1.25.0.0', 65 'pretty_version' => 'v1.26.0', 66 'version' => '1.26.0.0', 67 'reference' => '6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4', 67 68 'type' => 'library', 68 69 'install_path' => __DIR__ . '/../symfony/polyfill-ctype', 69 70 'aliases' => array(), 70 'reference' => '30885182c981ab175d4d034db0f6f469898070ab',71 71 'dev_requirement' => false, 72 72 ), … … 74 74 'pretty_version' => 'v1.24.0', 75 75 'version' => '1.24.0.0', 76 'reference' => '57b712b08eddb97c762a8caa32c84e037892d2e9', 76 77 'type' => 'library', 77 78 'install_path' => __DIR__ . '/../symfony/polyfill-php80', 78 79 'aliases' => array(), 79 'reference' => '57b712b08eddb97c762a8caa32c84e037892d2e9',80 80 'dev_requirement' => false, 81 81 ), … … 83 83 'pretty_version' => 'v1.24.0', 84 84 'version' => '1.24.0.0', 85 'reference' => '5de4ba2d41b15f9bd0e19b2ab9674135813ec98f', 85 86 'type' => 'library', 86 87 'install_path' => __DIR__ . '/../symfony/polyfill-php81', 87 88 'aliases' => array(), 88 'reference' => '5de4ba2d41b15f9bd0e19b2ab9674135813ec98f',89 89 'dev_requirement' => false, 90 90 ),
Note: See TracChangeset
for help on using the changeset viewer.