Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PSR4 & Class Map Autoloading #704

Merged
merged 32 commits into from
Aug 30, 2024
Merged

Conversation

nmolham-godaddy
Copy link
Contributor

@nmolham-godaddy nmolham-godaddy commented Aug 26, 2024

Summary

Setup and configure PSR4 autoloading as well as class map existing matching class files.

Release: #705

QA

Before merge

  • I have confirmed these changes in each supported minor WooCommerce version

@nmolham-godaddy nmolham-godaddy self-assigned this Aug 26, 2024
@nmolham-godaddy nmolham-godaddy requested review from agibson-godaddy and removed request for agibson-godaddy August 26, 2024 07:39
Copy link
Contributor

@agibson-godaddy agibson-godaddy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work!

Since we're changing the namespace of a few classes (other than the usual version change), do you think this needs to be in a major version?

Or to make it backwards compatible we could set up class aliases just for the namespaces that we changed. For example, the Country_Helper class:

- namespace SkyVerge\WooCommerce\PluginFramework\v5_13_1;
+ namespace SkyVerge\WooCommerce\PluginFramework\v5_13_1\Handlers;

@nmolham-godaddy
Copy link
Contributor Author

@agibson-godaddy Good catch, I forgot I changed the namespace for Country_Helper 😅

Usually a namespace change like that should be a major version release as it is a breaking change, but in this case, this class (as far as I can tell) has been introduced recently (by you I believe) and been only used in one plugin.

Do you think it worth the additional effort of adding a class alias?

@agibson-godaddy
Copy link
Contributor

@nmolham-godaddy There were actually two namespace changes here:

  1. Country_Helper has been moved into the Handlers namespace. This class is actually a much older class. History
  2. PaymentFormContextChecker has been moved into Payment_Gateway namespace. This is the newer class I think you were thinking of.

If it were just the context checker, then I think I'd agree with you. But Country_Helper is a much older class so for that one I think we either need to set up a class alias (which would work fine) or adjust this to be a major version instead.

@nmolham-godaddy
Copy link
Contributor Author

nmolham-godaddy commented Aug 28, 2024

Good catch @agibson-godaddy, I got them mixed up as you concluded. I will setup class aliases for them.

Done 3fb89fa let me know what you think

I am playing around not with using classmap to autoload other classes class-sv-*.php files with classes that doesn't follow PSR4 schema

@nmolham-godaddy nmolham-godaddy marked this pull request as ready for review August 28, 2024 06:21
@nmolham-godaddy nmolham-godaddy changed the title [WIP] PSR4 Autoloading PSR4 Autoloading Aug 28, 2024
@nmolham-godaddy
Copy link
Contributor Author

nmolham-godaddy commented Aug 28, 2024

Just testing the latest changes on Memberships plugin (https://github.com/gdcorp-partners/woocommerce-memberships/pull/1222) and it looks pretty good, no issues or error so far. It required tiny change, other than that, looks good to me

@nmolham-godaddy
Copy link
Contributor Author

I did a dump of composer loader final computed PSR4 and class mapping in runtime, and find a very promising results. As far as I can tell, all framework classes counted for and mapped correctly to proper class files 🕺 🕺 🕺 🕺 🕺 🕺 🕺

Array
(
    [PSR4] => Array
        (
            [SkyVerge\WooCommerce\PluginFramework\v5_13_1\] => Array
                (
                    [0] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../skyverge/wc-plugin-framework/woocommerce
                )

            [SkyVerge\WooCommerce\Memberships\Tests\] => Array
                (
                    [0] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../../tests
                )

            [SkyVerge\WooCommerce\Memberships\] => Array
                (
                    [0] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../../src
                )

        )

    [classMap] => Array
        (
            [SkyVerge\WooCommerce\PluginFramework\v5_13_1\API\Abstract_Cacheable_API_Base] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../skyverge/wc-plugin-framework/woocommerce/api/Abstract_Cacheable_API_Base.php
            [SkyVerge\WooCommerce\PluginFramework\v5_13_1\API\Traits\Cacheable_Request_Trait] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../skyverge/wc-plugin-framework/woocommerce/api/Traits/Cacheable_Request_Trait.php
            [SkyVerge\WooCommerce\PluginFramework\v5_13_1\Admin\Notes_Helper] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../skyverge/wc-plugin-framework/woocommerce/admin/Notes_Helper.php
            [SkyVerge\WooCommerce\PluginFramework\v5_13_1\Admin\Setup_Wizard] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../skyverge/wc-plugin-framework/woocommerce/admin/abstract-sv-wc-plugin-admin-setup-wizard.php
            [SkyVerge\WooCommerce\PluginFramework\v5_13_1\Payment_Gateway\Admin\Setup_Wizard] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../skyverge/wc-plugin-framework/woocommerce/payment-gateway/admin/abstract-sv-wc-payment-gateway-plugin-admin-setup-wizard.php
            [SkyVerge\WooCommerce\PluginFramework\v5_13_1\Payment_Gateway\Blocks\Gateway_Blocks_Handler] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../skyverge/wc-plugin-framework/woocommerce/payment-gateway/Blocks/Gateway_Blocks_Handler.php
            [SkyVerge\WooCommerce\PluginFramework\v5_13_1\Payment_Gateway\Blocks\Gateway_Checkout_Block_Integration] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../skyverge/wc-plugin-framework/woocommerce/payment-gateway/Blocks/Gateway_Checkout_Block_Integration.php
            [SkyVerge\WooCommerce\PluginFramework\v5_13_1\Payment_Gateway\External_Checkout\Admin] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../skyverge/wc-plugin-framework/woocommerce/payment-gateway/External_Checkout/Admin.php
            [SkyVerge\WooCommerce\PluginFramework\v5_13_1\Payment_Gateway\External_Checkout\External_Checkout] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../skyverge/wc-plugin-framework/woocommerce/payment-gateway/External_Checkout/External_Checkout.php
            [SkyVerge\WooCommerce\PluginFramework\v5_13_1\Payment_Gateway\External_Checkout\Frontend] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../skyverge/wc-plugin-framework/woocommerce/payment-gateway/External_Checkout/Frontend.php
            [SkyVerge\WooCommerce\PluginFramework\v5_13_1\Payment_Gateway\External_Checkout\Google_Pay\AJAX] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../skyverge/wc-plugin-framework/woocommerce/payment-gateway/External_Checkout/Google_Pay/AJAX.php
            [SkyVerge\WooCommerce\PluginFramework\v5_13_1\Payment_Gateway\External_Checkout\Google_Pay\Admin] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../skyverge/wc-plugin-framework/woocommerce/payment-gateway/External_Checkout/Google_Pay/Admin.php
            [SkyVerge\WooCommerce\PluginFramework\v5_13_1\Payment_Gateway\External_Checkout\Google_Pay\Frontend] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../skyverge/wc-plugin-framework/woocommerce/payment-gateway/External_Checkout/Google_Pay/Frontend.php
            [SkyVerge\WooCommerce\PluginFramework\v5_13_1\Payment_Gateway\External_Checkout\Google_Pay\Google_Pay] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../skyverge/wc-plugin-framework/woocommerce/payment-gateway/External_Checkout/Google_Pay/Google_Pay.php
            [SkyVerge\WooCommerce\PluginFramework\v5_13_1\Payment_Gateway\External_Checkout\Orders] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../skyverge/wc-plugin-framework/woocommerce/payment-gateway/External_Checkout/Orders.php
            [SkyVerge\WooCommerce\PluginFramework\v5_13_1\Payment_Gateway\Handlers\Abstract_Hosted_Payment_Handler] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../skyverge/wc-plugin-framework/woocommerce/payment-gateway/Handlers/Abstract_Hosted_Payment_Handler.php
            [SkyVerge\WooCommerce\PluginFramework\v5_13_1\Payment_Gateway\Handlers\Abstract_Payment_Handler] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../skyverge/wc-plugin-framework/woocommerce/payment-gateway/Handlers/Abstract_Payment_Handler.php
            [SkyVerge\WooCommerce\PluginFramework\v5_13_1\Payment_Gateway\Handlers\Capture] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../skyverge/wc-plugin-framework/woocommerce/payment-gateway/Handlers/Capture.php
            [SkyVerge\WooCommerce\PluginFramework\v5_13_1\Payment_Gateway\PaymentFormContextChecker] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../skyverge/wc-plugin-framework/woocommerce/payment-gateway/PaymentFormContextChecker.php
            [SkyVerge\WooCommerce\PluginFramework\v5_13_1\Payment_Gateway\REST_API] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../skyverge/wc-plugin-framework/woocommerce/payment-gateway/rest-api/class-sv-wc-payment-gateway-plugin-rest-api.php
            [SkyVerge\WooCommerce\PluginFramework\v5_13_1\Plugin\Lifecycle] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../skyverge/wc-plugin-framework/woocommerce/Lifecycle.php
            [SkyVerge\WooCommerce\PluginFramework\v5_13_1\REST_API] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../skyverge/wc-plugin-framework/woocommerce/rest-api/class-sv-wc-plugin-rest-api.php
            [SkyVerge\WooCommerce\PluginFramework\v5_13_1\REST_API\Controllers\Settings] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../skyverge/wc-plugin-framework/woocommerce/rest-api/Controllers/Settings.php
            [SkyVerge\WooCommerce\PluginFramework\v5_13_1\SV_WC_API_Base] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../skyverge/wc-plugin-framework/woocommerce/api/class-sv-wc-api-base.php
            [SkyVerge\WooCommerce\PluginFramework\v5_13_1\SV_WC_API_Exception] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../skyverge/wc-plugin-framework/woocommerce/api/class-sv-wc-api-exception.php
            [SkyVerge\WooCommerce\PluginFramework\v5_13_1\SV_WC_API_JSON_Request] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../skyverge/wc-plugin-framework/woocommerce/api/abstract-sv-wc-api-json-request.php
            [SkyVerge\WooCommerce\PluginFramework\v5_13_1\SV_WC_API_JSON_Response] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../skyverge/wc-plugin-framework/woocommerce/api/abstract-sv-wc-api-json-response.php
            [SkyVerge\WooCommerce\PluginFramework\v5_13_1\SV_WC_API_Request] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../skyverge/wc-plugin-framework/woocommerce/api/interface-sv-wc-api-request.php
            [SkyVerge\WooCommerce\PluginFramework\v5_13_1\SV_WC_API_Response] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../skyverge/wc-plugin-framework/woocommerce/api/interface-sv-wc-api-response.php
            [SkyVerge\WooCommerce\PluginFramework\v5_13_1\SV_WC_API_XML_Request] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../skyverge/wc-plugin-framework/woocommerce/api/abstract-sv-wc-api-xml-request.php
            [SkyVerge\WooCommerce\PluginFramework\v5_13_1\SV_WC_API_XML_Response] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../skyverge/wc-plugin-framework/woocommerce/api/abstract-sv-wc-api-xml-response.php
            [SkyVerge\WooCommerce\PluginFramework\v5_13_1\SV_WC_Admin_Notice_Handler] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../skyverge/wc-plugin-framework/woocommerce/class-sv-wc-admin-notice-handler.php
            [SkyVerge\WooCommerce\PluginFramework\v5_13_1\SV_WC_Data_Compatibility] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../skyverge/wc-plugin-framework/woocommerce/compatibility/abstract-sv-wc-data-compatibility.php
            [SkyVerge\WooCommerce\PluginFramework\v5_13_1\SV_WC_Helper] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../skyverge/wc-plugin-framework/woocommerce/class-sv-wc-helper.php
            [SkyVerge\WooCommerce\PluginFramework\v5_13_1\SV_WC_Hook_Deprecator] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../skyverge/wc-plugin-framework/woocommerce/class-sv-wc-hook-deprecator.php
            [SkyVerge\WooCommerce\PluginFramework\v5_13_1\SV_WC_Order_Compatibility] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../skyverge/wc-plugin-framework/woocommerce/compatibility/class-sv-wc-order-compatibility.php
            [SkyVerge\WooCommerce\PluginFramework\v5_13_1\SV_WC_Payment_Gateway] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../skyverge/wc-plugin-framework/woocommerce/payment-gateway/class-sv-wc-payment-gateway.php
            [SkyVerge\WooCommerce\PluginFramework\v5_13_1\SV_WC_Payment_Gateway_API] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../skyverge/wc-plugin-framework/woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api.php
            [SkyVerge\WooCommerce\PluginFramework\v5_13_1\SV_WC_Payment_Gateway_API_Authorization_Response] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../skyverge/wc-plugin-framework/woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api-authorization-response.php
            [SkyVerge\WooCommerce\PluginFramework\v5_13_1\SV_WC_Payment_Gateway_API_Create_Payment_Token_Response] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../skyverge/wc-plugin-framework/woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api-create-payment-token-response.php
            [SkyVerge\WooCommerce\PluginFramework\v5_13_1\SV_WC_Payment_Gateway_API_Customer_Response] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../skyverge/wc-plugin-framework/woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api-customer-response.php
            [SkyVerge\WooCommerce\PluginFramework\v5_13_1\SV_WC_Payment_Gateway_API_Get_Tokenized_Payment_Methods_Response] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../skyverge/wc-plugin-framework/woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api-get-tokenized-payment-methods-response.php
            [SkyVerge\WooCommerce\PluginFramework\v5_13_1\SV_WC_Payment_Gateway_API_Payment_Notification_Credit_Card_Response] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../skyverge/wc-plugin-framework/woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api-payment-notification-credit-card-response.php
            [SkyVerge\WooCommerce\PluginFramework\v5_13_1\SV_WC_Payment_Gateway_API_Payment_Notification_Response] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../skyverge/wc-plugin-framework/woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api-payment-notification-response.php
            [SkyVerge\WooCommerce\PluginFramework\v5_13_1\SV_WC_Payment_Gateway_API_Payment_Notification_eCheck_Response] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../skyverge/wc-plugin-framework/woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api-payment-notification-echeck-response.php
            [SkyVerge\WooCommerce\PluginFramework\v5_13_1\SV_WC_Payment_Gateway_API_Request] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../skyverge/wc-plugin-framework/woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api-request.php
            [SkyVerge\WooCommerce\PluginFramework\v5_13_1\SV_WC_Payment_Gateway_API_Response] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../skyverge/wc-plugin-framework/woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api-response.php
            [SkyVerge\WooCommerce\PluginFramework\v5_13_1\SV_WC_Payment_Gateway_API_Response_Message_Helper] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../skyverge/wc-plugin-framework/woocommerce/payment-gateway/api/class-sv-wc-payment-gateway-api-response-message-helper.php
            [SkyVerge\WooCommerce\PluginFramework\v5_13_1\SV_WC_Payment_Gateway_Admin_Order] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../skyverge/wc-plugin-framework/woocommerce/payment-gateway/admin/class-sv-wc-payment-gateway-admin-order.php
            [SkyVerge\WooCommerce\PluginFramework\v5_13_1\SV_WC_Payment_Gateway_Admin_Payment_Token_Editor] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../skyverge/wc-plugin-framework/woocommerce/payment-gateway/admin/class-sv-wc-payment-gateway-admin-payment-token-editor.php
            [SkyVerge\WooCommerce\PluginFramework\v5_13_1\SV_WC_Payment_Gateway_Admin_User_Handler] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../skyverge/wc-plugin-framework/woocommerce/payment-gateway/admin/class-sv-wc-payment-gateway-admin-user-handler.php
            [SkyVerge\WooCommerce\PluginFramework\v5_13_1\SV_WC_Payment_Gateway_Apple_Pay] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../skyverge/wc-plugin-framework/woocommerce/payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay.php
            [SkyVerge\WooCommerce\PluginFramework\v5_13_1\SV_WC_Payment_Gateway_Apple_Pay_AJAX] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../skyverge/wc-plugin-framework/woocommerce/payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay-ajax.php
            [SkyVerge\WooCommerce\PluginFramework\v5_13_1\SV_WC_Payment_Gateway_Apple_Pay_API] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../skyverge/wc-plugin-framework/woocommerce/payment-gateway/External_Checkout/apple-pay/api/class-sv-wc-payment-gateway-apple-pay-api.php
            [SkyVerge\WooCommerce\PluginFramework\v5_13_1\SV_WC_Payment_Gateway_Apple_Pay_API_Request] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../skyverge/wc-plugin-framework/woocommerce/payment-gateway/External_Checkout/apple-pay/api/class-sv-wc-payment-gateway-apple-pay-api-request.php
            [SkyVerge\WooCommerce\PluginFramework\v5_13_1\SV_WC_Payment_Gateway_Apple_Pay_API_Response] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../skyverge/wc-plugin-framework/woocommerce/payment-gateway/External_Checkout/apple-pay/api/class-sv-wc-payment-gateway-apple-pay-api-response.php
            [SkyVerge\WooCommerce\PluginFramework\v5_13_1\SV_WC_Payment_Gateway_Apple_Pay_Admin] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../skyverge/wc-plugin-framework/woocommerce/payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay-admin.php
            [SkyVerge\WooCommerce\PluginFramework\v5_13_1\SV_WC_Payment_Gateway_Apple_Pay_Frontend] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../skyverge/wc-plugin-framework/woocommerce/payment-gateway/External_Checkout/apple-pay/class-sv-wc-payment-gateway-apple-pay-frontend.php
            [SkyVerge\WooCommerce\PluginFramework\v5_13_1\SV_WC_Payment_Gateway_Apple_Pay_Payment_Response] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../skyverge/wc-plugin-framework/woocommerce/payment-gateway/External_Checkout/apple-pay/api/class-sv-wc-payment-gateway-apple-pay-payment-response.php
            [SkyVerge\WooCommerce\PluginFramework\v5_13_1\SV_WC_Payment_Gateway_Direct] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../skyverge/wc-plugin-framework/woocommerce/payment-gateway/class-sv-wc-payment-gateway-direct.php
            [SkyVerge\WooCommerce\PluginFramework\v5_13_1\SV_WC_Payment_Gateway_Exception] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../skyverge/wc-plugin-framework/woocommerce/payment-gateway/exceptions/class-sv-wc-payment-gateway-exception.php
            [SkyVerge\WooCommerce\PluginFramework\v5_13_1\SV_WC_Payment_Gateway_Helper] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../skyverge/wc-plugin-framework/woocommerce/payment-gateway/class-sv-wc-payment-gateway-helper.php
            [SkyVerge\WooCommerce\PluginFramework\v5_13_1\SV_WC_Payment_Gateway_Hosted] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../skyverge/wc-plugin-framework/woocommerce/payment-gateway/class-sv-wc-payment-gateway-hosted.php
            [SkyVerge\WooCommerce\PluginFramework\v5_13_1\SV_WC_Payment_Gateway_Integration] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../skyverge/wc-plugin-framework/woocommerce/payment-gateway/integrations/abstract-sv-wc-payment-gateway-integration.php
            [SkyVerge\WooCommerce\PluginFramework\v5_13_1\SV_WC_Payment_Gateway_Integration_Pre_Orders] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../skyverge/wc-plugin-framework/woocommerce/payment-gateway/integrations/class-sv-wc-payment-gateway-integration-pre-orders.php
            [SkyVerge\WooCommerce\PluginFramework\v5_13_1\SV_WC_Payment_Gateway_Integration_Subscriptions] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../skyverge/wc-plugin-framework/woocommerce/payment-gateway/integrations/class-sv-wc-payment-gateway-integration-subscriptions.php
            [SkyVerge\WooCommerce\PluginFramework\v5_13_1\SV_WC_Payment_Gateway_My_Payment_Methods] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../skyverge/wc-plugin-framework/woocommerce/payment-gateway/class-sv-wc-payment-gateway-my-payment-methods.php
            [SkyVerge\WooCommerce\PluginFramework\v5_13_1\SV_WC_Payment_Gateway_Payment_Form] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../skyverge/wc-plugin-framework/woocommerce/payment-gateway/class-sv-wc-payment-gateway-payment-form.php
            [SkyVerge\WooCommerce\PluginFramework\v5_13_1\SV_WC_Payment_Gateway_Payment_Notification_Tokenization_Response] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../skyverge/wc-plugin-framework/woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api-payment-notification-tokenization-response.php
            [SkyVerge\WooCommerce\PluginFramework\v5_13_1\SV_WC_Payment_Gateway_Payment_Token] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../skyverge/wc-plugin-framework/woocommerce/payment-gateway/payment-tokens/class-sv-wc-payment-gateway-payment-token.php
            [SkyVerge\WooCommerce\PluginFramework\v5_13_1\SV_WC_Payment_Gateway_Payment_Tokens_Handler] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../skyverge/wc-plugin-framework/woocommerce/payment-gateway/payment-tokens/class-sv-wc-payment-gateway-payment-tokens-handler.php
            [SkyVerge\WooCommerce\PluginFramework\v5_13_1\SV_WC_Payment_Gateway_Plugin] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../skyverge/wc-plugin-framework/woocommerce/payment-gateway/class-sv-wc-payment-gateway-plugin.php
            [SkyVerge\WooCommerce\PluginFramework\v5_13_1\SV_WC_Payment_Gateway_Privacy] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../skyverge/wc-plugin-framework/woocommerce/payment-gateway/class-sv-wc-payment-gateway-privacy.php
            [SkyVerge\WooCommerce\PluginFramework\v5_13_1\SV_WC_Plugin] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../skyverge/wc-plugin-framework/woocommerce/class-sv-wc-plugin.php
            [SkyVerge\WooCommerce\PluginFramework\v5_13_1\SV_WC_Plugin_Compatibility] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../skyverge/wc-plugin-framework/woocommerce/class-sv-wc-plugin-compatibility.php
            [SkyVerge\WooCommerce\PluginFramework\v5_13_1\SV_WC_Plugin_Dependencies] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../skyverge/wc-plugin-framework/woocommerce/class-sv-wc-plugin-dependencies.php
            [SkyVerge\WooCommerce\PluginFramework\v5_13_1\SV_WC_Plugin_Exception] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../skyverge/wc-plugin-framework/woocommerce/class-sv-wc-plugin-exception.php
            [SkyVerge\WooCommerce\PluginFramework\v5_13_1\SV_WC_Subscription_Compatibility] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../skyverge/wc-plugin-framework/woocommerce/compatibility/class-sv-wc-subscription-compatibility.php
            [SkyVerge\WooCommerce\PluginFramework\v5_13_1\SV_WP_Admin_Message_Handler] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../skyverge/wc-plugin-framework/woocommerce/class-sv-wp-admin-message-handler.php
            [SkyVerge\WooCommerce\PluginFramework\v5_13_1\SV_WP_Async_Request] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../skyverge/wc-plugin-framework/woocommerce/utilities/class-sv-wp-async-request.php
            [SkyVerge\WooCommerce\PluginFramework\v5_13_1\SV_WP_Background_Job_Handler] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../skyverge/wc-plugin-framework/woocommerce/utilities/class-sv-wp-background-job-handler.php
            [SkyVerge\WooCommerce\PluginFramework\v5_13_1\SV_WP_Job_Batch_Handler] => /Users/nmolham/gdcorp-partners/woocommerce-memberships/vendor/composer/../skyverge/wc-plugin-framework/woocommerce/utilities/class-sv-wp-job-batch-handler.php
        )

)

@nmolham-godaddy nmolham-godaddy changed the title PSR4 Autoloading PSR4 & Class Map Autoloading Aug 28, 2024
@nmolham-godaddy nmolham-godaddy changed the base branch from release/5.13.1 to release/5.14.0 August 29, 2024 02:48
# Conflicts:
#	tests/unit/Helpers/CountryHelperTest.php
#	tests/unit/Payment_Gateway/PaymentFormContextCheckerTest.php
#	woocommerce/Handlers/Country_Helper.php
#	woocommerce/payment-gateway/Blocks/Gateway_Blocks_Handler.php
#	woocommerce/payment-gateway/PaymentFormContextChecker.php
# Conflicts:
#	tests/unit/Helpers/CountryHelperTest.php
#	tests/unit/Payment_Gateway/PaymentFormContextCheckerTest.php
#	woocommerce/Handlers/Country_Helper.php
#	woocommerce/payment-gateway/Blocks/Gateway_Blocks_Handler.php
#	woocommerce/payment-gateway/PaymentFormContextChecker.php
@nmolham-godaddy
Copy link
Contributor Author

Replace base PR with the new release branch PR #705

@agibson-godaddy
Copy link
Contributor

Completed authorize[.]net gateway testing. Seems to work just fine!

@agibson-godaddy
Copy link
Contributor

agibson-godaddy commented Aug 29, 2024

When I have both authorizenet and memberships activated at the same time, I get this error:

[29-Aug-2024 11:06:33 UTC] PHP Warning: Cannot declare class \SkyVerge\WooCommerce\PluginFramework\v5_14_0\Country_Helper, because the name is already in use in /wp-content/plugins/woocommerce-gateway-authorize-net-cim/vendor/skyverge/wc-plugin-framework/woocommerce/class-sv-wc-plugin.php on line 465
[29-Aug-2024 11:06:33 UTC] PHP Warning: Cannot declare class \SkyVerge\WooCommerce\PluginFramework\v5_14_0\PaymentFormContextChecker, because the name is already in use in /wp-content/plugins/woocommerce-gateway-authorize-net-cim/vendor/skyverge/wc-plugin-framework/woocommerce/class-sv-wc-plugin.php on line 470

EDIT: fixed 68da0a5

Copy link
Contributor

@agibson-godaddy agibson-godaddy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent work @nmolham-godaddy ! I've done QA with both plugins separately, and with them activated at the same time. I believe everything is working as expected.

Not merging just so you can have a chance to look at my changes above. But I think we can go ahead and merge this.

@agibson-godaddy agibson-godaddy mentioned this pull request Aug 29, 2024
3 tasks
@nmolham-godaddy
Copy link
Contributor Author

Cool, thanks @agibson-godaddy for doing the QA and catching this bug caused by the class aliases, I definitlly didn't count for that one.

@nmolham-godaddy nmolham-godaddy merged commit 42da0a9 into release/5.14.0 Aug 30, 2024
5 checks passed
@nmolham-godaddy nmolham-godaddy deleted the chore/setup-autoloading branch August 30, 2024 02:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants