mirror of
https://github.com/wp-graphql/wp-graphql-woocommerce.git
synced 2026-08-14 12:53:44 +02:00
Crud_CPT renamed to WC_Post
This commit is contained in:
committed by
Geoff Taylor
parent
0ffe6d5633
commit
331bfe52eb
@@ -9,7 +9,7 @@ use WC_Coupon;
|
||||
/**
|
||||
* Class Coupon
|
||||
*/
|
||||
class Coupon extends Crud_CPT {
|
||||
class Coupon extends WC_Post {
|
||||
|
||||
/**
|
||||
* Coupon constructor
|
||||
@@ -17,16 +17,8 @@ class Coupon extends Crud_CPT {
|
||||
* @param int $id - shop_coupon post-type ID.
|
||||
*/
|
||||
public function __construct( $id ) {
|
||||
$this->data = new WC_Coupon( $id );
|
||||
$allowed_restricted_fields = array(
|
||||
'isRestricted',
|
||||
'isPrivate',
|
||||
'isPublic',
|
||||
'id',
|
||||
'databaseId',
|
||||
);
|
||||
|
||||
parent::__construct( $allowed_restricted_fields, 'shop_coupon', $id );
|
||||
$this->data = new WC_Coupon( $id );
|
||||
parent::__construct( 'shop_coupon', $data );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -52,6 +44,21 @@ class Coupon extends Crud_CPT {
|
||||
return $cap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the fields allowed to be displayed even if this entry is restricted.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected function get_allowed_restricted_fields() {
|
||||
return array(
|
||||
'isRestricted',
|
||||
'isPrivate',
|
||||
'isPublic',
|
||||
'id',
|
||||
'databaseId',
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the Coupon field resolvers
|
||||
*/
|
||||
|
||||
@@ -15,12 +15,14 @@ use GraphQLRelay\Relay;
|
||||
/**
|
||||
* Class Order
|
||||
*/
|
||||
class Order extends Crud_CPT {
|
||||
class Order extends WC_Post {
|
||||
|
||||
/**
|
||||
* Defines get_restricted_cap
|
||||
* Hold order post type slug
|
||||
*
|
||||
* @var string $post_type
|
||||
*/
|
||||
use Shop_Manager_Caps;
|
||||
protected $post_type = 'shop_order';
|
||||
|
||||
/**
|
||||
* Order constructor.
|
||||
@@ -28,8 +30,71 @@ class Order extends Crud_CPT {
|
||||
* @param int $id - shop_order post-type ID.
|
||||
*/
|
||||
public function __construct( $id ) {
|
||||
$this->data = \WC_Order_Factory::get_order( $id );
|
||||
$allowed_restricted_fields = array(
|
||||
$data = $this->get_object( $id );
|
||||
parent::__construct( $this->post_type, $data, $data->get_customer_id() );
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the data source to be used by the model.
|
||||
*
|
||||
* @param integer $id Order ID.
|
||||
*
|
||||
* @return WC_Data
|
||||
*/
|
||||
protected function get_object( $id ) {
|
||||
return \WC_Order_Factory::get_order( $id );
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve the cap to check if the data should be restricted for the order
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function get_restricted_cap() {
|
||||
if ( post_password_required( $this->data->get_id() ) ) {
|
||||
return $this->post_type_object->cap->edit_others_posts;
|
||||
}
|
||||
switch ( get_post_status( $this->data->get_id() ) ) {
|
||||
case 'draft':
|
||||
$cap = $this->post_type_object->cap->edit_others_posts;
|
||||
break;
|
||||
default:
|
||||
$cap = '';
|
||||
if ( ! $this->owner_matches_current_user() ) {
|
||||
$cap = $this->post_type_object->cap->edit_posts;
|
||||
}
|
||||
break;
|
||||
}
|
||||
return $cap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether or not the owner of the data matches the current user.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
protected function owner_matches_current_user() {
|
||||
// Get Customer ID.
|
||||
$customer_id = null;
|
||||
if ( is_callable( array( $this->data, 'get_customer_id' ) ) ) {
|
||||
$customer_id = $this->data->get_customer_id();
|
||||
}
|
||||
|
||||
if ( empty( $this->current_user->ID ) || ( empty( $this->owner ) && empty( $customer_id ) ) ) {
|
||||
return false;
|
||||
}
|
||||
return ( absint( $this->owner ) === absint( $this->current_user->ID ) || absint( $customer_id ) === absint( $this->current_user->ID ) )
|
||||
? true
|
||||
: false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the fields that visible to owners of the order without management caps.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected function get_allowed_restricted_fields() {
|
||||
return array(
|
||||
'isRestricted',
|
||||
'isPrivate',
|
||||
'isPublic',
|
||||
@@ -63,8 +128,6 @@ class Order extends Crud_CPT {
|
||||
'commentCount',
|
||||
'commentStatus',
|
||||
);
|
||||
|
||||
parent::__construct( $allowed_restricted_fields, 'shop_order', $id );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -16,7 +16,7 @@ use WC_Product_Variation;
|
||||
/**
|
||||
* Class Product_Variation
|
||||
*/
|
||||
class Product_Variation extends Crud_CPT {
|
||||
class Product_Variation extends WC_Post {
|
||||
|
||||
/**
|
||||
* Product_Variation constructor
|
||||
@@ -24,16 +24,8 @@ class Product_Variation extends Crud_CPT {
|
||||
* @param int $id - product_variation post-type ID.
|
||||
*/
|
||||
public function __construct( $id ) {
|
||||
$this->data = new WC_Product_Variation( $id );
|
||||
$allowed_restricted_fields = array(
|
||||
'isRestricted',
|
||||
'isPrivate',
|
||||
'isPublic',
|
||||
'id',
|
||||
'databaseId',
|
||||
);
|
||||
|
||||
parent::__construct( $allowed_restricted_fields, 'product_variation', $id );
|
||||
$data = new WC_Product_Variation( $id );
|
||||
parent::__construct( 'product_variation', $data );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -59,6 +51,21 @@ class Product_Variation extends Crud_CPT {
|
||||
return $cap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the fields allowed to be displayed even if this entry is restricted.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected function get_allowed_restricted_fields() {
|
||||
return array(
|
||||
'isRestricted',
|
||||
'isPrivate',
|
||||
'isPublic',
|
||||
'id',
|
||||
'databaseId',
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the ProductVariation field resolvers.
|
||||
*/
|
||||
|
||||
@@ -20,7 +20,7 @@ use WC_Product_Simple;
|
||||
/**
|
||||
* Class Product
|
||||
*/
|
||||
class Product extends Crud_CPT {
|
||||
class Product extends WC_Post {
|
||||
|
||||
/**
|
||||
* Stores the product type: external, grouped, simple, variable.
|
||||
@@ -42,17 +42,13 @@ class Product extends Crud_CPT {
|
||||
* @param int $id - product post-type ID.
|
||||
*/
|
||||
public function __construct( $id ) {
|
||||
$this->product_type = $this->product_factory()->get_product_type( $id );
|
||||
$this->data = $this->get_object( $id );
|
||||
$allowed_restricted_fields = array(
|
||||
'isRestricted',
|
||||
'isPrivate',
|
||||
'isPublic',
|
||||
'id',
|
||||
'databaseId',
|
||||
);
|
||||
// Get product type.
|
||||
$this->product_type = $this->product_factory()->get_product_type( $id );
|
||||
|
||||
parent::__construct( $allowed_restricted_fields, 'product', $id );
|
||||
// Get WC_Product object.
|
||||
$data = $this->get_object( $id );
|
||||
|
||||
parent::__construct( 'product', $data );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -91,6 +87,21 @@ class Product extends Crud_CPT {
|
||||
return $cap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the fields allowed to be displayed even if this entry is restricted.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected function get_allowed_restricted_fields() {
|
||||
return array(
|
||||
'isRestricted',
|
||||
'isPrivate',
|
||||
'isPublic',
|
||||
'id',
|
||||
'databaseId',
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an instance of: WC_Product_External, WC_Product_Simple, WC_Product_Grouped,
|
||||
* or WC_Product_Variable; based upon the product type
|
||||
|
||||
@@ -16,29 +16,39 @@ use WC_Order_Refund;
|
||||
/**
|
||||
* Class Refund.
|
||||
*/
|
||||
class Refund extends Crud_CPT {
|
||||
class Refund extends Order {
|
||||
|
||||
/**
|
||||
* Defines get_restricted_cap.
|
||||
* Hold order post type slug
|
||||
*
|
||||
* @var string $post_type
|
||||
*/
|
||||
use Shop_Manager_Caps;
|
||||
protected $post_type = 'shop_order_refund';
|
||||
|
||||
/**
|
||||
* Refund constructor.
|
||||
* Return the data source to be used by the model.
|
||||
*
|
||||
* @param integer $id Refund ID.
|
||||
*
|
||||
* @return WC_Data
|
||||
*/
|
||||
protected function get_object( $id ) {
|
||||
return new WC_Order_Refund( $id );
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the fields allowed to be displayed even if this entry is restricted.
|
||||
*
|
||||
* @param int $id - shop_order_refund post-type ID.
|
||||
* @return array
|
||||
*/
|
||||
public function __construct( $id ) {
|
||||
$this->data = new WC_Order_Refund( $id );
|
||||
$allowed_restricted_fields = array(
|
||||
protected function get_allowed_restricted_fields() {
|
||||
return array(
|
||||
'isRestricted',
|
||||
'isPrivate',
|
||||
'isPublic',
|
||||
'id',
|
||||
'databaseId',
|
||||
);
|
||||
|
||||
parent::__construct( $allowed_restricted_fields, 'shop_order_refund', $id );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<?php
|
||||
/**
|
||||
* Abstract Model - Crud_CPT
|
||||
* Abstract Model - WC_Post
|
||||
*
|
||||
* Defines share functionality for Crud objects wrapped around WordPress CPTs
|
||||
* Defines shared functionality for WooCommerce CPT models.
|
||||
*
|
||||
* @package WPGraphQL\WooCommerce\Model
|
||||
* @since 0.0.1
|
||||
@@ -11,49 +11,63 @@
|
||||
namespace WPGraphQL\WooCommerce\Model;
|
||||
|
||||
use GraphQL\Error\UserError;
|
||||
use WPGraphQL\Model\Model;
|
||||
use WPGraphQL\Model\Post;
|
||||
use WP_Post_Type;
|
||||
|
||||
/**
|
||||
* Class Crud_CPT
|
||||
* Class WC_Post
|
||||
*/
|
||||
abstract class Crud_CPT extends Model {
|
||||
abstract class WC_Post extends Post {
|
||||
|
||||
/**
|
||||
* Stores the incoming post type object for the post being modeled
|
||||
*
|
||||
* @var null|WP_Post_Type $post_type_object
|
||||
* @var WP_Post_Type $post_type_object
|
||||
*/
|
||||
protected $post_type_object;
|
||||
|
||||
/**
|
||||
* Crud_CPT constructor
|
||||
*
|
||||
* @param array $allowed_restricted_fields - Fields that can be resolved even if post is restricted.
|
||||
* @param string $post_type - Object post-type.
|
||||
* @param int $post_id - Post ID.
|
||||
*/
|
||||
public function __construct( $allowed_restricted_fields, $post_type, $post_id ) {
|
||||
$author_id = get_post_field( 'post_author', $post_id );
|
||||
$this->post_type_object = get_post_type_object( $post_type );
|
||||
|
||||
/**
|
||||
* Store the WP_Post object connected to the model.
|
||||
*
|
||||
* @var WP_Post $post
|
||||
*/
|
||||
protected $post;
|
||||
|
||||
/**
|
||||
* Stores the WC_Data object connected to the model.
|
||||
*
|
||||
* @var \WC_Data $data
|
||||
*/
|
||||
protected $data;
|
||||
|
||||
/**
|
||||
* WC_Post constructor
|
||||
*
|
||||
* @param string $post_type Post type.
|
||||
* @param int $data Data object to be used by the model.
|
||||
*/
|
||||
public function __construct( $post_type, $data, $owner_id = null ) {
|
||||
// Get WP_Post object.
|
||||
$this->post = get_post( $data->get_id() );
|
||||
|
||||
// Execute Post Model constructor.
|
||||
parent::__construct( $data, $owner_id );
|
||||
}
|
||||
|
||||
/**
|
||||
* Setup the global data for the model to have proper context when resolving
|
||||
*/
|
||||
public function setup() {
|
||||
/**
|
||||
* Set the resolving post to the global $post. That way any filters that
|
||||
* might be applied when resolving fields can rely on global post and
|
||||
* post data being set up.
|
||||
*/
|
||||
$post = get_post( $post_id );
|
||||
// @codingStandardsIgnoreLine
|
||||
$GLOBALS['post'] = $post;
|
||||
setup_postdata( $post );
|
||||
|
||||
$restricted_cap = apply_filters(
|
||||
// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.DynamicHooknameFound
|
||||
$this->post_type_object->name . '_restricted_cap',
|
||||
$this->get_restricted_cap()
|
||||
);
|
||||
|
||||
parent::__construct( $restricted_cap, $allowed_restricted_fields, $author_id );
|
||||
if ( $this->post && $this->post instanceof \WP_Post ) {
|
||||
$GLOBALS['post'] = $this->post;
|
||||
setup_postdata( $this->post );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -86,13 +100,6 @@ abstract class Crud_CPT extends Model {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve the cap to check if the data should be restricted for the crud object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
abstract public function get_restricted_cap();
|
||||
|
||||
/**
|
||||
* Wrapper function for deleting
|
||||
*
|
||||
@@ -1,58 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* Defines Admin only restriction caps.
|
||||
*
|
||||
* @package WPGraphQL\WooCommerce\Model
|
||||
* @since 0.0.2
|
||||
*/
|
||||
|
||||
namespace WPGraphQL\WooCommerce\Model;
|
||||
|
||||
/**
|
||||
* Trait Shop_Manager_Capabilities.
|
||||
*/
|
||||
trait Shop_Manager_Caps {
|
||||
|
||||
/**
|
||||
* Retrieve the cap to check if the data should be restricted for the order
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function get_restricted_cap() {
|
||||
if ( post_password_required( $this->data->get_id() ) ) {
|
||||
return $this->post_type_object->cap->edit_others_posts;
|
||||
}
|
||||
switch ( get_post_status( $this->data->get_id() ) ) {
|
||||
case 'draft':
|
||||
$cap = $this->post_type_object->cap->edit_others_posts;
|
||||
break;
|
||||
default:
|
||||
$cap = '';
|
||||
if ( ! $this->owner_matches_current_user() ) {
|
||||
$cap = $this->post_type_object->cap->edit_posts;
|
||||
}
|
||||
break;
|
||||
}
|
||||
return $cap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether or not the owner of the data matches the current user.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
protected function owner_matches_current_user() {
|
||||
// Get Customer ID.
|
||||
$customer_id = null;
|
||||
if ( is_callable( array( $this->data, 'get_customer_id' ) ) ) {
|
||||
$customer_id = $this->data->get_customer_id();
|
||||
}
|
||||
|
||||
if ( empty( $this->current_user->ID ) || ( empty( $this->owner ) && empty( $customer_id ) ) ) {
|
||||
return false;
|
||||
}
|
||||
return ( absint( $this->owner ) === absint( $this->current_user->ID ) || absint( $customer_id ) === absint( $this->current_user->ID ) )
|
||||
? true
|
||||
: false;
|
||||
}
|
||||
}
|
||||
@@ -71,11 +71,6 @@ class Review_Write {
|
||||
if ( ! isset( $payload['id'] ) || ! absint( $payload['id'] ) ) {
|
||||
return null;
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
|
||||
=======
|
||||
|
||||
>>>>>>> Product review mutations implemented and tested.
|
||||
return (float) get_comment_meta( $payload['id'], 'rating', true );
|
||||
}
|
||||
),
|
||||
@@ -86,11 +81,6 @@ class Review_Write {
|
||||
if ( ! isset( $payload['id'] ) || ! absint( $payload['id'] ) ) {
|
||||
return null;
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
|
||||
=======
|
||||
|
||||
>>>>>>> Product review mutations implemented and tested.
|
||||
$comment = get_comment( $payload['id'] );
|
||||
return new Comment( $comment );
|
||||
},
|
||||
|
||||
+2932
-2
File diff suppressed because it is too large
Load Diff
Vendored
+39
@@ -6,6 +6,45 @@ $vendorDir = dirname(dirname(__FILE__));
|
||||
$baseDir = dirname($vendorDir);
|
||||
|
||||
return array(
|
||||
'320cde22f66dd4f5d3fd621d3e88b98f' => $vendorDir . '/symfony/polyfill-ctype/bootstrap.php',
|
||||
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php',
|
||||
'0d59ee240a4cd96ddbb4ff164fccea4d' => $vendorDir . '/symfony/polyfill-php73/bootstrap.php',
|
||||
'ba366f96f4fddbdef61ad7a862b44f61' => $vendorDir . '/wp-cli/package-command/package-command.php',
|
||||
'3937806105cc8e221b8fa8db5b70d2f2' => $vendorDir . '/wp-cli/mustangostang-spyc/includes/functions.php',
|
||||
'be01b9b16925dcb22165c40b46681ac6' => $vendorDir . '/wp-cli/php-cli-tools/lib/cli/cli.php',
|
||||
'8a0ad02df6a5087f2c380f8fd52db273' => $vendorDir . '/wp-cli/cache-command/cache-command.php',
|
||||
'f3f0199a3ecd9f501d0a3b361bd2f61c' => $vendorDir . '/wp-cli/entity-command/entity-command.php',
|
||||
'3f201033d5aceb2293314273be88f7c6' => $vendorDir . '/wp-cli/extension-command/extension-command.php',
|
||||
'c65f753375faee349b7adc48c2ee7cc2' => $vendorDir . '/wp-cli/db-command/db-command.php',
|
||||
'7b11c4dc42b3b3023073cb14e519683c' => $vendorDir . '/ralouphie/getallheaders/src/getallheaders.php',
|
||||
'a0edc8309cc5e1d60e3047b5df6b7052' => $vendorDir . '/guzzlehttp/psr7/src/functions_include.php',
|
||||
'd979c11fe80ba96ae3037b43429fe546' => $vendorDir . '/wp-cli/scaffold-command/scaffold-command.php',
|
||||
'5c6ec5cff8f9d625772c8ed147f6b894' => $vendorDir . '/wp-cli/export-command/export-command.php',
|
||||
'c964ee0ededf28c96ebd9db5099ef910' => $vendorDir . '/guzzlehttp/promises/src/functions_include.php',
|
||||
'b66d29757fcb2fb7a9608d068e3716b0' => $vendorDir . '/wp-cli/checksum-command/checksum-command.php',
|
||||
'37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php',
|
||||
'72579e7bd17821bb1321b87411366eae' => $vendorDir . '/illuminate/support/helpers.php',
|
||||
'30cbb6e4122dc988e494c6b9c0438233' => $vendorDir . '/wp-cli/import-command/import-command.php',
|
||||
'5e099d3cac677dd2bec1003ea7707745' => $vendorDir . '/wp-cli/media-command/media-command.php',
|
||||
'ac949ce40a981819ba132473518a9a31' => $vendorDir . '/wp-cli/wp-config-transformer/src/WPConfigTransformer.php',
|
||||
'5deaf6ce9c8bbdfb65104c7e938d5875' => $vendorDir . '/wp-cli/config-command/config-command.php',
|
||||
'68c39b88215b6cf7a0da164166670ef9' => $vendorDir . '/wp-cli/core-command/core-command.php',
|
||||
'7654e00bf0e632580764400bd8293a9c' => $vendorDir . '/wp-cli/cron-command/cron-command.php',
|
||||
'021d3a13471556f0b57038d679f7f8ea' => $vendorDir . '/wp-cli/embed-command/embed-command.php',
|
||||
'f958dca3f412fd7975da1700912a9321' => $vendorDir . '/wp-cli/eval-command/eval-command.php',
|
||||
'ffb465a494c3101218c4417180c2c9a2' => $vendorDir . '/wp-cli/i18n-command/i18n-command.php',
|
||||
'ace0d205db7f4135ec32132a0076d555' => $vendorDir . '/wp-cli/language-command/language-command.php',
|
||||
'1c88c1eff05217a8cac80c64c9ac2080' => $vendorDir . '/wp-cli/maintenance-mode-command/maintenance-mode-command.php',
|
||||
'f399c1c8d0c787d5c94c09884cdd9762' => $vendorDir . '/wp-cli/rewrite-command/rewrite-command.php',
|
||||
'080fadd667195d055c5a23386f270261' => $vendorDir . '/wp-cli/role-command/role-command.php',
|
||||
'8ecb13f8bbc22b1b34d12b14ec01077a' => $vendorDir . '/wp-cli/search-replace-command/search-replace-command.php',
|
||||
'9f04dd0aa5d67ec75a75c88c345a079e' => $vendorDir . '/wp-cli/server-command/server-command.php',
|
||||
'129d58fa8151374aceb8571bcaa97504' => $vendorDir . '/wp-cli/shell-command/shell-command.php',
|
||||
'8519779bbb65eeb842af2f629ce7b6f8' => $vendorDir . '/wp-cli/super-admin-command/super-admin-command.php',
|
||||
'1f05372afcc7d0c51a305cef1d56dd01' => $vendorDir . '/wp-cli/widget-command/widget-command.php',
|
||||
'6124b4c8570aa390c21fafd04a26c69f' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/deep_copy.php',
|
||||
'e2b8090921f5e293ca4eb0c107749811' => $vendorDir . '/lucatume/wp-browser/src/tad/WPBrowser/functions.php',
|
||||
'944484f100dc1864a5320474d49ebd5a' => $baseDir . '/includes/connection/wc-cpt-connection-args.php',
|
||||
'45a15019e901000ab8608c03ebff44fb' => $baseDir . '/includes/functions.php',
|
||||
'e873b70ed56804979eba7de676fd9a7f' => $baseDir . '/tests/_data/config.php',
|
||||
);
|
||||
|
||||
+9
@@ -6,4 +6,13 @@ $vendorDir = dirname(dirname(__FILE__));
|
||||
$baseDir = dirname($vendorDir);
|
||||
|
||||
return array(
|
||||
'cli' => array($vendorDir . '/wp-cli/php-cli-tools/lib'),
|
||||
'WP_CLI' => array($vendorDir . '/wp-cli/wp-cli/php'),
|
||||
'Requests' => array($vendorDir . '/rmccue/requests/library'),
|
||||
'Oxymel' => array($vendorDir . '/nb/oxymel'),
|
||||
'Mustache' => array($vendorDir . '/mustache/mustache/src'),
|
||||
'Hautelook' => array($vendorDir . '/hautelook/phpass/src'),
|
||||
'Handlebars' => array($vendorDir . '/xamin/handlebars.php/src'),
|
||||
'Behat\\Gherkin' => array($vendorDir . '/behat/gherkin/src'),
|
||||
'BaconStringUtils' => array($vendorDir . '/bacon/bacon-string-utils/src'),
|
||||
);
|
||||
|
||||
Vendored
+63
@@ -6,6 +6,69 @@ $vendorDir = dirname(dirname(__FILE__));
|
||||
$baseDir = dirname($vendorDir);
|
||||
|
||||
return array(
|
||||
'voku\\tests\\' => array($vendorDir . '/voku/portable-ascii/tests'),
|
||||
'voku\\' => array($vendorDir . '/voku/portable-ascii/src/voku'),
|
||||
'tad\\' => array($vendorDir . '/lucatume/wp-browser/src/tad', $vendorDir . '/lucatume/wp-browser-commons/src/tad'),
|
||||
'phpDocumentor\\Reflection\\' => array($vendorDir . '/phpdocumentor/reflection-common/src', $vendorDir . '/phpdocumentor/reflection-docblock/src', $vendorDir . '/phpdocumentor/type-resolver/src'),
|
||||
'cweagans\\Composer\\' => array($vendorDir . '/cweagans/composer-patches/src'),
|
||||
'Webmozart\\Assert\\' => array($vendorDir . '/webmozart/assert/src'),
|
||||
'WP_CLI\\MaintenanceMode\\' => array($vendorDir . '/wp-cli/maintenance-mode-command/src'),
|
||||
'WP_CLI\\I18n\\' => array($vendorDir . '/wp-cli/i18n-command/src'),
|
||||
'WP_CLI\\Embeds\\' => array($vendorDir . '/wp-cli/embed-command/src'),
|
||||
'WP_CLI\\' => array($vendorDir . '/wp-cli/entity-command/src/WP_CLI', $vendorDir . '/wp-cli/shell-command/src/WP_CLI'),
|
||||
'WPGraphQL\\WooCommerce\\' => array($baseDir . '/includes'),
|
||||
'Symfony\\Polyfill\\Php73\\' => array($vendorDir . '/symfony/polyfill-php73'),
|
||||
'Symfony\\Polyfill\\Mbstring\\' => array($vendorDir . '/symfony/polyfill-mbstring'),
|
||||
'Symfony\\Polyfill\\Ctype\\' => array($vendorDir . '/symfony/polyfill-ctype'),
|
||||
'Symfony\\Contracts\\Translation\\' => array($vendorDir . '/symfony/translation-contracts'),
|
||||
'Symfony\\Contracts\\Service\\' => array($vendorDir . '/symfony/service-contracts'),
|
||||
'Symfony\\Contracts\\EventDispatcher\\' => array($vendorDir . '/symfony/event-dispatcher-contracts'),
|
||||
'Symfony\\Component\\Yaml\\' => array($vendorDir . '/symfony/yaml'),
|
||||
'Symfony\\Component\\Translation\\' => array($vendorDir . '/symfony/translation'),
|
||||
'Symfony\\Component\\Process\\' => array($vendorDir . '/symfony/process'),
|
||||
'Symfony\\Component\\Finder\\' => array($vendorDir . '/symfony/finder'),
|
||||
'Symfony\\Component\\Filesystem\\' => array($vendorDir . '/symfony/filesystem'),
|
||||
'Symfony\\Component\\EventDispatcher\\' => array($vendorDir . '/symfony/event-dispatcher'),
|
||||
'Symfony\\Component\\DomCrawler\\' => array($vendorDir . '/symfony/dom-crawler'),
|
||||
'Symfony\\Component\\CssSelector\\' => array($vendorDir . '/symfony/css-selector'),
|
||||
'Symfony\\Component\\Console\\' => array($vendorDir . '/symfony/console'),
|
||||
'Symfony\\Component\\BrowserKit\\' => array($vendorDir . '/symfony/browser-kit'),
|
||||
'Stripe\\' => array($vendorDir . '/stripe/stripe-php/lib'),
|
||||
'Seld\\PharUtils\\' => array($vendorDir . '/seld/phar-utils/src'),
|
||||
'Seld\\JsonLint\\' => array($vendorDir . '/seld/jsonlint/src/Seld/JsonLint'),
|
||||
'Psr\\SimpleCache\\' => array($vendorDir . '/psr/simple-cache/src'),
|
||||
'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'),
|
||||
'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-message/src'),
|
||||
'Psr\\Container\\' => array($vendorDir . '/psr/container/src'),
|
||||
'Prophecy\\' => array($vendorDir . '/phpspec/prophecy/src/Prophecy'),
|
||||
'PhpOption\\' => array($vendorDir . '/phpoption/phpoption/src/PhpOption'),
|
||||
'Peast\\test\\' => array($vendorDir . '/mck89/peast/test/Peast'),
|
||||
'Peast\\' => array($vendorDir . '/mck89/peast/lib/Peast'),
|
||||
'Mustangostang\\' => array($vendorDir . '/wp-cli/mustangostang-spyc/src'),
|
||||
'MikeMcLin\\WpPassword\\' => array($vendorDir . '/mikemclin/laravel-wp-password/src'),
|
||||
'JsonSchema\\' => array($vendorDir . '/justinrainbow/json-schema/src/JsonSchema'),
|
||||
'Illuminate\\Support\\' => array($vendorDir . '/illuminate/support'),
|
||||
'Illuminate\\Contracts\\' => array($vendorDir . '/illuminate/contracts'),
|
||||
'GuzzleHttp\\Psr7\\' => array($vendorDir . '/guzzlehttp/psr7/src'),
|
||||
'GuzzleHttp\\Promise\\' => array($vendorDir . '/guzzlehttp/promises/src'),
|
||||
'GuzzleHttp\\' => array($vendorDir . '/guzzlehttp/guzzle/src'),
|
||||
'Gumlet\\' => array($vendorDir . '/gumlet/php-image-resize/lib'),
|
||||
'Gettext\\Languages\\' => array($vendorDir . '/gettext/languages/src'),
|
||||
'Gettext\\' => array($vendorDir . '/gettext/gettext/src'),
|
||||
'Firebase\\JWT\\' => array($vendorDir . '/firebase/php-jwt/src'),
|
||||
'Facebook\\WebDriver\\' => array($vendorDir . '/facebook/webdriver/lib'),
|
||||
'Dotenv\\' => array($vendorDir . '/vlucas/phpdotenv/src'),
|
||||
'Doctrine\\Instantiator\\' => array($vendorDir . '/doctrine/instantiator/src/Doctrine/Instantiator'),
|
||||
'Doctrine\\Common\\Inflector\\' => array($vendorDir . '/doctrine/inflector/lib/Doctrine/Common/Inflector'),
|
||||
'DeepCopy\\' => array($vendorDir . '/myclabs/deep-copy/src/DeepCopy'),
|
||||
'Composer\\XdebugHandler\\' => array($vendorDir . '/composer/xdebug-handler/src'),
|
||||
'Composer\\Spdx\\' => array($vendorDir . '/composer/spdx-licenses/src'),
|
||||
'Composer\\Semver\\' => array($vendorDir . '/composer/semver/src'),
|
||||
'Composer\\CaBundle\\' => array($vendorDir . '/composer/ca-bundle/src'),
|
||||
'Composer\\' => array($vendorDir . '/composer/composer/src/Composer'),
|
||||
'Codeception\\PHPUnit\\' => array($vendorDir . '/codeception/phpunit-wrapper/src'),
|
||||
'Codeception\\Extension\\' => array($vendorDir . '/codeception/codeception/ext'),
|
||||
'Codeception\\' => array($vendorDir . '/codeception/codeception/src/Codeception', $vendorDir . '/codeception/stub/src', $vendorDir . '/lucatume/wp-browser/src/Codeception'),
|
||||
'Carbon\\' => array($vendorDir . '/nesbot/carbon/src/Carbon'),
|
||||
'' => array($vendorDir . '/wp-cli/cache-command/src', $vendorDir . '/wp-cli/checksum-command/src', $vendorDir . '/wp-cli/config-command/src', $vendorDir . '/wp-cli/core-command/src', $vendorDir . '/wp-cli/cron-command/src', $vendorDir . '/wp-cli/db-command/src', $vendorDir . '/wp-cli/entity-command/src', $vendorDir . '/wp-cli/eval-command/src', $vendorDir . '/wp-cli/export-command/src', $vendorDir . '/wp-cli/extension-command/src', $vendorDir . '/wp-cli/import-command/src', $vendorDir . '/wp-cli/language-command/src', $vendorDir . '/wp-cli/media-command/src', $vendorDir . '/wp-cli/package-command/src', $vendorDir . '/wp-cli/rewrite-command/src', $vendorDir . '/wp-cli/role-command/src', $vendorDir . '/wp-cli/scaffold-command/src', $vendorDir . '/wp-cli/search-replace-command/src', $vendorDir . '/wp-cli/server-command/src', $vendorDir . '/wp-cli/shell-command/src', $vendorDir . '/wp-cli/super-admin-command/src', $vendorDir . '/wp-cli/widget-command/src'),
|
||||
);
|
||||
|
||||
Vendored
+3416
-2
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user