Updates to 7.2.1

This commit is contained in:
WooCommerce
2025-02-14 10:15:12 +00:00
parent 1d59fa1a59
commit 147748f6c7
150 changed files with 1476 additions and 949 deletions

1
.nvmrc Normal file
View File

@@ -0,0 +1 @@
20.11

View File

@@ -1,5 +1,24 @@
*** WooCommerce Subscriptions Changelog *** *** WooCommerce Subscriptions Changelog ***
2025-02-13 - version 7.2.1
* Fix: Revert a change released in 7.2.0 which triggered the "woocommerce_cart_item_name" filter with the wrong number of parameters.
* Dev: Update subscriptions-core to 8.0.1.
2025-02-13 - version 7.2.0
* Fix: In the system status report, show correct icon in the Cache Update Failures section when the total failures is 0.
* Fix: Recommend WooPayments when there is no available payment gateway.
* Fix: Safeguards added to the Subscriptions Totals template used in the My Account area, to guard against fatal errors that could arise in unusual conditions.
* Fix: Correctly load product names with HTML on the cart and checkout shipping rates.
* Fix: Improve our admin notice handling to ensure notices are displayed to the intended admin user.
* Fix: Improve protections around the pending renewal order-creation process, to prevent uncaught exceptions and other errors from breaking the subscription editor.
* Fix: Prevent unnecessary subscription object lookups on non-subscription admin pages when global $post is set.
* Fix: After enabling the Customer Notification feature or changing the reminder timing setting, ensure notifications are correctly scheduled for all subscriptions with pending cancellation status.
* Update: Improve performance of displaying recurring coupon limits in the admin coupon list table by optimizing coupon object retrieval.
* Update: Display the subscription items table in all customer notification emails.
* Update: Subscription notes for unsent customer notification emails now only occurs if WCS_DEBUG is enabled.
* Dev: Introduces a new `woocommerce_subscription_valid_customer_notification_types` filter to modify which notification types are scheduled in Action Scheduler.
* Dev: Update subscriptions-core to 8.0.0.
2025-01-10 - version 7.1.0 2025-01-10 - version 7.1.0
* Add: Compatibility with WooCommerce's new preview email feature introduced in 9.6. * Add: Compatibility with WooCommerce's new preview email feature introduced in 9.6.
* Fix: Prevents PHP fatal error when wcs_can_user_renew_early() is called with a non-existent subscription ID. * Fix: Prevents PHP fatal error when wcs_can_user_renew_early() is called with a non-existent subscription ID.

View File

@@ -321,7 +321,7 @@ class WCS_Report_Cache_Manager {
'label' => 'Cache Update Failures', 'label' => 'Cache Update Failures',
/* translators: %d refers to the number of times we have detected cache update failures */ /* translators: %d refers to the number of times we have detected cache update failures */
'note' => sprintf( _n( '%d failures', '%d failure', $failures, 'woocommerce-subscriptions' ), $failures ), 'note' => sprintf( _n( '%d failures', '%d failure', $failures, 'woocommerce-subscriptions' ), $failures ),
'success' => 0 === $failures, 'success' => 0 === (int)$failures,
), ),
); );

View File

@@ -473,7 +473,8 @@ class WCS_Report_Subscription_Events_By_Date extends WC_Admin_Report {
// Remove this class from the list of classes WC updates on shutdown. Introduced in WC 3.7 // Remove this class from the list of classes WC updates on shutdown. Introduced in WC 3.7
if ( ! wcs_is_woocommerce_pre( '3.7' ) ) { if ( ! wcs_is_woocommerce_pre( '3.7' ) ) {
unset( WC_Admin_Report::$transients_to_update[ strtolower( get_class( $this ) ) ] ); $class_name = strtolower( get_class( $this ) );
unset( WC_Admin_Report::$transients_to_update[ $class_name ] );
} }
} }
} }

View File

@@ -77,28 +77,33 @@ class WCS_Limited_Recurring_Coupon_Manager {
* Get the number of renewals for a limited coupon. * Get the number of renewals for a limited coupon.
* *
* @since 4.0.0 * @since 4.0.0
* @param string $code The coupon code. * @param string|WC_Coupon $coupon The coupon or coupon code.
* @return false|int False for non-recurring coupons, or the limit number for recurring coupons. * @return false|int False for non-recurring coupons, or the limit number for recurring coupons.
* A value of 0 is for unlimited usage. * A value of 0 is for unlimited usage.
*/ */
public static function get_coupon_limit( $code ) { public static function get_coupon_limit( $coupon ) {
if ( wcs_is_woocommerce_pre( '3.2' ) ) { // If we have a coupon code, attempt to get the coupon object.
if ( is_string( $coupon ) ) {
$coupon = new WC_Coupon( $coupon );
}
if ( ! $coupon instanceof WC_Coupon ) {
return false; return false;
} }
// Retrieve the coupon data.
$coupon = new WC_Coupon( $code );
$coupon_type = $coupon->get_discount_type(); $coupon_type = $coupon->get_discount_type();
// If we have a virtual coupon, attempt to get the original coupon. // If we have a virtual coupon, attempt to get the original coupon.
if ( WC_Subscriptions_Coupon::is_renewal_cart_coupon( $coupon_type ) ) { if ( WC_Subscriptions_Coupon::is_renewal_cart_coupon( $coupon_type ) ) {
$coupon = WC_Subscriptions_Coupon::map_virtual_coupon( $code ); $coupon = WC_Subscriptions_Coupon::map_virtual_coupon( $coupon->get_code() );
$coupon_type = $coupon->get_discount_type(); $coupon_type = $coupon->get_discount_type();
} }
$limited = $coupon->get_meta( self::$coupons_renewals ); if ( ! WC_Subscriptions_Coupon::is_recurring_coupon( $coupon_type ) ) {
return false;
}
return WC_Subscriptions_Coupon::is_recurring_coupon( $coupon_type ) ? intval( $limited ) : false; return intval( $coupon->get_meta( self::$coupons_renewals ) );
} }
/** /**
@@ -266,11 +271,16 @@ class WCS_Limited_Recurring_Coupon_Manager {
* @param int $id The coupon ID. * @param int $id The coupon ID.
*/ */
public static function add_limit_to_list_table( $column_name, $id ) { public static function add_limit_to_list_table( $column_name, $id ) {
global $the_coupon;
if ( 'usage' !== $column_name ) { if ( 'usage' !== $column_name ) {
return; return;
} }
$limit = self::get_coupon_limit( wc_get_coupon_code_by_id( $id ) ); // Confirm the global coupon object is the one we're looking for, otherwise fetch it.
$coupon = empty( $the_coupon ) || $the_coupon->get_id() !== $id ? new WC_Coupon( $id ) : $the_coupon;
$limit = self::get_coupon_limit( $coupon );
if ( false === $limit ) { if ( false === $limit ) {
return; return;
} }

View File

@@ -2,14 +2,14 @@
# This file is distributed under the same license as the WooCommerce Subscriptions plugin. # This file is distributed under the same license as the WooCommerce Subscriptions plugin.
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: WooCommerce Subscriptions 7.1.0\n" "Project-Id-Version: WooCommerce Subscriptions 7.2.1\n"
"Report-Msgid-Bugs-To: https://woocommerce.com/contact-us\n" "Report-Msgid-Bugs-To: https://woocommerce.com/contact-us\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"POT-Creation-Date: 2025-01-10T00:50:30+00:00\n" "POT-Creation-Date: 2025-02-13T11:09:03+00:00\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"X-Generator: WP-CLI 2.11.0\n" "X-Generator: WP-CLI 2.11.0\n"
"X-Domain: woocommerce-subscriptions\n" "X-Domain: woocommerce-subscriptions\n"
@@ -48,7 +48,7 @@ msgid "Subscription reports are incompatible with the %1$sWooCommerce data stora
msgstr "" msgstr ""
#: includes/admin/class-wcs-admin-reports.php:81 #: includes/admin/class-wcs-admin-reports.php:81
#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:922 #: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:923
#: includes/api/class-wc-rest-subscriptions-settings.php:29 #: includes/api/class-wc-rest-subscriptions-settings.php:29
#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1028 #: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1028
#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1180 #: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1180
@@ -321,148 +321,148 @@ msgid "subscriptions"
msgstr "" msgstr ""
#. translators: %s: formatted total amount. #. translators: %s: formatted total amount.
#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:493 #: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:494
msgid "%s signup revenue in this period" msgid "%s signup revenue in this period"
msgstr "" msgstr ""
#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:494 #: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:495
msgid "The sum of all subscription parent orders, including other items, fees, tax and shipping." msgid "The sum of all subscription parent orders, including other items, fees, tax and shipping."
msgstr "" msgstr ""
#. translators: %s: formatted total amount. #. translators: %s: formatted total amount.
#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:501 #: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:502
msgid "%s renewal revenue in this period" msgid "%s renewal revenue in this period"
msgstr "" msgstr ""
#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:502 #: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:503
msgid "The sum of all renewal orders including tax and shipping." msgid "The sum of all renewal orders including tax and shipping."
msgstr "" msgstr ""
#. translators: %s: formatted total amount. #. translators: %s: formatted total amount.
#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:509 #: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:510
msgid "%s resubscribe revenue in this period" msgid "%s resubscribe revenue in this period"
msgstr "" msgstr ""
#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:510 #: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:511
msgid "The sum of all resubscribe orders including tax and shipping." msgid "The sum of all resubscribe orders including tax and shipping."
msgstr "" msgstr ""
#. translators: %s: formatted total amount. #. translators: %s: formatted total amount.
#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:517 #: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:518
msgid "%s switch revenue in this period" msgid "%s switch revenue in this period"
msgstr "" msgstr ""
#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:518 #: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:519
msgid "The sum of all switch orders including tax and shipping." msgid "The sum of all switch orders including tax and shipping."
msgstr "" msgstr ""
#. translators: 2: link opening tag, 1: subscription count and closing tag. #. translators: 2: link opening tag, 1: subscription count and closing tag.
#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:526 #: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:527
msgid "%2$s %1$s new subscriptions" msgid "%2$s %1$s new subscriptions"
msgstr "" msgstr ""
#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:540 #: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:541
msgid "The number of subscriptions created during this period, either by being manually created, imported or a customer placing an order. This includes orders pending payment." msgid "The number of subscriptions created during this period, either by being manually created, imported or a customer placing an order. This includes orders pending payment."
msgstr "" msgstr ""
#. translators: 2: link opening tag, 1: subscription count and closing tag. #. translators: 2: link opening tag, 1: subscription count and closing tag.
#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:548 #: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:549
msgid "%2$s %1$s subscription signups" msgid "%2$s %1$s subscription signups"
msgstr "" msgstr ""
#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:562 #: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:563
msgid "The number of subscriptions purchased in parent orders created during this period. This represents the new subscriptions created by customers placing an order via checkout." msgid "The number of subscriptions purchased in parent orders created during this period. This represents the new subscriptions created by customers placing an order via checkout."
msgstr "" msgstr ""
#. translators: 2: link opening tag, 1: subscription count and closing tag. #. translators: 2: link opening tag, 1: subscription count and closing tag.
#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:570 #: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:571
msgid "%2$s %1$s subscription resubscribes" msgid "%2$s %1$s subscription resubscribes"
msgstr "" msgstr ""
#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:584 #: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:585
msgid "The number of resubscribe orders processed during this period." msgid "The number of resubscribe orders processed during this period."
msgstr "" msgstr ""
#. translators: 2: link opening tag, 1: subscription count and closing tag. #. translators: 2: link opening tag, 1: subscription count and closing tag.
#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:592 #: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:593
msgid "%2$s %1$s subscription renewals" msgid "%2$s %1$s subscription renewals"
msgstr "" msgstr ""
#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:606 #: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:607
msgid "The number of renewal orders processed during this period." msgid "The number of renewal orders processed during this period."
msgstr "" msgstr ""
#. translators: 2: link opening tag, 1: subscription count and closing tag. #. translators: 2: link opening tag, 1: subscription count and closing tag.
#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:614 #: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:615
msgid "%2$s %1$s subscription switches" msgid "%2$s %1$s subscription switches"
msgstr "" msgstr ""
#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:628 #: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:629
msgid "The number of subscriptions upgraded, downgraded or cross-graded during this period." msgid "The number of subscriptions upgraded, downgraded or cross-graded during this period."
msgstr "" msgstr ""
#. translators: 2: link opening tag, 1: subscription count and closing tag. #. translators: 2: link opening tag, 1: subscription count and closing tag.
#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:636 #: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:637
msgid "%2$s %1$s subscription cancellations" msgid "%2$s %1$s subscription cancellations"
msgstr "" msgstr ""
#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:650 #: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:651
msgid "The number of subscriptions cancelled by the customer or store manager during this period. The pre-paid term may not yet have ended during this period." msgid "The number of subscriptions cancelled by the customer or store manager during this period. The pre-paid term may not yet have ended during this period."
msgstr "" msgstr ""
#. translators: 2: link opening tag, 1: subscription count and closing tag. #. translators: 2: link opening tag, 1: subscription count and closing tag.
#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:658 #: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:659
msgid "%2$s %1$s ended subscriptions" msgid "%2$s %1$s ended subscriptions"
msgstr "" msgstr ""
#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:672 #: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:673
msgid "The number of subscriptions which have either expired or reached the end of the prepaid term if it was previously cancelled." msgid "The number of subscriptions which have either expired or reached the end of the prepaid term if it was previously cancelled."
msgstr "" msgstr ""
#. translators: 2: link opening tag, 1: subscription count and closing tag. #. translators: 2: link opening tag, 1: subscription count and closing tag.
#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:683 #: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:684
msgid "%2$s %1$s current subscriptions" msgid "%2$s %1$s current subscriptions"
msgstr "" msgstr ""
#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:698 #: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:699
msgid "The number of subscriptions during this period with an end date in the future and a status other than pending." msgid "The number of subscriptions during this period with an end date in the future and a status other than pending."
msgstr "" msgstr ""
#. translators: %s: subscription net gain (with percentage). #. translators: %s: subscription net gain (with percentage).
#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:715 #: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:716
msgid "%s net subscription gain" msgid "%s net subscription gain"
msgstr "" msgstr ""
#. translators: %s: subscription net loss (with percentage). #. translators: %s: subscription net loss (with percentage).
#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:718 #: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:719
msgid "%s net subscription loss" msgid "%s net subscription loss"
msgstr "" msgstr ""
#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:723 #: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:724
msgid "Change in subscriptions between the start and end of the period." msgid "Change in subscriptions between the start and end of the period."
msgstr "" msgstr ""
#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:737 #: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:738
#: includes/admin/reports/class-wcs-report-subscription-payment-retry.php:159 #: includes/admin/reports/class-wcs-report-subscription-payment-retry.php:159
msgid "Year" msgid "Year"
msgstr "" msgstr ""
#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:738 #: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:739
#: includes/admin/reports/class-wcs-report-subscription-payment-retry.php:160 #: includes/admin/reports/class-wcs-report-subscription-payment-retry.php:160
msgid "Last Month" msgid "Last Month"
msgstr "" msgstr ""
#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:739 #: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:740
#: includes/admin/reports/class-wcs-report-subscription-payment-retry.php:161 #: includes/admin/reports/class-wcs-report-subscription-payment-retry.php:161
msgid "This Month" msgid "This Month"
msgstr "" msgstr ""
#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:740 #: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:741
#: includes/admin/reports/class-wcs-report-subscription-payment-retry.php:162 #: includes/admin/reports/class-wcs-report-subscription-payment-retry.php:162
msgid "Last 7 Days" msgid "Last 7 Days"
msgstr "" msgstr ""
#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:781 #: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:782
#: includes/admin/reports/class-wcs-report-subscription-payment-retry.php:195 #: includes/admin/reports/class-wcs-report-subscription-payment-retry.php:195
#: includes/admin/reports/class-wcs-report-upcoming-recurring-revenue.php:222 #: includes/admin/reports/class-wcs-report-upcoming-recurring-revenue.php:222
#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/views/html-related-orders-table.php:20 #: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/views/html-related-orders-table.php:20
@@ -471,53 +471,53 @@ msgstr ""
msgid "Date" msgid "Date"
msgstr "" msgstr ""
#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:785 #: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:786
#: includes/admin/reports/class-wcs-report-subscription-payment-retry.php:199 #: includes/admin/reports/class-wcs-report-subscription-payment-retry.php:199
#: includes/admin/reports/class-wcs-report-upcoming-recurring-revenue.php:226 #: includes/admin/reports/class-wcs-report-upcoming-recurring-revenue.php:226
msgid "Export CSV" msgid "Export CSV"
msgstr "" msgstr ""
#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:844 #: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:845
msgid "Switched subscriptions" msgid "Switched subscriptions"
msgstr "" msgstr ""
#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:860 #: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:861
msgid "New Subscriptions" msgid "New Subscriptions"
msgstr "" msgstr ""
#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:876 #: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:877
msgid "Subscriptions signups" msgid "Subscriptions signups"
msgstr "" msgstr ""
#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:891 #: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:892
msgid "Number of resubscribes" msgid "Number of resubscribes"
msgstr "" msgstr ""
#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:906 #: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:907
msgid "Number of renewals" msgid "Number of renewals"
msgstr "" msgstr ""
#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:938 #: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:939
msgid "Subscriptions Ended" msgid "Subscriptions Ended"
msgstr "" msgstr ""
#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:954 #: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:955
msgid "Cancellations" msgid "Cancellations"
msgstr "" msgstr ""
#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:969 #: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:970
msgid "Signup Totals" msgid "Signup Totals"
msgstr "" msgstr ""
#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:989 #: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:990
msgid "Resubscribe Totals" msgid "Resubscribe Totals"
msgstr "" msgstr ""
#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:1009 #: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:1010
msgid "Renewal Totals" msgid "Renewal Totals"
msgstr "" msgstr ""
#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:1029 #: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:1030
msgid "Switch Totals" msgid "Switch Totals"
msgstr "" msgstr ""
@@ -1168,24 +1168,24 @@ msgid "Coupon will be limited to the given number of payments. It will then be a
msgstr "" msgstr ""
#. translators: %1$s is the coupon code, %2$d is the number of payment usages #. translators: %1$s is the coupon code, %2$d is the number of payment usages
#: includes/class-wcs-limited-recurring-coupon-manager.php:247 #: includes/class-wcs-limited-recurring-coupon-manager.php:252
msgid "Limited use coupon \"%1$s\" removed from subscription. It has been used %2$d time." msgid "Limited use coupon \"%1$s\" removed from subscription. It has been used %2$d time."
msgid_plural "Limited use coupon \"%1$s\" removed from subscription. It has been used %2$d times." msgid_plural "Limited use coupon \"%1$s\" removed from subscription. It has been used %2$d times."
msgstr[0] "" msgstr[0] ""
msgstr[1] "" msgstr[1] ""
#. translators: %d refers to the number of payments the coupon can be used for. #. translators: %d refers to the number of payments the coupon can be used for.
#: includes/class-wcs-limited-recurring-coupon-manager.php:282 #: includes/class-wcs-limited-recurring-coupon-manager.php:292
msgid "Active for %d payment" msgid "Active for %d payment"
msgid_plural "Active for %d payments" msgid_plural "Active for %d payments"
msgstr[0] "" msgstr[0] ""
msgstr[1] "" msgstr[1] ""
#: includes/class-wcs-limited-recurring-coupon-manager.php:286 #: includes/class-wcs-limited-recurring-coupon-manager.php:296
msgid "Active for unlimited payments" msgid "Active for unlimited payments"
msgstr "" msgstr ""
#: includes/class-wcs-limited-recurring-coupon-manager.php:378 #: includes/class-wcs-limited-recurring-coupon-manager.php:388
#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-coupon.php:1148 #: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-coupon.php:1148
msgid "Sorry, it seems there are no available payment methods which support the recurring coupon you are using. Please contact us if you require assistance or wish to make alternate arrangements." msgid "Sorry, it seems there are no available payment methods which support the recurring coupon you are using. Please contact us if you require assistance or wish to make alternate arrangements."
msgstr "" msgstr ""
@@ -2285,7 +2285,7 @@ msgstr ""
#. translators: $1-2: opening and closing tags of a link that takes to Woo marketplace / Stripe product page #. translators: $1-2: opening and closing tags of a link that takes to Woo marketplace / Stripe product page
#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1896 #: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1896
msgid "No payment gateways capable of processing automatic subscription payments are enabled. If you would like to process automatic payments, we recommend the %1$sfree Stripe extension%2$s." msgid "No payment gateways capable of processing automatic subscription payments are enabled. If you would like to process automatic payments, we recommend %1$sWooPayments%2$s."
msgstr "" msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1903 #: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1903
@@ -2329,86 +2329,104 @@ msgstr ""
msgid "Related Orders" msgid "Related Orders"
msgstr "" msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:166 #: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:174
msgid "Please enter a start date in the past." msgid "Please enter a start date in the past."
msgstr "" msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:167 #: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:175
msgid "Please enter a date at least 2 minutes into the future." msgid "Please enter a date at least 2 minutes into the future."
msgstr "" msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:167 #: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:175
msgid "Please enter a date at least one hour into the future." msgid "Please enter a date at least one hour into the future."
msgstr "" msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:168 #: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:176
msgid "Please enter a date after the trial end." msgid "Please enter a date after the trial end."
msgstr "" msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:169 #: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:177
#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:170 #: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:178
msgid "Please enter a date after the start date." msgid "Please enter a date after the start date."
msgstr "" msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:171 #: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:179
msgid "Please enter a date before the next payment." msgid "Please enter a date before the next payment."
msgstr "" msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:172 #: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:180
msgid "Please enter a date after the next payment." msgid "Please enter a date after the next payment."
msgstr "" msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:173 #: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:181
msgid "" msgid ""
"Are you sure you want to process a renewal?\n" "Are you sure you want to process a renewal?\n"
"\n" "\n"
"This will charge the customer and email them the renewal order (if emails are enabled)." "This will charge the customer and email them the renewal order (if emails are enabled)."
msgstr "" msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:189 #: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:197
msgid "" msgid ""
"Are you sure you want to retry payment for this renewal order?\n" "Are you sure you want to retry payment for this renewal order?\n"
"\n" "\n"
"This will attempt to charge the customer and send renewal order emails (if emails are enabled)." "This will attempt to charge the customer and send renewal order emails (if emails are enabled)."
msgstr "" msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:220 #: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:228
msgid "Process renewal" msgid "Process renewal"
msgstr "" msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:224 #: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:232
msgid "Create pending renewal order" msgid "Create pending renewal order"
msgstr "" msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:226 #: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:234
msgid "Create pending parent order" msgid "Create pending parent order"
msgstr "" msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:230 #: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:238
msgid "Retry Renewal Payment" msgid "Retry Renewal Payment"
msgstr "" msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:243 #: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:251
msgid "Process renewal order action requested by admin." msgid "Process renewal order action requested by admin."
msgstr "" msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:254 #: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:261
msgid "Create pending renewal order requested by admin action." msgid "Create pending renewal order requested by admin action."
msgstr "" msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:296 #: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:267
msgid "Pending renewal order was not created, as it was not possible to update the subscription status."
msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:279
msgid "Creation of the pending renewal order failed."
msgstr ""
#. Translators: %1$s opening link tag, %2$s closing link tag.
#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:300
msgid "A pending %1$srenewal order%2$s was successfully created!"
msgstr ""
#. Translators: %1$s opening link tag, %2$s closing link tag.
#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:312
msgid "A %1$spending renewal order%2$s was successfully created, but there was a problem setting the payment method. Please review the order."
msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:348
msgid "Create pending parent order requested by admin action." msgid "Create pending parent order requested by admin action."
msgstr "" msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:327 #: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:379
msgid "Retry renewal payment action requested by admin." msgid "Retry renewal payment action requested by admin."
msgstr "" msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:423 #: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:475
msgid "This order contains line items with prices above the current product price. To override the product's live price when the customer pays for this order, lock in the manual price increases." msgid "This order contains line items with prices above the current product price. To override the product's live price when the customer pays for this order, lock in the manual price increases."
msgstr "" msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:427 #: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:479
msgid "Lock manual price increases" msgid "Lock manual price increases"
msgstr "" msgstr ""
@@ -2571,7 +2589,7 @@ msgstr[1] ""
#. translators: placeholder is the display name of a payment gateway a subscription was paid by #. translators: placeholder is the display name of a payment gateway a subscription was paid by
#. translators: %s: payment method. #. translators: %s: payment method.
#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:652 #: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:652
#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2168 #: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2217
msgid "Via %s" msgid "Via %s"
msgstr "" msgstr ""
@@ -2639,7 +2657,7 @@ msgid "None"
msgstr "" msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1174 #: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1174
#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2150 #: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2199
#: vendor/woocommerce/subscriptions-core/includes/class-wcs-change-payment-method-admin.php:170 #: vendor/woocommerce/subscriptions-core/includes/class-wcs-change-payment-method-admin.php:170
msgid "Manual Renewal" msgid "Manual Renewal"
msgstr "" msgstr ""
@@ -2794,7 +2812,7 @@ msgid "Edit Subscription"
msgstr "" msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/admin/debug-tools/class-wcs-notifications-debug-tool-processor.php:274 #: vendor/woocommerce/subscriptions-core/includes/admin/debug-tools/class-wcs-notifications-debug-tool-processor.php:274
#: vendor/woocommerce/subscriptions-core/includes/class-wcs-notifications-batch-processor.php:253 #: vendor/woocommerce/subscriptions-core/includes/class-wcs-notifications-batch-processor.php:254
msgid "Background process for updating subscription notifications already started, nothing done." msgid "Background process for updating subscription notifications already started, nothing done."
msgstr "" msgstr ""
@@ -2803,7 +2821,7 @@ msgid "Background process for updating subscription notifications started"
msgstr "" msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/admin/debug-tools/class-wcs-notifications-debug-tool-processor.php:290 #: vendor/woocommerce/subscriptions-core/includes/admin/debug-tools/class-wcs-notifications-debug-tool-processor.php:290
#: vendor/woocommerce/subscriptions-core/includes/class-wcs-notifications-batch-processor.php:268 #: vendor/woocommerce/subscriptions-core/includes/class-wcs-notifications-batch-processor.php:269
msgid "Background process for updating subscription notifications not started, nothing done." msgid "Background process for updating subscription notifications not started, nothing done."
msgstr "" msgstr ""
@@ -3122,75 +3140,75 @@ msgstr ""
#. translators: %d: subscription ID. #. translators: %d: subscription ID.
#. translators: %d: order ID. #. translators: %d: order ID.
#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:1457 #: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:1457
#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2591 #: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2640
msgid "Subscription #%d: " msgid "Subscription #%d: "
msgstr "" msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:1871 #: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:1920
msgid "Payment status marked complete." msgid "Payment status marked complete."
msgstr "" msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:1913 #: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:1962
msgid "Payment failed." msgid "Payment failed."
msgstr "" msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:1918 #: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:1967
msgid "Subscription Cancelled: maximum number of failed payments reached." msgid "Subscription Cancelled: maximum number of failed payments reached."
msgstr "" msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2032 #: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2081
msgid "The \"all\" value for $order_type parameter is deprecated. It was a misnomer, as it did not return resubscribe orders. It was also inconsistent with order type values accepted by wcs_get_subscription_orders(). Use array( \"parent\", \"renewal\", \"switch\" ) to maintain previous behaviour, or \"any\" to receive all order types, including switch and resubscribe." msgid "The \"all\" value for $order_type parameter is deprecated. It was a misnomer, as it did not return resubscribe orders. It was also inconsistent with order type values accepted by wcs_get_subscription_orders(). Use array( \"parent\", \"renewal\", \"switch\" ) to maintain previous behaviour, or \"any\" to receive all order types, including switch and resubscribe."
msgstr "" msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2247 #: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2296
#: vendor/woocommerce/subscriptions-core/wcs-functions.php:853 #: vendor/woocommerce/subscriptions-core/wcs-functions.php:853
msgid "Payment method meta must be an array." msgid "Payment method meta must be an array."
msgstr "" msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2483 #: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2532
msgid "Invalid format. First parameter needs to be an array." msgid "Invalid format. First parameter needs to be an array."
msgstr "" msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2487 #: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2536
msgid "Invalid data. First parameter was empty when passed to update_dates()." msgid "Invalid data. First parameter was empty when passed to update_dates()."
msgstr "" msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2494 #: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2543
msgid "Invalid data. First parameter has a date that is not in the registered date types." msgid "Invalid data. First parameter has a date that is not in the registered date types."
msgstr "" msgstr ""
#. translators: placeholder is date type (e.g. "end", "next_payment"...) #. translators: placeholder is date type (e.g. "end", "next_payment"...)
#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2521 #: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2570
msgctxt "appears in an error message if date is wrong format" msgctxt "appears in an error message if date is wrong format"
msgid "Invalid %s date. The date must be of the format: \"Y-m-d H:i:s\"." msgid "Invalid %s date. The date must be of the format: \"Y-m-d H:i:s\"."
msgstr "" msgstr ""
#. translators: %s: date type (e.g. "end"). #. translators: %s: date type (e.g. "end").
#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2559 #: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2608
msgid "The %s date must occur after the cancellation date." msgid "The %s date must occur after the cancellation date."
msgstr "" msgstr ""
#. translators: %s: date type (e.g. "end"). #. translators: %s: date type (e.g. "end").
#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2565 #: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2614
msgid "The %s date must occur after the last payment date." msgid "The %s date must occur after the last payment date."
msgstr "" msgstr ""
#. translators: %s: date type (e.g. "end"). #. translators: %s: date type (e.g. "end").
#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2570 #: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2619
msgid "The %s date must occur after the next payment date." msgid "The %s date must occur after the next payment date."
msgstr "" msgstr ""
#. translators: %s: date type (e.g. "end"). #. translators: %s: date type (e.g. "end").
#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2576 #: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2625
msgid "The %s date must occur after the trial end date." msgid "The %s date must occur after the trial end date."
msgstr "" msgstr ""
#. translators: %s: date type (e.g. "next_payment"). #. translators: %s: date type (e.g. "next_payment").
#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2581 #: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2630
msgid "The %s date must occur after the start date." msgid "The %s date must occur after the start date."
msgstr "" msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2611 #: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2660
#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-checkout.php:348 #: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-checkout.php:348
msgid "Backordered" msgid "Backordered"
msgstr "" msgstr ""
@@ -4033,53 +4051,53 @@ msgid "Payment completed on order after subscription was cancelled."
msgstr "" msgstr ""
#. translators: $1: opening link tag, $2: order number, $3: closing link tag #. translators: $1: opening link tag, $2: order number, $3: closing link tag
#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:1111 #: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:1112
msgid "Subscription cancelled for refunded order %1$s#%2$s%3$s." msgid "Subscription cancelled for refunded order %1$s#%2$s%3$s."
msgstr "" msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:2407
msgctxt "An order type"
msgid "Original"
msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:2408 #: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:2408
msgctxt "An order type" msgctxt "An order type"
msgid "Subscription Parent" msgid "Original"
msgstr "" msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:2409 #: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:2409
msgctxt "An order type" msgctxt "An order type"
msgid "Subscription Renewal" msgid "Subscription Parent"
msgstr "" msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:2410 #: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:2410
msgctxt "An order type" msgctxt "An order type"
msgid "Subscription Resubscribe" msgid "Subscription Renewal"
msgstr "" msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:2411 #: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:2411
msgctxt "An order type" msgctxt "An order type"
msgid "Subscription Switch" msgid "Subscription Resubscribe"
msgstr "" msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:2412 #: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:2412
msgctxt "An order type" msgctxt "An order type"
msgid "Subscription Switch"
msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:2413
msgctxt "An order type"
msgid "Non-subscription" msgid "Non-subscription"
msgstr "" msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:2421 #: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:2422
msgid "All orders types" msgid "All orders types"
msgstr "" msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:2448 #: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:2449
msgid "Renewal Order" msgid "Renewal Order"
msgstr "" msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:2450 #: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:2451
msgid "Resubscribe Order" msgid "Resubscribe Order"
msgstr "" msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:2452 #: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:2453
msgid "Parent Order" msgid "Parent Order"
msgstr "" msgstr ""
@@ -4474,11 +4492,11 @@ msgstr ""
msgid "That payment method cannot be deleted because it is linked to an automatic subscription. Please choose a %1$sdefault%2$s payment method%3$s, before trying again." msgid "That payment method cannot be deleted because it is linked to an automatic subscription. Please choose a %1$sdefault%2$s payment method%3$s, before trying again."
msgstr "" msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/class-wcs-notifications-batch-processor.php:257 #: vendor/woocommerce/subscriptions-core/includes/class-wcs-notifications-batch-processor.php:258
msgid "Background process for updating subscription notifications started." msgid "Background process for updating subscription notifications started."
msgstr "" msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/class-wcs-notifications-batch-processor.php:272 #: vendor/woocommerce/subscriptions-core/includes/class-wcs-notifications-batch-processor.php:273
msgid "Background process for updating subscription notifications stopped." msgid "Background process for updating subscription notifications stopped."
msgstr "" msgstr ""
@@ -5029,24 +5047,24 @@ msgstr ""
msgid "Thank you for choosing {site_title}!" msgid "Thank you for choosing {site_title}!"
msgstr "" msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/emails/class-wcs-email-customer-notification.php:273 #: vendor/woocommerce/subscriptions-core/includes/emails/class-wcs-email-customer-notification.php:271
msgid "Reminder emails disabled." msgid "Reminder emails disabled."
msgstr "" msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/emails/class-wcs-email-customer-notification.php:276 #: vendor/woocommerce/subscriptions-core/includes/emails/class-wcs-email-customer-notification.php:277
msgid "Not a production site" msgid "Not a production site, or notifications have been globally disabled"
msgstr "" msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/emails/class-wcs-email-customer-notification.php:280 #: vendor/woocommerce/subscriptions-core/includes/emails/class-wcs-email-customer-notification.php:281
msgid "Recipient not found" msgid "Recipient not found"
msgstr "" msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/emails/class-wcs-email-customer-notification.php:284 #: vendor/woocommerce/subscriptions-core/includes/emails/class-wcs-email-customer-notification.php:285
msgid "Subscription billing cycle too short" msgid "Subscription billing cycle too short"
msgstr "" msgstr ""
#. translators: %1$s: email title, %2$s: list of reasons why email was skipped. #. translators: %1$s: email title, %2$s: list of reasons why email was skipped.
#: vendor/woocommerce/subscriptions-core/includes/emails/class-wcs-email-customer-notification.php:290 #: vendor/woocommerce/subscriptions-core/includes/emails/class-wcs-email-customer-notification.php:304
msgid "Skipped sending \"%1$s\": %2$s" msgid "Skipped sending \"%1$s\": %2$s"
msgstr "" msgstr ""
@@ -5585,56 +5603,56 @@ msgstr ""
msgid "Customers with a subscription are excluded from this setting." msgid "Customers with a subscription are excluded from this setting."
msgstr "" msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:184 #: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:189
msgid "A database upgrade is required to use Subscriptions. Upgrades from the previously installed version is no longer supported. You will need to install an older version of WooCommerce Subscriptions or WooCommerce Payments to proceed with the upgrade before you can use a newer version." msgid "A database upgrade is required to use Subscriptions. Upgrades from the previously installed version is no longer supported. You will need to install an older version of WooCommerce Subscriptions or WooCommerce Payments to proceed with the upgrade before you can use a newer version."
msgstr "" msgstr ""
#. translators: 1-2: opening/closing <strong> tags, 3: active version of Subscriptions, 4: current version of Subscriptions, 5-6: opening/closing tags linked to ticket form, 7-8: opening/closing tags linked to documentation. #. translators: 1-2: opening/closing <strong> tags, 3: active version of Subscriptions, 4: current version of Subscriptions, 5-6: opening/closing tags linked to ticket form, 7-8: opening/closing tags linked to documentation.
#: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:246 #: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:251
msgid "%1$sWarning!%2$s It appears that you have downgraded %1$sWooCommerce Subscriptions%2$s from %3$s to %4$s. Downgrading the plugin in this way may cause issues. Please update to %3$s or higher, or %5$sopen a new support ticket%6$s for further assistance. %7$sLearn more &raquo;%8$s" msgid "%1$sWarning!%2$s It appears that you have downgraded %1$sWooCommerce Subscriptions%2$s from %3$s to %4$s. Downgrading the plugin in this way may cause issues. Please update to %3$s or higher, or %5$sopen a new support ticket%6$s for further assistance. %7$sLearn more &raquo;%8$s"
msgstr "" msgstr ""
#. translators: placeholder is a list of version numbers (e.g. "1.3 & 1.4 & 1.5") #. translators: placeholder is a list of version numbers (e.g. "1.3 & 1.4 & 1.5")
#: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:385 #: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:390
msgid "Database updated to version %s" msgid "Database updated to version %s"
msgstr "" msgstr ""
#. translators: placeholder is number of upgraded subscriptions #. translators: placeholder is number of upgraded subscriptions
#: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:393 #: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:398
msgctxt "used in the subscriptions upgrader" msgctxt "used in the subscriptions upgrader"
msgid "Marked %s subscription products as \"sold individually\"." msgid "Marked %s subscription products as \"sold individually\"."
msgstr "" msgstr ""
#. translators: 1$: number of action scheduler hooks upgraded, 2$: "{execution_time}", will be replaced on front end with actual time #. translators: 1$: number of action scheduler hooks upgraded, 2$: "{execution_time}", will be replaced on front end with actual time
#: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:402 #: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:407
msgid "Migrated %1$s subscription related hooks to the new scheduler (in %2$s seconds)." msgid "Migrated %1$s subscription related hooks to the new scheduler (in %2$s seconds)."
msgstr "" msgstr ""
#. translators: 1$: number of subscriptions upgraded, 2$: "{execution_time}", will be replaced on front end with actual time it took #. translators: 1$: number of subscriptions upgraded, 2$: "{execution_time}", will be replaced on front end with actual time it took
#: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:414 #: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:419
msgid "Migrated %1$s subscriptions to the new structure (in %2$s seconds)." msgid "Migrated %1$s subscriptions to the new structure (in %2$s seconds)."
msgstr "" msgstr ""
#. translators: placeholder is "{time_left}", will be replaced on front end with actual time #. translators: placeholder is "{time_left}", will be replaced on front end with actual time
#: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:417 #: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:422
#: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:463 #: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:468
msgctxt "Message that gets sent to front end." msgctxt "Message that gets sent to front end."
msgid "Estimated time left (minutes:seconds): %s" msgid "Estimated time left (minutes:seconds): %s"
msgstr "" msgstr ""
#. translators: 1$: error message, 2$: opening link tag, 3$: closing link tag, 4$: break tag #. translators: 1$: error message, 2$: opening link tag, 3$: closing link tag, 4$: break tag
#: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:427 #: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:432
msgid "Unable to upgrade subscriptions.%4$sError: %1$s%4$sPlease refresh the page and try again. If problem persists, %2$scontact support%3$s." msgid "Unable to upgrade subscriptions.%4$sError: %1$s%4$sPlease refresh the page and try again. If problem persists, %2$scontact support%3$s."
msgstr "" msgstr ""
#. translators: placeholder is the number of subscriptions repaired #. translators: placeholder is the number of subscriptions repaired
#: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:442 #: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:447
msgctxt "Repair message that gets sent to front end." msgctxt "Repair message that gets sent to front end."
msgid "Repaired %d subscriptions with incorrect dates, line tax data or missing customer notes." msgid "Repaired %d subscriptions with incorrect dates, line tax data or missing customer notes."
msgstr "" msgstr ""
#. translators: placeholder is number of subscriptions that were checked and did not need repairs. There's a space at the beginning! #. translators: placeholder is number of subscriptions that were checked and did not need repairs. There's a space at the beginning!
#: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:448 #: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:453
msgctxt "Repair message that gets sent to front end." msgctxt "Repair message that gets sent to front end."
msgid " %d other subscription was checked and did not need any repairs." msgid " %d other subscription was checked and did not need any repairs."
msgid_plural "%d other subscriptions were checked and did not need any repairs." msgid_plural "%d other subscriptions were checked and did not need any repairs."
@@ -5642,33 +5660,33 @@ msgstr[0] ""
msgstr[1] "" msgstr[1] ""
#. translators: placeholder is "{execution_time}", which will be replaced on front end with actual time #. translators: placeholder is "{execution_time}", which will be replaced on front end with actual time
#: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:452 #: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:457
msgctxt "Repair message that gets sent to front end." msgctxt "Repair message that gets sent to front end."
msgid "(in %s seconds)" msgid "(in %s seconds)"
msgstr "" msgstr ""
#. translators: $1: "Repaired x subs with incorrect dates...", $2: "X others were checked and no repair needed", $3: "(in X seconds)". Ordering for RTL languages. #. translators: $1: "Repaired x subs with incorrect dates...", $2: "X others were checked and no repair needed", $3: "(in X seconds)". Ordering for RTL languages.
#: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:455 #: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:460
msgctxt "The assembled repair message that gets sent to front end." msgctxt "The assembled repair message that gets sent to front end."
msgid "%1$s%2$s %3$s" msgid "%1$s%2$s %3$s"
msgstr "" msgstr ""
#. translators: 1$: error message, 2$: opening link tag, 3$: closing link tag, 4$: break tag #. translators: 1$: error message, 2$: opening link tag, 3$: closing link tag, 4$: break tag
#: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:474 #: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:479
msgctxt "Error message that gets sent to front end when upgrading Subscriptions" msgctxt "Error message that gets sent to front end when upgrading Subscriptions"
msgid "Unable to repair subscriptions.%4$sError: %1$s%4$sPlease refresh the page and try again. If problem persists, %2$scontact support%3$s." msgid "Unable to repair subscriptions.%4$sError: %1$s%4$sPlease refresh the page and try again. If problem persists, %2$scontact support%3$s."
msgstr "" msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:681 #: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:686
msgid "Welcome to WooCommerce Subscriptions 2.1" msgid "Welcome to WooCommerce Subscriptions 2.1"
msgstr "" msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:681 #: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:686
msgid "About WooCommerce Subscriptions" msgid "About WooCommerce Subscriptions"
msgstr "" msgstr ""
#. translators: 1-2: opening/closing <strong> tags, 3-4: opening/closing tags linked to ticket form. #. translators: 1-2: opening/closing <strong> tags, 3-4: opening/closing tags linked to ticket form.
#: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:915 #: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:920
msgid "%1$sWarning!%2$s We discovered an issue in %1$sWooCommerce Subscriptions 2.3.0 - 2.3.2%2$s that may cause your subscription renewal order and customer subscription caches to contain invalid data. For information about how to update the cached data, please %3$sopen a new support ticket%4$s." msgid "%1$sWarning!%2$s We discovered an issue in %1$sWooCommerce Subscriptions 2.3.0 - 2.3.2%2$s that may cause your subscription renewal order and customer subscription caches to contain invalid data. For information about how to update the cached data, please %3$sopen a new support ticket%4$s."
msgstr "" msgstr ""
@@ -6798,23 +6816,12 @@ msgstr ""
msgid "Your subscription will <strong>automatically renew</strong> in %1$s — thats <strong>%2$s</strong>." msgid "Your subscription will <strong>automatically renew</strong> in %1$s — thats <strong>%2$s</strong>."
msgstr "" msgstr ""
#: vendor/woocommerce/subscriptions-core/templates/emails/customer-notification-auto-renewal.php:51
#: vendor/woocommerce/subscriptions-core/templates/emails/customer-notification-auto-trial-ending.php:65
#: vendor/woocommerce/subscriptions-core/templates/emails/customer-notification-expiring-subscription.php:51
#: vendor/woocommerce/subscriptions-core/templates/emails/customer-notification-manual-renewal.php:92
#: vendor/woocommerce/subscriptions-core/templates/emails/plain/customer-notification-auto-renewal.php:40
#: vendor/woocommerce/subscriptions-core/templates/emails/plain/customer-notification-auto-trial-ending.php:46
#: vendor/woocommerce/subscriptions-core/templates/emails/plain/customer-notification-expiring-subscription.php:40
#: vendor/woocommerce/subscriptions-core/templates/emails/plain/customer-notification-manual-renewal.php:61
msgid "Here are the details:"
msgstr ""
#. translators: %s: link to subscription detail in the customer's dashboard. #. translators: %s: link to subscription detail in the customer's dashboard.
#: vendor/woocommerce/subscriptions-core/templates/emails/customer-notification-auto-renewal.php:67 #: vendor/woocommerce/subscriptions-core/templates/emails/customer-notification-auto-renewal.php:73
msgid "You can manage this subscription from your %s" msgid "You can manage this subscription from your %s"
msgstr "" msgstr ""
#: vendor/woocommerce/subscriptions-core/templates/emails/customer-notification-auto-renewal.php:68 #: vendor/woocommerce/subscriptions-core/templates/emails/customer-notification-auto-renewal.php:74
#: vendor/woocommerce/subscriptions-core/templates/emails/customer-notification-auto-trial-ending.php:56 #: vendor/woocommerce/subscriptions-core/templates/emails/customer-notification-auto-trial-ending.php:56
msgid "account dashboard" msgid "account dashboard"
msgstr "" msgstr ""
@@ -6991,7 +6998,7 @@ msgstr ""
msgid "Your subscription will automatically renew in %1$s — thats %2$s." msgid "Your subscription will automatically renew in %1$s — thats %2$s."
msgstr "" msgstr ""
#: vendor/woocommerce/subscriptions-core/templates/emails/plain/customer-notification-auto-renewal.php:45 #: vendor/woocommerce/subscriptions-core/templates/emails/plain/customer-notification-auto-renewal.php:46
msgid "You can manage this subscription from your account dashboard: " msgid "You can manage this subscription from your account dashboard: "
msgstr "" msgstr ""
@@ -7061,77 +7068,79 @@ msgstr ""
msgid "Date Suspended: %s" msgid "Date Suspended: %s"
msgstr "" msgstr ""
#: vendor/woocommerce/subscriptions-core/templates/emails/plain/subscription-info.php:20 #: vendor/woocommerce/subscriptions-core/templates/emails/plain/subscription-info.php:19
#: vendor/woocommerce/subscriptions-core/templates/emails/subscription-info.php:21 #: vendor/woocommerce/subscriptions-core/templates/emails/subscription-info.php:20
msgid "Subscription information" msgid "Subscription information"
msgstr "" msgstr ""
#. translators: placeholder is subscription's number #. translators: placeholder is subscription's number
#: vendor/woocommerce/subscriptions-core/templates/emails/plain/subscription-info.php:25 #: vendor/woocommerce/subscriptions-core/templates/emails/plain/subscription-info.php:24
msgctxt "in plain emails for subscription information" msgctxt "in plain emails for subscription information"
msgid "Subscription: %s" msgid "Subscription: %s"
msgstr "" msgstr ""
#. translators: placeholder is either view or edit url for the subscription #. translators: placeholder is either view or edit url for the subscription
#: vendor/woocommerce/subscriptions-core/templates/emails/plain/subscription-info.php:27 #: vendor/woocommerce/subscriptions-core/templates/emails/plain/subscription-info.php:26
msgctxt "in plain emails for subscription information" msgctxt "in plain emails for subscription information"
msgid "View subscription: %s" msgid "View subscription: %s"
msgstr "" msgstr ""
#. translators: placeholder is localised start date #. translators: placeholder is localised start date
#: vendor/woocommerce/subscriptions-core/templates/emails/plain/subscription-info.php:29 #: vendor/woocommerce/subscriptions-core/templates/emails/plain/subscription-info.php:28
msgctxt "in plain emails for subscription information" msgctxt "in plain emails for subscription information"
msgid "Start date: %s" msgid "Start date: %s"
msgstr "" msgstr ""
#: vendor/woocommerce/subscriptions-core/templates/emails/plain/subscription-info.php:31 #: vendor/woocommerce/subscriptions-core/templates/emails/plain/subscription-info.php:30
msgctxt "Used as end date for an indefinite subscription" msgctxt "Used as end date for an indefinite subscription"
msgid "When Cancelled" msgid "When Cancelled"
msgstr "" msgstr ""
#. translators: placeholder is localised end date, or "when cancelled" #. translators: placeholder is localised end date, or "when cancelled"
#: vendor/woocommerce/subscriptions-core/templates/emails/plain/subscription-info.php:33 #: vendor/woocommerce/subscriptions-core/templates/emails/plain/subscription-info.php:32
msgctxt "in plain emails for subscription information" msgctxt "in plain emails for subscription information"
msgid "End date: %s" msgid "End date: %s"
msgstr "" msgstr ""
#. translators: placeholder is the formatted order total for the subscription #. translators: placeholder is the formatted order total for the subscription
#: vendor/woocommerce/subscriptions-core/templates/emails/plain/subscription-info.php:35 #: vendor/woocommerce/subscriptions-core/templates/emails/plain/subscription-info.php:34
msgctxt "in plain emails for subscription information" msgctxt "in plain emails for subscription information"
msgid "Recurring price: %s" msgid "Recurring price: %s"
msgstr "" msgstr ""
#: vendor/woocommerce/subscriptions-core/templates/emails/plain/subscription-info.php:38 #. Translators: placeholder is the next payment date.
#: vendor/woocommerce/subscriptions-core/templates/emails/subscription-info.php:42 #: vendor/woocommerce/subscriptions-core/templates/emails/plain/subscription-info.php:37
#: vendor/woocommerce/subscriptions-core/templates/emails/subscription-info.php:43
msgid "Next payment: %s" msgid "Next payment: %s"
msgstr "" msgstr ""
#: vendor/woocommerce/subscriptions-core/templates/emails/plain/subscription-info.php:54 #: vendor/woocommerce/subscriptions-core/templates/emails/plain/subscription-info.php:53
msgid "This subscription is set to renew automatically using your payment method on file. You can manage or cancel this subscription from your my account page. %s" msgid "This subscription is set to renew automatically using your payment method on file. You can manage or cancel this subscription from your my account page. %s"
msgid_plural "These subscriptions are set to renew automatically using your payment method on file. You can manage or cancel your subscriptions from your my account page. %s" msgid_plural "These subscriptions are set to renew automatically using your payment method on file. You can manage or cancel your subscriptions from your my account page. %s"
msgstr[0] "" msgstr[0] ""
msgstr[1] "" msgstr[1] ""
#: vendor/woocommerce/subscriptions-core/templates/emails/subscription-info.php:25 #: vendor/woocommerce/subscriptions-core/templates/emails/subscription-info.php:24
msgctxt "subscription ID table heading" msgctxt "subscription ID table heading"
msgid "ID" msgid "ID"
msgstr "" msgstr ""
#: vendor/woocommerce/subscriptions-core/templates/emails/subscription-info.php:26 #: vendor/woocommerce/subscriptions-core/templates/emails/subscription-info.php:25
msgctxt "table heading" msgctxt "table heading"
msgid "Start date" msgid "Start date"
msgstr "" msgstr ""
#: vendor/woocommerce/subscriptions-core/templates/emails/subscription-info.php:27 #: vendor/woocommerce/subscriptions-core/templates/emails/subscription-info.php:26
msgctxt "table heading" msgctxt "table heading"
msgid "End date" msgid "End date"
msgstr "" msgstr ""
#: vendor/woocommerce/subscriptions-core/templates/emails/subscription-info.php:28 #: vendor/woocommerce/subscriptions-core/templates/emails/subscription-info.php:27
msgctxt "table heading" msgctxt "table heading"
msgid "Recurring total" msgid "Recurring total"
msgstr "" msgstr ""
#. Translators: placeholder is the subscription number.
#: vendor/woocommerce/subscriptions-core/templates/emails/subscription-info.php:35 #: vendor/woocommerce/subscriptions-core/templates/emails/subscription-info.php:35
msgctxt "subscription number in email table. (eg: #106)" msgctxt "subscription number in email table. (eg: #106)"
msgid "#%s" msgid "#%s"
@@ -7142,7 +7151,8 @@ msgctxt "Used as end date for an indefinite subscription"
msgid "When cancelled" msgid "When cancelled"
msgstr "" msgstr ""
#: vendor/woocommerce/subscriptions-core/templates/emails/subscription-info.php:63 #. Translators: Placeholders are opening and closing My Account link tags.
#: vendor/woocommerce/subscriptions-core/templates/emails/subscription-info.php:64
msgid "This subscription is set to renew automatically using your payment method on file. You can manage or cancel this subscription from your %1$smy account page%2$s." msgid "This subscription is set to renew automatically using your payment method on file. You can manage or cancel this subscription from your %1$smy account page%2$s."
msgid_plural "These subscriptions are set to renew automatically using your payment method on file. You can manage or cancel your subscriptions from your %1$smy account page%2$s." msgid_plural "These subscriptions are set to renew automatically using your payment method on file. You can manage or cancel your subscriptions from your %1$smy account page%2$s."
msgstr[0] "" msgstr[0] ""
@@ -7287,7 +7297,7 @@ msgctxt "date on subscription updates list. Will be localized"
msgid "l jS \\o\\f F Y, h:ia" msgid "l jS \\o\\f F Y, h:ia"
msgstr "" msgstr ""
#: vendor/woocommerce/subscriptions-core/templates/myaccount/subscription-totals-table.php:34 #: vendor/woocommerce/subscriptions-core/templates/myaccount/subscription-totals-table.php:46
msgid "Are you sure you want to remove this item from your subscription?" msgid "Are you sure you want to remove this item from your subscription?"
msgstr "" msgstr ""

2
vendor/autoload.php vendored
View File

@@ -22,4 +22,4 @@ if (PHP_VERSION_ID < 50600) {
require_once __DIR__ . '/composer/autoload_real.php'; require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInit1a0806ecf77df05bfe8e09cca6dc9f00::getLoader(); return ComposerAutoloaderInit0c80b12786c5f329cae617490ce0ac6d::getLoader();

View File

@@ -8,13 +8,14 @@ $baseDir = dirname($vendorDir);
return array( return array(
'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php', 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
'Composer\\Installers\\AglInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/AglInstaller.php', 'Composer\\Installers\\AglInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/AglInstaller.php',
'Composer\\Installers\\AimeosInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/AimeosInstaller.php', 'Composer\\Installers\\AkauntingInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/AkauntingInstaller.php',
'Composer\\Installers\\AnnotateCmsInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/AnnotateCmsInstaller.php', 'Composer\\Installers\\AnnotateCmsInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/AnnotateCmsInstaller.php',
'Composer\\Installers\\AsgardInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/AsgardInstaller.php', 'Composer\\Installers\\AsgardInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/AsgardInstaller.php',
'Composer\\Installers\\AttogramInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/AttogramInstaller.php', 'Composer\\Installers\\AttogramInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/AttogramInstaller.php',
'Composer\\Installers\\BaseInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/BaseInstaller.php', 'Composer\\Installers\\BaseInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/BaseInstaller.php',
'Composer\\Installers\\BitrixInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/BitrixInstaller.php', 'Composer\\Installers\\BitrixInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/BitrixInstaller.php',
'Composer\\Installers\\BonefishInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/BonefishInstaller.php', 'Composer\\Installers\\BonefishInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/BonefishInstaller.php',
'Composer\\Installers\\BotbleInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/BotbleInstaller.php',
'Composer\\Installers\\CakePHPInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/CakePHPInstaller.php', 'Composer\\Installers\\CakePHPInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/CakePHPInstaller.php',
'Composer\\Installers\\ChefInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ChefInstaller.php', 'Composer\\Installers\\ChefInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ChefInstaller.php',
'Composer\\Installers\\CiviCrmInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/CiviCrmInstaller.php', 'Composer\\Installers\\CiviCrmInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/CiviCrmInstaller.php',
@@ -22,7 +23,7 @@ return array(
'Composer\\Installers\\CockpitInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/CockpitInstaller.php', 'Composer\\Installers\\CockpitInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/CockpitInstaller.php',
'Composer\\Installers\\CodeIgniterInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/CodeIgniterInstaller.php', 'Composer\\Installers\\CodeIgniterInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/CodeIgniterInstaller.php',
'Composer\\Installers\\Concrete5Installer' => $vendorDir . '/composer/installers/src/Composer/Installers/Concrete5Installer.php', 'Composer\\Installers\\Concrete5Installer' => $vendorDir . '/composer/installers/src/Composer/Installers/Concrete5Installer.php',
'Composer\\Installers\\CraftInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/CraftInstaller.php', 'Composer\\Installers\\ConcreteCMSInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ConcreteCMSInstaller.php',
'Composer\\Installers\\CroogoInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/CroogoInstaller.php', 'Composer\\Installers\\CroogoInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/CroogoInstaller.php',
'Composer\\Installers\\DecibelInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/DecibelInstaller.php', 'Composer\\Installers\\DecibelInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/DecibelInstaller.php',
'Composer\\Installers\\DframeInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/DframeInstaller.php', 'Composer\\Installers\\DframeInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/DframeInstaller.php',
@@ -33,6 +34,7 @@ return array(
'Composer\\Installers\\EliasisInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/EliasisInstaller.php', 'Composer\\Installers\\EliasisInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/EliasisInstaller.php',
'Composer\\Installers\\ExpressionEngineInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ExpressionEngineInstaller.php', 'Composer\\Installers\\ExpressionEngineInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ExpressionEngineInstaller.php',
'Composer\\Installers\\EzPlatformInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/EzPlatformInstaller.php', 'Composer\\Installers\\EzPlatformInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/EzPlatformInstaller.php',
'Composer\\Installers\\ForkCMSInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ForkCMSInstaller.php',
'Composer\\Installers\\FuelInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/FuelInstaller.php', 'Composer\\Installers\\FuelInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/FuelInstaller.php',
'Composer\\Installers\\FuelphpInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/FuelphpInstaller.php', 'Composer\\Installers\\FuelphpInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/FuelphpInstaller.php',
'Composer\\Installers\\GravInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/GravInstaller.php', 'Composer\\Installers\\GravInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/GravInstaller.php',
@@ -40,9 +42,7 @@ return array(
'Composer\\Installers\\ImageCMSInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ImageCMSInstaller.php', 'Composer\\Installers\\ImageCMSInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ImageCMSInstaller.php',
'Composer\\Installers\\Installer' => $vendorDir . '/composer/installers/src/Composer/Installers/Installer.php', 'Composer\\Installers\\Installer' => $vendorDir . '/composer/installers/src/Composer/Installers/Installer.php',
'Composer\\Installers\\ItopInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ItopInstaller.php', 'Composer\\Installers\\ItopInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ItopInstaller.php',
'Composer\\Installers\\JoomlaInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/JoomlaInstaller.php',
'Composer\\Installers\\KanboardInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/KanboardInstaller.php', 'Composer\\Installers\\KanboardInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/KanboardInstaller.php',
'Composer\\Installers\\KirbyInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/KirbyInstaller.php',
'Composer\\Installers\\KnownInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/KnownInstaller.php', 'Composer\\Installers\\KnownInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/KnownInstaller.php',
'Composer\\Installers\\KodiCMSInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/KodiCMSInstaller.php', 'Composer\\Installers\\KodiCMSInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/KodiCMSInstaller.php',
'Composer\\Installers\\KohanaInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/KohanaInstaller.php', 'Composer\\Installers\\KohanaInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/KohanaInstaller.php',
@@ -56,6 +56,7 @@ return array(
'Composer\\Installers\\MajimaInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MajimaInstaller.php', 'Composer\\Installers\\MajimaInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MajimaInstaller.php',
'Composer\\Installers\\MakoInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MakoInstaller.php', 'Composer\\Installers\\MakoInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MakoInstaller.php',
'Composer\\Installers\\MantisBTInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MantisBTInstaller.php', 'Composer\\Installers\\MantisBTInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MantisBTInstaller.php',
'Composer\\Installers\\MatomoInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MatomoInstaller.php',
'Composer\\Installers\\MauticInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MauticInstaller.php', 'Composer\\Installers\\MauticInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MauticInstaller.php',
'Composer\\Installers\\MayaInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MayaInstaller.php', 'Composer\\Installers\\MayaInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MayaInstaller.php',
'Composer\\Installers\\MediaWikiInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MediaWikiInstaller.php', 'Composer\\Installers\\MediaWikiInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MediaWikiInstaller.php',
@@ -71,7 +72,6 @@ return array(
'Composer\\Installers\\PantheonInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PantheonInstaller.php', 'Composer\\Installers\\PantheonInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PantheonInstaller.php',
'Composer\\Installers\\PhiftyInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PhiftyInstaller.php', 'Composer\\Installers\\PhiftyInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PhiftyInstaller.php',
'Composer\\Installers\\PhpBBInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PhpBBInstaller.php', 'Composer\\Installers\\PhpBBInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PhpBBInstaller.php',
'Composer\\Installers\\PimcoreInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PimcoreInstaller.php',
'Composer\\Installers\\PiwikInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PiwikInstaller.php', 'Composer\\Installers\\PiwikInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PiwikInstaller.php',
'Composer\\Installers\\PlentymarketsInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PlentymarketsInstaller.php', 'Composer\\Installers\\PlentymarketsInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PlentymarketsInstaller.php',
'Composer\\Installers\\Plugin' => $vendorDir . '/composer/installers/src/Composer/Installers/Plugin.php', 'Composer\\Installers\\Plugin' => $vendorDir . '/composer/installers/src/Composer/Installers/Plugin.php',
@@ -92,9 +92,6 @@ return array(
'Composer\\Installers\\StarbugInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/StarbugInstaller.php', 'Composer\\Installers\\StarbugInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/StarbugInstaller.php',
'Composer\\Installers\\SyDESInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/SyDESInstaller.php', 'Composer\\Installers\\SyDESInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/SyDESInstaller.php',
'Composer\\Installers\\SyliusInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/SyliusInstaller.php', 'Composer\\Installers\\SyliusInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/SyliusInstaller.php',
'Composer\\Installers\\Symfony1Installer' => $vendorDir . '/composer/installers/src/Composer/Installers/Symfony1Installer.php',
'Composer\\Installers\\TYPO3CmsInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/TYPO3CmsInstaller.php',
'Composer\\Installers\\TYPO3FlowInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/TYPO3FlowInstaller.php',
'Composer\\Installers\\TaoInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/TaoInstaller.php', 'Composer\\Installers\\TaoInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/TaoInstaller.php',
'Composer\\Installers\\TastyIgniterInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/TastyIgniterInstaller.php', 'Composer\\Installers\\TastyIgniterInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/TastyIgniterInstaller.php',
'Composer\\Installers\\TheliaInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/TheliaInstaller.php', 'Composer\\Installers\\TheliaInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/TheliaInstaller.php',

View File

@@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer // autoload_real.php @generated by Composer
class ComposerAutoloaderInit1a0806ecf77df05bfe8e09cca6dc9f00 class ComposerAutoloaderInit0c80b12786c5f329cae617490ce0ac6d
{ {
private static $loader; private static $loader;
@@ -24,12 +24,12 @@ class ComposerAutoloaderInit1a0806ecf77df05bfe8e09cca6dc9f00
require __DIR__ . '/platform_check.php'; require __DIR__ . '/platform_check.php';
spl_autoload_register(array('ComposerAutoloaderInit1a0806ecf77df05bfe8e09cca6dc9f00', 'loadClassLoader'), true, true); spl_autoload_register(array('ComposerAutoloaderInit0c80b12786c5f329cae617490ce0ac6d', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInit1a0806ecf77df05bfe8e09cca6dc9f00', 'loadClassLoader')); spl_autoload_unregister(array('ComposerAutoloaderInit0c80b12786c5f329cae617490ce0ac6d', 'loadClassLoader'));
require __DIR__ . '/autoload_static.php'; require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInit1a0806ecf77df05bfe8e09cca6dc9f00::getInitializer($loader)); call_user_func(\Composer\Autoload\ComposerStaticInit0c80b12786c5f329cae617490ce0ac6d::getInitializer($loader));
$loader->register(true); $loader->register(true);

View File

@@ -4,7 +4,7 @@
namespace Composer\Autoload; namespace Composer\Autoload;
class ComposerStaticInit1a0806ecf77df05bfe8e09cca6dc9f00 class ComposerStaticInit0c80b12786c5f329cae617490ce0ac6d
{ {
public static $prefixLengthsPsr4 = array ( public static $prefixLengthsPsr4 = array (
'C' => 'C' =>
@@ -23,13 +23,14 @@ class ComposerStaticInit1a0806ecf77df05bfe8e09cca6dc9f00
public static $classMap = array ( public static $classMap = array (
'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
'Composer\\Installers\\AglInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/AglInstaller.php', 'Composer\\Installers\\AglInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/AglInstaller.php',
'Composer\\Installers\\AimeosInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/AimeosInstaller.php', 'Composer\\Installers\\AkauntingInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/AkauntingInstaller.php',
'Composer\\Installers\\AnnotateCmsInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/AnnotateCmsInstaller.php', 'Composer\\Installers\\AnnotateCmsInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/AnnotateCmsInstaller.php',
'Composer\\Installers\\AsgardInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/AsgardInstaller.php', 'Composer\\Installers\\AsgardInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/AsgardInstaller.php',
'Composer\\Installers\\AttogramInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/AttogramInstaller.php', 'Composer\\Installers\\AttogramInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/AttogramInstaller.php',
'Composer\\Installers\\BaseInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/BaseInstaller.php', 'Composer\\Installers\\BaseInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/BaseInstaller.php',
'Composer\\Installers\\BitrixInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/BitrixInstaller.php', 'Composer\\Installers\\BitrixInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/BitrixInstaller.php',
'Composer\\Installers\\BonefishInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/BonefishInstaller.php', 'Composer\\Installers\\BonefishInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/BonefishInstaller.php',
'Composer\\Installers\\BotbleInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/BotbleInstaller.php',
'Composer\\Installers\\CakePHPInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/CakePHPInstaller.php', 'Composer\\Installers\\CakePHPInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/CakePHPInstaller.php',
'Composer\\Installers\\ChefInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ChefInstaller.php', 'Composer\\Installers\\ChefInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ChefInstaller.php',
'Composer\\Installers\\CiviCrmInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/CiviCrmInstaller.php', 'Composer\\Installers\\CiviCrmInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/CiviCrmInstaller.php',
@@ -37,7 +38,7 @@ class ComposerStaticInit1a0806ecf77df05bfe8e09cca6dc9f00
'Composer\\Installers\\CockpitInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/CockpitInstaller.php', 'Composer\\Installers\\CockpitInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/CockpitInstaller.php',
'Composer\\Installers\\CodeIgniterInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/CodeIgniterInstaller.php', 'Composer\\Installers\\CodeIgniterInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/CodeIgniterInstaller.php',
'Composer\\Installers\\Concrete5Installer' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/Concrete5Installer.php', 'Composer\\Installers\\Concrete5Installer' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/Concrete5Installer.php',
'Composer\\Installers\\CraftInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/CraftInstaller.php', 'Composer\\Installers\\ConcreteCMSInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ConcreteCMSInstaller.php',
'Composer\\Installers\\CroogoInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/CroogoInstaller.php', 'Composer\\Installers\\CroogoInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/CroogoInstaller.php',
'Composer\\Installers\\DecibelInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/DecibelInstaller.php', 'Composer\\Installers\\DecibelInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/DecibelInstaller.php',
'Composer\\Installers\\DframeInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/DframeInstaller.php', 'Composer\\Installers\\DframeInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/DframeInstaller.php',
@@ -48,6 +49,7 @@ class ComposerStaticInit1a0806ecf77df05bfe8e09cca6dc9f00
'Composer\\Installers\\EliasisInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/EliasisInstaller.php', 'Composer\\Installers\\EliasisInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/EliasisInstaller.php',
'Composer\\Installers\\ExpressionEngineInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ExpressionEngineInstaller.php', 'Composer\\Installers\\ExpressionEngineInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ExpressionEngineInstaller.php',
'Composer\\Installers\\EzPlatformInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/EzPlatformInstaller.php', 'Composer\\Installers\\EzPlatformInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/EzPlatformInstaller.php',
'Composer\\Installers\\ForkCMSInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ForkCMSInstaller.php',
'Composer\\Installers\\FuelInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/FuelInstaller.php', 'Composer\\Installers\\FuelInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/FuelInstaller.php',
'Composer\\Installers\\FuelphpInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/FuelphpInstaller.php', 'Composer\\Installers\\FuelphpInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/FuelphpInstaller.php',
'Composer\\Installers\\GravInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/GravInstaller.php', 'Composer\\Installers\\GravInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/GravInstaller.php',
@@ -55,9 +57,7 @@ class ComposerStaticInit1a0806ecf77df05bfe8e09cca6dc9f00
'Composer\\Installers\\ImageCMSInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ImageCMSInstaller.php', 'Composer\\Installers\\ImageCMSInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ImageCMSInstaller.php',
'Composer\\Installers\\Installer' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/Installer.php', 'Composer\\Installers\\Installer' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/Installer.php',
'Composer\\Installers\\ItopInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ItopInstaller.php', 'Composer\\Installers\\ItopInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ItopInstaller.php',
'Composer\\Installers\\JoomlaInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/JoomlaInstaller.php',
'Composer\\Installers\\KanboardInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/KanboardInstaller.php', 'Composer\\Installers\\KanboardInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/KanboardInstaller.php',
'Composer\\Installers\\KirbyInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/KirbyInstaller.php',
'Composer\\Installers\\KnownInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/KnownInstaller.php', 'Composer\\Installers\\KnownInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/KnownInstaller.php',
'Composer\\Installers\\KodiCMSInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/KodiCMSInstaller.php', 'Composer\\Installers\\KodiCMSInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/KodiCMSInstaller.php',
'Composer\\Installers\\KohanaInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/KohanaInstaller.php', 'Composer\\Installers\\KohanaInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/KohanaInstaller.php',
@@ -71,6 +71,7 @@ class ComposerStaticInit1a0806ecf77df05bfe8e09cca6dc9f00
'Composer\\Installers\\MajimaInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MajimaInstaller.php', 'Composer\\Installers\\MajimaInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MajimaInstaller.php',
'Composer\\Installers\\MakoInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MakoInstaller.php', 'Composer\\Installers\\MakoInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MakoInstaller.php',
'Composer\\Installers\\MantisBTInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MantisBTInstaller.php', 'Composer\\Installers\\MantisBTInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MantisBTInstaller.php',
'Composer\\Installers\\MatomoInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MatomoInstaller.php',
'Composer\\Installers\\MauticInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MauticInstaller.php', 'Composer\\Installers\\MauticInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MauticInstaller.php',
'Composer\\Installers\\MayaInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MayaInstaller.php', 'Composer\\Installers\\MayaInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MayaInstaller.php',
'Composer\\Installers\\MediaWikiInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MediaWikiInstaller.php', 'Composer\\Installers\\MediaWikiInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MediaWikiInstaller.php',
@@ -86,7 +87,6 @@ class ComposerStaticInit1a0806ecf77df05bfe8e09cca6dc9f00
'Composer\\Installers\\PantheonInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/PantheonInstaller.php', 'Composer\\Installers\\PantheonInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/PantheonInstaller.php',
'Composer\\Installers\\PhiftyInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/PhiftyInstaller.php', 'Composer\\Installers\\PhiftyInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/PhiftyInstaller.php',
'Composer\\Installers\\PhpBBInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/PhpBBInstaller.php', 'Composer\\Installers\\PhpBBInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/PhpBBInstaller.php',
'Composer\\Installers\\PimcoreInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/PimcoreInstaller.php',
'Composer\\Installers\\PiwikInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/PiwikInstaller.php', 'Composer\\Installers\\PiwikInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/PiwikInstaller.php',
'Composer\\Installers\\PlentymarketsInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/PlentymarketsInstaller.php', 'Composer\\Installers\\PlentymarketsInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/PlentymarketsInstaller.php',
'Composer\\Installers\\Plugin' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/Plugin.php', 'Composer\\Installers\\Plugin' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/Plugin.php',
@@ -107,9 +107,6 @@ class ComposerStaticInit1a0806ecf77df05bfe8e09cca6dc9f00
'Composer\\Installers\\StarbugInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/StarbugInstaller.php', 'Composer\\Installers\\StarbugInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/StarbugInstaller.php',
'Composer\\Installers\\SyDESInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/SyDESInstaller.php', 'Composer\\Installers\\SyDESInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/SyDESInstaller.php',
'Composer\\Installers\\SyliusInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/SyliusInstaller.php', 'Composer\\Installers\\SyliusInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/SyliusInstaller.php',
'Composer\\Installers\\Symfony1Installer' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/Symfony1Installer.php',
'Composer\\Installers\\TYPO3CmsInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/TYPO3CmsInstaller.php',
'Composer\\Installers\\TYPO3FlowInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/TYPO3FlowInstaller.php',
'Composer\\Installers\\TaoInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/TaoInstaller.php', 'Composer\\Installers\\TaoInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/TaoInstaller.php',
'Composer\\Installers\\TastyIgniterInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/TastyIgniterInstaller.php', 'Composer\\Installers\\TastyIgniterInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/TastyIgniterInstaller.php',
'Composer\\Installers\\TheliaInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/TheliaInstaller.php', 'Composer\\Installers\\TheliaInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/TheliaInstaller.php',
@@ -129,9 +126,9 @@ class ComposerStaticInit1a0806ecf77df05bfe8e09cca6dc9f00
public static function getInitializer(ClassLoader $loader) public static function getInitializer(ClassLoader $loader)
{ {
return \Closure::bind(function () use ($loader) { return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInit1a0806ecf77df05bfe8e09cca6dc9f00::$prefixLengthsPsr4; $loader->prefixLengthsPsr4 = ComposerStaticInit0c80b12786c5f329cae617490ce0ac6d::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit1a0806ecf77df05bfe8e09cca6dc9f00::$prefixDirsPsr4; $loader->prefixDirsPsr4 = ComposerStaticInit0c80b12786c5f329cae617490ce0ac6d::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit1a0806ecf77df05bfe8e09cca6dc9f00::$classMap; $loader->classMap = ComposerStaticInit0c80b12786c5f329cae617490ce0ac6d::$classMap;
}, null, ClassLoader::class); }, null, ClassLoader::class);
} }

View File

@@ -2,41 +2,39 @@
"packages": [ "packages": [
{ {
"name": "composer/installers", "name": "composer/installers",
"version": "v1.12.0", "version": "v2.3.0",
"version_normalized": "1.12.0.0", "version_normalized": "2.3.0.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/composer/installers.git", "url": "https://github.com/composer/installers.git",
"reference": "d20a64ed3c94748397ff5973488761b22f6d3f19" "reference": "12fb2dfe5e16183de69e784a7b84046c43d97e8e"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/composer/installers/zipball/d20a64ed3c94748397ff5973488761b22f6d3f19", "url": "https://api.github.com/repos/composer/installers/zipball/12fb2dfe5e16183de69e784a7b84046c43d97e8e",
"reference": "d20a64ed3c94748397ff5973488761b22f6d3f19", "reference": "12fb2dfe5e16183de69e784a7b84046c43d97e8e",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"composer-plugin-api": "^1.0 || ^2.0" "composer-plugin-api": "^1.0 || ^2.0",
}, "php": "^7.2 || ^8.0"
"replace": {
"roundcube/plugin-installer": "*",
"shama/baton": "*"
}, },
"require-dev": { "require-dev": {
"composer/composer": "1.6.* || ^2.0", "composer/composer": "^1.10.27 || ^2.7",
"composer/semver": "^1 || ^3", "composer/semver": "^1.7.2 || ^3.4.0",
"phpstan/phpstan": "^0.12.55", "phpstan/phpstan": "^1.11",
"phpstan/phpstan-phpunit": "^0.12.16", "phpstan/phpstan-phpunit": "^1",
"symfony/phpunit-bridge": "^4.2 || ^5", "symfony/phpunit-bridge": "^7.1.1",
"symfony/process": "^2.3" "symfony/process": "^5 || ^6 || ^7"
}, },
"time": "2021-09-13T08:19:44+00:00", "time": "2024-06-24T20:46:46+00:00",
"type": "composer-plugin", "type": "composer-plugin",
"extra": { "extra": {
"class": "Composer\\Installers\\Plugin", "class": "Composer\\Installers\\Plugin",
"branch-alias": { "branch-alias": {
"dev-main": "1.x-dev" "dev-main": "2.x-dev"
} },
"plugin-modifies-install-path": true
}, },
"installation-source": "dist", "installation-source": "dist",
"autoload": { "autoload": {
@@ -58,7 +56,6 @@
"description": "A multi-framework Composer library installer", "description": "A multi-framework Composer library installer",
"homepage": "https://composer.github.io/installers/", "homepage": "https://composer.github.io/installers/",
"keywords": [ "keywords": [
"Craft",
"Dolibarr", "Dolibarr",
"Eliasis", "Eliasis",
"Hurad", "Hurad",
@@ -79,7 +76,6 @@
"Whmcs", "Whmcs",
"WolfCMS", "WolfCMS",
"agl", "agl",
"aimeos",
"annotatecms", "annotatecms",
"attogram", "attogram",
"bitrix", "bitrix",
@@ -88,6 +84,7 @@
"cockpit", "cockpit",
"codeigniter", "codeigniter",
"concrete5", "concrete5",
"concreteCMS",
"croogo", "croogo",
"dokuwiki", "dokuwiki",
"drupal", "drupal",
@@ -98,7 +95,6 @@
"grav", "grav",
"installer", "installer",
"itop", "itop",
"joomla",
"known", "known",
"kohana", "kohana",
"laravel", "laravel",
@@ -107,6 +103,7 @@
"magento", "magento",
"majima", "majima",
"mako", "mako",
"matomo",
"mediawiki", "mediawiki",
"miaoxing", "miaoxing",
"modulework", "modulework",
@@ -126,9 +123,7 @@
"silverstripe", "silverstripe",
"sydes", "sydes",
"sylius", "sylius",
"symfony",
"tastyigniter", "tastyigniter",
"typo3",
"wordpress", "wordpress",
"yawik", "yawik",
"zend", "zend",
@@ -136,7 +131,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/composer/installers/issues", "issues": "https://github.com/composer/installers/issues",
"source": "https://github.com/composer/installers/tree/v1.12.0" "source": "https://github.com/composer/installers/tree/v2.3.0"
}, },
"funding": [ "funding": [
{ {
@@ -156,17 +151,17 @@
}, },
{ {
"name": "woocommerce/subscriptions-core", "name": "woocommerce/subscriptions-core",
"version": "7.9.0", "version": "8.0.1",
"version_normalized": "7.9.0.0", "version_normalized": "8.0.1.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/Automattic/woocommerce-subscriptions-core.git", "url": "https://github.com/Automattic/woocommerce-subscriptions-core.git",
"reference": "36629b90e52bf1137fd4f7580414cea7e42ce920" "reference": "554c03a5e7591c448d495ee41ee12015f65cad5a"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/Automattic/woocommerce-subscriptions-core/zipball/36629b90e52bf1137fd4f7580414cea7e42ce920", "url": "https://api.github.com/repos/Automattic/woocommerce-subscriptions-core/zipball/554c03a5e7591c448d495ee41ee12015f65cad5a",
"reference": "36629b90e52bf1137fd4f7580414cea7e42ce920", "reference": "554c03a5e7591c448d495ee41ee12015f65cad5a",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -179,7 +174,7 @@
"woocommerce/woocommerce-sniffs": "0.1.0", "woocommerce/woocommerce-sniffs": "0.1.0",
"yoast/phpunit-polyfills": "1.1.0" "yoast/phpunit-polyfills": "1.1.0"
}, },
"time": "2025-01-10T00:22:55+00:00", "time": "2025-02-13T10:49:47+00:00",
"type": "wordpress-plugin", "type": "wordpress-plugin",
"extra": { "extra": {
"phpcodesniffer-search-depth": 2 "phpcodesniffer-search-depth": 2
@@ -209,7 +204,7 @@
"description": "Sell products and services with recurring payments in your WooCommerce Store.", "description": "Sell products and services with recurring payments in your WooCommerce Store.",
"homepage": "https://github.com/Automattic/woocommerce-subscriptions-core", "homepage": "https://github.com/Automattic/woocommerce-subscriptions-core",
"support": { "support": {
"source": "https://github.com/Automattic/woocommerce-subscriptions-core/tree/7.9.0", "source": "https://github.com/Automattic/woocommerce-subscriptions-core/tree/8.0.1",
"issues": "https://github.com/Automattic/woocommerce-subscriptions-core/issues" "issues": "https://github.com/Automattic/woocommerce-subscriptions-core/issues"
}, },
"install-path": "../woocommerce/subscriptions-core" "install-path": "../woocommerce/subscriptions-core"

View File

@@ -1,9 +1,9 @@
<?php return array( <?php return array(
'root' => array( 'root' => array(
'name' => 'woocommerce/woocommerce-subscriptions', 'name' => 'woocommerce/woocommerce-subscriptions',
'pretty_version' => 'dev-release/7.1.0', 'pretty_version' => 'dev-release/7.2.1',
'version' => 'dev-release/7.1.0', 'version' => 'dev-release/7.2.1',
'reference' => '4cd67267efc98d376b5db58714feb586f8d2be41', 'reference' => 'c1ca6ecf1cb1adeb0725e3d5ad543424e73b041e',
'type' => 'wordpress-plugin', 'type' => 'wordpress-plugin',
'install_path' => __DIR__ . '/../../', 'install_path' => __DIR__ . '/../../',
'aliases' => array(), 'aliases' => array(),
@@ -11,39 +11,27 @@
), ),
'versions' => array( 'versions' => array(
'composer/installers' => array( 'composer/installers' => array(
'pretty_version' => 'v1.12.0', 'pretty_version' => 'v2.3.0',
'version' => '1.12.0.0', 'version' => '2.3.0.0',
'reference' => 'd20a64ed3c94748397ff5973488761b22f6d3f19', 'reference' => '12fb2dfe5e16183de69e784a7b84046c43d97e8e',
'type' => 'composer-plugin', 'type' => 'composer-plugin',
'install_path' => __DIR__ . '/./installers', 'install_path' => __DIR__ . '/./installers',
'aliases' => array(), 'aliases' => array(),
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'roundcube/plugin-installer' => array(
'dev_requirement' => false,
'replaced' => array(
0 => '*',
),
),
'shama/baton' => array(
'dev_requirement' => false,
'replaced' => array(
0 => '*',
),
),
'woocommerce/subscriptions-core' => array( 'woocommerce/subscriptions-core' => array(
'pretty_version' => '7.9.0', 'pretty_version' => '8.0.1',
'version' => '7.9.0.0', 'version' => '8.0.1.0',
'reference' => '36629b90e52bf1137fd4f7580414cea7e42ce920', 'reference' => '554c03a5e7591c448d495ee41ee12015f65cad5a',
'type' => 'wordpress-plugin', 'type' => 'wordpress-plugin',
'install_path' => __DIR__ . '/../woocommerce/subscriptions-core', 'install_path' => __DIR__ . '/../woocommerce/subscriptions-core',
'aliases' => array(), 'aliases' => array(),
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'woocommerce/woocommerce-subscriptions' => array( 'woocommerce/woocommerce-subscriptions' => array(
'pretty_version' => 'dev-release/7.1.0', 'pretty_version' => 'dev-release/7.2.1',
'version' => 'dev-release/7.1.0', 'version' => 'dev-release/7.2.1',
'reference' => '4cd67267efc98d376b5db58714feb586f8d2be41', 'reference' => 'c1ca6ecf1cb1adeb0725e3d5ad543424e73b041e',
'type' => 'wordpress-plugin', 'type' => 'wordpress-plugin',
'install_path' => __DIR__ . '/../../', 'install_path' => __DIR__ . '/../../',
'aliases' => array(), 'aliases' => array(),

View File

@@ -1,10 +0,0 @@
parameters:
level: 5
paths:
- src
- tests
excludes_analyse:
- tests/Composer/Installers/Test/PolyfillTestCase.php
includes:
- vendor/phpstan/phpstan-phpunit/extension.neon

View File

@@ -1,8 +1,10 @@
<?php <?php
namespace Composer\Installers; namespace Composer\Installers;
class AglInstaller extends BaseInstaller class AglInstaller extends BaseInstaller
{ {
/** @var array<string, string> */
protected $locations = array( protected $locations = array(
'module' => 'More/{$name}/', 'module' => 'More/{$name}/',
); );
@@ -10,12 +12,18 @@ class AglInstaller extends BaseInstaller
/** /**
* Format package name to CamelCase * Format package name to CamelCase
*/ */
public function inflectPackageVars($vars) public function inflectPackageVars(array $vars): array
{ {
$vars['name'] = preg_replace_callback('/(?:^|_|-)(.?)/', function ($matches) { $name = preg_replace_callback('/(?:^|_|-)(.?)/', function ($matches) {
return strtoupper($matches[1]); return strtoupper($matches[1]);
}, $vars['name']); }, $vars['name']);
if (null === $name) {
throw new \RuntimeException('Failed to run preg_replace_callback: '.preg_last_error());
}
$vars['name'] = $name;
return $vars; return $vars;
} }
} }

View File

@@ -1,9 +0,0 @@
<?php
namespace Composer\Installers;
class AimeosInstaller extends BaseInstaller
{
protected $locations = array(
'extension' => 'ext/{$name}/',
);
}

View File

@@ -0,0 +1,23 @@
<?php
namespace Composer\Installers;
class AkauntingInstaller extends BaseInstaller
{
/** @var array<string, string> */
protected $locations = array(
'module' => 'modules/{$name}',
);
/**
* Format package name to CamelCase
*/
public function inflectPackageVars(array $vars): array
{
$vars['name'] = strtolower($this->pregReplace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name']));
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
return $vars;
}
}

View File

@@ -1,8 +1,10 @@
<?php <?php
namespace Composer\Installers; namespace Composer\Installers;
class AnnotateCmsInstaller extends BaseInstaller class AnnotateCmsInstaller extends BaseInstaller
{ {
/** @var array<string, string> */
protected $locations = array( protected $locations = array(
'module' => 'addons/modules/{$name}/', 'module' => 'addons/modules/{$name}/',
'component' => 'addons/components/{$name}/', 'component' => 'addons/components/{$name}/',

View File

@@ -1,8 +1,10 @@
<?php <?php
namespace Composer\Installers; namespace Composer\Installers;
class AsgardInstaller extends BaseInstaller class AsgardInstaller extends BaseInstaller
{ {
/** @var array<string, string> */
protected $locations = array( protected $locations = array(
'module' => 'Modules/{$name}/', 'module' => 'Modules/{$name}/',
'theme' => 'Themes/{$name}/' 'theme' => 'Themes/{$name}/'
@@ -14,9 +16,8 @@ class AsgardInstaller extends BaseInstaller
* For package type asgard-module, cut off a trailing '-plugin' if present. * For package type asgard-module, cut off a trailing '-plugin' if present.
* *
* For package type asgard-theme, cut off a trailing '-theme' if present. * For package type asgard-theme, cut off a trailing '-theme' if present.
*
*/ */
public function inflectPackageVars($vars) public function inflectPackageVars(array $vars): array
{ {
if ($vars['type'] === 'asgard-module') { if ($vars['type'] === 'asgard-module') {
return $this->inflectPluginVars($vars); return $this->inflectPluginVars($vars);
@@ -29,18 +30,26 @@ class AsgardInstaller extends BaseInstaller
return $vars; return $vars;
} }
protected function inflectPluginVars($vars) /**
* @param array<string, string> $vars
* @return array<string, string>
*/
protected function inflectPluginVars(array $vars): array
{ {
$vars['name'] = preg_replace('/-module$/', '', $vars['name']); $vars['name'] = $this->pregReplace('/-module$/', '', $vars['name']);
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']); $vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
$vars['name'] = str_replace(' ', '', ucwords($vars['name'])); $vars['name'] = str_replace(' ', '', ucwords($vars['name']));
return $vars; return $vars;
} }
protected function inflectThemeVars($vars) /**
* @param array<string, string> $vars
* @return array<string, string>
*/
protected function inflectThemeVars(array $vars): array
{ {
$vars['name'] = preg_replace('/-theme$/', '', $vars['name']); $vars['name'] = $this->pregReplace('/-theme$/', '', $vars['name']);
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']); $vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
$vars['name'] = str_replace(' ', '', ucwords($vars['name'])); $vars['name'] = str_replace(' ', '', ucwords($vars['name']));

View File

@@ -1,8 +1,10 @@
<?php <?php
namespace Composer\Installers; namespace Composer\Installers;
class AttogramInstaller extends BaseInstaller class AttogramInstaller extends BaseInstaller
{ {
/** @var array<string, string> */
protected $locations = array( protected $locations = array(
'module' => 'modules/{$name}/', 'module' => 'modules/{$name}/',
); );

View File

@@ -1,4 +1,5 @@
<?php <?php
namespace Composer\Installers; namespace Composer\Installers;
use Composer\IO\IOInterface; use Composer\IO\IOInterface;
@@ -7,19 +8,19 @@ use Composer\Package\PackageInterface;
abstract class BaseInstaller abstract class BaseInstaller
{ {
/** @var array<string, string> */
protected $locations = array(); protected $locations = array();
/** @var Composer */
protected $composer; protected $composer;
/** @var PackageInterface */
protected $package; protected $package;
/** @var IOInterface */
protected $io; protected $io;
/** /**
* Initializes base installer. * Initializes base installer.
*
* @param PackageInterface $package
* @param Composer $composer
* @param IOInterface $io
*/ */
public function __construct(PackageInterface $package = null, Composer $composer = null, IOInterface $io = null) public function __construct(PackageInterface $package, Composer $composer, IOInterface $io)
{ {
$this->composer = $composer; $this->composer = $composer;
$this->package = $package; $this->package = $package;
@@ -28,12 +29,8 @@ abstract class BaseInstaller
/** /**
* Return the install path based on package type. * Return the install path based on package type.
*
* @param PackageInterface $package
* @param string $frameworkType
* @return string
*/ */
public function getInstallPath(PackageInterface $package, $frameworkType = '') public function getInstallPath(PackageInterface $package, string $frameworkType = ''): string
{ {
$type = $this->package->getType(); $type = $this->package->getType();
@@ -52,18 +49,16 @@ abstract class BaseInstaller
$availableVars['name'] = $extra['installer-name']; $availableVars['name'] = $extra['installer-name'];
} }
if ($this->composer->getPackage()) { $extra = $this->composer->getPackage()->getExtra();
$extra = $this->composer->getPackage()->getExtra(); if (!empty($extra['installer-paths'])) {
if (!empty($extra['installer-paths'])) { $customPath = $this->mapCustomInstallPaths($extra['installer-paths'], $prettyName, $type, $vendor);
$customPath = $this->mapCustomInstallPaths($extra['installer-paths'], $prettyName, $type, $vendor); if ($customPath !== false) {
if ($customPath !== false) { return $this->templatePath($customPath, $availableVars);
return $this->templatePath($customPath, $availableVars);
}
} }
} }
$packageType = substr($type, strlen($frameworkType) + 1); $packageType = substr($type, strlen($frameworkType) + 1);
$locations = $this->getLocations(); $locations = $this->getLocations($frameworkType);
if (!isset($locations[$packageType])) { if (!isset($locations[$packageType])) {
throw new \InvalidArgumentException(sprintf('Package type "%s" is not supported', $type)); throw new \InvalidArgumentException(sprintf('Package type "%s" is not supported', $type));
} }
@@ -77,7 +72,7 @@ abstract class BaseInstaller
* @param array<string, string> $vars This will normally receive array{name: string, vendor: string, type: string} * @param array<string, string> $vars This will normally receive array{name: string, vendor: string, type: string}
* @return array<string, string> * @return array<string, string>
*/ */
public function inflectPackageVars($vars) public function inflectPackageVars(array $vars): array
{ {
return $vars; return $vars;
} }
@@ -87,7 +82,7 @@ abstract class BaseInstaller
* *
* @return array<string, string> map of package types => install path * @return array<string, string> map of package types => install path
*/ */
public function getLocations() public function getLocations(string $frameworkType)
{ {
return $this->locations; return $this->locations;
} }
@@ -95,11 +90,9 @@ abstract class BaseInstaller
/** /**
* Replace vars in a path * Replace vars in a path
* *
* @param string $path
* @param array<string, string> $vars * @param array<string, string> $vars
* @return string
*/ */
protected function templatePath($path, array $vars = array()) protected function templatePath(string $path, array $vars = array()): string
{ {
if (strpos($path, '{') !== false) { if (strpos($path, '{') !== false) {
extract($vars); extract($vars);
@@ -117,13 +110,10 @@ abstract class BaseInstaller
/** /**
* Search through a passed paths array for a custom install path. * Search through a passed paths array for a custom install path.
* *
* @param array $paths * @param array<string, string[]|string> $paths
* @param string $name
* @param string $type
* @param string $vendor = NULL
* @return string|false * @return string|false
*/ */
protected function mapCustomInstallPaths(array $paths, $name, $type, $vendor = NULL) protected function mapCustomInstallPaths(array $paths, string $name, string $type, ?string $vendor = null)
{ {
foreach ($paths as $path => $names) { foreach ($paths as $path => $names) {
$names = (array) $names; $names = (array) $names;
@@ -134,4 +124,14 @@ abstract class BaseInstaller
return false; return false;
} }
protected function pregReplace(string $pattern, string $replacement, string $subject): string
{
$result = preg_replace($pattern, $replacement, $subject);
if (null === $result) {
throw new \RuntimeException('Failed to run preg_replace with '.$pattern.': '.preg_last_error());
}
return $result;
}
} }

View File

@@ -9,9 +9,9 @@ use Composer\Util\Filesystem;
* - `bitrix-d7-module` — copy the module to directory `bitrix/modules/<vendor>.<name>`. * - `bitrix-d7-module` — copy the module to directory `bitrix/modules/<vendor>.<name>`.
* - `bitrix-d7-component` — copy the component to directory `bitrix/components/<vendor>/<name>`. * - `bitrix-d7-component` — copy the component to directory `bitrix/components/<vendor>/<name>`.
* - `bitrix-d7-template` — copy the template to directory `bitrix/templates/<vendor>_<name>`. * - `bitrix-d7-template` — copy the template to directory `bitrix/templates/<vendor>_<name>`.
* *
* You can set custom path to directory with Bitrix kernel in `composer.json`: * You can set custom path to directory with Bitrix kernel in `composer.json`:
* *
* ```json * ```json
* { * {
* "extra": { * "extra": {
@@ -25,6 +25,7 @@ use Composer\Util\Filesystem;
*/ */
class BitrixInstaller extends BaseInstaller class BitrixInstaller extends BaseInstaller
{ {
/** @var array<string, string> */
protected $locations = array( protected $locations = array(
'module' => '{$bitrix_dir}/modules/{$name}/', // deprecated, remove on the major release (Backward compatibility will be broken) 'module' => '{$bitrix_dir}/modules/{$name}/', // deprecated, remove on the major release (Backward compatibility will be broken)
'component' => '{$bitrix_dir}/components/{$name}/', // deprecated, remove on the major release (Backward compatibility will be broken) 'component' => '{$bitrix_dir}/components/{$name}/', // deprecated, remove on the major release (Backward compatibility will be broken)
@@ -35,15 +36,13 @@ class BitrixInstaller extends BaseInstaller
); );
/** /**
* @var array Storage for informations about duplicates at all the time of installation packages. * @var string[] Storage for informations about duplicates at all the time of installation packages.
*/ */
private static $checkedDuplicates = array(); private static $checkedDuplicates = array();
/** public function inflectPackageVars(array $vars): array
* {@inheritdoc}
*/
public function inflectPackageVars($vars)
{ {
/** @phpstan-ignore-next-line */
if ($this->composer->getPackage()) { if ($this->composer->getPackage()) {
$extra = $this->composer->getPackage()->getExtra(); $extra = $this->composer->getPackage()->getExtra();
@@ -62,7 +61,7 @@ class BitrixInstaller extends BaseInstaller
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
protected function templatePath($path, array $vars = array()) protected function templatePath(string $path, array $vars = array()): string
{ {
$templatePath = parent::templatePath($path, $vars); $templatePath = parent::templatePath($path, $vars);
$this->checkDuplicates($templatePath, $vars); $this->checkDuplicates($templatePath, $vars);
@@ -73,10 +72,9 @@ class BitrixInstaller extends BaseInstaller
/** /**
* Duplicates search packages. * Duplicates search packages.
* *
* @param string $path * @param array<string, string> $vars
* @param array $vars
*/ */
protected function checkDuplicates($path, array $vars = array()) protected function checkDuplicates(string $path, array $vars = array()): void
{ {
$packageType = substr($vars['type'], strlen('bitrix') + 1); $packageType = substr($vars['type'], strlen('bitrix') + 1);
$localDir = explode('/', $vars['bitrix_dir']); $localDir = explode('/', $vars['bitrix_dir']);
@@ -94,8 +92,7 @@ class BitrixInstaller extends BaseInstaller
return; return;
} }
if ($oldPath !== $path && file_exists($oldPath) && $this->io && $this->io->isInteractive()) { if ($oldPath !== $path && file_exists($oldPath) && $this->io->isInteractive()) {
$this->io->writeError(' <error>Duplication of packages:</error>'); $this->io->writeError(' <error>Duplication of packages:</error>');
$this->io->writeError(' <info>Package ' . $oldPath . ' will be called instead package ' . $path . '</info>'); $this->io->writeError(' <info>Package ' . $oldPath . ' will be called instead package ' . $path . '</info>');

View File

@@ -1,8 +1,10 @@
<?php <?php
namespace Composer\Installers; namespace Composer\Installers;
class BonefishInstaller extends BaseInstaller class BonefishInstaller extends BaseInstaller
{ {
/** @var array<string, string> */
protected $locations = array( protected $locations = array(
'package' => 'Packages/{$vendor}/{$name}/' 'package' => 'Packages/{$vendor}/{$name}/'
); );

View File

@@ -0,0 +1,12 @@
<?php
namespace Composer\Installers;
class BotbleInstaller extends BaseInstaller
{
/** @var array<string, string> */
protected $locations = array(
'plugin' => 'platform/plugins/{$name}/',
'theme' => 'platform/themes/{$name}/',
);
}

View File

@@ -1,4 +1,5 @@
<?php <?php
namespace Composer\Installers; namespace Composer\Installers;
use Composer\DependencyResolver\Pool; use Composer\DependencyResolver\Pool;
@@ -6,6 +7,7 @@ use Composer\Semver\Constraint\Constraint;
class CakePHPInstaller extends BaseInstaller class CakePHPInstaller extends BaseInstaller
{ {
/** @var array<string, string> */
protected $locations = array( protected $locations = array(
'plugin' => 'Plugin/{$name}/', 'plugin' => 'Plugin/{$name}/',
); );
@@ -13,7 +15,7 @@ class CakePHPInstaller extends BaseInstaller
/** /**
* Format package name to CamelCase * Format package name to CamelCase
*/ */
public function inflectPackageVars($vars) public function inflectPackageVars(array $vars): array
{ {
if ($this->matchesCakeVersion('>=', '3.0.0')) { if ($this->matchesCakeVersion('>=', '3.0.0')) {
return $vars; return $vars;
@@ -21,7 +23,7 @@ class CakePHPInstaller extends BaseInstaller
$nameParts = explode('/', $vars['name']); $nameParts = explode('/', $vars['name']);
foreach ($nameParts as &$value) { foreach ($nameParts as &$value) {
$value = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $value)); $value = strtolower($this->pregReplace('/(?<=\\w)([A-Z])/', '_\\1', $value));
$value = str_replace(array('-', '_'), ' ', $value); $value = str_replace(array('-', '_'), ' ', $value);
$value = str_replace(' ', '', ucwords($value)); $value = str_replace(' ', '', ucwords($value));
} }
@@ -33,7 +35,7 @@ class CakePHPInstaller extends BaseInstaller
/** /**
* Change the default plugin location when cakephp >= 3.0 * Change the default plugin location when cakephp >= 3.0
*/ */
public function getLocations() public function getLocations(string $frameworkType): array
{ {
if ($this->matchesCakeVersion('>=', '3.0.0')) { if ($this->matchesCakeVersion('>=', '3.0.0')) {
$this->locations['plugin'] = $this->composer->getConfig()->get('vendor-dir') . '/{$vendor}/{$name}/'; $this->locations['plugin'] = $this->composer->getConfig()->get('vendor-dir') . '/{$vendor}/{$name}/';
@@ -44,19 +46,18 @@ class CakePHPInstaller extends BaseInstaller
/** /**
* Check if CakePHP version matches against a version * Check if CakePHP version matches against a version
* *
* @param string $matcher * @phpstan-param '='|'=='|'<'|'<='|'>'|'>='|'<>'|'!=' $matcher
* @param string $version
* @return bool
* @phpstan-param Constraint::STR_OP_* $matcher
*/ */
protected function matchesCakeVersion($matcher, $version) protected function matchesCakeVersion(string $matcher, string $version): bool
{ {
$repositoryManager = $this->composer->getRepositoryManager(); $repositoryManager = $this->composer->getRepositoryManager();
if (! $repositoryManager) { /** @phpstan-ignore-next-line */
if (!$repositoryManager) {
return false; return false;
} }
$repos = $repositoryManager->getLocalRepository(); $repos = $repositoryManager->getLocalRepository();
/** @phpstan-ignore-next-line */
if (!$repos) { if (!$repos) {
return false; return false;
} }

View File

@@ -1,11 +1,12 @@
<?php <?php
namespace Composer\Installers; namespace Composer\Installers;
class ChefInstaller extends BaseInstaller class ChefInstaller extends BaseInstaller
{ {
/** @var array<string, string> */
protected $locations = array( protected $locations = array(
'cookbook' => 'Chef/{$vendor}/{$name}/', 'cookbook' => 'Chef/{$vendor}/{$name}/',
'role' => 'Chef/roles/{$name}/', 'role' => 'Chef/roles/{$name}/',
); );
} }

View File

@@ -1,8 +1,10 @@
<?php <?php
namespace Composer\Installers; namespace Composer\Installers;
class CiviCrmInstaller extends BaseInstaller class CiviCrmInstaller extends BaseInstaller
{ {
/** @var array<string, string> */
protected $locations = array( protected $locations = array(
'ext' => 'ext/{$name}/' 'ext' => 'ext/{$name}/'
); );

View File

@@ -1,10 +1,12 @@
<?php <?php
namespace Composer\Installers; namespace Composer\Installers;
class ClanCatsFrameworkInstaller extends BaseInstaller class ClanCatsFrameworkInstaller extends BaseInstaller
{ {
protected $locations = array( /** @var array<string, string> */
'ship' => 'CCF/orbit/{$name}/', protected $locations = array(
'theme' => 'CCF/app/themes/{$name}/', 'ship' => 'CCF/orbit/{$name}/',
); 'theme' => 'CCF/app/themes/{$name}/',
} );
}

View File

@@ -1,8 +1,10 @@
<?php <?php
namespace Composer\Installers; namespace Composer\Installers;
class CockpitInstaller extends BaseInstaller class CockpitInstaller extends BaseInstaller
{ {
/** @var array<string, string> */
protected $locations = array( protected $locations = array(
'module' => 'cockpit/modules/addons/{$name}/', 'module' => 'cockpit/modules/addons/{$name}/',
); );
@@ -11,10 +13,8 @@ class CockpitInstaller extends BaseInstaller
* Format module name. * Format module name.
* *
* Strip `module-` prefix from package name. * Strip `module-` prefix from package name.
*
* {@inheritDoc}
*/ */
public function inflectPackageVars($vars) public function inflectPackageVars(array $vars): array
{ {
if ($vars['type'] == 'cockpit-module') { if ($vars['type'] == 'cockpit-module') {
return $this->inflectModuleVars($vars); return $this->inflectModuleVars($vars);
@@ -23,9 +23,13 @@ class CockpitInstaller extends BaseInstaller
return $vars; return $vars;
} }
public function inflectModuleVars($vars) /**
* @param array<string, string> $vars
* @return array<string, string>
*/
public function inflectModuleVars(array $vars): array
{ {
$vars['name'] = ucfirst(preg_replace('/cockpit-/i', '', $vars['name'])); $vars['name'] = ucfirst($this->pregReplace('/cockpit-/i', '', $vars['name']));
return $vars; return $vars;
} }

View File

@@ -1,8 +1,10 @@
<?php <?php
namespace Composer\Installers; namespace Composer\Installers;
class CodeIgniterInstaller extends BaseInstaller class CodeIgniterInstaller extends BaseInstaller
{ {
/** @var array<string, string> */
protected $locations = array( protected $locations = array(
'library' => 'application/libraries/{$name}/', 'library' => 'application/libraries/{$name}/',
'third-party' => 'application/third_party/{$name}/', 'third-party' => 'application/third_party/{$name}/',

View File

@@ -1,8 +1,10 @@
<?php <?php
namespace Composer\Installers; namespace Composer\Installers;
class Concrete5Installer extends BaseInstaller class Concrete5Installer extends BaseInstaller
{ {
/** @var array<string, string> */
protected $locations = array( protected $locations = array(
'core' => 'concrete/', 'core' => 'concrete/',
'block' => 'application/blocks/{$name}/', 'block' => 'application/blocks/{$name}/',

View File

@@ -0,0 +1,15 @@
<?php
namespace Composer\Installers;
class ConcreteCMSInstaller extends BaseInstaller
{
/** @var array<string, string> */
protected $locations = array(
'core' => 'concrete/',
'block' => 'application/blocks/{$name}/',
'package' => 'packages/{$name}/',
'theme' => 'application/themes/{$name}/',
'update' => 'updates/{$name}/',
);
}

View File

@@ -1,35 +0,0 @@
<?php
namespace Composer\Installers;
/**
* Installer for Craft Plugins
*/
class CraftInstaller extends BaseInstaller
{
const NAME_PREFIX = 'craft';
const NAME_SUFFIX = 'plugin';
protected $locations = array(
'plugin' => 'craft/plugins/{$name}/',
);
/**
* Strip `craft-` prefix and/or `-plugin` suffix from package names
*
* @param array $vars
*
* @return array
*/
final public function inflectPackageVars($vars)
{
return $this->inflectPluginVars($vars);
}
private function inflectPluginVars($vars)
{
$vars['name'] = preg_replace('/-' . self::NAME_SUFFIX . '$/i', '', $vars['name']);
$vars['name'] = preg_replace('/^' . self::NAME_PREFIX . '-/i', '', $vars['name']);
return $vars;
}
}

View File

@@ -1,8 +1,10 @@
<?php <?php
namespace Composer\Installers; namespace Composer\Installers;
class CroogoInstaller extends BaseInstaller class CroogoInstaller extends BaseInstaller
{ {
/** @var array<string, string> */
protected $locations = array( protected $locations = array(
'plugin' => 'Plugin/{$name}/', 'plugin' => 'Plugin/{$name}/',
'theme' => 'View/Themed/{$name}/', 'theme' => 'View/Themed/{$name}/',
@@ -11,7 +13,7 @@ class CroogoInstaller extends BaseInstaller
/** /**
* Format package name to CamelCase * Format package name to CamelCase
*/ */
public function inflectPackageVars($vars) public function inflectPackageVars(array $vars): array
{ {
$vars['name'] = strtolower(str_replace(array('-', '_'), ' ', $vars['name'])); $vars['name'] = strtolower(str_replace(array('-', '_'), ' ', $vars['name']));
$vars['name'] = str_replace(' ', '', ucwords($vars['name'])); $vars['name'] = str_replace(' ', '', ucwords($vars['name']));

View File

@@ -1,9 +1,11 @@
<?php <?php
namespace Composer\Installers; namespace Composer\Installers;
class DecibelInstaller extends BaseInstaller class DecibelInstaller extends BaseInstaller
{ {
/** @var array */ /** @var array */
/** @var array<string, string> */
protected $locations = array( protected $locations = array(
'app' => 'app/{$name}/', 'app' => 'app/{$name}/',
); );

View File

@@ -4,6 +4,7 @@ namespace Composer\Installers;
class DframeInstaller extends BaseInstaller class DframeInstaller extends BaseInstaller
{ {
/** @var array<string, string> */
protected $locations = array( protected $locations = array(
'module' => 'modules/{$vendor}/{$name}/', 'module' => 'modules/{$vendor}/{$name}/',
); );

View File

@@ -1,8 +1,10 @@
<?php <?php
namespace Composer\Installers; namespace Composer\Installers;
class DokuWikiInstaller extends BaseInstaller class DokuWikiInstaller extends BaseInstaller
{ {
/** @var array<string, string> */
protected $locations = array( protected $locations = array(
'plugin' => 'lib/plugins/{$name}/', 'plugin' => 'lib/plugins/{$name}/',
'template' => 'lib/tpl/{$name}/', 'template' => 'lib/tpl/{$name}/',
@@ -11,15 +13,13 @@ class DokuWikiInstaller extends BaseInstaller
/** /**
* Format package name. * Format package name.
* *
* For package type dokuwiki-plugin, cut off a trailing '-plugin', * For package type dokuwiki-plugin, cut off a trailing '-plugin',
* or leading dokuwiki_ if present. * or leading dokuwiki_ if present.
*
* For package type dokuwiki-template, cut off a trailing '-template' if present.
* *
* For package type dokuwiki-template, cut off a trailing '-template' if present.
*/ */
public function inflectPackageVars($vars) public function inflectPackageVars(array $vars): array
{ {
if ($vars['type'] === 'dokuwiki-plugin') { if ($vars['type'] === 'dokuwiki-plugin') {
return $this->inflectPluginVars($vars); return $this->inflectPluginVars($vars);
} }
@@ -31,20 +31,27 @@ class DokuWikiInstaller extends BaseInstaller
return $vars; return $vars;
} }
protected function inflectPluginVars($vars) /**
* @param array<string, string> $vars
* @return array<string, string>
*/
protected function inflectPluginVars(array $vars): array
{ {
$vars['name'] = preg_replace('/-plugin$/', '', $vars['name']); $vars['name'] = $this->pregReplace('/-plugin$/', '', $vars['name']);
$vars['name'] = preg_replace('/^dokuwiki_?-?/', '', $vars['name']); $vars['name'] = $this->pregReplace('/^dokuwiki_?-?/', '', $vars['name']);
return $vars; return $vars;
} }
protected function inflectTemplateVars($vars) /**
* @param array<string, string> $vars
* @return array<string, string>
*/
protected function inflectTemplateVars(array $vars): array
{ {
$vars['name'] = preg_replace('/-template$/', '', $vars['name']); $vars['name'] = $this->pregReplace('/-template$/', '', $vars['name']);
$vars['name'] = preg_replace('/^dokuwiki_?-?/', '', $vars['name']); $vars['name'] = $this->pregReplace('/^dokuwiki_?-?/', '', $vars['name']);
return $vars; return $vars;
} }
} }

View File

@@ -1,4 +1,5 @@
<?php <?php
namespace Composer\Installers; namespace Composer\Installers;
/** /**
@@ -10,6 +11,7 @@ namespace Composer\Installers;
class DolibarrInstaller extends BaseInstaller class DolibarrInstaller extends BaseInstaller
{ {
//TODO: Add support for scripts and themes //TODO: Add support for scripts and themes
/** @var array<string, string> */
protected $locations = array( protected $locations = array(
'module' => 'htdocs/custom/{$name}/', 'module' => 'htdocs/custom/{$name}/',
); );

View File

@@ -1,8 +1,10 @@
<?php <?php
namespace Composer\Installers; namespace Composer\Installers;
class DrupalInstaller extends BaseInstaller class DrupalInstaller extends BaseInstaller
{ {
/** @var array<string, string> */
protected $locations = array( protected $locations = array(
'core' => 'core/', 'core' => 'core/',
'module' => 'modules/{$name}/', 'module' => 'modules/{$name}/',
@@ -18,5 +20,6 @@ class DrupalInstaller extends BaseInstaller
'console' => 'console/{$name}/', 'console' => 'console/{$name}/',
'console-language' => 'console/language/{$name}/', 'console-language' => 'console/language/{$name}/',
'config' => 'config/sync/', 'config' => 'config/sync/',
'recipe' => 'recipes/{$name}',
); );
} }

View File

@@ -1,8 +1,10 @@
<?php <?php
namespace Composer\Installers; namespace Composer\Installers;
class ElggInstaller extends BaseInstaller class ElggInstaller extends BaseInstaller
{ {
/** @var array<string, string> */
protected $locations = array( protected $locations = array(
'plugin' => 'mod/{$name}/', 'plugin' => 'mod/{$name}/',
); );

View File

@@ -1,8 +1,10 @@
<?php <?php
namespace Composer\Installers; namespace Composer\Installers;
class EliasisInstaller extends BaseInstaller class EliasisInstaller extends BaseInstaller
{ {
/** @var array<string, string> */
protected $locations = array( protected $locations = array(
'component' => 'components/{$name}/', 'component' => 'components/{$name}/',
'module' => 'modules/{$name}/', 'module' => 'modules/{$name}/',

View File

@@ -1,29 +1,31 @@
<?php <?php
namespace Composer\Installers; namespace Composer\Installers;
use Composer\Package\PackageInterface; use Composer\Package\PackageInterface;
class ExpressionEngineInstaller extends BaseInstaller class ExpressionEngineInstaller extends BaseInstaller
{ {
/** @var array<string, string> */
protected $locations = array();
private $ee2Locations = array( private $ee2Locations = array(
'addon' => 'system/expressionengine/third_party/{$name}/', 'addon' => 'system/expressionengine/third_party/{$name}/',
'theme' => 'themes/third_party/{$name}/', 'theme' => 'themes/third_party/{$name}/',
); );
/** @var array<string, string> */
private $ee3Locations = array( private $ee3Locations = array(
'addon' => 'system/user/addons/{$name}/', 'addon' => 'system/user/addons/{$name}/',
'theme' => 'themes/user/{$name}/', 'theme' => 'themes/user/{$name}/',
); );
public function getInstallPath(PackageInterface $package, $frameworkType = '') public function getLocations(string $frameworkType): array
{ {
if ($frameworkType === 'ee2') {
$this->locations = $this->ee2Locations;
} else {
$this->locations = $this->ee3Locations;
}
$version = "{$frameworkType}Locations"; return $this->locations;
$this->locations = $this->$version;
return parent::getInstallPath($package, $frameworkType);
} }
} }

View File

@@ -1,8 +1,10 @@
<?php <?php
namespace Composer\Installers; namespace Composer\Installers;
class EzPlatformInstaller extends BaseInstaller class EzPlatformInstaller extends BaseInstaller
{ {
/** @var array<string, string> */
protected $locations = array( protected $locations = array(
'meta-assets' => 'web/assets/ezplatform/', 'meta-assets' => 'web/assets/ezplatform/',
'assets' => 'web/assets/ezplatform/{$name}/', 'assets' => 'web/assets/ezplatform/{$name}/',

View File

@@ -0,0 +1,58 @@
<?php
namespace Composer\Installers;
class ForkCMSInstaller extends BaseInstaller
{
/** @var array<string, string> */
protected $locations = [
'module' => 'src/Modules/{$name}/',
'theme' => 'src/Themes/{$name}/'
];
/**
* Format package name.
*
* For package type fork-cms-module, cut off a trailing '-plugin' if present.
*
* For package type fork-cms-theme, cut off a trailing '-theme' if present.
*/
public function inflectPackageVars(array $vars): array
{
if ($vars['type'] === 'fork-cms-module') {
return $this->inflectModuleVars($vars);
}
if ($vars['type'] === 'fork-cms-theme') {
return $this->inflectThemeVars($vars);
}
return $vars;
}
/**
* @param array<string, string> $vars
* @return array<string, string>
*/
protected function inflectModuleVars(array $vars): array
{
$vars['name'] = $this->pregReplace('/^fork-cms-|-module|ForkCMS|ForkCms|Forkcms|forkcms|Module$/', '', $vars['name']);
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']); // replace hyphens with spaces
$vars['name'] = str_replace(' ', '', ucwords($vars['name'])); // make module name camelcased
return $vars;
}
/**
* @param array<string, string> $vars
* @return array<string, string>
*/
protected function inflectThemeVars(array $vars): array
{
$vars['name'] = $this->pregReplace('/^fork-cms-|-theme|ForkCMS|ForkCms|Forkcms|forkcms|Theme$/', '', $vars['name']);
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']); // replace hyphens with spaces
$vars['name'] = str_replace(' ', '', ucwords($vars['name'])); // make theme name camelcased
return $vars;
}
}

View File

@@ -1,8 +1,10 @@
<?php <?php
namespace Composer\Installers; namespace Composer\Installers;
class FuelInstaller extends BaseInstaller class FuelInstaller extends BaseInstaller
{ {
/** @var array<string, string> */
protected $locations = array( protected $locations = array(
'module' => 'fuel/app/modules/{$name}/', 'module' => 'fuel/app/modules/{$name}/',
'package' => 'fuel/packages/{$name}/', 'package' => 'fuel/packages/{$name}/',

View File

@@ -1,8 +1,10 @@
<?php <?php
namespace Composer\Installers; namespace Composer\Installers;
class FuelphpInstaller extends BaseInstaller class FuelphpInstaller extends BaseInstaller
{ {
/** @var array<string, string> */
protected $locations = array( protected $locations = array(
'component' => 'components/{$name}/', 'component' => 'components/{$name}/',
); );

View File

@@ -1,8 +1,10 @@
<?php <?php
namespace Composer\Installers; namespace Composer\Installers;
class GravInstaller extends BaseInstaller class GravInstaller extends BaseInstaller
{ {
/** @var array<string, string> */
protected $locations = array( protected $locations = array(
'plugin' => 'user/plugins/{$name}/', 'plugin' => 'user/plugins/{$name}/',
'theme' => 'user/themes/{$name}/', 'theme' => 'user/themes/{$name}/',
@@ -10,17 +12,14 @@ class GravInstaller extends BaseInstaller
/** /**
* Format package name * Format package name
*
* @param array $vars
*
* @return array
*/ */
public function inflectPackageVars($vars) public function inflectPackageVars(array $vars): array
{ {
$restrictedWords = implode('|', array_keys($this->locations)); $restrictedWords = implode('|', array_keys($this->locations));
$vars['name'] = strtolower($vars['name']); $vars['name'] = strtolower($vars['name']);
$vars['name'] = preg_replace('/^(?:grav-)?(?:(?:'.$restrictedWords.')-)?(.*?)(?:-(?:'.$restrictedWords.'))?$/ui', $vars['name'] = $this->pregReplace(
'/^(?:grav-)?(?:(?:'.$restrictedWords.')-)?(.*?)(?:-(?:'.$restrictedWords.'))?$/ui',
'$1', '$1',
$vars['name'] $vars['name']
); );

View File

@@ -1,8 +1,10 @@
<?php <?php
namespace Composer\Installers; namespace Composer\Installers;
class HuradInstaller extends BaseInstaller class HuradInstaller extends BaseInstaller
{ {
/** @var array<string, string> */
protected $locations = array( protected $locations = array(
'plugin' => 'plugins/{$name}/', 'plugin' => 'plugins/{$name}/',
'theme' => 'plugins/{$name}/', 'theme' => 'plugins/{$name}/',
@@ -11,11 +13,11 @@ class HuradInstaller extends BaseInstaller
/** /**
* Format package name to CamelCase * Format package name to CamelCase
*/ */
public function inflectPackageVars($vars) public function inflectPackageVars(array $vars): array
{ {
$nameParts = explode('/', $vars['name']); $nameParts = explode('/', $vars['name']);
foreach ($nameParts as &$value) { foreach ($nameParts as &$value) {
$value = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $value)); $value = strtolower($this->pregReplace('/(?<=\\w)([A-Z])/', '_\\1', $value));
$value = str_replace(array('-', '_'), ' ', $value); $value = str_replace(array('-', '_'), ' ', $value);
$value = str_replace(' ', '', ucwords($value)); $value = str_replace(' ', '', ucwords($value));
} }

View File

@@ -1,8 +1,10 @@
<?php <?php
namespace Composer\Installers; namespace Composer\Installers;
class ImageCMSInstaller extends BaseInstaller class ImageCMSInstaller extends BaseInstaller
{ {
/** @var array<string, string> */
protected $locations = array( protected $locations = array(
'template' => 'templates/{$name}/', 'template' => 'templates/{$name}/',
'module' => 'application/modules/{$name}/', 'module' => 'application/modules/{$name}/',

View File

@@ -6,6 +6,7 @@ use Composer\Composer;
use Composer\Installer\BinaryInstaller; use Composer\Installer\BinaryInstaller;
use Composer\Installer\LibraryInstaller; use Composer\Installer\LibraryInstaller;
use Composer\IO\IOInterface; use Composer\IO\IOInterface;
use Composer\Package\Package;
use Composer\Package\PackageInterface; use Composer\Package\PackageInterface;
use Composer\Repository\InstalledRepositoryInterface; use Composer\Repository\InstalledRepositoryInterface;
use Composer\Util\Filesystem; use Composer\Util\Filesystem;
@@ -13,19 +14,19 @@ use React\Promise\PromiseInterface;
class Installer extends LibraryInstaller class Installer extends LibraryInstaller
{ {
/** /**
* Package types to installer class map * Package types to installer class map
* *
* @var array * @var array<string, string>
*/ */
private $supportedTypes = array( private $supportedTypes = array(
'aimeos' => 'AimeosInstaller', 'akaunting' => 'AkauntingInstaller',
'asgard' => 'AsgardInstaller', 'asgard' => 'AsgardInstaller',
'attogram' => 'AttogramInstaller', 'attogram' => 'AttogramInstaller',
'agl' => 'AglInstaller', 'agl' => 'AglInstaller',
'annotatecms' => 'AnnotateCmsInstaller', 'annotatecms' => 'AnnotateCmsInstaller',
'bitrix' => 'BitrixInstaller', 'bitrix' => 'BitrixInstaller',
'botble' => 'BotbleInstaller',
'bonefish' => 'BonefishInstaller', 'bonefish' => 'BonefishInstaller',
'cakephp' => 'CakePHPInstaller', 'cakephp' => 'CakePHPInstaller',
'chef' => 'ChefInstaller', 'chef' => 'ChefInstaller',
@@ -34,7 +35,7 @@ class Installer extends LibraryInstaller
'cockpit' => 'CockpitInstaller', 'cockpit' => 'CockpitInstaller',
'codeigniter' => 'CodeIgniterInstaller', 'codeigniter' => 'CodeIgniterInstaller',
'concrete5' => 'Concrete5Installer', 'concrete5' => 'Concrete5Installer',
'craft' => 'CraftInstaller', 'concretecms' => 'ConcreteCMSInstaller',
'croogo' => 'CroogoInstaller', 'croogo' => 'CroogoInstaller',
'dframe' => 'DframeInstaller', 'dframe' => 'DframeInstaller',
'dokuwiki' => 'DokuWikiInstaller', 'dokuwiki' => 'DokuWikiInstaller',
@@ -46,6 +47,7 @@ class Installer extends LibraryInstaller
'ee3' => 'ExpressionEngineInstaller', 'ee3' => 'ExpressionEngineInstaller',
'ee2' => 'ExpressionEngineInstaller', 'ee2' => 'ExpressionEngineInstaller',
'ezplatform' => 'EzPlatformInstaller', 'ezplatform' => 'EzPlatformInstaller',
'fork' => 'ForkCMSInstaller',
'fuel' => 'FuelInstaller', 'fuel' => 'FuelInstaller',
'fuelphp' => 'FuelphpInstaller', 'fuelphp' => 'FuelphpInstaller',
'grav' => 'GravInstaller', 'grav' => 'GravInstaller',
@@ -53,13 +55,11 @@ class Installer extends LibraryInstaller
'tastyigniter' => 'TastyIgniterInstaller', 'tastyigniter' => 'TastyIgniterInstaller',
'imagecms' => 'ImageCMSInstaller', 'imagecms' => 'ImageCMSInstaller',
'itop' => 'ItopInstaller', 'itop' => 'ItopInstaller',
'joomla' => 'JoomlaInstaller',
'kanboard' => 'KanboardInstaller', 'kanboard' => 'KanboardInstaller',
'kirby' => 'KirbyInstaller',
'known' => 'KnownInstaller', 'known' => 'KnownInstaller',
'kodicms' => 'KodiCMSInstaller', 'kodicms' => 'KodiCMSInstaller',
'kohana' => 'KohanaInstaller', 'kohana' => 'KohanaInstaller',
'lms' => 'LanManagementSystemInstaller', 'lms' => 'LanManagementSystemInstaller',
'laravel' => 'LaravelInstaller', 'laravel' => 'LaravelInstaller',
'lavalite' => 'LavaLiteInstaller', 'lavalite' => 'LavaLiteInstaller',
'lithium' => 'LithiumInstaller', 'lithium' => 'LithiumInstaller',
@@ -67,6 +67,7 @@ class Installer extends LibraryInstaller
'majima' => 'MajimaInstaller', 'majima' => 'MajimaInstaller',
'mantisbt' => 'MantisBTInstaller', 'mantisbt' => 'MantisBTInstaller',
'mako' => 'MakoInstaller', 'mako' => 'MakoInstaller',
'matomo' => 'MatomoInstaller',
'maya' => 'MayaInstaller', 'maya' => 'MayaInstaller',
'mautic' => 'MauticInstaller', 'mautic' => 'MauticInstaller',
'mediawiki' => 'MediaWikiInstaller', 'mediawiki' => 'MediaWikiInstaller',
@@ -82,7 +83,6 @@ class Installer extends LibraryInstaller
'osclass' => 'OsclassInstaller', 'osclass' => 'OsclassInstaller',
'pxcms' => 'PxcmsInstaller', 'pxcms' => 'PxcmsInstaller',
'phpbb' => 'PhpBBInstaller', 'phpbb' => 'PhpBBInstaller',
'pimcore' => 'PimcoreInstaller',
'piwik' => 'PiwikInstaller', 'piwik' => 'PiwikInstaller',
'plentymarkets'=> 'PlentymarketsInstaller', 'plentymarkets'=> 'PlentymarketsInstaller',
'ppi' => 'PPIInstaller', 'ppi' => 'PPIInstaller',
@@ -103,12 +103,9 @@ class Installer extends LibraryInstaller
'starbug' => 'StarbugInstaller', 'starbug' => 'StarbugInstaller',
'sydes' => 'SyDESInstaller', 'sydes' => 'SyDESInstaller',
'sylius' => 'SyliusInstaller', 'sylius' => 'SyliusInstaller',
'symfony1' => 'Symfony1Installer',
'tao' => 'TaoInstaller', 'tao' => 'TaoInstaller',
'thelia' => 'TheliaInstaller', 'thelia' => 'TheliaInstaller',
'tusk' => 'TuskInstaller', 'tusk' => 'TuskInstaller',
'typo3-cms' => 'TYPO3CmsInstaller',
'typo3-flow' => 'TYPO3FlowInstaller',
'userfrosting' => 'UserFrostingInstaller', 'userfrosting' => 'UserFrostingInstaller',
'vanilla' => 'VanillaInstaller', 'vanilla' => 'VanillaInstaller',
'whmcs' => 'WHMCSInstaller', 'whmcs' => 'WHMCSInstaller',
@@ -122,26 +119,17 @@ class Installer extends LibraryInstaller
); );
/** /**
* Installer constructor.
*
* Disables installers specified in main composer extra installer-disable * Disables installers specified in main composer extra installer-disable
* list * list
*
* @param IOInterface $io
* @param Composer $composer
* @param string $type
* @param Filesystem|null $filesystem
* @param BinaryInstaller|null $binaryInstaller
*/ */
public function __construct( public function __construct(
IOInterface $io, IOInterface $io,
Composer $composer, Composer $composer,
$type = 'library', string $type = 'library',
Filesystem $filesystem = null, ?Filesystem $filesystem = null,
BinaryInstaller $binaryInstaller = null ?BinaryInstaller $binaryInstaller = null
) { ) {
parent::__construct($io, $composer, $type, $filesystem, parent::__construct($io, $composer, $type, $filesystem, $binaryInstaller);
$binaryInstaller);
$this->removeDisabledInstallers(); $this->removeDisabledInstallers();
} }
@@ -160,9 +148,17 @@ class Installer extends LibraryInstaller
} }
$class = 'Composer\\Installers\\' . $this->supportedTypes[$frameworkType]; $class = 'Composer\\Installers\\' . $this->supportedTypes[$frameworkType];
/**
* @var BaseInstaller
*/
$installer = new $class($package, $this->composer, $this->getIO()); $installer = new $class($package, $this->composer, $this->getIO());
return $installer->getInstallPath($package, $frameworkType); $path = $installer->getInstallPath($package, $frameworkType);
if (!$this->filesystem->isAbsolutePath($path)) {
$path = getcwd() . '/' . $path;
}
return $path;
} }
public function uninstall(InstalledRepositoryInterface $repo, PackageInterface $package) public function uninstall(InstalledRepositoryInterface $repo, PackageInterface $package)
@@ -188,6 +184,8 @@ class Installer extends LibraryInstaller
/** /**
* {@inheritDoc} * {@inheritDoc}
*
* @param string $packageType
*/ */
public function supports($packageType) public function supports($packageType)
{ {
@@ -205,10 +203,9 @@ class Installer extends LibraryInstaller
/** /**
* Finds a supported framework type if it exists and returns it * Finds a supported framework type if it exists and returns it
* *
* @param string $type
* @return string|false * @return string|false
*/ */
protected function findFrameworkType($type) protected function findFrameworkType(string $type)
{ {
krsort($this->supportedTypes); krsort($this->supportedTypes);
@@ -224,30 +221,24 @@ class Installer extends LibraryInstaller
/** /**
* Get the second part of the regular expression to check for support of a * Get the second part of the regular expression to check for support of a
* package type * package type
*
* @param string $frameworkType
* @return string
*/ */
protected function getLocationPattern($frameworkType) protected function getLocationPattern(string $frameworkType): string
{ {
$pattern = false; $pattern = null;
if (!empty($this->supportedTypes[$frameworkType])) { if (!empty($this->supportedTypes[$frameworkType])) {
$frameworkClass = 'Composer\\Installers\\' . $this->supportedTypes[$frameworkType]; $frameworkClass = 'Composer\\Installers\\' . $this->supportedTypes[$frameworkType];
/** @var BaseInstaller $framework */ /** @var BaseInstaller $framework */
$framework = new $frameworkClass(null, $this->composer, $this->getIO()); $framework = new $frameworkClass(new Package('dummy/pkg', '1.0.0.0', '1.0.0'), $this->composer, $this->getIO());
$locations = array_keys($framework->getLocations()); $locations = array_keys($framework->getLocations($frameworkType));
$pattern = $locations ? '(' . implode('|', $locations) . ')' : false; if ($locations) {
$pattern = '(' . implode('|', $locations) . ')';
}
} }
return $pattern ? : '(\w+)'; return $pattern ?: '(\w+)';
} }
/** private function getIO(): IOInterface
* Get I/O object
*
* @return IOInterface
*/
private function getIO()
{ {
return $this->io; return $this->io;
} }
@@ -260,10 +251,8 @@ class Installer extends LibraryInstaller
* - true, "all", and "*" - disable all installers. * - true, "all", and "*" - disable all installers.
* - false - enable all installers (useful with * - false - enable all installers (useful with
* wikimedia/composer-merge-plugin or similar) * wikimedia/composer-merge-plugin or similar)
*
* @return void
*/ */
protected function removeDisabledInstallers() protected function removeDisabledInstallers(): void
{ {
$extra = $this->composer->getPackage()->getExtra(); $extra = $this->composer->getPackage()->getExtra();
@@ -286,12 +275,13 @@ class Installer extends LibraryInstaller
if (!empty($intersect)) { if (!empty($intersect)) {
// Disable all installers // Disable all installers
$this->supportedTypes = array(); $this->supportedTypes = array();
} else { return;
// Disable specified installers }
foreach ($disable as $key => $installer) {
if (is_string($installer) && key_exists($installer, $this->supportedTypes)) { // Disable specified installers
unset($this->supportedTypes[$installer]); foreach ($disable as $key => $installer) {
} if (is_string($installer) && key_exists($installer, $this->supportedTypes)) {
unset($this->supportedTypes[$installer]);
} }
} }
} }

View File

@@ -1,8 +1,10 @@
<?php <?php
namespace Composer\Installers; namespace Composer\Installers;
class ItopInstaller extends BaseInstaller class ItopInstaller extends BaseInstaller
{ {
/** @var array<string, string> */
protected $locations = array( protected $locations = array(
'extension' => 'extensions/{$name}/', 'extension' => 'extensions/{$name}/',
); );

View File

@@ -1,15 +0,0 @@
<?php
namespace Composer\Installers;
class JoomlaInstaller extends BaseInstaller
{
protected $locations = array(
'component' => 'components/{$name}/',
'module' => 'modules/{$name}/',
'template' => 'templates/{$name}/',
'plugin' => 'plugins/{$name}/',
'library' => 'libraries/{$name}/',
);
// TODO: Add inflector for mod_ and com_ names
}

View File

@@ -1,4 +1,5 @@
<?php <?php
namespace Composer\Installers; namespace Composer\Installers;
/** /**
@@ -12,6 +13,7 @@ namespace Composer\Installers;
*/ */
class KanboardInstaller extends BaseInstaller class KanboardInstaller extends BaseInstaller
{ {
/** @var array<string, string> */
protected $locations = array( protected $locations = array(
'plugin' => 'plugins/{$name}/', 'plugin' => 'plugins/{$name}/',
); );

View File

@@ -1,11 +0,0 @@
<?php
namespace Composer\Installers;
class KirbyInstaller extends BaseInstaller
{
protected $locations = array(
'plugin' => 'site/plugins/{$name}/',
'field' => 'site/fields/{$name}/',
'tag' => 'site/tags/{$name}/'
);
}

View File

@@ -1,8 +1,10 @@
<?php <?php
namespace Composer\Installers; namespace Composer\Installers;
class KnownInstaller extends BaseInstaller class KnownInstaller extends BaseInstaller
{ {
/** @var array<string, string> */
protected $locations = array( protected $locations = array(
'plugin' => 'IdnoPlugins/{$name}/', 'plugin' => 'IdnoPlugins/{$name}/',
'theme' => 'Themes/{$name}/', 'theme' => 'Themes/{$name}/',

View File

@@ -1,10 +1,12 @@
<?php <?php
namespace Composer\Installers; namespace Composer\Installers;
class KodiCMSInstaller extends BaseInstaller class KodiCMSInstaller extends BaseInstaller
{ {
/** @var array<string, string> */
protected $locations = array( protected $locations = array(
'plugin' => 'cms/plugins/{$name}/', 'plugin' => 'cms/plugins/{$name}/',
'media' => 'cms/media/vendor/{$name}/' 'media' => 'cms/media/vendor/{$name}/'
); );
} }

View File

@@ -1,8 +1,10 @@
<?php <?php
namespace Composer\Installers; namespace Composer\Installers;
class KohanaInstaller extends BaseInstaller class KohanaInstaller extends BaseInstaller
{ {
/** @var array<string, string> */
protected $locations = array( protected $locations = array(
'module' => 'modules/{$name}/', 'module' => 'modules/{$name}/',
); );

View File

@@ -5,6 +5,7 @@ namespace Composer\Installers;
class LanManagementSystemInstaller extends BaseInstaller class LanManagementSystemInstaller extends BaseInstaller
{ {
/** @var array<string, string> */
protected $locations = array( protected $locations = array(
'plugin' => 'plugins/{$name}/', 'plugin' => 'plugins/{$name}/',
'template' => 'templates/{$name}/', 'template' => 'templates/{$name}/',
@@ -15,13 +16,12 @@ class LanManagementSystemInstaller extends BaseInstaller
/** /**
* Format package name to CamelCase * Format package name to CamelCase
*/ */
public function inflectPackageVars($vars) public function inflectPackageVars(array $vars): array
{ {
$vars['name'] = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name'])); $vars['name'] = strtolower($this->pregReplace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name']));
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']); $vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
$vars['name'] = str_replace(' ', '', ucwords($vars['name'])); $vars['name'] = str_replace(' ', '', ucwords($vars['name']));
return $vars; return $vars;
} }
} }

View File

@@ -1,8 +1,10 @@
<?php <?php
namespace Composer\Installers; namespace Composer\Installers;
class LaravelInstaller extends BaseInstaller class LaravelInstaller extends BaseInstaller
{ {
/** @var array<string, string> */
protected $locations = array( protected $locations = array(
'library' => 'libraries/{$name}/', 'library' => 'libraries/{$name}/',
); );

View File

@@ -1,8 +1,10 @@
<?php <?php
namespace Composer\Installers; namespace Composer\Installers;
class LavaLiteInstaller extends BaseInstaller class LavaLiteInstaller extends BaseInstaller
{ {
/** @var array<string, string> */
protected $locations = array( protected $locations = array(
'package' => 'packages/{$vendor}/{$name}/', 'package' => 'packages/{$vendor}/{$name}/',
'theme' => 'public/themes/{$name}/', 'theme' => 'public/themes/{$name}/',

View File

@@ -1,8 +1,10 @@
<?php <?php
namespace Composer\Installers; namespace Composer\Installers;
class LithiumInstaller extends BaseInstaller class LithiumInstaller extends BaseInstaller
{ {
/** @var array<string, string> */
protected $locations = array( protected $locations = array(
'library' => 'libraries/{$name}/', 'library' => 'libraries/{$name}/',
'source' => 'libraries/_source/{$name}/', 'source' => 'libraries/_source/{$name}/',

View File

@@ -1,8 +1,10 @@
<?php <?php
namespace Composer\Installers; namespace Composer\Installers;
class MODULEWorkInstaller extends BaseInstaller class MODULEWorkInstaller extends BaseInstaller
{ {
/** @var array<string, string> */
protected $locations = array( protected $locations = array(
'module' => 'modules/{$name}/', 'module' => 'modules/{$name}/',
); );

View File

@@ -1,4 +1,5 @@
<?php <?php
namespace Composer\Installers; namespace Composer\Installers;
/** /**
@@ -6,6 +7,7 @@ namespace Composer\Installers;
*/ */
class MODXEvoInstaller extends BaseInstaller class MODXEvoInstaller extends BaseInstaller
{ {
/** @var array<string, string> */
protected $locations = array( protected $locations = array(
'snippet' => 'assets/snippets/{$name}/', 'snippet' => 'assets/snippets/{$name}/',
'plugin' => 'assets/plugins/{$name}/', 'plugin' => 'assets/plugins/{$name}/',

View File

@@ -1,8 +1,10 @@
<?php <?php
namespace Composer\Installers; namespace Composer\Installers;
class MagentoInstaller extends BaseInstaller class MagentoInstaller extends BaseInstaller
{ {
/** @var array<string, string> */
protected $locations = array( protected $locations = array(
'theme' => 'app/design/frontend/{$name}/', 'theme' => 'app/design/frontend/{$name}/',
'skin' => 'skin/frontend/default/{$name}/', 'skin' => 'skin/frontend/default/{$name}/',

View File

@@ -1,4 +1,5 @@
<?php <?php
namespace Composer\Installers; namespace Composer\Installers;
/** /**
@@ -7,30 +8,38 @@ namespace Composer\Installers;
*/ */
class MajimaInstaller extends BaseInstaller class MajimaInstaller extends BaseInstaller
{ {
/** @var array<string, string> */
protected $locations = array( protected $locations = array(
'plugin' => 'plugins/{$name}/', 'plugin' => 'plugins/{$name}/',
); );
/** /**
* Transforms the names * Transforms the names
* @param array $vars *
* @return array * @param array<string, string> $vars
* @return array<string, string>
*/ */
public function inflectPackageVars($vars) public function inflectPackageVars(array $vars): array
{ {
return $this->correctPluginName($vars); return $this->correctPluginName($vars);
} }
/** /**
* Change hyphenated names to camelcase * Change hyphenated names to camelcase
* @param array $vars *
* @return array * @param array<string, string> $vars
* @return array<string, string>
*/ */
private function correctPluginName($vars) private function correctPluginName(array $vars): array
{ {
$camelCasedName = preg_replace_callback('/(-[a-z])/', function ($matches) { $camelCasedName = preg_replace_callback('/(-[a-z])/', function ($matches) {
return strtoupper($matches[0][1]); return strtoupper($matches[0][1]);
}, $vars['name']); }, $vars['name']);
if (null === $camelCasedName) {
throw new \RuntimeException('Failed to run preg_replace_callback: '.preg_last_error());
}
$vars['name'] = ucfirst($camelCasedName); $vars['name'] = ucfirst($camelCasedName);
return $vars; return $vars;
} }

View File

@@ -1,8 +1,10 @@
<?php <?php
namespace Composer\Installers; namespace Composer\Installers;
class MakoInstaller extends BaseInstaller class MakoInstaller extends BaseInstaller
{ {
/** @var array<string, string> */
protected $locations = array( protected $locations = array(
'package' => 'app/packages/{$name}/', 'package' => 'app/packages/{$name}/',
); );

View File

@@ -1,10 +1,12 @@
<?php <?php
namespace Composer\Installers; namespace Composer\Installers;
use Composer\DependencyResolver\Pool; use Composer\DependencyResolver\Pool;
class MantisBTInstaller extends BaseInstaller class MantisBTInstaller extends BaseInstaller
{ {
/** @var array<string, string> */
protected $locations = array( protected $locations = array(
'plugin' => 'plugins/{$name}/', 'plugin' => 'plugins/{$name}/',
); );
@@ -12,9 +14,9 @@ class MantisBTInstaller extends BaseInstaller
/** /**
* Format package name to CamelCase * Format package name to CamelCase
*/ */
public function inflectPackageVars($vars) public function inflectPackageVars(array $vars): array
{ {
$vars['name'] = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name'])); $vars['name'] = strtolower($this->pregReplace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name']));
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']); $vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
$vars['name'] = str_replace(' ', '', ucwords($vars['name'])); $vars['name'] = str_replace(' ', '', ucwords($vars['name']));

View File

@@ -1,8 +1,15 @@
<?php <?php
namespace Composer\Installers; namespace Composer\Installers;
class PimcoreInstaller extends BaseInstaller /**
* Class MatomoInstaller
*
* @package Composer\Installers
*/
class MatomoInstaller extends BaseInstaller
{ {
/** @var array<string, string> */
protected $locations = array( protected $locations = array(
'plugin' => 'plugins/{$name}/', 'plugin' => 'plugins/{$name}/',
); );
@@ -10,9 +17,9 @@ class PimcoreInstaller extends BaseInstaller
/** /**
* Format package name to CamelCase * Format package name to CamelCase
*/ */
public function inflectPackageVars($vars) public function inflectPackageVars(array $vars): array
{ {
$vars['name'] = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name'])); $vars['name'] = strtolower($this->pregReplace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name']));
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']); $vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
$vars['name'] = str_replace(' ', '', ucwords($vars['name'])); $vars['name'] = str_replace(' ', '', ucwords($vars['name']));

View File

@@ -1,17 +1,19 @@
<?php <?php
namespace Composer\Installers; namespace Composer\Installers;
use Composer\Package\PackageInterface; use Composer\Package\PackageInterface;
class MauticInstaller extends BaseInstaller class MauticInstaller extends BaseInstaller
{ {
/** @var array<string, string> */
protected $locations = array( protected $locations = array(
'plugin' => 'plugins/{$name}/', 'plugin' => 'plugins/{$name}/',
'theme' => 'themes/{$name}/', 'theme' => 'themes/{$name}/',
'core' => 'app/', 'core' => 'app/',
); );
private function getDirectoryName() private function getDirectoryName(): string
{ {
$extra = $this->package->getExtra(); $extra = $this->package->getExtra();
if (!empty($extra['install-directory-name'])) { if (!empty($extra['install-directory-name'])) {
@@ -21,12 +23,7 @@ class MauticInstaller extends BaseInstaller
return $this->toCamelCase($this->package->getPrettyName()); return $this->toCamelCase($this->package->getPrettyName());
} }
/** private function toCamelCase(string $packageName): string
* @param string $packageName
*
* @return string
*/
private function toCamelCase($packageName)
{ {
return str_replace(' ', '', ucwords(str_replace('-', ' ', basename($packageName)))); return str_replace(' ', '', ucwords(str_replace('-', ' ', basename($packageName))));
} }
@@ -34,9 +31,8 @@ class MauticInstaller extends BaseInstaller
/** /**
* Format package name of mautic-plugins to CamelCase * Format package name of mautic-plugins to CamelCase
*/ */
public function inflectPackageVars($vars) public function inflectPackageVars(array $vars): array
{ {
if ($vars['type'] == 'mautic-plugin' || $vars['type'] == 'mautic-theme') { if ($vars['type'] == 'mautic-plugin' || $vars['type'] == 'mautic-theme') {
$directoryName = $this->getDirectoryName(); $directoryName = $this->getDirectoryName();
$vars['name'] = $directoryName; $vars['name'] = $directoryName;
@@ -44,5 +40,4 @@ class MauticInstaller extends BaseInstaller
return $vars; return $vars;
} }
} }

View File

@@ -1,8 +1,10 @@
<?php <?php
namespace Composer\Installers; namespace Composer\Installers;
class MayaInstaller extends BaseInstaller class MayaInstaller extends BaseInstaller
{ {
/** @var array<string, string> */
protected $locations = array( protected $locations = array(
'module' => 'modules/{$name}/', 'module' => 'modules/{$name}/',
); );
@@ -11,9 +13,8 @@ class MayaInstaller extends BaseInstaller
* Format package name. * Format package name.
* *
* For package type maya-module, cut off a trailing '-module' if present. * For package type maya-module, cut off a trailing '-module' if present.
*
*/ */
public function inflectPackageVars($vars) public function inflectPackageVars(array $vars): array
{ {
if ($vars['type'] === 'maya-module') { if ($vars['type'] === 'maya-module') {
return $this->inflectModuleVars($vars); return $this->inflectModuleVars($vars);
@@ -22,9 +23,13 @@ class MayaInstaller extends BaseInstaller
return $vars; return $vars;
} }
protected function inflectModuleVars($vars) /**
* @param array<string, string> $vars
* @return array<string, string>
*/
protected function inflectModuleVars(array $vars): array
{ {
$vars['name'] = preg_replace('/-module$/', '', $vars['name']); $vars['name'] = $this->pregReplace('/-module$/', '', $vars['name']);
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']); $vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
$vars['name'] = str_replace(' ', '', ucwords($vars['name'])); $vars['name'] = str_replace(' ', '', ucwords($vars['name']));

View File

@@ -1,8 +1,10 @@
<?php <?php
namespace Composer\Installers; namespace Composer\Installers;
class MediaWikiInstaller extends BaseInstaller class MediaWikiInstaller extends BaseInstaller
{ {
/** @var array<string, string> */
protected $locations = array( protected $locations = array(
'core' => 'core/', 'core' => 'core/',
'extension' => 'extensions/{$name}/', 'extension' => 'extensions/{$name}/',
@@ -16,11 +18,9 @@ class MediaWikiInstaller extends BaseInstaller
* to CamelCase keeping existing uppercase chars. * to CamelCase keeping existing uppercase chars.
* *
* For package type mediawiki-skin, cut off a trailing '-skin' if present. * For package type mediawiki-skin, cut off a trailing '-skin' if present.
*
*/ */
public function inflectPackageVars($vars) public function inflectPackageVars(array $vars): array
{ {
if ($vars['type'] === 'mediawiki-extension') { if ($vars['type'] === 'mediawiki-extension') {
return $this->inflectExtensionVars($vars); return $this->inflectExtensionVars($vars);
} }
@@ -32,20 +32,27 @@ class MediaWikiInstaller extends BaseInstaller
return $vars; return $vars;
} }
protected function inflectExtensionVars($vars) /**
* @param array<string, string> $vars
* @return array<string, string>
*/
protected function inflectExtensionVars(array $vars): array
{ {
$vars['name'] = preg_replace('/-extension$/', '', $vars['name']); $vars['name'] = $this->pregReplace('/-extension$/', '', $vars['name']);
$vars['name'] = str_replace('-', ' ', $vars['name']); $vars['name'] = str_replace('-', ' ', $vars['name']);
$vars['name'] = str_replace(' ', '', ucwords($vars['name'])); $vars['name'] = str_replace(' ', '', ucwords($vars['name']));
return $vars; return $vars;
} }
protected function inflectSkinVars($vars) /**
* @param array<string, string> $vars
* @return array<string, string>
*/
protected function inflectSkinVars(array $vars): array
{ {
$vars['name'] = preg_replace('/-skin$/', '', $vars['name']); $vars['name'] = $this->pregReplace('/-skin$/', '', $vars['name']);
return $vars; return $vars;
} }
} }

View File

@@ -4,6 +4,7 @@ namespace Composer\Installers;
class MiaoxingInstaller extends BaseInstaller class MiaoxingInstaller extends BaseInstaller
{ {
/** @var array<string, string> */
protected $locations = array( protected $locations = array(
'plugin' => 'plugins/{$name}/', 'plugin' => 'plugins/{$name}/',
); );

View File

@@ -1,8 +1,10 @@
<?php <?php
namespace Composer\Installers; namespace Composer\Installers;
class MicroweberInstaller extends BaseInstaller class MicroweberInstaller extends BaseInstaller
{ {
/** @var array<string, string> */
protected $locations = array( protected $locations = array(
'module' => 'userfiles/modules/{$install_item_dir}/', 'module' => 'userfiles/modules/{$install_item_dir}/',
'module-skin' => 'userfiles/modules/{$install_item_dir}/templates/', 'module-skin' => 'userfiles/modules/{$install_item_dir}/templates/',
@@ -18,13 +20,10 @@ class MicroweberInstaller extends BaseInstaller
* For package type microweber-module, cut off a trailing '-module' if present * For package type microweber-module, cut off a trailing '-module' if present
* *
* For package type microweber-template, cut off a trailing '-template' if present. * For package type microweber-template, cut off a trailing '-template' if present.
*
*/ */
public function inflectPackageVars($vars) public function inflectPackageVars(array $vars): array
{ {
if ($this->package->getTargetDir() !== null && $this->package->getTargetDir() !== '') {
if ($this->package->getTargetDir()) {
$vars['install_item_dir'] = $this->package->getTargetDir(); $vars['install_item_dir'] = $this->package->getTargetDir();
} else { } else {
$vars['install_item_dir'] = $vars['name']; $vars['install_item_dir'] = $vars['name'];
@@ -54,65 +53,92 @@ class MicroweberInstaller extends BaseInstaller
} }
} }
return $vars;
}
/**
* @param array<string, string> $vars
* @return array<string, string>
*/
protected function inflectTemplateVars(array $vars): array
{
$vars['install_item_dir'] = $this->pregReplace('/-template$/', '', $vars['install_item_dir']);
$vars['install_item_dir'] = $this->pregReplace('/template-$/', '', $vars['install_item_dir']);
return $vars; return $vars;
} }
protected function inflectTemplateVars($vars) /**
* @param array<string, string> $vars
* @return array<string, string>
*/
protected function inflectTemplatesVars(array $vars): array
{ {
$vars['install_item_dir'] = preg_replace('/-template$/', '', $vars['install_item_dir']); $vars['install_item_dir'] = $this->pregReplace('/-templates$/', '', $vars['install_item_dir']);
$vars['install_item_dir'] = preg_replace('/template-$/', '', $vars['install_item_dir']); $vars['install_item_dir'] = $this->pregReplace('/templates-$/', '', $vars['install_item_dir']);
return $vars; return $vars;
} }
protected function inflectTemplatesVars($vars) /**
* @param array<string, string> $vars
* @return array<string, string>
*/
protected function inflectCoreVars(array $vars): array
{ {
$vars['install_item_dir'] = preg_replace('/-templates$/', '', $vars['install_item_dir']); $vars['install_item_dir'] = $this->pregReplace('/-providers$/', '', $vars['install_item_dir']);
$vars['install_item_dir'] = preg_replace('/templates-$/', '', $vars['install_item_dir']); $vars['install_item_dir'] = $this->pregReplace('/-provider$/', '', $vars['install_item_dir']);
$vars['install_item_dir'] = $this->pregReplace('/-adapter$/', '', $vars['install_item_dir']);
return $vars; return $vars;
} }
protected function inflectCoreVars($vars) /**
* @param array<string, string> $vars
* @return array<string, string>
*/
protected function inflectModuleVars(array $vars): array
{ {
$vars['install_item_dir'] = preg_replace('/-providers$/', '', $vars['install_item_dir']); $vars['install_item_dir'] = $this->pregReplace('/-module$/', '', $vars['install_item_dir']);
$vars['install_item_dir'] = preg_replace('/-provider$/', '', $vars['install_item_dir']); $vars['install_item_dir'] = $this->pregReplace('/module-$/', '', $vars['install_item_dir']);
$vars['install_item_dir'] = preg_replace('/-adapter$/', '', $vars['install_item_dir']);
return $vars; return $vars;
} }
protected function inflectModuleVars($vars) /**
* @param array<string, string> $vars
* @return array<string, string>
*/
protected function inflectModulesVars(array $vars): array
{ {
$vars['install_item_dir'] = preg_replace('/-module$/', '', $vars['install_item_dir']); $vars['install_item_dir'] = $this->pregReplace('/-modules$/', '', $vars['install_item_dir']);
$vars['install_item_dir'] = preg_replace('/module-$/', '', $vars['install_item_dir']); $vars['install_item_dir'] = $this->pregReplace('/modules-$/', '', $vars['install_item_dir']);
return $vars; return $vars;
} }
protected function inflectModulesVars($vars) /**
* @param array<string, string> $vars
* @return array<string, string>
*/
protected function inflectSkinVars(array $vars): array
{ {
$vars['install_item_dir'] = preg_replace('/-modules$/', '', $vars['install_item_dir']); $vars['install_item_dir'] = $this->pregReplace('/-skin$/', '', $vars['install_item_dir']);
$vars['install_item_dir'] = preg_replace('/modules-$/', '', $vars['install_item_dir']); $vars['install_item_dir'] = $this->pregReplace('/skin-$/', '', $vars['install_item_dir']);
return $vars; return $vars;
} }
protected function inflectSkinVars($vars) /**
* @param array<string, string> $vars
* @return array<string, string>
*/
protected function inflectElementVars(array $vars): array
{ {
$vars['install_item_dir'] = preg_replace('/-skin$/', '', $vars['install_item_dir']); $vars['install_item_dir'] = $this->pregReplace('/-elements$/', '', $vars['install_item_dir']);
$vars['install_item_dir'] = preg_replace('/skin-$/', '', $vars['install_item_dir']); $vars['install_item_dir'] = $this->pregReplace('/elements-$/', '', $vars['install_item_dir']);
$vars['install_item_dir'] = $this->pregReplace('/-element$/', '', $vars['install_item_dir']);
return $vars; $vars['install_item_dir'] = $this->pregReplace('/element-$/', '', $vars['install_item_dir']);
}
protected function inflectElementVars($vars)
{
$vars['install_item_dir'] = preg_replace('/-elements$/', '', $vars['install_item_dir']);
$vars['install_item_dir'] = preg_replace('/elements-$/', '', $vars['install_item_dir']);
$vars['install_item_dir'] = preg_replace('/-element$/', '', $vars['install_item_dir']);
$vars['install_item_dir'] = preg_replace('/element-$/', '', $vars['install_item_dir']);
return $vars; return $vars;
} }

View File

@@ -1,4 +1,5 @@
<?php <?php
namespace Composer\Installers; namespace Composer\Installers;
/** /**
@@ -6,6 +7,7 @@ namespace Composer\Installers;
*/ */
class ModxInstaller extends BaseInstaller class ModxInstaller extends BaseInstaller
{ {
/** @var array<string, string> */
protected $locations = array( protected $locations = array(
'extra' => 'core/packages/{$name}/' 'extra' => 'core/packages/{$name}/'
); );

View File

@@ -1,8 +1,10 @@
<?php <?php
namespace Composer\Installers; namespace Composer\Installers;
class MoodleInstaller extends BaseInstaller class MoodleInstaller extends BaseInstaller
{ {
/** @var array<string, string> */
protected $locations = array( protected $locations = array(
'mod' => 'mod/{$name}/', 'mod' => 'mod/{$name}/',
'admin_report' => 'admin/report/{$name}/', 'admin_report' => 'admin/report/{$name}/',
@@ -11,6 +13,7 @@ class MoodleInstaller extends BaseInstaller
'assignment' => 'mod/assignment/type/{$name}/', 'assignment' => 'mod/assignment/type/{$name}/',
'assignsubmission' => 'mod/assign/submission/{$name}/', 'assignsubmission' => 'mod/assign/submission/{$name}/',
'assignfeedback' => 'mod/assign/feedback/{$name}/', 'assignfeedback' => 'mod/assign/feedback/{$name}/',
'antivirus' => 'lib/antivirus/{$name}/',
'auth' => 'auth/{$name}/', 'auth' => 'auth/{$name}/',
'availability' => 'availability/condition/{$name}/', 'availability' => 'availability/condition/{$name}/',
'block' => 'blocks/{$name}/', 'block' => 'blocks/{$name}/',
@@ -18,27 +21,37 @@ class MoodleInstaller extends BaseInstaller
'cachestore' => 'cache/stores/{$name}/', 'cachestore' => 'cache/stores/{$name}/',
'cachelock' => 'cache/locks/{$name}/', 'cachelock' => 'cache/locks/{$name}/',
'calendartype' => 'calendar/type/{$name}/', 'calendartype' => 'calendar/type/{$name}/',
'communication' => 'communication/provider/{$name}/',
'customfield' => 'customfield/field/{$name}/',
'fileconverter' => 'files/converter/{$name}/', 'fileconverter' => 'files/converter/{$name}/',
'format' => 'course/format/{$name}/', 'format' => 'course/format/{$name}/',
'coursereport' => 'course/report/{$name}/', 'coursereport' => 'course/report/{$name}/',
'contenttype' => 'contentbank/contenttype/{$name}/',
'customcertelement' => 'mod/customcert/element/{$name}/', 'customcertelement' => 'mod/customcert/element/{$name}/',
'datafield' => 'mod/data/field/{$name}/', 'datafield' => 'mod/data/field/{$name}/',
'dataformat' => 'dataformat/{$name}/',
'datapreset' => 'mod/data/preset/{$name}/', 'datapreset' => 'mod/data/preset/{$name}/',
'editor' => 'lib/editor/{$name}/', 'editor' => 'lib/editor/{$name}/',
'enrol' => 'enrol/{$name}/', 'enrol' => 'enrol/{$name}/',
'filter' => 'filter/{$name}/', 'filter' => 'filter/{$name}/',
'forumreport' => 'mod/forum/report/{$name}/',
'gradeexport' => 'grade/export/{$name}/', 'gradeexport' => 'grade/export/{$name}/',
'gradeimport' => 'grade/import/{$name}/', 'gradeimport' => 'grade/import/{$name}/',
'gradereport' => 'grade/report/{$name}/', 'gradereport' => 'grade/report/{$name}/',
'gradingform' => 'grade/grading/form/{$name}/', 'gradingform' => 'grade/grading/form/{$name}/',
'h5plib' => 'h5p/h5plib/{$name}/',
'local' => 'local/{$name}/', 'local' => 'local/{$name}/',
'logstore' => 'admin/tool/log/store/{$name}/', 'logstore' => 'admin/tool/log/store/{$name}/',
'ltisource' => 'mod/lti/source/{$name}/', 'ltisource' => 'mod/lti/source/{$name}/',
'ltiservice' => 'mod/lti/service/{$name}/', 'ltiservice' => 'mod/lti/service/{$name}/',
'media' => 'media/player/{$name}/',
'message' => 'message/output/{$name}/', 'message' => 'message/output/{$name}/',
'mlbackend' => 'lib/mlbackend/{$name}/',
'mnetservice' => 'mnet/service/{$name}/', 'mnetservice' => 'mnet/service/{$name}/',
'paygw' => 'payment/gateway/{$name}/',
'plagiarism' => 'plagiarism/{$name}/', 'plagiarism' => 'plagiarism/{$name}/',
'portfolio' => 'portfolio/{$name}/', 'portfolio' => 'portfolio/{$name}/',
'qbank' => 'question/bank/{$name}/',
'qbehaviour' => 'question/behaviour/{$name}/', 'qbehaviour' => 'question/behaviour/{$name}/',
'qformat' => 'question/format/{$name}/', 'qformat' => 'question/format/{$name}/',
'qtype' => 'question/type/{$name}/', 'qtype' => 'question/type/{$name}/',
@@ -49,6 +62,7 @@ class MoodleInstaller extends BaseInstaller
'scormreport' => 'mod/scorm/report/{$name}/', 'scormreport' => 'mod/scorm/report/{$name}/',
'search' => 'search/engine/{$name}/', 'search' => 'search/engine/{$name}/',
'theme' => 'theme/{$name}/', 'theme' => 'theme/{$name}/',
'tiny' => 'lib/editor/tiny/plugins/{$name}/',
'tinymce' => 'lib/editor/tinymce/plugins/{$name}/', 'tinymce' => 'lib/editor/tinymce/plugins/{$name}/',
'profilefield' => 'user/profile/field/{$name}/', 'profilefield' => 'user/profile/field/{$name}/',
'webservice' => 'webservice/{$name}/', 'webservice' => 'webservice/{$name}/',

View File

@@ -1,8 +1,10 @@
<?php <?php
namespace Composer\Installers; namespace Composer\Installers;
class OctoberInstaller extends BaseInstaller class OctoberInstaller extends BaseInstaller
{ {
/** @var array<string, string> */
protected $locations = array( protected $locations = array(
'module' => 'modules/{$name}/', 'module' => 'modules/{$name}/',
'plugin' => 'plugins/{$vendor}/{$name}/', 'plugin' => 'plugins/{$vendor}/{$name}/',
@@ -15,9 +17,8 @@ class OctoberInstaller extends BaseInstaller
* For package type october-plugin, cut off a trailing '-plugin' if present. * For package type october-plugin, cut off a trailing '-plugin' if present.
* *
* For package type october-theme, cut off a trailing '-theme' if present. * For package type october-theme, cut off a trailing '-theme' if present.
*
*/ */
public function inflectPackageVars($vars) public function inflectPackageVars(array $vars): array
{ {
if ($vars['type'] === 'october-plugin') { if ($vars['type'] === 'october-plugin') {
return $this->inflectPluginVars($vars); return $this->inflectPluginVars($vars);
@@ -30,18 +31,26 @@ class OctoberInstaller extends BaseInstaller
return $vars; return $vars;
} }
protected function inflectPluginVars($vars) /**
* @param array<string, string> $vars
* @return array<string, string>
*/
protected function inflectPluginVars(array $vars): array
{ {
$vars['name'] = preg_replace('/^oc-|-plugin$/', '', $vars['name']); $vars['name'] = $this->pregReplace('/^oc-|-plugin$/', '', $vars['name']);
$vars['vendor'] = preg_replace('/[^a-z0-9_]/i', '', $vars['vendor']); $vars['vendor'] = $this->pregReplace('/[^a-z0-9_]/i', '', $vars['vendor']);
return $vars; return $vars;
} }
protected function inflectThemeVars($vars) /**
* @param array<string, string> $vars
* @return array<string, string>
*/
protected function inflectThemeVars(array $vars): array
{ {
$vars['name'] = preg_replace('/^oc-|-theme$/', '', $vars['name']); $vars['name'] = $this->pregReplace('/^oc-|-theme$/', '', $vars['name']);
$vars['vendor'] = preg_replace('/[^a-z0-9_]/i', '', $vars['vendor']); $vars['vendor'] = $this->pregReplace('/[^a-z0-9_]/i', '', $vars['vendor']);
return $vars; return $vars;
} }

View File

@@ -1,8 +1,10 @@
<?php <?php
namespace Composer\Installers; namespace Composer\Installers;
class OntoWikiInstaller extends BaseInstaller class OntoWikiInstaller extends BaseInstaller
{ {
/** @var array<string, string> */
protected $locations = array( protected $locations = array(
'extension' => 'extensions/{$name}/', 'extension' => 'extensions/{$name}/',
'theme' => 'extensions/themes/{$name}/', 'theme' => 'extensions/themes/{$name}/',
@@ -12,12 +14,12 @@ class OntoWikiInstaller extends BaseInstaller
/** /**
* Format package name to lower case and remove ".ontowiki" suffix * Format package name to lower case and remove ".ontowiki" suffix
*/ */
public function inflectPackageVars($vars) public function inflectPackageVars(array $vars): array
{ {
$vars['name'] = strtolower($vars['name']); $vars['name'] = strtolower($vars['name']);
$vars['name'] = preg_replace('/.ontowiki$/', '', $vars['name']); $vars['name'] = $this->pregReplace('/.ontowiki$/', '', $vars['name']);
$vars['name'] = preg_replace('/-theme$/', '', $vars['name']); $vars['name'] = $this->pregReplace('/-theme$/', '', $vars['name']);
$vars['name'] = preg_replace('/-translation$/', '', $vars['name']); $vars['name'] = $this->pregReplace('/-translation$/', '', $vars['name']);
return $vars; return $vars;
} }

View File

@@ -1,14 +1,14 @@
<?php <?php
namespace Composer\Installers; namespace Composer\Installers;
class OsclassInstaller extends BaseInstaller
class OsclassInstaller extends BaseInstaller
{ {
/** @var array<string, string> */
protected $locations = array( protected $locations = array(
'plugin' => 'oc-content/plugins/{$name}/', 'plugin' => 'oc-content/plugins/{$name}/',
'theme' => 'oc-content/themes/{$name}/', 'theme' => 'oc-content/themes/{$name}/',
'language' => 'oc-content/languages/{$name}/', 'language' => 'oc-content/languages/{$name}/',
); );
} }

View File

@@ -1,59 +1,49 @@
<?php <?php
namespace Composer\Installers; namespace Composer\Installers;
use Composer\Package\PackageInterface; use Composer\Package\PackageInterface;
class OxidInstaller extends BaseInstaller class OxidInstaller extends BaseInstaller
{ {
const VENDOR_PATTERN = '/^modules\/(?P<vendor>.+)\/.+/'; const VENDOR_PATTERN = '/^modules\/(?P<vendor>.+)\/.+/';
/** @var array<string, string> */
protected $locations = array( protected $locations = array(
'module' => 'modules/{$name}/', 'module' => 'modules/{$name}/',
'theme' => 'application/views/{$name}/', 'theme' => 'application/views/{$name}/',
'out' => 'out/{$name}/', 'out' => 'out/{$name}/',
); );
/** public function getInstallPath(PackageInterface $package, string $frameworkType = ''): string
* getInstallPath {
* $installPath = parent::getInstallPath($package, $frameworkType);
* @param PackageInterface $package $type = $this->package->getType();
* @param string $frameworkType if ($type === 'oxid-module') {
* @return string $this->prepareVendorDirectory($installPath);
*/ }
public function getInstallPath(PackageInterface $package, $frameworkType = '') return $installPath;
{ }
$installPath = parent::getInstallPath($package, $frameworkType);
$type = $this->package->getType();
if ($type === 'oxid-module') {
$this->prepareVendorDirectory($installPath);
}
return $installPath;
}
/** /**
* prepareVendorDirectory * Makes sure there is a vendormetadata.php file inside
* * the vendor folder if there is a vendor folder.
* Makes sure there is a vendormetadata.php file inside */
* the vendor folder if there is a vendor folder. protected function prepareVendorDirectory(string $installPath): void
* {
* @param string $installPath $matches = '';
* @return void $hasVendorDirectory = preg_match(self::VENDOR_PATTERN, $installPath, $matches);
*/ if (!$hasVendorDirectory) {
protected function prepareVendorDirectory($installPath) return;
{ }
$matches = '';
$hasVendorDirectory = preg_match(self::VENDOR_PATTERN, $installPath, $matches);
if (!$hasVendorDirectory) {
return;
}
$vendorDirectory = $matches['vendor']; $vendorDirectory = $matches['vendor'];
$vendorPath = getcwd() . '/modules/' . $vendorDirectory; $vendorPath = getcwd() . '/modules/' . $vendorDirectory;
if (!file_exists($vendorPath)) { if (!file_exists($vendorPath)) {
mkdir($vendorPath, 0755, true); mkdir($vendorPath, 0755, true);
} }
$vendorMetaDataPath = $vendorPath . '/vendormetadata.php'; $vendorMetaDataPath = $vendorPath . '/vendormetadata.php';
touch($vendorMetaDataPath); touch($vendorMetaDataPath);
} }
} }

View File

@@ -1,8 +1,10 @@
<?php <?php
namespace Composer\Installers; namespace Composer\Installers;
class PPIInstaller extends BaseInstaller class PPIInstaller extends BaseInstaller
{ {
/** @var array<string, string> */
protected $locations = array( protected $locations = array(
'module' => 'modules/{$name}/', 'module' => 'modules/{$name}/',
); );

View File

@@ -1,8 +1,10 @@
<?php <?php
namespace Composer\Installers; namespace Composer\Installers;
class PhiftyInstaller extends BaseInstaller class PhiftyInstaller extends BaseInstaller
{ {
/** @var array<string, string> */
protected $locations = array( protected $locations = array(
'bundle' => 'bundles/{$name}/', 'bundle' => 'bundles/{$name}/',
'library' => 'libraries/{$name}/', 'library' => 'libraries/{$name}/',

View File

@@ -1,8 +1,10 @@
<?php <?php
namespace Composer\Installers; namespace Composer\Installers;
class PhpBBInstaller extends BaseInstaller class PhpBBInstaller extends BaseInstaller
{ {
/** @var array<string, string> */
protected $locations = array( protected $locations = array(
'extension' => 'ext/{$vendor}/{$name}/', 'extension' => 'ext/{$vendor}/{$name}/',
'language' => 'language/{$name}/', 'language' => 'language/{$name}/',

View File

@@ -1,4 +1,5 @@
<?php <?php
namespace Composer\Installers; namespace Composer\Installers;
/** /**
@@ -8,22 +9,17 @@ namespace Composer\Installers;
*/ */
class PiwikInstaller extends BaseInstaller class PiwikInstaller extends BaseInstaller
{ {
/** /** @var array<string, string> */
* @var array
*/
protected $locations = array( protected $locations = array(
'plugin' => 'plugins/{$name}/', 'plugin' => 'plugins/{$name}/',
); );
/** /**
* Format package name to CamelCase * Format package name to CamelCase
* @param array $vars
*
* @return array
*/ */
public function inflectPackageVars($vars) public function inflectPackageVars(array $vars): array
{ {
$vars['name'] = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name'])); $vars['name'] = strtolower($this->pregReplace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name']));
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']); $vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
$vars['name'] = str_replace(' ', '', ucwords($vars['name'])); $vars['name'] = str_replace(' ', '', ucwords($vars['name']));

View File

@@ -1,28 +1,27 @@
<?php <?php
namespace Composer\Installers; namespace Composer\Installers;
class PlentymarketsInstaller extends BaseInstaller class PlentymarketsInstaller extends BaseInstaller
{ {
/** @var array<string, string> */
protected $locations = array( protected $locations = array(
'plugin' => '{$name}/' 'plugin' => '{$name}/'
); );
/** /**
* Remove hyphen, "plugin" and format to camelcase * Remove hyphen, "plugin" and format to camelcase
* @param array $vars
*
* @return array
*/ */
public function inflectPackageVars($vars) public function inflectPackageVars(array $vars): array
{ {
$vars['name'] = explode("-", $vars['name']); $nameBits = explode("-", $vars['name']);
foreach ($vars['name'] as $key => $name) { foreach ($nameBits as $key => $name) {
$vars['name'][$key] = ucfirst($vars['name'][$key]); $nameBits[$key] = ucfirst($name);
if (strcasecmp($name, "Plugin") == 0) { if (strcasecmp($name, "Plugin") == 0) {
unset($vars['name'][$key]); unset($nameBits[$key]);
} }
} }
$vars['name'] = implode("",$vars['name']); $vars['name'] = implode('', $nameBits);
return $vars; return $vars;
} }

View File

@@ -8,20 +8,21 @@ use Composer\Plugin\PluginInterface;
class Plugin implements PluginInterface class Plugin implements PluginInterface
{ {
/** @var Installer */
private $installer; private $installer;
public function activate(Composer $composer, IOInterface $io) public function activate(Composer $composer, IOInterface $io): void
{ {
$this->installer = new Installer($io, $composer); $this->installer = new Installer($io, $composer);
$composer->getInstallationManager()->addInstaller($this->installer); $composer->getInstallationManager()->addInstaller($this->installer);
} }
public function deactivate(Composer $composer, IOInterface $io) public function deactivate(Composer $composer, IOInterface $io): void
{ {
$composer->getInstallationManager()->removeInstaller($this->installer); $composer->getInstallationManager()->removeInstaller($this->installer);
} }
public function uninstall(Composer $composer, IOInterface $io) public function uninstall(Composer $composer, IOInterface $io): void
{ {
} }
} }

View File

@@ -1,8 +1,10 @@
<?php <?php
namespace Composer\Installers; namespace Composer\Installers;
class PortoInstaller extends BaseInstaller class PortoInstaller extends BaseInstaller
{ {
/** @var array<string, string> */
protected $locations = array( protected $locations = array(
'container' => 'app/Containers/{$name}/', 'container' => 'app/Containers/{$name}/',
); );

View File

@@ -1,8 +1,10 @@
<?php <?php
namespace Composer\Installers; namespace Composer\Installers;
class PrestashopInstaller extends BaseInstaller class PrestashopInstaller extends BaseInstaller
{ {
/** @var array<string, string> */
protected $locations = array( protected $locations = array(
'module' => 'modules/{$name}/', 'module' => 'modules/{$name}/',
'theme' => 'themes/{$name}/', 'theme' => 'themes/{$name}/',

View File

@@ -4,6 +4,7 @@ namespace Composer\Installers;
class ProcessWireInstaller extends BaseInstaller class ProcessWireInstaller extends BaseInstaller
{ {
/** @var array<string, string> */
protected $locations = array( protected $locations = array(
'module' => 'site/modules/{$name}/', 'module' => 'site/modules/{$name}/',
); );
@@ -11,9 +12,9 @@ class ProcessWireInstaller extends BaseInstaller
/** /**
* Format package name to CamelCase * Format package name to CamelCase
*/ */
public function inflectPackageVars($vars) public function inflectPackageVars(array $vars): array
{ {
$vars['name'] = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name'])); $vars['name'] = strtolower($this->pregReplace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name']));
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']); $vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
$vars['name'] = str_replace(' ', '', ucwords($vars['name'])); $vars['name'] = str_replace(' ', '', ucwords($vars['name']));

View File

@@ -5,6 +5,7 @@ namespace Composer\Installers;
class PuppetInstaller extends BaseInstaller class PuppetInstaller extends BaseInstaller
{ {
/** @var array<string, string> */
protected $locations = array( protected $locations = array(
'module' => 'modules/{$name}/', 'module' => 'modules/{$name}/',
); );

View File

@@ -1,8 +1,10 @@
<?php <?php
namespace Composer\Installers; namespace Composer\Installers;
class PxcmsInstaller extends BaseInstaller class PxcmsInstaller extends BaseInstaller
{ {
/** @var array<string, string> */
protected $locations = array( protected $locations = array(
'module' => 'app/Modules/{$name}/', 'module' => 'app/Modules/{$name}/',
'theme' => 'themes/{$name}/', 'theme' => 'themes/{$name}/',
@@ -10,12 +12,8 @@ class PxcmsInstaller extends BaseInstaller
/** /**
* Format package name. * Format package name.
*
* @param array $vars
*
* @return array
*/ */
public function inflectPackageVars($vars) public function inflectPackageVars(array $vars): array
{ {
if ($vars['type'] === 'pxcms-module') { if ($vars['type'] === 'pxcms-module') {
return $this->inflectModuleVars($vars); return $this->inflectModuleVars($vars);
@@ -31,30 +29,31 @@ class PxcmsInstaller extends BaseInstaller
/** /**
* For package type pxcms-module, cut off a trailing '-plugin' if present. * For package type pxcms-module, cut off a trailing '-plugin' if present.
* *
* return string * @param array<string, string> $vars
* @return array<string, string>
*/ */
protected function inflectModuleVars($vars) protected function inflectModuleVars(array $vars): array
{ {
$vars['name'] = str_replace('pxcms-', '', $vars['name']); // strip out pxcms- just incase (legacy) $vars['name'] = str_replace('pxcms-', '', $vars['name']); // strip out pxcms- just incase (legacy)
$vars['name'] = str_replace('module-', '', $vars['name']); // strip out module- $vars['name'] = str_replace('module-', '', $vars['name']); // strip out module-
$vars['name'] = preg_replace('/-module$/', '', $vars['name']); // strip out -module $vars['name'] = $this->pregReplace('/-module$/', '', $vars['name']); // strip out -module
$vars['name'] = str_replace('-', '_', $vars['name']); // make -'s be _'s $vars['name'] = str_replace('-', '_', $vars['name']); // make -'s be _'s
$vars['name'] = ucwords($vars['name']); // make module name camelcased $vars['name'] = ucwords($vars['name']); // make module name camelcased
return $vars; return $vars;
} }
/** /**
* For package type pxcms-module, cut off a trailing '-plugin' if present. * For package type pxcms-module, cut off a trailing '-plugin' if present.
* *
* return string * @param array<string, string> $vars
* @return array<string, string>
*/ */
protected function inflectThemeVars($vars) protected function inflectThemeVars(array $vars): array
{ {
$vars['name'] = str_replace('pxcms-', '', $vars['name']); // strip out pxcms- just incase (legacy) $vars['name'] = str_replace('pxcms-', '', $vars['name']); // strip out pxcms- just incase (legacy)
$vars['name'] = str_replace('theme-', '', $vars['name']); // strip out theme- $vars['name'] = str_replace('theme-', '', $vars['name']); // strip out theme-
$vars['name'] = preg_replace('/-theme$/', '', $vars['name']); // strip out -theme $vars['name'] = $this->pregReplace('/-theme$/', '', $vars['name']); // strip out -theme
$vars['name'] = str_replace('-', '_', $vars['name']); // make -'s be _'s $vars['name'] = str_replace('-', '_', $vars['name']); // make -'s be _'s
$vars['name'] = ucwords($vars['name']); // make module name camelcased $vars['name'] = ucwords($vars['name']); // make module name camelcased

View File

@@ -1,8 +1,10 @@
<?php <?php
namespace Composer\Installers; namespace Composer\Installers;
class RadPHPInstaller extends BaseInstaller class RadPHPInstaller extends BaseInstaller
{ {
/** @var array<string, string> */
protected $locations = array( protected $locations = array(
'bundle' => 'src/{$name}/' 'bundle' => 'src/{$name}/'
); );
@@ -10,11 +12,11 @@ class RadPHPInstaller extends BaseInstaller
/** /**
* Format package name to CamelCase * Format package name to CamelCase
*/ */
public function inflectPackageVars($vars) public function inflectPackageVars(array $vars): array
{ {
$nameParts = explode('/', $vars['name']); $nameParts = explode('/', $vars['name']);
foreach ($nameParts as &$value) { foreach ($nameParts as &$value) {
$value = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $value)); $value = strtolower($this->pregReplace('/(?<=\\w)([A-Z])/', '_\\1', $value));
$value = str_replace(array('-', '_'), ' ', $value); $value = str_replace(array('-', '_'), ' ', $value);
$value = str_replace(' ', '', ucwords($value)); $value = str_replace(' ', '', ucwords($value));
} }

View File

@@ -1,8 +1,10 @@
<?php <?php
namespace Composer\Installers; namespace Composer\Installers;
class ReIndexInstaller extends BaseInstaller class ReIndexInstaller extends BaseInstaller
{ {
/** @var array<string, string> */
protected $locations = array( protected $locations = array(
'theme' => 'themes/{$name}/', 'theme' => 'themes/{$name}/',
'plugin' => 'plugins/{$name}/' 'plugin' => 'plugins/{$name}/'

View File

@@ -1,8 +1,10 @@
<?php <?php
namespace Composer\Installers; namespace Composer\Installers;
class Redaxo5Installer extends BaseInstaller class Redaxo5Installer extends BaseInstaller
{ {
/** @var array<string, string> */
protected $locations = array( protected $locations = array(
'addon' => 'redaxo/src/addons/{$name}/', 'addon' => 'redaxo/src/addons/{$name}/',
'bestyle-plugin' => 'redaxo/src/addons/be_style/plugins/{$name}/' 'bestyle-plugin' => 'redaxo/src/addons/be_style/plugins/{$name}/'

View File

@@ -1,8 +1,10 @@
<?php <?php
namespace Composer\Installers; namespace Composer\Installers;
class RedaxoInstaller extends BaseInstaller class RedaxoInstaller extends BaseInstaller
{ {
/** @var array<string, string> */
protected $locations = array( protected $locations = array(
'addon' => 'redaxo/include/addons/{$name}/', 'addon' => 'redaxo/include/addons/{$name}/',
'bestyle-plugin' => 'redaxo/include/addons/be_style/plugins/{$name}/' 'bestyle-plugin' => 'redaxo/include/addons/be_style/plugins/{$name}/'

View File

@@ -1,19 +1,18 @@
<?php <?php
namespace Composer\Installers; namespace Composer\Installers;
class RoundcubeInstaller extends BaseInstaller class RoundcubeInstaller extends BaseInstaller
{ {
/** @var array<string, string> */
protected $locations = array( protected $locations = array(
'plugin' => 'plugins/{$name}/', 'plugin' => 'plugins/{$name}/',
); );
/** /**
* Lowercase name and changes the name to a underscores * Lowercase name and changes the name to a underscores
*
* @param array $vars
* @return array
*/ */
public function inflectPackageVars($vars) public function inflectPackageVars(array $vars): array
{ {
$vars['name'] = strtolower(str_replace('-', '_', $vars['name'])); $vars['name'] = strtolower(str_replace('-', '_', $vars['name']));

View File

@@ -1,8 +1,10 @@
<?php <?php
namespace Composer\Installers; namespace Composer\Installers;
class SMFInstaller extends BaseInstaller class SMFInstaller extends BaseInstaller
{ {
/** @var array<string, string> */
protected $locations = array( protected $locations = array(
'module' => 'Sources/{$name}/', 'module' => 'Sources/{$name}/',
'theme' => 'Themes/{$name}/', 'theme' => 'Themes/{$name}/',

View File

@@ -1,4 +1,5 @@
<?php <?php
namespace Composer\Installers; namespace Composer\Installers;
/** /**
@@ -7,6 +8,7 @@ namespace Composer\Installers;
*/ */
class ShopwareInstaller extends BaseInstaller class ShopwareInstaller extends BaseInstaller
{ {
/** @var array<string, string> */
protected $locations = array( protected $locations = array(
'backend-plugin' => 'engine/Shopware/Plugins/Local/Backend/{$name}/', 'backend-plugin' => 'engine/Shopware/Plugins/Local/Backend/{$name}/',
'core-plugin' => 'engine/Shopware/Plugins/Local/Core/{$name}/', 'core-plugin' => 'engine/Shopware/Plugins/Local/Core/{$name}/',
@@ -18,29 +20,32 @@ class ShopwareInstaller extends BaseInstaller
/** /**
* Transforms the names * Transforms the names
* @param array $vars
* @return array
*/ */
public function inflectPackageVars($vars) public function inflectPackageVars(array $vars): array
{ {
if ($vars['type'] === 'shopware-theme') { if ($vars['type'] === 'shopware-theme') {
return $this->correctThemeName($vars); return $this->correctThemeName($vars);
} }
return $this->correctPluginName($vars); return $this->correctPluginName($vars);
} }
/** /**
* Changes the name to a camelcased combination of vendor and name * Changes the name to a camelcased combination of vendor and name
* @param array $vars *
* @return array * @param array<string, string> $vars
* @return array<string, string>
*/ */
private function correctPluginName($vars) private function correctPluginName(array $vars): array
{ {
$camelCasedName = preg_replace_callback('/(-[a-z])/', function ($matches) { $camelCasedName = preg_replace_callback('/(-[a-z])/', function ($matches) {
return strtoupper($matches[0][1]); return strtoupper($matches[0][1]);
}, $vars['name']); }, $vars['name']);
if (null === $camelCasedName) {
throw new \RuntimeException('Failed to run preg_replace_callback: '.preg_last_error());
}
$vars['name'] = ucfirst($vars['vendor']) . ucfirst($camelCasedName); $vars['name'] = ucfirst($vars['vendor']) . ucfirst($camelCasedName);
return $vars; return $vars;
@@ -48,10 +53,11 @@ class ShopwareInstaller extends BaseInstaller
/** /**
* Changes the name to a underscore separated name * Changes the name to a underscore separated name
* @param array $vars *
* @return array * @param array<string, string> $vars
* @return array<string, string>
*/ */
private function correctThemeName($vars) private function correctThemeName(array $vars): array
{ {
$vars['name'] = str_replace('-', '_', $vars['name']); $vars['name'] = str_replace('-', '_', $vars['name']);

View File

@@ -1,10 +1,12 @@
<?php <?php
namespace Composer\Installers; namespace Composer\Installers;
use Composer\Package\PackageInterface; use Composer\Package\PackageInterface;
class SilverStripeInstaller extends BaseInstaller class SilverStripeInstaller extends BaseInstaller
{ {
/** @var array<string, string> */
protected $locations = array( protected $locations = array(
'module' => '{$name}/', 'module' => '{$name}/',
'theme' => 'themes/{$name}/', 'theme' => 'themes/{$name}/',
@@ -15,12 +17,8 @@ class SilverStripeInstaller extends BaseInstaller
* *
* Relies on built-in BaseInstaller behaviour with one exception: silverstripe/framework * Relies on built-in BaseInstaller behaviour with one exception: silverstripe/framework
* must be installed to 'sapphire' and not 'framework' if the version is <3.0.0 * must be installed to 'sapphire' and not 'framework' if the version is <3.0.0
*
* @param PackageInterface $package
* @param string $frameworkType
* @return string
*/ */
public function getInstallPath(PackageInterface $package, $frameworkType = '') public function getInstallPath(PackageInterface $package, string $frameworkType = ''): string
{ {
if ( if (
$package->getName() == 'silverstripe/framework' $package->getName() == 'silverstripe/framework'

View File

@@ -4,17 +4,26 @@ namespace Composer\Installers;
class SiteDirectInstaller extends BaseInstaller class SiteDirectInstaller extends BaseInstaller
{ {
/** @var array<string, string> */
protected $locations = array( protected $locations = array(
'module' => 'modules/{$vendor}/{$name}/', 'module' => 'modules/{$vendor}/{$name}/',
'plugin' => 'plugins/{$vendor}/{$name}/' 'plugin' => 'plugins/{$vendor}/{$name}/'
); );
public function inflectPackageVars($vars) /**
* @param array<string, string> $vars
* @return array<string, string>
*/
public function inflectPackageVars(array $vars): array
{ {
return $this->parseVars($vars); return $this->parseVars($vars);
} }
protected function parseVars($vars) /**
* @param array<string, string> $vars
* @return array<string, string>
*/
protected function parseVars(array $vars): array
{ {
$vars['vendor'] = strtolower($vars['vendor']) == 'sitedirect' ? 'SiteDirect' : $vars['vendor']; $vars['vendor'] = strtolower($vars['vendor']) == 'sitedirect' ? 'SiteDirect' : $vars['vendor'];
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']); $vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);

View File

@@ -1,8 +1,10 @@
<?php <?php
namespace Composer\Installers; namespace Composer\Installers;
class StarbugInstaller extends BaseInstaller class StarbugInstaller extends BaseInstaller
{ {
/** @var array<string, string> */
protected $locations = array( protected $locations = array(
'module' => 'modules/{$name}/', 'module' => 'modules/{$name}/',
'theme' => 'themes/{$name}/', 'theme' => 'themes/{$name}/',

View File

@@ -1,8 +1,10 @@
<?php <?php
namespace Composer\Installers; namespace Composer\Installers;
class SyDESInstaller extends BaseInstaller class SyDESInstaller extends BaseInstaller
{ {
/** @var array<string, string> */
protected $locations = array( protected $locations = array(
'module' => 'app/modules/{$name}/', 'module' => 'app/modules/{$name}/',
'theme' => 'themes/{$name}/', 'theme' => 'themes/{$name}/',
@@ -12,10 +14,8 @@ class SyDESInstaller extends BaseInstaller
* Format module name. * Format module name.
* *
* Strip `sydes-` prefix and a trailing '-theme' or '-module' from package name if present. * Strip `sydes-` prefix and a trailing '-theme' or '-module' from package name if present.
*
* {@inerhitDoc}
*/ */
public function inflectPackageVars($vars) public function inflectPackageVars(array $vars): array
{ {
if ($vars['type'] == 'sydes-module') { if ($vars['type'] == 'sydes-module') {
return $this->inflectModuleVars($vars); return $this->inflectModuleVars($vars);
@@ -28,18 +28,26 @@ class SyDESInstaller extends BaseInstaller
return $vars; return $vars;
} }
public function inflectModuleVars($vars) /**
* @param array<string, string> $vars
* @return array<string, string>
*/
public function inflectModuleVars(array $vars): array
{ {
$vars['name'] = preg_replace('/(^sydes-|-module$)/i', '', $vars['name']); $vars['name'] = $this->pregReplace('/(^sydes-|-module$)/i', '', $vars['name']);
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']); $vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
$vars['name'] = str_replace(' ', '', ucwords($vars['name'])); $vars['name'] = str_replace(' ', '', ucwords($vars['name']));
return $vars; return $vars;
} }
protected function inflectThemeVars($vars) /**
* @param array<string, string> $vars
* @return array<string, string>
*/
protected function inflectThemeVars(array $vars): array
{ {
$vars['name'] = preg_replace('/(^sydes-|-theme$)/', '', $vars['name']); $vars['name'] = $this->pregReplace('/(^sydes-|-theme$)/', '', $vars['name']);
$vars['name'] = strtolower($vars['name']); $vars['name'] = strtolower($vars['name']);
return $vars; return $vars;

Some files were not shown because too many files have changed in this diff Show More