diff --git a/Makefile b/Makefile index 4e1b066..7fadb88 100644 --- a/Makefile +++ b/Makefile @@ -158,15 +158,18 @@ gh-release: create-gh-release.sh ## Install PHP code sniffer, PHP CS Fixer, PHP code beautifuler and fixer and the wp-coding-standards, wpcs install_phpcs: + composer config allow-plugins.dealerdirect/phpcodesniffer-composer-installer true composer require squizlabs/php_codesniffer friendsofphp/php-cs-fixer wp-coding-standards/wpcs --dev -W - ./vendor/bin/phpcs --config-set installed_paths vendor/wp-coding-standards/wpcs + composer update wp-coding-standards/wpcs --with-dependencies + # Verify with vendor/bin/phpcs --config-show + ./vendor/bin/phpcs --config-set installed_paths vendor/wp-coding-standards/wpcs,vendor/phpcsstandards/phpcsutils,vendor/phpcsstandards/phpextra ./vendor/bin/phpcs --config-set default_standard WordPress-Core .PHONY: phpcs ## Run PHP Code Sniffer linter using WordPress coding standards phpcs: @echo '**** run phpcs ****' - ./vendor/bin/phpcs --standard=WordPress --extensions=php --ignore="vendor/*,lib" . + ./vendor/bin/phpcs -ps --standard=WordPress --extensions=php --ignore="vendor/*,lib" . .PHONY: phpcs-wpcore ## Run PHP Code Sniffer linter using WordPress-Core coding standards diff --git a/class-wpforms-epfl-payonline.php b/class-wpforms-epfl-payonline.php index 2c74114..f037b0d 100644 --- a/class-wpforms-epfl-payonline.php +++ b/class-wpforms-epfl-payonline.php @@ -52,10 +52,10 @@ public function init() { add_action( 'admin_enqueue_scripts', array( $this, 'load_custom_wp_admin_style' ) ); add_action( 'wpforms_process_complete', array( $this, 'process_payment_to_wordline_saferpay' ), 20, 4 ); - add_filter( 'wpforms_forms_submission_prepare_payment_data', [ $this, 'prepare_payment_data' ], 10, 3 ); - add_filter( 'wpforms_forms_submission_prepare_payment_meta', [ $this, 'prepare_payment_meta' ], 10, 3 ); + add_filter( 'wpforms_forms_submission_prepare_payment_data', array( $this, 'prepare_payment_data' ), 10, 3 ); + add_filter( 'wpforms_forms_submission_prepare_payment_meta', array( $this, 'prepare_payment_meta' ), 10, 3 ); add_action( 'init', array( $this, 'check_return_from_saferpay' ) ); - add_action( 'wpforms_process_payment_saved', [ $this, 'process_payment_saved' ], 10, 3 ); + add_action( 'wpforms_process_payment_saved', array( $this, 'process_payment_saved' ), 10, 3 ); // (see wpforms/pro/includes/payments/functions.php) add_filter( 'wpforms_currencies', array( $this, 'filter_currencies' ), 10, 1 ); @@ -77,15 +77,14 @@ public function init() { // Add payonline.epfl.ch to safe redirect hosts. add_filter( 'allowed_redirect_hosts', array( $this, 'wpforms_add_payonline_to_allowed_redirect' ) ); - //add_action( 'wpforms_process', [ $this, 'process_payment_to_wordline_saferpay' ], 10, 3 ); + // add_action( 'wpforms_process', [ $this, 'process_payment_to_wordline_saferpay' ], 10, 3 ); - - add_filter( 'wpforms_db_payments_value_validator_get_allowed_gateways', [ $this, 'allowed_gateways' ], 10, 1 ); + add_filter( 'wpforms_db_payments_value_validator_get_allowed_gateways', array( $this, 'allowed_gateways' ), 10, 1 ); // ??? // add_action( 'wpforms_form_settings_notifications_single_after', [ $this, 'notification_settings' ], 10, 2 ); // Logic that helps decide if we should send completed payments notifications. add_filter( 'wpforms_entry_email_process', [ $this, 'process_email' ], 70, 5 ); - } + } /** @@ -95,8 +94,8 @@ public function init() { * @param String $title ... */ function allowed_gateways( $list_of_allowed_gateway ) { - $list_of_allowed_gateway[$this->slug] = esc_html__( $this->name, 'wpforms-epfl-payonline' ); - //$this->debug( $list_of_allowed_gateway, 'list_of_allowed_gateway'); + $list_of_allowed_gateway[ $this->slug ] = esc_html__( $this->name, 'wpforms-epfl-payonline' ); + // $this->debug( $list_of_allowed_gateway, 'list_of_allowed_gateway'); return $list_of_allowed_gateway; } @@ -194,9 +193,9 @@ private function getArraysFromType( $fields, $type ) { * * @return void */ - private function update_payment( $payment_id, $data = [] ) { + private function update_payment( $payment_id, $data = array() ) { - wpforms()->get( 'payment' )->update( $payment_id, $data, '', '', [ 'cap' => false ] ); + wpforms()->get( 'payment' )->update( $payment_id, $data, '', '', array( 'cap' => false ) ); } @@ -210,9 +209,9 @@ private function update_payment( $payment_id, $data = [] ) { * * @return void */ - private function update_payment_meta( $payment_id, $data = [] ) { + private function update_payment_meta( $payment_id, $data = array() ) { - wpforms()->get( 'payment_meta' )->update( $payment_id, $data, '', '', [ 'cap' => false ] ); + wpforms()->get( 'payment_meta' )->update( $payment_id, $data, '', '', array( 'cap' => false ) ); } @@ -268,7 +267,7 @@ public function process_payment_to_wordline_saferpay( $fields, $entry, $form_dat ( '1' !== $payment_settings['enable'] ) ) { $this->log( $payment_settings, '⚠ Some EPFL Wordline Saferpay settings are missing ⚠' ); - $this->debug( $payment_settings, "PAYMENT SETTINGS" ); + $this->debug( $payment_settings, 'PAYMENT SETTINGS' ); return; } @@ -297,12 +296,12 @@ public function process_payment_to_wordline_saferpay( $fields, $entry, $form_dat $payonline_args = ''; $payonline_args = apply_filters( 'wpforms_payonline_redirect_args', $payonline_args, $fields, $form_data, $entry_id ); - # - # INITIALIZE WORDLINE PAYMENT - # + // + // INITIALIZE WORDLINE PAYMENT + // $payment_data = array( 'amount' => $amount, - 'currency' => strtolower( wpforms_setting( 'currency', 'CHF' )), + 'currency' => strtolower( wpforms_setting( 'currency', 'CHF' ) ), 'FirstName' => $this->getArraysFromType( $fields, 'name' )[0]['first'], 'LastName' => $this->getArraysFromType( $fields, 'name' )[0]['last'], 'Street' => $this->getArraysFromType( $fields, 'address' )[0]['address1'], @@ -311,17 +310,17 @@ public function process_payment_to_wordline_saferpay( $fields, $entry, $form_dat 'City' => $this->getArraysFromType( $fields, 'address' )[0]['city'], 'CountrySubdivisionCode' => $this->getArraysFromType( $fields, 'address' )[0]['state'], 'CountryCode' => $this->getArraysFromType( $fields, 'address' )[0]['country'], - 'Email' => $this->getFieldsFromType( $fields, 'email' )[0] + 'Email' => $this->getFieldsFromType( $fields, 'email' )[0], ); $wpforms_data = array( - "items" => wpforms_get_payment_items( $fields ), - "entry_id" => absint( $entry_id ), - "blog_info" => get_bloginfo( 'name' ), - "form_title" => $form_data['settings']['form_title'] + 'items' => wpforms_get_payment_items( $fields ), + 'entry_id' => absint( $entry_id ), + 'blog_info' => get_bloginfo( 'name' ), + 'form_title' => $form_data['settings']['form_title'], ); - $payment = new SaferpayPayment(/*settings*/$payment_settings, /*data, total and user info*/$payment_data, $wpforms_data); - $payment_init_result = $payment->paymentPageInitialize(); + $payment = new SaferpayPayment( /*settings*/$payment_settings, /*data, total and user info*/$payment_data, $wpforms_data ); + $payment_init_result = $payment->paymentPageInitialize(); $this->payment_redirect_url = $payment_init_result->RedirectUrl; // $this->debug( $payment_init_result->RedirectUrl, 'preparing redirection to saferpay' ); // $this->debug( $this->payment_redirect_url, 'preparing redirection to saferpay' ); @@ -329,22 +328,22 @@ public function process_payment_to_wordline_saferpay( $fields, $entry, $form_dat // Save to wp_forms_payment in pending $this->payment_save($entry); // Redirect to EPFL Payonline. - if ( wp_http_validate_url($payment_init_result->RedirectUrl) ) { + if ( wp_http_validate_url( $payment_init_result->RedirectUrl ) ) { // Update entry to include payment details. $entry_data = array( 'status' => 'pending', 'type' => 'payment', 'meta' => wp_json_encode( array( - 'payment_type' => $this->slug, - 'payment_recipient' => sanitize_email( trim( $payment_settings['email'] ) ), // ???? - 'payment_total' => $amount, - 'payment_currency' => strtolower( wpforms_setting( 'currency', 'CHF' ) ), + 'payment_type' => $this->slug, + 'payment_recipient' => sanitize_email( trim( $payment_settings['email'] ) ), // ???? + 'payment_total' => $amount, + 'payment_currency' => strtolower( wpforms_setting( 'currency', 'CHF' ) ), 'wordline_specifics' => $payment_init_result, - //'payment_saferpay' => $payment_init_result, + // 'payment_saferpay' => $payment_init_result, // 'payment_mode' => esc_html( $payment_settings['mode'] ), ) - ) + ), ); wpforms()->entry->update( $entry_id, $entry_data, '', '', array( 'cap' => false ) ); $this->debug( $payment_init_result->RedirectUrl, 'redirecting to saferpay' ); @@ -357,7 +356,7 @@ public function process_payment_to_wordline_saferpay( $fields, $entry, $form_dat /* NOTE: from here there is now way to know what happens with the payment. - The buyer might stop the process, or go though it completly. + The buyer might stop the process, or go though it completly. */ } @@ -380,21 +379,21 @@ public function prepare_payment_data( $payment_data, $fields, $form_data ) { $payonline_mode = $form_data['payments'][ $this->slug ]['payonline_mode']; if ( $payonline_mode === 'manual' ) { $payonline_saferpay_terminalid = $form_data['payments'][ $this->slug ]['saferpay_terminal_id']; - } else if ( $payonline_mode === 'test' ) { + } elseif ( $payonline_mode === 'test' ) { $payonline_saferpay_terminalid = get_option( 'wpforms-epfl-payonline-saferpay-terminalid-test' ); - } else if ( $payonline_mode === 'production' ) { + } elseif ( $payonline_mode === 'production' ) { $payonline_saferpay_terminalid = get_option( 'wpforms-epfl-payonline-saferpay-terminalid-prod' ); } $payment_reconciliation_code = $form_data['payments'][ $this->slug ]['payment_reconciliation_code']; - $padded_entry_id = str_pad($payment_data['entry_id'], 6, "0", STR_PAD_LEFT); + $padded_entry_id = str_pad( $payment_data['entry_id'], 6, '0', STR_PAD_LEFT ); - $OrderId = $payment_reconciliation_code . "-" . $payonline_saferpay_terminalid . "-" . $padded_entry_id . "-" . $payonline_mode; + $OrderId = $payment_reconciliation_code . '-' . $payonline_saferpay_terminalid . '-' . $padded_entry_id . '-' . $payonline_mode; $payment_data['status'] = 'pending'; $payment_data['title'] = $OrderId; $payment_data['gateway'] = sanitize_key( $this->slug ); $payment_settings = $form_data['payments'][ sanitize_key( $this->slug ) ]; - $payment_data['mode'] = ($payment_settings['payonline_mode'] === 'production') ? 'live' : 'test'; + $payment_data['mode'] = ( $payment_settings['payonline_mode'] === 'production' ) ? 'live' : 'test'; return $payment_data; } @@ -416,7 +415,8 @@ public function prepare_payment_meta( $payment_meta, $fields, $form_data ) { // $this->debug( $form_data, 'form_data' ); // If payment has not been cleared for processing, return. - /*if ( ! $this->allowed_to_process ) { + /* + if ( ! $this->allowed_to_process ) { return $payment_meta; }*/ @@ -439,13 +439,13 @@ public function check_return_from_saferpay() { if ( ! isset( $_GET['EPFLPayonline'] ) || ! isset( $_GET['entry_id'] ) ) { return; } else { - $this->debug( "Get hit on /?EPFLPayonline for " . $_GET['entry_id'], 'check_return_from_saferpay' ); + $this->debug( 'Get hit on /?EPFLPayonline for ' . $_GET['entry_id'], 'check_return_from_saferpay' ); } $entry_id = absint( $_GET['entry_id'] ); // TODO: do something clever here. $entry = wpforms()->entry->get( $entry_id ); - $this->debug( $entry_id, "Entry ID" ); + $this->debug( $entry_id, 'Entry ID' ); $payment = wpforms()->get( 'payment' )->get_by( 'entry_id', $entry_id ); @@ -466,62 +466,60 @@ public function check_return_from_saferpay() { } $entry_meta = json_decode( $entry->meta, true ); - $this->debug( $entry_meta, "entry_meta" ); - $this->debug( $entry_meta['wordline_specifics'], "entry_meta->wordline_specifics" ); - $this->debug( $entry_meta['wordline_specifics']['Token'], "entry_meta->wordline_specifics->token" ); + $this->debug( $entry_meta, 'entry_meta' ); + $this->debug( $entry_meta['wordline_specifics'], 'entry_meta->wordline_specifics' ); + $this->debug( $entry_meta['wordline_specifics']['Token'], 'entry_meta->wordline_specifics->token' ); + $saferpay_payment = new SaferpayPayment( /*settings*/$payment_settings, /*data, total and user info*/null, null ); + $assert = $saferpay_payment->paymentPageAssert( $entry_meta['wordline_specifics']['Token'], $entry_meta['wordline_specifics']['ResponseHeader']['RequestId'] ); - $saferpay_payment = new SaferpayPayment(/*settings*/$payment_settings, /*data, total and user info*/null, null); - $assert = $saferpay_payment->paymentPageAssert($entry_meta['wordline_specifics']['Token'], $entry_meta['wordline_specifics']['ResponseHeader']['RequestId']); + error_log( "\n\nASSERT\n" ); + error_log( var_export( json_decode( $assert, true ), true ) ); + error_log( "\n\nEND ASSERT\n" ); - error_log("\n\nASSERT\n"); - error_log(var_export(json_decode( $assert, true ), true)); - error_log("\n\nEND ASSERT\n"); - - if ($assert->Transaction->AcquirerName !== '') { - $this->debug( "AcquirerName is " . $assert->Transaction->AcquirerName ); + if ( $assert->Transaction->AcquirerName !== '' ) { + $this->debug( 'AcquirerName is ' . $assert->Transaction->AcquirerName ); wpforms()->get( 'payment_meta' )->add( - [ + array( 'payment_id' => $payment->id, 'meta_key' => 'method_type', 'meta_value' => $assert->Transaction->AcquirerName, - ] + ) ); } else { - $this->debug("AcquirerNameAcquirerNameAcquirerNameAcquirerNameAcquirerNameAcquirerName"); + $this->debug( 'AcquirerNameAcquirerNameAcquirerNameAcquirerNameAcquirerNameAcquirerName' ); } - if ( $assert && $assert->Transaction->Status !== 'AUTHORIZED' && $assert->Transaction->Status !== 'CAPTURED' ) { // && $assert->Transaction->Type === 'PAYMENT' - $this->debug( $assert, "ASSERT" ); - $this->debug( $assert->Transaction->Status, "ASSERT" ); // AUTHORIZED - $this->debug( $assert->Transaction->Type, "ASSERT" ); // PAYMENT + $this->debug( $assert, 'ASSERT' ); + $this->debug( $assert->Transaction->Status, 'ASSERT' ); // AUTHORIZED + $this->debug( $assert->Transaction->Type, 'ASSERT' ); // PAYMENT // THE PAYMENT HAS FAILED wpforms_log( esc_html__( 'EPFL Wordline Return Error', 'wpforms-epfl-payonline' ), sprintf( 'Error - Wordline data: %s', '
' . var_export( $assert, true ) . '
' ), - [ + array( 'parent' => $entry_id, - 'type' => [ 'error', 'payment' ], + 'type' => array( 'error', 'payment' ), 'form_id' => $payment->form_id, - ] + ) ); $this->add_payment_log( $payment->id, 'EPFL Wordline Return Error' ); - $array_assert = (array) $assert; // was an object array + $array_assert = (array) $assert; // was an object array $entry_meta['wordline_assert'] = $array_assert; - $entry_data = array( + $entry_data = array( 'status' => 'failed', // 'type' => 'payment', 'meta' => wp_json_encode( $entry_meta - ) + ), ); - //$this->update_payment( $payment->id, [ 'title' => "TITRE DE TEST l532 class-wpforms....php" ] ); + // $this->update_payment( $payment->id, [ 'title' => "TITRE DE TEST l532 class-wpforms....php" ] ); wpforms()->entry->update( $entry_id, $entry_data, '', '', array( 'cap' => false ) ); - $this->update_payment( $payment->id, [ 'status' => 'failed' ] ); + $this->update_payment( $payment->id, array( 'status' => 'failed' ) ); return; } @@ -536,35 +534,35 @@ public function check_return_from_saferpay() { // $entry_meta['payonline'] = $data; // Save the returned value by payonline. $this->log( $assert, 'wordline assert success' ); // Set the payment status to completed. - $array_assert = (array) $assert; // was an object array + $array_assert = (array) $assert; // was an object array $entry_meta['wordline_assert'] = $array_assert; - $entry_data = array( + $entry_data = array( 'status' => 'authorized', // 'type' => 'payment', 'meta' => wp_json_encode( $entry_meta - ) + ), ); - } else if ( $assert && $assert->Transaction->Type === 'PAYMENT' && $assert->Transaction->Status === 'CAPTURED' ) { + } elseif ( $assert && $assert->Transaction->Type === 'PAYMENT' && $assert->Transaction->Status === 'CAPTURED' ) { $this->log( $assert, 'wordline assert (captured) success' ); // Set the payment status to completed. - $array_assert = (array) $assert; // was an object array + $array_assert = (array) $assert; // was an object array $entry_meta['wordline_assert'] = $array_assert; - $entry_data = array( + $entry_data = array( 'status' => 'completed (captured)', // 'type' => 'payment', 'meta' => wp_json_encode( $entry_meta - ) + ), ); - $this->update_payment( $payment->id, [ 'status' => 'completed' ] ); + $this->update_payment( $payment->id, array( 'status' => 'completed' ) ); return; } // CAPTURE PAYMENT — actual money - $capture = $saferpay_payment->paymentCapture($assert->Transaction->Id, $entry_meta['wordline_specifics']['ResponseHeader']['RequestId']); - $this->debug( $capture, "CAPTURE" ); + $capture = $saferpay_payment->paymentCapture( $assert->Transaction->Id, $entry_meta['wordline_specifics']['ResponseHeader']['RequestId'] ); + $this->debug( $capture, 'CAPTURE' ); if ( $capture && $capture->Status !== 'CAPTURED' ) { // THE PAYMENT HAS FAILED @@ -577,20 +575,20 @@ public function check_return_from_saferpay() { 'form_id' => $entry->form_id, ) ); - $array_capture = (array) $capture; // was an object array + $array_capture = (array) $capture; // was an object array $entry_meta['wordline_capture'] = $array_capture; - $entry_data = array( + $entry_data = array( 'status' => 'capture failed', // 'type' => 'payment', 'meta' => wp_json_encode( $entry_meta - ) + ), ); wpforms()->entry->update( $entry_id, $entry_data, '', '', array( 'cap' => false ) ); // $entry = wpforms()->entry->get( $entry_id ); // $entry_meta = json_decode( $entry->meta, true ); // $this->debug( $entry_meta, "XXXentry_meta" ); - $this->update_payment( $payment->id, [ 'status' => 'failed' ] ); + $this->update_payment( $payment->id, array( 'status' => 'failed' ) ); return; } @@ -600,21 +598,21 @@ public function check_return_from_saferpay() { $this->log( $capture, 'wordline capture success' ); // Set the payment status to completed. - $array_capture = (array) $capture; // was an object array + $array_capture = (array) $capture; // was an object array $entry_meta['wordline_capture'] = $array_capture; - $entry_data = array( + $entry_data = array( 'status' => 'completed', // 'type' => 'payment', 'meta' => wp_json_encode( $entry_meta - ) + ), ); wpforms()->entry->update( $entry_id, $entry_data, '', '', array( 'cap' => false ) ); - $this->update_payment( $payment->id, [ 'status' => 'completed' ] ); + $this->update_payment( $payment->id, array( 'status' => 'completed' ) ); } -/* + /* // Send email to benificiary (payment proof). // translators: %1$s blog's name, %2$s form's name $email['subject'] = sprintf( esc_html__( '[%1$s] Payment confirmation for "%2$s"', 'wpforms-epfl-payonline' ), get_bloginfo( 'name' ), $form_data['settings']['form_title'] ); @@ -646,7 +644,7 @@ public function check_return_from_saferpay() { } // Send a copy to WPForms EPFL Payonline notification email. $emails->send( trim( $form_data['payments'][ $this->slug ]['email'] ), __( '[COPY]', 'wpforms-epfl-payonline' ) . $email['subject'], $email['message'] ); -*/ + */ // Just in case something else is needed... do_action( 'wpforms_epfl_payonline_process_complete', wpforms_decode( $entry->fields ), $form_data, $entry_id, $capture ); @@ -673,20 +671,20 @@ public function check_return_from_saferpay() { public function filter_currencies( $currencies ) { $currencies = array( // 'USD' => array( - // 'name' => esc_html__( 'U.S. Dollar', 'wpforms' ), - // 'symbol' => '$', - // 'symbol_pos' => 'left', - // 'thousands_separator' => ',', - // 'decimal_separator' => '.', - // 'decimals' => 2, + // 'name' => esc_html__( 'U.S. Dollar', 'wpforms' ), + // 'symbol' => '$', + // 'symbol_pos' => 'left', + // 'thousands_separator' => ',', + // 'decimal_separator' => '.', + // 'decimals' => 2, // ), // 'EUR' => array( - // 'name' => esc_html__( 'Euro', 'wpforms' ), - // 'symbol' => '€', - // 'symbol_pos' => 'right', - // 'thousands_separator' => '.', - // 'decimal_separator' => ',', - // 'decimals' => 2, + // 'name' => esc_html__( 'Euro', 'wpforms' ), + // 'symbol' => '€', + // 'symbol_pos' => 'right', + // 'thousands_separator' => '.', + // 'decimal_separator' => ',', + // 'decimals' => 2, // ), 'CHF' => array( 'name' => esc_html__( 'Swiss Franc', 'wpforms' ), @@ -724,15 +722,14 @@ public function action_entry_payment_sidebar( $entry, $form_data ) { echo '
(' . __( 'Note: accessible only for Payonline instance\'s administrators', 'wpforms-epfl-payonline' ) . ')'; if ( ! empty( $entry_meta->payment_id_trans ) ) { echo '
  • ' . __( 'Transaction detail', 'wpforms-epfl-payonline' ) . ': '; - echo sprintf( '%s', $entry_meta->payment_id_trans, $entry_meta->payment_id_trans ); + printf( '%s', $entry_meta->payment_id_trans, $entry_meta->payment_id_trans ); } if ( ! empty( $entry_meta->payment_id_inst ) ) { echo '
  • ' . __( 'Payonline transactions list', 'wpforms-epfl-payonline' ) . ': '; - echo sprintf( '%s', $entry_meta->payment_id_inst, $entry_meta->payment_id_inst ); + printf( '%s', $entry_meta->payment_id_inst, $entry_meta->payment_id_inst ); } echo '

'; } - } /** @@ -849,19 +846,19 @@ public function builder_content() { 'payonline_mode', $this->form_data, esc_html__( 'Payonline Payment Mode', 'wpforms' ), - [ + array( 'default' => 'Test', - 'options' => [ - 'test' => esc_html__( 'Test', 'wpforms-epfl-payonline' ), - 'production' => esc_html__( 'Production', 'wpforms-epfl-payonline' ), - 'manual' => esc_html__( 'Manual', 'wpforms-epfl-payonline' ), - ], + 'options' => array( + 'test' => esc_html__( 'Test', 'wpforms-epfl-payonline' ), + 'production' => esc_html__( 'Production', 'wpforms-epfl-payonline' ), + 'manual' => esc_html__( 'Manual', 'wpforms-epfl-payonline' ), + ), 'class' => 'wpforms-epfl-payonline-payment-mode-wrap', 'input_id' => 'wpforms-epfl-payonline-payment-mode', 'input_class' => 'wpforms-epfl-payonline-payment-mode', 'parent' => 'payments', - 'tooltip' => esc_html__( 'Payonline payment mode :
', 'wpforms-epfl-payonline' ), - ] + 'tooltip' => esc_html__( 'Payonline payment mode :
', 'wpforms-epfl-payonline' ), + ) ); echo '
'; @@ -944,16 +941,16 @@ public function builder_content() { // We decided that the form's name should be comprehensive enough for the // end user. It is alors easier for "webmaster". // wpforms_panel_field( - // 'text', - // $this->slug, - // 'payment_description', - // $this->form_data, - // esc_html__( 'A description of the payment for the end-user', 'wpforms-epfl-payonline' ), - // array( - // 'parent' => 'payments', - // 'tooltip' => esc_html__( 'The description is shown in the payment page', 'wpforms-epfl-payonline' ), - // 'default' => 'EPFL payment' - // ) + // 'text', + // $this->slug, + // 'payment_description', + // $this->form_data, + // esc_html__( 'A description of the payment for the end-user', 'wpforms-epfl-payonline' ), + // array( + // 'parent' => 'payments', + // 'tooltip' => esc_html__( 'The description is shown in the payment page', 'wpforms-epfl-payonline' ), + // 'default' => 'EPFL payment' + // ) // ); wpforms_panel_field( 'text', @@ -967,17 +964,16 @@ public function builder_content() { ) ); echo '
'; - } /** * Add additional links for WPForms EPFL Payonline in the plugins list. * * @access public - * @param array $links_array An array of the plugin's metadata - * @param string $plugin_file_name Path to the plugin file - * @param array $plugin_data An array of plugin data - * @param string $status Status of the plugin + * @param array $links_array An array of the plugin's metadata + * @param string $plugin_file_name Path to the plugin file + * @param array $plugin_data An array of plugin data + * @param string $status Status of the plugin * @return array $links_array */ public function add_links_to_plugin_row( $links_array, $plugin_file_name, $plugin_data, $status ) { @@ -991,7 +987,6 @@ public function add_links_to_plugin_row( $links_array, $plugin_file_name, $plugi } return (array) $links_array; } - } new WPForms_EPFL_Payonline(); diff --git a/class-wpforms-saferpay.php b/class-wpforms-saferpay.php index fa9b953..2bfed1f 100644 --- a/class-wpforms-saferpay.php +++ b/class-wpforms-saferpay.php @@ -37,7 +37,6 @@ * $ wp option add wpforms-epfl-payonline-saferpay-terminalid-test 12345678 * * The "Production" is similar with `-prod` at the end. - * **/ class SaferpayPayment { @@ -54,24 +53,24 @@ class SaferpayPayment { public $payonline_saferpay_customerid; public $payonline_saferpay_terminalid; - public function __construct($payment_settings, $payment_data, $wpforms_data) { + public function __construct( $payment_settings, $payment_data, $wpforms_data ) { /* Add-on settings */ - $this->payment_settings = $payment_settings; - $this->payonline_mode = $this->payment_settings['payonline_mode']; + $this->payment_settings = $payment_settings; + $this->payonline_mode = $this->payment_settings['payonline_mode']; $this->payment_reconciliation_code = $this->payment_settings['payment_reconciliation_code']; // $this->payment_description = $this->payment_settings['payment_description']; /* Form data */ $this->wpforms_data = $wpforms_data; - $this->form_title = $this->payment_description = $this->wpforms_data['form_title']; + $this->form_title = $this->payment_description = $this->wpforms_data['form_title']; /* Payment data */ $this->payment_data = $payment_data; /* Payment ID */ - $this->padded_entry_id = str_pad($this->wpforms_data['entry_id'], 6, "0", STR_PAD_LEFT); + $this->padded_entry_id = str_pad( $this->wpforms_data['entry_id'], 6, '0', STR_PAD_LEFT ); - error_log(static::class . "::" . __FUNCTION__ . ": payonline_mode = " . $this->payonline_mode); + error_log( static::class . '::' . __FUNCTION__ . ': payonline_mode = ' . $this->payonline_mode ); /** * According to the mode, settings are fetched either from the settings @@ -82,38 +81,39 @@ public function __construct($payment_settings, $payment_data, $wpforms_data) { * Data are set from the DB. * - production: use the mutualized "EPFL-WPforms" account * Data are set from the DB. - **/ + */ if ( $this->payonline_mode === 'manual' ) { $this->payonline_saferpay_apiusername = $this->payment_settings['saferpay_api_username']; $this->payonline_saferpay_apipassword = $this->payment_settings['saferpay_api_password']; - $this->payonline_saferpay_customerid = $this->payment_settings['saferpay_customer_id']; - $this->payonline_saferpay_terminalid = $this->payment_settings['saferpay_terminal_id']; - } else if ( $this->payonline_mode === 'test' ) { - $this->payonline_saferpay_apiusername = get_option( 'wpforms-epfl-payonline-saferpay-apiusername-test' ); - $this->payonline_saferpay_apipassword = get_option( 'wpforms-epfl-payonline-saferpay-apipassword-test' ); - $this->payonline_saferpay_customerid = get_option( 'wpforms-epfl-payonline-saferpay-customerid-test' ); - $this->payonline_saferpay_terminalid = get_option( 'wpforms-epfl-payonline-saferpay-terminalid-test' ); + $this->payonline_saferpay_customerid = $this->payment_settings['saferpay_customer_id']; + $this->payonline_saferpay_terminalid = $this->payment_settings['saferpay_terminal_id']; + } elseif ( $this->payonline_mode === 'test' ) { + $this->payonline_saferpay_apiusername = get_option( 'wpforms-epfl-payonline-saferpay-apiusername-test' ); + $this->payonline_saferpay_apipassword = get_option( 'wpforms-epfl-payonline-saferpay-apipassword-test' ); + $this->payonline_saferpay_customerid = get_option( 'wpforms-epfl-payonline-saferpay-customerid-test' ); + $this->payonline_saferpay_terminalid = get_option( 'wpforms-epfl-payonline-saferpay-terminalid-test' ); $this->payment_settings['saferpay_api_url'] = 'https://test.saferpay.com'; - } else if ( $this->payonline_mode === 'production' ) { - $this->payonline_saferpay_apiusername = get_option( 'wpforms-epfl-payonline-saferpay-apiusername-prod' ); - $this->payonline_saferpay_apipassword = get_option( 'wpforms-epfl-payonline-saferpay-apipassword-prod' ); - $this->payonline_saferpay_customerid = get_option( 'wpforms-epfl-payonline-saferpay-customerid-prod' ); - $this->payonline_saferpay_terminalid = get_option( 'wpforms-epfl-payonline-saferpay-terminalid-prod' ); + } elseif ( $this->payonline_mode === 'production' ) { + $this->payonline_saferpay_apiusername = get_option( 'wpforms-epfl-payonline-saferpay-apiusername-prod' ); + $this->payonline_saferpay_apipassword = get_option( 'wpforms-epfl-payonline-saferpay-apipassword-prod' ); + $this->payonline_saferpay_customerid = get_option( 'wpforms-epfl-payonline-saferpay-customerid-prod' ); + $this->payonline_saferpay_terminalid = get_option( 'wpforms-epfl-payonline-saferpay-terminalid-prod' ); $this->payment_settings['saferpay_api_url'] = 'https://www.saferpay.com'; } - error_log("-- Saferpay secrets --------------------------------------------- + error_log( + "-- Saferpay secrets --------------------------------------------- \tCredentials: $this->payonline_saferpay_apiusername / $this->payonline_saferpay_apipassword \tCustomerID: $this->payonline_saferpay_customerid \tTerminalID: $this->payonline_saferpay_terminalid -\tAPI URL: $this->payment_settings['saferpay_api_url']\n"); - +\tAPI URL: $this->payment_settings['saferpay_api_url']\n" + ); } /** * Function to post data to the SaferPay API **/ - private function postJSONData($url, $data) { - $basic_auth = base64_encode($this->payonline_saferpay_apiusername . ":" . $this->payonline_saferpay_apipassword ); + private function postJSONData( $url, $data ) { + $basic_auth = base64_encode( $this->payonline_saferpay_apiusername . ':' . $this->payonline_saferpay_apipassword ); // error_log("POST AUTH"); // error_log(var_export($basic_auth, true)); // error_log("POST DATA"); @@ -121,36 +121,36 @@ private function postJSONData($url, $data) { $options = array( 'http' => array( 'ignore_errors' => true, // Note: without this line all 400ish status will be ignored! https://stackoverflow.com/a/11479968/960623 - 'header' => "Content-Type: application/json\r\n" - . "Authorization: Basic $basic_auth\r\n", - 'method' => 'POST', - 'content' => json_encode($data) - ) + 'header' => "Content-Type: application/json\r\n" + . "Authorization: Basic $basic_auth\r\n", + 'method' => 'POST', + 'content' => json_encode( $data ), + ), ); - error_log(static::class . "::" . __FUNCTION__ . " : Posted Data "); - error_log(var_export(json_encode($data), true)); - error_log(var_export("Authorization: Basic $basic_auth", true)); + error_log( static::class . '::' . __FUNCTION__ . ' : Posted Data ' ); + error_log( var_export( json_encode( $data ), true ) ); + error_log( var_export( "Authorization: Basic $basic_auth", true ) ); - $context = stream_context_create($options); - $json_result = file_get_contents($url, false, $context); + $context = stream_context_create( $options ); + $json_result = file_get_contents( $url, false, $context ); - if ($json_result !== false) { - $result = json_decode($json_result); - error_log(var_export($result, true)); - if (property_exists( $result, 'ErrorName' ) ) { + if ( $json_result !== false ) { + $result = json_decode( $json_result ); + error_log( var_export( $result, true ) ); + if ( property_exists( $result, 'ErrorName' ) ) { // Something has failed - error_log('POSTING DATA TO SAFERPAY FAILED!'); - foreach ($result->ErrorDetail as $msg) { - error_log(' ' . $result->ErrorName . ' (' . $result->ErrorMessage . "): " . $msg); + error_log( 'POSTING DATA TO SAFERPAY FAILED!' ); + foreach ( $result->ErrorDetail as $msg ) { + error_log( ' ' . $result->ErrorName . ' (' . $result->ErrorMessage . '): ' . $msg ); } } else { - error_log("POST RESULTS"); - error_log(var_export(json_decode($json_result), true)); + error_log( 'POST RESULTS' ); + error_log( var_export( json_decode( $json_result ), true ) ); return $result; } } else { // Something went wrong! - error_log("Error posting data!"); + error_log( 'Error posting data!' ); } return false; } @@ -167,60 +167,60 @@ public function paymentPageInitialize() { $data = array( // mandatory - "RequestHeader" => array( + 'RequestHeader' => array( // mandatory - "SpecVersion" => self::SpecVersion, + 'SpecVersion' => self::SpecVersion, // mandatory - "CustomerId" => $this->payonline_saferpay_customerid, + 'CustomerId' => $this->payonline_saferpay_customerid, // mandatory - "RequestId" => $this->wpforms_data['entry_id'] . ':' . date("Y-m-d_H:i:s"), // TODO test a better payment identifier (should be unique) + 'RequestId' => $this->wpforms_data['entry_id'] . ':' . date( 'Y-m-d_H:i:s' ), // TODO test a better payment identifier (should be unique) // mandatory - "RetryIndicator" => 0 + 'RetryIndicator' => 0, ), // mandatory - "TerminalId" => $this->payonline_saferpay_terminalid, + 'TerminalId' => $this->payonline_saferpay_terminalid, // mandatory - "Payment" => array ( + 'Payment' => array( // mandatory - "Amount" => array ( + 'Amount' => array( // mandatory Amount in minor unit (CHF 1.00 ⇒ Value=100). Only Integer values will be accepted! - "Value" => $this->payment_data['amount']*100, + 'Value' => $this->payment_data['amount'] * 100, // mandatory ISO 4217 3-letter currency code - "CurrencyCode" => strtoupper($this->payment_data['currency']), // TODO: use the wproms settings + 'CurrencyCode' => strtoupper( $this->payment_data['currency'] ), // TODO: use the wproms settings ), // recommanded Unambiguous order identifier defined by the merchant / shop. This identifier might be used as reference later on. Max 80 - "OrderId" => $this->payment_reconciliation_code . "-" . $this->payonline_saferpay_terminalid . "-" . $this->padded_entry_id . "-" . $this->payonline_mode, // "NoSpaceOrSpecial" . bin2hex(openssl_random_pseudo_bytes(32)), // "wpf-" . $this->wpforms_data['entry_id'], - "PayerNote" => substr( "EPFL — " . $this->form_title, 0, 50 ), // Max 50 // TODO: change me + 'OrderId' => $this->payment_reconciliation_code . '-' . $this->payonline_saferpay_terminalid . '-' . $this->padded_entry_id . '-' . $this->payonline_mode, // "NoSpaceOrSpecial" . bin2hex(openssl_random_pseudo_bytes(32)), // "wpf-" . $this->wpforms_data['entry_id'], + 'PayerNote' => substr( 'EPFL — ' . $this->form_title, 0, 50 ), // Max 50 // TODO: change me // mandatory A human readable description provided by the merchant that will be displayed in Payment Page. - "Description" => $this->payment_description + 'Description' => $this->payment_description, ), - "ReturnUrl" => array( - "Url" => get_site_url() . "?EPFLPayonline&entry_id=" . $this->padded_entry_id + 'ReturnUrl' => array( + 'Url' => get_site_url() . '?EPFLPayonline&entry_id=' . $this->padded_entry_id, ), - "RedirectNotifyUrls" => array( - "Success" => get_site_url() . "?EPFLPayonline&status=Success&entry_id=" . $this->padded_entry_id, - "Fail" => get_site_url() . "?EPFLPayonline&status=Fail&entry_id=" . $this->padded_entry_id + 'RedirectNotifyUrls' => array( + 'Success' => get_site_url() . '?EPFLPayonline&status=Success&entry_id=' . $this->padded_entry_id, + 'Fail' => get_site_url() . '?EPFLPayonline&status=Fail&entry_id=' . $this->padded_entry_id, ), // Information about the caller (merchant host) - "ClientInfo" => array( - "ShopInfo" => "epfl_wpforms v" . WPFORMS_EPFL_PAYONLINE_VERSION ?: "epfl_wpforms", // Name and version of the shop software - "OsInfo" => "epfl_wp_base" //Information on the operating system + 'ClientInfo' => array( + 'ShopInfo' => 'epfl_wpforms v' . WPFORMS_EPFL_PAYONLINE_VERSION ?: 'epfl_wpforms', // Name and version of the shop software + 'OsInfo' => 'epfl_wp_base', // Information on the operating system ), - "Payer" => array( - "LanguageCode" => "en", - "BillingAddress" => array( - "FirstName" => $this->payment_data['FirstName'], // The payer's first name - "LastName" => $this->payment_data['LastName'], // The payer's last name + 'Payer' => array( + 'LanguageCode' => 'en', + 'BillingAddress' => array( + 'FirstName' => $this->payment_data['FirstName'], // The payer's first name + 'LastName' => $this->payment_data['LastName'], // The payer's last name // // "Company" => '', // The payer's company // // "LegalForm" => '', //The payer's legal form (AG, GmbH, Misc.) // // "Gender" => '', // The payer's gender - "Street" => $this->payment_data['Street'] ?? 'no address1', // The payer's street - "Street2" => $this->payment_data['Street2'] ?? 'no address2', // The payer's street, second line. Only use this, if you need two lines. It may not be supported by all acquirers. - "Zip" => $this->payment_data['Zip'] ?? '0000', // The payer's zip code - "City" => $this->payment_data['City'] ?? 'no city', // The payer's city - //"CountrySubdivisionCode" => $this->payment_data['CountrySubdivisionCode'] ?? 'no state', // The payer's country subdivision code (Canton) - "CountryCode" => $this->payment_data['CountryCode'] ?? 'XX', // The payer's country code (ISO 3166-1 alpha-2 country code) - "Email" => $this->payment_data['Email'] ?? 'no email', // The payer's email address + 'Street' => $this->payment_data['Street'] ?? 'no address1', // The payer's street + 'Street2' => $this->payment_data['Street2'] ?? 'no address2', // The payer's street, second line. Only use this, if you need two lines. It may not be supported by all acquirers. + 'Zip' => $this->payment_data['Zip'] ?? '0000', // The payer's zip code + 'City' => $this->payment_data['City'] ?? 'no city', // The payer's city + // "CountrySubdivisionCode" => $this->payment_data['CountrySubdivisionCode'] ?? 'no state', // The payer's country subdivision code (Canton) + 'CountryCode' => $this->payment_data['CountryCode'] ?? 'XX', // The payer's country code (ISO 3166-1 alpha-2 country code) + 'Email' => $this->payment_data['Email'] ?? 'no email', // The payer's email address // "DateOfBirth" => '', // The payer's date of birth in ISO 8601 extended date notation (YYYY-MM-DD) // "Phone" => '', // The payer's phone number // // "VatNumber" => '', // The company's vat number @@ -228,19 +228,19 @@ public function paymentPageInitialize() { // // "DeliveryAddress" => array() ), ), - "Notification" => array( - "MerchantEmails" => array($this->payment_settings['email'], 'wp-saferpay@groupes.epfl.ch'), - "PayerEmail" => $this->payment_data['Email'] - ) + 'Notification' => array( + 'MerchantEmails' => array( $this->payment_settings['email'], 'wp-saferpay@groupes.epfl.ch' ), + 'PayerEmail' => $this->payment_data['Email'], + ), ); // The test URL is https://test.saferpay.com/api/Payment/v1/PaymentPage/Initialize - $url = $this->payment_settings['saferpay_api_url'] . '/api/Payment/v1/PaymentPage/Initialize'; - $payment_init_result = self::postJSONData($url, $data); + $url = $this->payment_settings['saferpay_api_url'] . '/api/Payment/v1/PaymentPage/Initialize'; + $payment_init_result = self::postJSONData( $url, $data ); - if ($payment_init_result->Token && + if ( $payment_init_result->Token && $payment_init_result->Expiration && - $payment_init_result->RedirectUrl) { + $payment_init_result->RedirectUrl ) { return $payment_init_result; } else { return false; @@ -253,20 +253,20 @@ public function paymentPageInitialize() { * * https://saferpay.github.io/jsonapi/#Payment_v1_PaymentPage_Assert */ - public function paymentPageAssert($token, $request_id) { + public function paymentPageAssert( $token, $request_id ) { // https://test.saferpay.com/api//Payment/v1/PaymentPage/Assert - $url = $this->payment_settings['saferpay_api_url'] . '/api/Payment/v1/PaymentPage/Assert'; - $data = array( - "RequestHeader" => array( - "SpecVersion" => self::SpecVersion, - "CustomerId" => $this->payonline_saferpay_customerid, - "RequestId" => $request_id, - "RetryIndicator" => 0 + $url = $this->payment_settings['saferpay_api_url'] . '/api/Payment/v1/PaymentPage/Assert'; + $data = array( + 'RequestHeader' => array( + 'SpecVersion' => self::SpecVersion, + 'CustomerId' => $this->payonline_saferpay_customerid, + 'RequestId' => $request_id, + 'RetryIndicator' => 0, ), - "Token" => $token + 'Token' => $token, ); - $assert = self::postJSONData($url, $data); - if ($assert) { + $assert = self::postJSONData( $url, $data ); + if ( $assert ) { return $assert; } else { return false; @@ -276,26 +276,25 @@ public function paymentPageAssert($token, $request_id) { /** * Not sure yet (https://docs.saferpay.com/home/integration-guide/licences-and-interfaces/capture-and-daily-closing) */ - public function paymentCapture($transaction_id, $request_id) { + public function paymentCapture( $transaction_id, $request_id ) { // https://saferpay.github.io/jsonapi/index.html#Payment_v1_Transaction_Capture - $url = $this->payment_settings['saferpay_api_url'] . '/api/Payment/v1/Transaction/Capture'; - $data = array( - "RequestHeader" => array( - "SpecVersion" => self::SpecVersion, - "CustomerId" => $this->payonline_saferpay_customerid, - "RequestId" => $request_id, - "RetryIndicator" => 0 + $url = $this->payment_settings['saferpay_api_url'] . '/api/Payment/v1/Transaction/Capture'; + $data = array( + 'RequestHeader' => array( + 'SpecVersion' => self::SpecVersion, + 'CustomerId' => $this->payonline_saferpay_customerid, + 'RequestId' => $request_id, + 'RetryIndicator' => 0, + ), + 'TransactionReference' => array( + 'TransactionId' => $transaction_id, ), - "TransactionReference" => array( - "TransactionId" => $transaction_id - ) ); - $capture = self::postJSONData($url, $data); - if ($capture) { + $capture = self::postJSONData( $url, $data ); + if ( $capture ) { return $capture; } else { return false; } } - } diff --git a/composer.json b/composer.json index ed4651b..89aa3c0 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,12 @@ { "require-dev": { - "squizlabs/php_codesniffer": "^3.6", - "friendsofphp/php-cs-fixer": "^3.8", - "wp-coding-standards/wpcs": "^2.3" + "squizlabs/php_codesniffer": "^3.7", + "friendsofphp/php-cs-fixer": "^3.40", + "wp-coding-standards/wpcs": "^3.0" + }, + "config": { + "allow-plugins": { + "dealerdirect/phpcodesniffer-composer-installer": true + } } } diff --git a/composer.lock b/composer.lock index 0a1b2dc..8e852a5 100644 --- a/composer.lock +++ b/composer.lock @@ -4,21 +4,21 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "3f8314659c70489f8188040502da5c63", + "content-hash": "86e5e97fca2b1c49823e1ceef4345aed", "packages": [], "packages-dev": [ { "name": "composer/pcre", - "version": "3.0.0", + "version": "3.1.1", "source": { "type": "git", "url": "https://github.com/composer/pcre.git", - "reference": "e300eb6c535192decd27a85bc72a9290f0d6b3bd" + "reference": "00104306927c7a0919b4ced2aaa6782c1e61a3c9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/pcre/zipball/e300eb6c535192decd27a85bc72a9290f0d6b3bd", - "reference": "e300eb6c535192decd27a85bc72a9290f0d6b3bd", + "url": "https://api.github.com/repos/composer/pcre/zipball/00104306927c7a0919b4ced2aaa6782c1e61a3c9", + "reference": "00104306927c7a0919b4ced2aaa6782c1e61a3c9", "shasum": "" }, "require": { @@ -60,7 +60,7 @@ ], "support": { "issues": "https://github.com/composer/pcre/issues", - "source": "https://github.com/composer/pcre/tree/3.0.0" + "source": "https://github.com/composer/pcre/tree/3.1.1" }, "funding": [ { @@ -76,20 +76,20 @@ "type": "tidelift" } ], - "time": "2022-02-25T20:21:48+00:00" + "time": "2023-10-11T07:11:09+00:00" }, { "name": "composer/semver", - "version": "3.3.2", + "version": "3.4.0", "source": { "type": "git", "url": "https://github.com/composer/semver.git", - "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9" + "reference": "35e8d0af4486141bc745f23a29cc2091eb624a32" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/3953f23262f2bff1919fc82183ad9acb13ff62c9", - "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9", + "url": "https://api.github.com/repos/composer/semver/zipball/35e8d0af4486141bc745f23a29cc2091eb624a32", + "reference": "35e8d0af4486141bc745f23a29cc2091eb624a32", "shasum": "" }, "require": { @@ -139,9 +139,9 @@ "versioning" ], "support": { - "irc": "irc://irc.freenode.org/composer", + "irc": "ircs://irc.libera.chat:6697/composer", "issues": "https://github.com/composer/semver/issues", - "source": "https://github.com/composer/semver/tree/3.3.2" + "source": "https://github.com/composer/semver/tree/3.4.0" }, "funding": [ { @@ -157,7 +157,7 @@ "type": "tidelift" } ], - "time": "2022-04-01T19:23:25+00:00" + "time": "2023-08-31T09:50:34+00:00" }, { "name": "composer/xdebug-handler", @@ -226,104 +226,39 @@ "time": "2022-02-25T21:32:43+00:00" }, { - "name": "doctrine/annotations", - "version": "1.13.2", + "name": "dealerdirect/phpcodesniffer-composer-installer", + "version": "v1.0.0", "source": { "type": "git", - "url": "https://github.com/doctrine/annotations.git", - "reference": "5b668aef16090008790395c02c893b1ba13f7e08" + "url": "https://github.com/PHPCSStandards/composer-installer.git", + "reference": "4be43904336affa5c2f70744a348312336afd0da" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/5b668aef16090008790395c02c893b1ba13f7e08", - "reference": "5b668aef16090008790395c02c893b1ba13f7e08", + "url": "https://api.github.com/repos/PHPCSStandards/composer-installer/zipball/4be43904336affa5c2f70744a348312336afd0da", + "reference": "4be43904336affa5c2f70744a348312336afd0da", "shasum": "" }, "require": { - "doctrine/lexer": "1.*", - "ext-tokenizer": "*", - "php": "^7.1 || ^8.0", - "psr/cache": "^1 || ^2 || ^3" + "composer-plugin-api": "^1.0 || ^2.0", + "php": ">=5.4", + "squizlabs/php_codesniffer": "^2.0 || ^3.1.0 || ^4.0" }, "require-dev": { - "doctrine/cache": "^1.11 || ^2.0", - "doctrine/coding-standard": "^6.0 || ^8.1", - "phpstan/phpstan": "^0.12.20", - "phpunit/phpunit": "^7.5 || ^8.0 || ^9.1.5", - "symfony/cache": "^4.4 || ^5.2" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "Docblock Annotations Parser", - "homepage": "https://www.doctrine-project.org/projects/annotations.html", - "keywords": [ - "annotations", - "docblock", - "parser" - ], - "support": { - "issues": "https://github.com/doctrine/annotations/issues", - "source": "https://github.com/doctrine/annotations/tree/1.13.2" - }, - "time": "2021-08-05T19:00:23+00:00" - }, - { - "name": "doctrine/lexer", - "version": "1.2.3", - "source": { - "type": "git", - "url": "https://github.com/doctrine/lexer.git", - "reference": "c268e882d4dbdd85e36e4ad69e02dc284f89d229" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/c268e882d4dbdd85e36e4ad69e02dc284f89d229", - "reference": "c268e882d4dbdd85e36e4ad69e02dc284f89d229", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" + "composer/composer": "*", + "ext-json": "*", + "ext-zip": "*", + "php-parallel-lint/php-parallel-lint": "^1.3.1", + "phpcompatibility/php-compatibility": "^9.0", + "yoast/phpunit-polyfills": "^1.0" }, - "require-dev": { - "doctrine/coding-standard": "^9.0", - "phpstan/phpstan": "^1.3", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "vimeo/psalm": "^4.11" + "type": "composer-plugin", + "extra": { + "class": "PHPCSStandards\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin" }, - "type": "library", "autoload": { "psr-4": { - "Doctrine\\Common\\Lexer\\": "lib/Doctrine/Common/Lexer" + "PHPCSStandards\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -332,95 +267,88 @@ ], "authors": [ { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" + "name": "Franck Nijhof", + "email": "franck.nijhof@dealerdirect.com", + "homepage": "http://www.frenck.nl", + "role": "Developer / IT Manager" }, { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" + "name": "Contributors", + "homepage": "https://github.com/PHPCSStandards/composer-installer/graphs/contributors" } ], - "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", - "homepage": "https://www.doctrine-project.org/projects/lexer.html", + "description": "PHP_CodeSniffer Standards Composer Installer Plugin", + "homepage": "http://www.dealerdirect.com", "keywords": [ - "annotations", - "docblock", - "lexer", - "parser", - "php" + "PHPCodeSniffer", + "PHP_CodeSniffer", + "code quality", + "codesniffer", + "composer", + "installer", + "phpcbf", + "phpcs", + "plugin", + "qa", + "quality", + "standard", + "standards", + "style guide", + "stylecheck", + "tests" ], "support": { - "issues": "https://github.com/doctrine/lexer/issues", - "source": "https://github.com/doctrine/lexer/tree/1.2.3" + "issues": "https://github.com/PHPCSStandards/composer-installer/issues", + "source": "https://github.com/PHPCSStandards/composer-installer" }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer", - "type": "tidelift" - } - ], - "time": "2022-02-28T11:07:21+00:00" + "time": "2023-01-05T11:28:13+00:00" }, { "name": "friendsofphp/php-cs-fixer", - "version": "v3.8.0", + "version": "v3.40.0", "source": { "type": "git", - "url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git", - "reference": "cbad1115aac4b5c3c5540e7210d3c9fba2f81fa3" + "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", + "reference": "27d2b3265b5d550ec411b4319967ae7cfddfb2e0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/cbad1115aac4b5c3c5540e7210d3c9fba2f81fa3", - "reference": "cbad1115aac4b5c3c5540e7210d3c9fba2f81fa3", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/27d2b3265b5d550ec411b4319967ae7cfddfb2e0", + "reference": "27d2b3265b5d550ec411b4319967ae7cfddfb2e0", "shasum": "" }, "require": { - "composer/semver": "^3.2", + "composer/semver": "^3.4", "composer/xdebug-handler": "^3.0.3", - "doctrine/annotations": "^1.13", "ext-json": "*", "ext-tokenizer": "*", "php": "^7.4 || ^8.0", - "php-cs-fixer/diff": "^2.0", - "symfony/console": "^5.4 || ^6.0", - "symfony/event-dispatcher": "^5.4 || ^6.0", - "symfony/filesystem": "^5.4 || ^6.0", - "symfony/finder": "^5.4 || ^6.0", - "symfony/options-resolver": "^5.4 || ^6.0", - "symfony/polyfill-mbstring": "^1.23", - "symfony/polyfill-php80": "^1.25", - "symfony/polyfill-php81": "^1.25", - "symfony/process": "^5.4 || ^6.0", - "symfony/stopwatch": "^5.4 || ^6.0" + "sebastian/diff": "^4.0 || ^5.0", + "symfony/console": "^5.4 || ^6.0 || ^7.0", + "symfony/event-dispatcher": "^5.4 || ^6.0 || ^7.0", + "symfony/filesystem": "^5.4 || ^6.0 || ^7.0", + "symfony/finder": "^5.4 || ^6.0 || ^7.0", + "symfony/options-resolver": "^5.4 || ^6.0 || ^7.0", + "symfony/polyfill-mbstring": "^1.28", + "symfony/polyfill-php80": "^1.28", + "symfony/polyfill-php81": "^1.28", + "symfony/process": "^5.4 || ^6.0 || ^7.0", + "symfony/stopwatch": "^5.4 || ^6.0 || ^7.0" }, "require-dev": { + "facile-it/paraunit": "^1.3 || ^2.0", "justinrainbow/json-schema": "^5.2", - "keradus/cli-executor": "^1.5", - "mikey179/vfsstream": "^1.6.10", - "php-coveralls/php-coveralls": "^2.5.2", + "keradus/cli-executor": "^2.1", + "mikey179/vfsstream": "^1.6.11", + "php-coveralls/php-coveralls": "^2.7", "php-cs-fixer/accessible-object": "^1.1", - "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.2", - "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.2.1", - "phpspec/prophecy": "^1.15", + "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.4", + "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.4", + "phpspec/prophecy": "^1.17", "phpspec/prophecy-phpunit": "^2.0", - "phpunit/phpunit": "^9.5", - "phpunitgoodpractices/polyfill": "^1.5", - "phpunitgoodpractices/traits": "^1.9.1", - "symfony/phpunit-bridge": "^6.0", - "symfony/yaml": "^5.4 || ^6.0" + "phpunit/phpunit": "^9.6", + "symfony/phpunit-bridge": "^6.3.8 || ^7.0", + "symfony/yaml": "^5.4 || ^6.0 || ^7.0" }, "suggest": { "ext-dom": "For handling output formats in XML", @@ -450,9 +378,15 @@ } ], "description": "A tool to automatically fix PHP code style", + "keywords": [ + "Static code analysis", + "fixer", + "standards", + "static analysis" + ], "support": { - "issues": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues", - "source": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/tree/v3.8.0" + "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.40.0" }, "funding": [ { @@ -460,127 +394,167 @@ "type": "github" } ], - "time": "2022-03-18T17:20:59+00:00" + "time": "2023-11-26T09:25:53+00:00" }, { - "name": "php-cs-fixer/diff", - "version": "v2.0.2", + "name": "phpcsstandards/phpcsextra", + "version": "1.1.2", "source": { "type": "git", - "url": "https://github.com/PHP-CS-Fixer/diff.git", - "reference": "29dc0d507e838c4580d018bd8b5cb412474f7ec3" + "url": "https://github.com/PHPCSStandards/PHPCSExtra.git", + "reference": "746c3190ba8eb2f212087c947ba75f4f5b9a58d5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/diff/zipball/29dc0d507e838c4580d018bd8b5cb412474f7ec3", - "reference": "29dc0d507e838c4580d018bd8b5cb412474f7ec3", + "url": "https://api.github.com/repos/PHPCSStandards/PHPCSExtra/zipball/746c3190ba8eb2f212087c947ba75f4f5b9a58d5", + "reference": "746c3190ba8eb2f212087c947ba75f4f5b9a58d5", "shasum": "" }, "require": { - "php": "^5.6 || ^7.0 || ^8.0" + "php": ">=5.4", + "phpcsstandards/phpcsutils": "^1.0.8", + "squizlabs/php_codesniffer": "^3.7.1" }, "require-dev": { - "phpunit/phpunit": "^5.7.23 || ^6.4.3 || ^7.0", - "symfony/process": "^3.3" + "php-parallel-lint/php-console-highlighter": "^1.0", + "php-parallel-lint/php-parallel-lint": "^1.3.2", + "phpcsstandards/phpcsdevcs": "^1.1.6", + "phpcsstandards/phpcsdevtools": "^1.2.1", + "phpunit/phpunit": "^4.5 || ^5.0 || ^6.0 || ^7.0" }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] + "type": "phpcodesniffer-standard", + "extra": { + "branch-alias": { + "dev-stable": "1.x-dev", + "dev-develop": "1.x-dev" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "LGPL-3.0-or-later" ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" + "name": "Juliette Reinders Folmer", + "homepage": "https://github.com/jrfnl", + "role": "lead" }, { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" + "name": "Contributors", + "homepage": "https://github.com/PHPCSStandards/PHPCSExtra/graphs/contributors" } ], - "description": "sebastian/diff v3 backport support for PHP 5.6+", - "homepage": "https://github.com/PHP-CS-Fixer", + "description": "A collection of sniffs and standards for use with PHP_CodeSniffer.", "keywords": [ - "diff" + "PHP_CodeSniffer", + "phpcbf", + "phpcodesniffer-standard", + "phpcs", + "standards", + "static analysis" ], "support": { - "issues": "https://github.com/PHP-CS-Fixer/diff/issues", - "source": "https://github.com/PHP-CS-Fixer/diff/tree/v2.0.2" + "issues": "https://github.com/PHPCSStandards/PHPCSExtra/issues", + "source": "https://github.com/PHPCSStandards/PHPCSExtra" }, - "time": "2020-10-14T08:32:19+00:00" + "time": "2023-09-20T22:06:18+00:00" }, { - "name": "psr/cache", - "version": "1.0.1", + "name": "phpcsstandards/phpcsutils", + "version": "1.0.8", "source": { "type": "git", - "url": "https://github.com/php-fig/cache.git", - "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8" + "url": "https://github.com/PHPCSStandards/PHPCSUtils.git", + "reference": "69465cab9d12454e5e7767b9041af0cd8cd13be7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8", - "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8", + "url": "https://api.github.com/repos/PHPCSStandards/PHPCSUtils/zipball/69465cab9d12454e5e7767b9041af0cd8cd13be7", + "reference": "69465cab9d12454e5e7767b9041af0cd8cd13be7", "shasum": "" }, "require": { - "php": ">=5.3.0" + "dealerdirect/phpcodesniffer-composer-installer": "^0.4.1 || ^0.5 || ^0.6.2 || ^0.7 || ^1.0", + "php": ">=5.4", + "squizlabs/php_codesniffer": "^3.7.1 || 4.0.x-dev@dev" }, - "type": "library", + "require-dev": { + "ext-filter": "*", + "php-parallel-lint/php-console-highlighter": "^1.0", + "php-parallel-lint/php-parallel-lint": "^1.3.2", + "phpcsstandards/phpcsdevcs": "^1.1.6", + "yoast/phpunit-polyfills": "^1.0.5 || ^2.0.0" + }, + "type": "phpcodesniffer-standard", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-stable": "1.x-dev", + "dev-develop": "1.x-dev" } }, "autoload": { - "psr-4": { - "Psr\\Cache\\": "src/" - } + "classmap": [ + "PHPCSUtils/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "LGPL-3.0-or-later" ], "authors": [ { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "name": "Juliette Reinders Folmer", + "homepage": "https://github.com/jrfnl", + "role": "lead" + }, + { + "name": "Contributors", + "homepage": "https://github.com/PHPCSStandards/PHPCSUtils/graphs/contributors" } ], - "description": "Common interface for caching libraries", + "description": "A suite of utility functions for use with PHP_CodeSniffer", + "homepage": "https://phpcsutils.com/", "keywords": [ - "cache", - "psr", - "psr-6" + "PHP_CodeSniffer", + "phpcbf", + "phpcodesniffer-standard", + "phpcs", + "phpcs3", + "standards", + "static analysis", + "tokens", + "utility" ], "support": { - "source": "https://github.com/php-fig/cache/tree/master" + "docs": "https://phpcsutils.com/", + "issues": "https://github.com/PHPCSStandards/PHPCSUtils/issues", + "source": "https://github.com/PHPCSStandards/PHPCSUtils" }, - "time": "2016-08-06T20:24:11+00:00" + "time": "2023-07-16T21:39:41+00:00" }, { "name": "psr/container", - "version": "1.1.2", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/php-fig/container.git", - "reference": "513e0666f7216c7459170d56df27dfcefe1689ea" + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea", - "reference": "513e0666f7216c7459170d56df27dfcefe1689ea", + "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", "shasum": "" }, "require": { "php": ">=7.4.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, "autoload": { "psr-4": { "Psr\\Container\\": "src/" @@ -607,9 +581,9 @@ ], "support": { "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/1.1.2" + "source": "https://github.com/php-fig/container/tree/2.0.2" }, - "time": "2021-11-05T16:50:12+00:00" + "time": "2021-11-05T16:47:00+00:00" }, { "name": "psr/event-dispatcher", @@ -663,30 +637,30 @@ }, { "name": "psr/log", - "version": "1.1.4", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11" + "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11", + "url": "https://api.github.com/repos/php-fig/log/zipball/fe5ea303b0887d5caefd3d431c3e61ad47037001", + "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=8.0.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1.x-dev" + "dev-master": "3.x-dev" } }, "autoload": { "psr-4": { - "Psr\\Log\\": "Psr/Log/" + "Psr\\Log\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -707,22 +681,89 @@ "psr-3" ], "support": { - "source": "https://github.com/php-fig/log/tree/1.1.4" + "source": "https://github.com/php-fig/log/tree/3.0.0" + }, + "time": "2021-07-14T16:46:02+00:00" + }, + { + "name": "sebastian/diff", + "version": "5.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "912dc2fbe3e3c1e7873313cc801b100b6c68c87b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/912dc2fbe3e3c1e7873313cc801b100b6c68c87b", + "reference": "912dc2fbe3e3c1e7873313cc801b100b6c68c87b", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "require-dev": { + "phpunit/phpunit": "^10.0", + "symfony/process": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + } + ], + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff", + "udiff", + "unidiff", + "unified diff" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/diff/issues", + "security": "https://github.com/sebastianbergmann/diff/security/policy", + "source": "https://github.com/sebastianbergmann/diff/tree/5.0.3" }, - "time": "2021-05-03T11:20:27+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-05-01T07:48:21+00:00" }, { "name": "squizlabs/php_codesniffer", - "version": "3.6.2", + "version": "3.7.2", "source": { "type": "git", "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "5e4e71592f69da17871dba6e80dd51bce74a351a" + "reference": "ed8e00df0a83aa96acf703f8c2979ff33341f879" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/5e4e71592f69da17871dba6e80dd51bce74a351a", - "reference": "5e4e71592f69da17871dba6e80dd51bce74a351a", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/ed8e00df0a83aa96acf703f8c2979ff33341f879", + "reference": "ed8e00df0a83aa96acf703f8c2979ff33341f879", "shasum": "" }, "require": { @@ -758,63 +799,55 @@ "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", "keywords": [ "phpcs", - "standards" + "standards", + "static analysis" ], "support": { "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues", "source": "https://github.com/squizlabs/PHP_CodeSniffer", "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" }, - "time": "2021-12-12T21:44:58+00:00" + "time": "2023-02-22T23:07:41+00:00" }, { "name": "symfony/console", - "version": "v5.4.9", + "version": "v6.3.8", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "829d5d1bf60b2efeb0887b7436873becc71a45eb" + "reference": "0d14a9f6d04d4ac38a8cea1171f4554e325dae92" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/829d5d1bf60b2efeb0887b7436873becc71a45eb", - "reference": "829d5d1bf60b2efeb0887b7436873becc71a45eb", + "url": "https://api.github.com/repos/symfony/console/zipball/0d14a9f6d04d4ac38a8cea1171f4554e325dae92", + "reference": "0d14a9f6d04d4ac38a8cea1171f4554e325dae92", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", + "php": ">=8.1", + "symfony/deprecation-contracts": "^2.5|^3", "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php73": "^1.9", - "symfony/polyfill-php80": "^1.16", - "symfony/service-contracts": "^1.1|^2|^3", - "symfony/string": "^5.1|^6.0" + "symfony/service-contracts": "^2.5|^3", + "symfony/string": "^5.4|^6.0" }, "conflict": { - "psr/log": ">=3", - "symfony/dependency-injection": "<4.4", - "symfony/dotenv": "<5.1", - "symfony/event-dispatcher": "<4.4", - "symfony/lock": "<4.4", - "symfony/process": "<4.4" + "symfony/dependency-injection": "<5.4", + "symfony/dotenv": "<5.4", + "symfony/event-dispatcher": "<5.4", + "symfony/lock": "<5.4", + "symfony/process": "<5.4" }, "provide": { - "psr/log-implementation": "1.0|2.0" + "psr/log-implementation": "1.0|2.0|3.0" }, "require-dev": { - "psr/log": "^1|^2", - "symfony/config": "^4.4|^5.0|^6.0", - "symfony/dependency-injection": "^4.4|^5.0|^6.0", - "symfony/event-dispatcher": "^4.4|^5.0|^6.0", - "symfony/lock": "^4.4|^5.0|^6.0", - "symfony/process": "^4.4|^5.0|^6.0", - "symfony/var-dumper": "^4.4|^5.0|^6.0" - }, - "suggest": { - "psr/log": "For using the console logger", - "symfony/event-dispatcher": "", - "symfony/lock": "", - "symfony/process": "" + "psr/log": "^1|^2|^3", + "symfony/config": "^5.4|^6.0", + "symfony/dependency-injection": "^5.4|^6.0", + "symfony/event-dispatcher": "^5.4|^6.0", + "symfony/lock": "^5.4|^6.0", + "symfony/process": "^5.4|^6.0", + "symfony/var-dumper": "^5.4|^6.0" }, "type": "library", "autoload": { @@ -843,12 +876,12 @@ "homepage": "https://symfony.com", "keywords": [ "cli", - "command line", + "command-line", "console", "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.4.9" + "source": "https://github.com/symfony/console/tree/v6.3.8" }, "funding": [ { @@ -864,29 +897,29 @@ "type": "tidelift" } ], - "time": "2022-05-18T06:17:34+00:00" + "time": "2023-10-31T08:09:35+00:00" }, { "name": "symfony/deprecation-contracts", - "version": "v2.5.1", + "version": "v3.4.0", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66" + "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e8b495ea28c1d97b5e0c121748d6f9b53d075c66", - "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/7c3aff79d10325257a001fcf92d991f24fc967cf", + "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=8.1" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "2.5-dev" + "dev-main": "3.4-dev" }, "thanks": { "name": "symfony/contracts", @@ -915,7 +948,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.1" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.4.0" }, "funding": [ { @@ -931,48 +964,43 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:53:40+00:00" + "time": "2023-05-23T14:45:45+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v5.4.9", + "version": "v6.3.2", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "8e6ce1cc0279e3ff3c8ff0f43813bc88d21ca1bc" + "reference": "adb01fe097a4ee930db9258a3cc906b5beb5cf2e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/8e6ce1cc0279e3ff3c8ff0f43813bc88d21ca1bc", - "reference": "8e6ce1cc0279e3ff3c8ff0f43813bc88d21ca1bc", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/adb01fe097a4ee930db9258a3cc906b5beb5cf2e", + "reference": "adb01fe097a4ee930db9258a3cc906b5beb5cf2e", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/event-dispatcher-contracts": "^2|^3", - "symfony/polyfill-php80": "^1.16" + "php": ">=8.1", + "symfony/event-dispatcher-contracts": "^2.5|^3" }, "conflict": { - "symfony/dependency-injection": "<4.4" + "symfony/dependency-injection": "<5.4", + "symfony/service-contracts": "<2.5" }, "provide": { "psr/event-dispatcher-implementation": "1.0", - "symfony/event-dispatcher-implementation": "2.0" + "symfony/event-dispatcher-implementation": "2.0|3.0" }, "require-dev": { "psr/log": "^1|^2|^3", - "symfony/config": "^4.4|^5.0|^6.0", - "symfony/dependency-injection": "^4.4|^5.0|^6.0", - "symfony/error-handler": "^4.4|^5.0|^6.0", - "symfony/expression-language": "^4.4|^5.0|^6.0", - "symfony/http-foundation": "^4.4|^5.0|^6.0", - "symfony/service-contracts": "^1.1|^2|^3", - "symfony/stopwatch": "^4.4|^5.0|^6.0" - }, - "suggest": { - "symfony/dependency-injection": "", - "symfony/http-kernel": "" + "symfony/config": "^5.4|^6.0", + "symfony/dependency-injection": "^5.4|^6.0", + "symfony/error-handler": "^5.4|^6.0", + "symfony/expression-language": "^5.4|^6.0", + "symfony/http-foundation": "^5.4|^6.0", + "symfony/service-contracts": "^2.5|^3", + "symfony/stopwatch": "^5.4|^6.0" }, "type": "library", "autoload": { @@ -1000,7 +1028,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v5.4.9" + "source": "https://github.com/symfony/event-dispatcher/tree/v6.3.2" }, "funding": [ { @@ -1016,33 +1044,30 @@ "type": "tidelift" } ], - "time": "2022-05-05T16:45:39+00:00" + "time": "2023-07-06T06:56:43+00:00" }, { "name": "symfony/event-dispatcher-contracts", - "version": "v2.5.1", + "version": "v3.4.0", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "f98b54df6ad059855739db6fcbc2d36995283fe1" + "reference": "a76aed96a42d2b521153fb382d418e30d18b59df" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/f98b54df6ad059855739db6fcbc2d36995283fe1", - "reference": "f98b54df6ad059855739db6fcbc2d36995283fe1", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/a76aed96a42d2b521153fb382d418e30d18b59df", + "reference": "a76aed96a42d2b521153fb382d418e30d18b59df", "shasum": "" }, "require": { - "php": ">=7.2.5", + "php": ">=8.1", "psr/event-dispatcher": "^1" }, - "suggest": { - "symfony/event-dispatcher-implementation": "" - }, "type": "library", "extra": { "branch-alias": { - "dev-main": "2.5-dev" + "dev-main": "3.4-dev" }, "thanks": { "name": "symfony/contracts", @@ -1079,7 +1104,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v2.5.1" + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.4.0" }, "funding": [ { @@ -1095,27 +1120,26 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:53:40+00:00" + "time": "2023-05-23T14:45:45+00:00" }, { "name": "symfony/filesystem", - "version": "v5.4.9", + "version": "v6.3.1", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "36a017fa4cce1eff1b8e8129ff53513abcef05ba" + "reference": "edd36776956f2a6fcf577edb5b05eb0e3bdc52ae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/36a017fa4cce1eff1b8e8129ff53513abcef05ba", - "reference": "36a017fa4cce1eff1b8e8129ff53513abcef05ba", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/edd36776956f2a6fcf577edb5b05eb0e3bdc52ae", + "reference": "edd36776956f2a6fcf577edb5b05eb0e3bdc52ae", "shasum": "" }, "require": { - "php": ">=7.2.5", + "php": ">=8.1", "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-mbstring": "~1.8", - "symfony/polyfill-php80": "^1.16" + "symfony/polyfill-mbstring": "~1.8" }, "type": "library", "autoload": { @@ -1143,7 +1167,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v5.4.9" + "source": "https://github.com/symfony/filesystem/tree/v6.3.1" }, "funding": [ { @@ -1159,26 +1183,27 @@ "type": "tidelift" } ], - "time": "2022-05-20T13:55:35+00:00" + "time": "2023-06-01T08:30:39+00:00" }, { "name": "symfony/finder", - "version": "v5.4.8", + "version": "v6.3.5", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "9b630f3427f3ebe7cd346c277a1408b00249dad9" + "reference": "a1b31d88c0e998168ca7792f222cbecee47428c4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/9b630f3427f3ebe7cd346c277a1408b00249dad9", - "reference": "9b630f3427f3ebe7cd346c277a1408b00249dad9", + "url": "https://api.github.com/repos/symfony/finder/zipball/a1b31d88c0e998168ca7792f222cbecee47428c4", + "reference": "a1b31d88c0e998168ca7792f222cbecee47428c4", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-php80": "^1.16" + "php": ">=8.1" + }, + "require-dev": { + "symfony/filesystem": "^6.0" }, "type": "library", "autoload": { @@ -1206,7 +1231,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v5.4.8" + "source": "https://github.com/symfony/finder/tree/v6.3.5" }, "funding": [ { @@ -1222,27 +1247,25 @@ "type": "tidelift" } ], - "time": "2022-04-15T08:07:45+00:00" + "time": "2023-09-26T12:56:25+00:00" }, { "name": "symfony/options-resolver", - "version": "v5.4.3", + "version": "v6.3.0", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", - "reference": "cc1147cb11af1b43f503ac18f31aa3bec213aba8" + "reference": "a10f19f5198d589d5c33333cffe98dc9820332dd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/cc1147cb11af1b43f503ac18f31aa3bec213aba8", - "reference": "cc1147cb11af1b43f503ac18f31aa3bec213aba8", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/a10f19f5198d589d5c33333cffe98dc9820332dd", + "reference": "a10f19f5198d589d5c33333cffe98dc9820332dd", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-php73": "~1.0", - "symfony/polyfill-php80": "^1.16" + "php": ">=8.1", + "symfony/deprecation-contracts": "^2.5|^3" }, "type": "library", "autoload": { @@ -1275,7 +1298,7 @@ "options" ], "support": { - "source": "https://github.com/symfony/options-resolver/tree/v5.4.3" + "source": "https://github.com/symfony/options-resolver/tree/v6.3.0" }, "funding": [ { @@ -1291,20 +1314,20 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:53:40+00:00" + "time": "2023-05-12T14:21:09+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.26.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4" + "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4", - "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", + "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", "shasum": "" }, "require": { @@ -1319,7 +1342,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1357,7 +1380,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.28.0" }, "funding": [ { @@ -1373,20 +1396,20 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.26.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "433d05519ce6990bf3530fba6957499d327395c2" + "reference": "875e90aeea2777b6f135677f618529449334a612" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/433d05519ce6990bf3530fba6957499d327395c2", - "reference": "433d05519ce6990bf3530fba6957499d327395c2", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/875e90aeea2777b6f135677f618529449334a612", + "reference": "875e90aeea2777b6f135677f618529449334a612", "shasum": "" }, "require": { @@ -1398,7 +1421,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1438,7 +1461,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.28.0" }, "funding": [ { @@ -1454,20 +1477,20 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.26.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "219aa369ceff116e673852dce47c3a41794c14bd" + "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/219aa369ceff116e673852dce47c3a41794c14bd", - "reference": "219aa369ceff116e673852dce47c3a41794c14bd", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92", + "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92", "shasum": "" }, "require": { @@ -1479,7 +1502,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1522,7 +1545,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.28.0" }, "funding": [ { @@ -1538,20 +1561,20 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.26.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e" + "reference": "42292d99c55abe617799667f454222c54c60e229" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", - "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/42292d99c55abe617799667f454222c54c60e229", + "reference": "42292d99c55abe617799667f454222c54c60e229", "shasum": "" }, "require": { @@ -1566,7 +1589,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1605,7 +1628,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.28.0" }, "funding": [ { @@ -1621,99 +1644,20 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" - }, - { - "name": "symfony/polyfill-php73", - "version": "v1.26.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "e440d35fa0286f77fb45b79a03fedbeda9307e85" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/e440d35fa0286f77fb45b79a03fedbeda9307e85", - "reference": "e440d35fa0286f77fb45b79a03fedbeda9307e85", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.26-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php73\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.26.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2023-07-28T09:04:16+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.26.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace" + "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/cfa0ae98841b9e461207c13ab093d76b0fa7bace", - "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/6caa57379c4aec19c0a12a38b59b26487dcfe4b5", + "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5", "shasum": "" }, "require": { @@ -1722,7 +1666,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1767,7 +1711,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.28.0" }, "funding": [ { @@ -1783,20 +1727,20 @@ "type": "tidelift" } ], - "time": "2022-05-10T07:21:04+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { "name": "symfony/polyfill-php81", - "version": "v1.26.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php81.git", - "reference": "13f6d1271c663dc5ae9fb843a8f16521db7687a1" + "reference": "7581cd600fa9fd681b797d00b02f068e2f13263b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/13f6d1271c663dc5ae9fb843a8f16521db7687a1", - "reference": "13f6d1271c663dc5ae9fb843a8f16521db7687a1", + "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/7581cd600fa9fd681b797d00b02f068e2f13263b", + "reference": "7581cd600fa9fd681b797d00b02f068e2f13263b", "shasum": "" }, "require": { @@ -1805,7 +1749,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1846,7 +1790,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php81/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-php81/tree/v1.28.0" }, "funding": [ { @@ -1862,25 +1806,24 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { "name": "symfony/process", - "version": "v5.4.8", + "version": "v6.3.4", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "597f3fff8e3e91836bb0bd38f5718b56ddbde2f3" + "reference": "0b5c29118f2e980d455d2e34a5659f4579847c54" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/597f3fff8e3e91836bb0bd38f5718b56ddbde2f3", - "reference": "597f3fff8e3e91836bb0bd38f5718b56ddbde2f3", + "url": "https://api.github.com/repos/symfony/process/zipball/0b5c29118f2e980d455d2e34a5659f4579847c54", + "reference": "0b5c29118f2e980d455d2e34a5659f4579847c54", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/polyfill-php80": "^1.16" + "php": ">=8.1" }, "type": "library", "autoload": { @@ -1908,7 +1851,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v5.4.8" + "source": "https://github.com/symfony/process/tree/v6.3.4" }, "funding": [ { @@ -1924,37 +1867,33 @@ "type": "tidelift" } ], - "time": "2022-04-08T05:07:18+00:00" + "time": "2023-08-07T10:39:22+00:00" }, { "name": "symfony/service-contracts", - "version": "v2.5.1", + "version": "v3.4.0", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "24d9dc654b83e91aa59f9d167b131bc3b5bea24c" + "reference": "b3313c2dbffaf71c8de2934e2ea56ed2291a3838" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/24d9dc654b83e91aa59f9d167b131bc3b5bea24c", - "reference": "24d9dc654b83e91aa59f9d167b131bc3b5bea24c", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/b3313c2dbffaf71c8de2934e2ea56ed2291a3838", + "reference": "b3313c2dbffaf71c8de2934e2ea56ed2291a3838", "shasum": "" }, "require": { - "php": ">=7.2.5", - "psr/container": "^1.1", - "symfony/deprecation-contracts": "^2.1|^3" + "php": ">=8.1", + "psr/container": "^2.0" }, "conflict": { "ext-psr": "<1.1|>=2" }, - "suggest": { - "symfony/service-implementation": "" - }, "type": "library", "extra": { "branch-alias": { - "dev-main": "2.5-dev" + "dev-main": "3.4-dev" }, "thanks": { "name": "symfony/contracts", @@ -1964,7 +1903,10 @@ "autoload": { "psr-4": { "Symfony\\Contracts\\Service\\": "" - } + }, + "exclude-from-classmap": [ + "/Test/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1991,7 +1933,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v2.5.1" + "source": "https://github.com/symfony/service-contracts/tree/v3.4.0" }, "funding": [ { @@ -2007,25 +1949,25 @@ "type": "tidelift" } ], - "time": "2022-03-13T20:07:29+00:00" + "time": "2023-07-30T20:28:31+00:00" }, { "name": "symfony/stopwatch", - "version": "v5.4.5", + "version": "v6.3.0", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", - "reference": "4d04b5c24f3c9a1a168a131f6cbe297155bc0d30" + "reference": "fc47f1015ec80927ff64ba9094dfe8b9d48fe9f2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/4d04b5c24f3c9a1a168a131f6cbe297155bc0d30", - "reference": "4d04b5c24f3c9a1a168a131f6cbe297155bc0d30", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/fc47f1015ec80927ff64ba9094dfe8b9d48fe9f2", + "reference": "fc47f1015ec80927ff64ba9094dfe8b9d48fe9f2", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/service-contracts": "^1|^2|^3" + "php": ">=8.1", + "symfony/service-contracts": "^2.5|^3" }, "type": "library", "autoload": { @@ -2053,7 +1995,7 @@ "description": "Provides a way to profile code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/stopwatch/tree/v5.4.5" + "source": "https://github.com/symfony/stopwatch/tree/v6.3.0" }, "funding": [ { @@ -2069,38 +2011,38 @@ "type": "tidelift" } ], - "time": "2022-02-18T16:06:09+00:00" + "time": "2023-02-16T10:14:28+00:00" }, { "name": "symfony/string", - "version": "v5.4.9", + "version": "v6.3.8", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "985e6a9703ef5ce32ba617c9c7d97873bb7b2a99" + "reference": "13880a87790c76ef994c91e87efb96134522577a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/985e6a9703ef5ce32ba617c9c7d97873bb7b2a99", - "reference": "985e6a9703ef5ce32ba617c9c7d97873bb7b2a99", + "url": "https://api.github.com/repos/symfony/string/zipball/13880a87790c76ef994c91e87efb96134522577a", + "reference": "13880a87790c76ef994c91e87efb96134522577a", "shasum": "" }, "require": { - "php": ">=7.2.5", + "php": ">=8.1", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-intl-grapheme": "~1.0", "symfony/polyfill-intl-normalizer": "~1.0", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php80": "~1.15" + "symfony/polyfill-mbstring": "~1.0" }, "conflict": { - "symfony/translation-contracts": ">=3.0" + "symfony/translation-contracts": "<2.5" }, "require-dev": { - "symfony/error-handler": "^4.4|^5.0|^6.0", - "symfony/http-client": "^4.4|^5.0|^6.0", - "symfony/translation-contracts": "^1.1|^2", - "symfony/var-exporter": "^4.4|^5.0|^6.0" + "symfony/error-handler": "^5.4|^6.0", + "symfony/http-client": "^5.4|^6.0", + "symfony/intl": "^6.2", + "symfony/translation-contracts": "^2.5|^3.0", + "symfony/var-exporter": "^5.4|^6.0" }, "type": "library", "autoload": { @@ -2139,7 +2081,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v5.4.9" + "source": "https://github.com/symfony/string/tree/v6.3.8" }, "funding": [ { @@ -2155,34 +2097,42 @@ "type": "tidelift" } ], - "time": "2022-04-19T10:40:37+00:00" + "time": "2023-11-09T08:28:21+00:00" }, { "name": "wp-coding-standards/wpcs", - "version": "2.3.0", + "version": "3.0.1", "source": { "type": "git", "url": "https://github.com/WordPress/WordPress-Coding-Standards.git", - "reference": "7da1894633f168fe244afc6de00d141f27517b62" + "reference": "b4caf9689f1a0e4a4c632679a44e638c1c67aff1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/WordPress/WordPress-Coding-Standards/zipball/7da1894633f168fe244afc6de00d141f27517b62", - "reference": "7da1894633f168fe244afc6de00d141f27517b62", + "url": "https://api.github.com/repos/WordPress/WordPress-Coding-Standards/zipball/b4caf9689f1a0e4a4c632679a44e638c1c67aff1", + "reference": "b4caf9689f1a0e4a4c632679a44e638c1c67aff1", "shasum": "" }, "require": { + "ext-filter": "*", + "ext-libxml": "*", + "ext-tokenizer": "*", + "ext-xmlreader": "*", "php": ">=5.4", - "squizlabs/php_codesniffer": "^3.3.1" + "phpcsstandards/phpcsextra": "^1.1.0", + "phpcsstandards/phpcsutils": "^1.0.8", + "squizlabs/php_codesniffer": "^3.7.2" }, "require-dev": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.5 || ^0.6", + "php-parallel-lint/php-console-highlighter": "^1.0.0", + "php-parallel-lint/php-parallel-lint": "^1.3.2", "phpcompatibility/php-compatibility": "^9.0", - "phpcsstandards/phpcsdevtools": "^1.0", + "phpcsstandards/phpcsdevtools": "^1.2.0", "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" }, "suggest": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.6 || This Composer plugin will sort out the PHPCS 'installed_paths' automatically." + "ext-iconv": "For improved results", + "ext-mbstring": "For improved results" }, "type": "phpcodesniffer-standard", "notification-url": "https://packagist.org/downloads/", @@ -2199,6 +2149,7 @@ "keywords": [ "phpcs", "standards", + "static analysis", "wordpress" ], "support": { @@ -2206,7 +2157,13 @@ "source": "https://github.com/WordPress/WordPress-Coding-Standards", "wiki": "https://github.com/WordPress/WordPress-Coding-Standards/wiki" }, - "time": "2020-05-13T23:57:56+00:00" + "funding": [ + { + "url": "https://opencollective.com/thewpcc/contribute/wp-php-63406", + "type": "custom" + } + ], + "time": "2023-09-14T07:06:09+00:00" } ], "aliases": [], @@ -2216,5 +2173,5 @@ "prefer-lowest": false, "platform": [], "platform-dev": [], - "plugin-api-version": "2.0.0" + "plugin-api-version": "2.2.0" } diff --git a/templates/class-epfl-donation-form-template.php b/templates/class-epfl-donation-form-template.php index bc06e44..d960a84 100644 --- a/templates/class-epfl-donation-form-template.php +++ b/templates/class-epfl-donation-form-template.php @@ -22,135 +22,131 @@ */ if ( class_exists( 'WPForms_Template', false ) ) : -/** -* EPFL Donation Form Template -* Template for WPForms. -*/ -class EPFL_Donation_Form_Template extends WPForms_Template { /** - * Primary class constructor. - * - * @since 1.0.0 + EPFL Donation Form Template + Template for WPForms. */ - public function init() { - // Template name - $this->name = 'EPFL Donation Form Template'; - // Template slug - $this->slug = 'epfl_donation_form_example'; - // Template description - $this->description = 'Template for EPFL donation (via EPFL Payonline).'; - // Template field and settings - $this->data = array ( - 'fields' => array ( - 0 => array ( - 'id' => '0', - 'type' => 'name', - 'label' => 'Name', - 'format' => 'first-last', - 'required' => '1', - 'size' => 'large', - ), - 5 => array ( - 'id' => '5', - 'type' => 'address', - 'label' => 'Address', - 'scheme' => 'international', - 'required' => '1', - 'size' => 'large', - 'country_default' => 'CH', - ), - 1 => array ( - 'id' => '1', - 'type' => 'email', - 'label' => 'Email', - 'required' => '1', - 'size' => 'large', - 'default_value' => false, - ), - 4 => array ( - 'id' => '4', - 'type' => 'payment-single', - 'label' => 'Donation', - 'format' => 'user', - 'required' => '1', - 'size' => 'large', - ), - 2 => array ( - 'id' => '2', - 'type' => 'textarea', - 'label' => 'Comment or Message', - 'size' => 'small', - 'limit_count' => '1', - 'limit_mode' => 'characters', - ), - 3 => array ( - 'id' => '3', - 'type' => 'payment-total', - 'label' => 'Total', - ), - ), - 'field_id' => 6, - 'settings' => array ( - 'form_title' => 'EPFL Donation Form Template', - 'submit_text' => 'Donate', - 'submit_text_processing' => 'Sending...', - 'dynamic_population' => '1', - 'ajax_submit' => '1', - 'notification_enable' => '1', - 'notifications' => array ( - 1 => array ( - 'notification_name' => 'Default Notification', - 'email' => 'your.email@epfl.ch', - 'carboncopy' => 'another.email@epfl.ch', - 'subject' => 'New Entry: Donation Form', - 'sender_name' => 'Donation Form', - 'sender_address' => 'demo.donation@epfl.ch', - 'replyto' => 'demo.donation@epfl.ch', - 'message' => '{all_fields}', - 'file_upload_attachment_fields' => array ( + class EPFL_Donation_Form_Template extends WPForms_Template { + /** + * Primary class constructor. + * + * @since 1.0.0 + */ + public function init() { + // Template name + $this->name = 'EPFL Donation Form Template'; + // Template slug + $this->slug = 'epfl_donation_form_example'; + // Template description + $this->description = 'Template for EPFL donation (via EPFL Payonline).'; + // Template field and settings + $this->data = array( + 'fields' => array( + 0 => array( + 'id' => '0', + 'type' => 'name', + 'label' => 'Name', + 'format' => 'first-last', + 'required' => '1', + 'size' => 'large', + ), + 5 => array( + 'id' => '5', + 'type' => 'address', + 'label' => 'Address', + 'scheme' => 'international', + 'required' => '1', + 'size' => 'large', + 'country_default' => 'CH', + ), + 1 => array( + 'id' => '1', + 'type' => 'email', + 'label' => 'Email', + 'required' => '1', + 'size' => 'large', + 'default_value' => false, + ), + 4 => array( + 'id' => '4', + 'type' => 'payment-single', + 'label' => 'Donation', + 'format' => 'user', + 'required' => '1', + 'size' => 'large', + ), + 2 => array( + 'id' => '2', + 'type' => 'textarea', + 'label' => 'Comment or Message', + 'size' => 'small', + 'limit_count' => '1', + 'limit_mode' => 'characters', + ), + 3 => array( + 'id' => '3', + 'type' => 'payment-total', + 'label' => 'Total', + ), + ), + 'field_id' => 6, + 'settings' => array( + 'form_title' => 'EPFL Donation Form Template', + 'submit_text' => 'Donate', + 'submit_text_processing' => 'Sending...', + 'dynamic_population' => '1', + 'ajax_submit' => '1', + 'notification_enable' => '1', + 'notifications' => array( + 1 => array( + 'notification_name' => 'Default Notification', + 'email' => 'your.email@epfl.ch', + 'carboncopy' => 'another.email@epfl.ch', + 'subject' => 'New Entry: Donation Form', + 'sender_name' => 'Donation Form', + 'sender_address' => 'demo.donation@epfl.ch', + 'replyto' => 'demo.donation@epfl.ch', + 'message' => '{all_fields}', + 'file_upload_attachment_fields' => array(), + 'entry_csv_attachment_entry_information' => array(), + 'entry_csv_attachment_file_name' => 'entry-details', + ), + ), + 'confirmations' => array( + 1 => array( + 'name' => 'Default Confirmation', + 'type' => 'message', + 'message' => '

Thanks for contacting us! We will be in touch with you shortly.

', + 'message_scroll' => '1', + 'page' => '10', + 'message_entry_preview_style' => 'basic', + ), + ), + 'antispam' => '1', + 'anti_spam' => array( + 'country_filter' => array( + 'action' => 'allow', + 'country_codes' => array(), + 'message' => 'Sorry, this form does not accept submissions from your country.', + ), + 'keyword_filter' => array( + 'message' => 'Sorry, your message can\'t be submitted because it contains prohibited words.', + ), + ), + 'form_tags' => array(), ), - 'entry_csv_attachment_entry_information' => array ( + 'payments' => array( + 'epfl_payonline' => array( + 'enable' => '1', + 'id_inst' => '1234567890', + 'email' => 'donation.admin@groupes.epfl.ch', + ), ), - 'entry_csv_attachment_file_name' => 'entry-details', - ), - ), - 'confirmations' => array ( - 1 => array ( - 'name' => 'Default Confirmation', - 'type' => 'message', - 'message' => '

Thanks for contacting us! We will be in touch with you shortly.

', - 'message_scroll' => '1', - 'page' => '10', - 'message_entry_preview_style' => 'basic', - ), - ), - 'antispam' => '1', - 'anti_spam' => array ( - 'country_filter' => array ( - 'action' => 'allow', - 'country_codes' => array ( + 'meta' => array( + 'template' => 'epfl_donation_form_example', ), - 'message' => 'Sorry, this form does not accept submissions from your country.', - ), - 'keyword_filter' => array ( - 'message' => 'Sorry, your message can\'t be submitted because it contains prohibited words.', - ), - ), - 'form_tags' => array ( - ), - ), - 'payments' => array ( - 'epfl_payonline' => array ( - 'enable' => '1', - 'id_inst' => '1234567890', - 'email' => 'donation.admin@groupes.epfl.ch', - ), - ), - 'meta' => array ( - 'template' => 'epfl_donation_form_example', - ), -); + ); + } } -} -new EPFL_Donation_Form_Template(); + new EPFL_Donation_Form_Template(); endif; diff --git a/wpforms-epfl-payonline.php b/wpforms-epfl-payonline.php index 26eff17..cd7fd05 100644 --- a/wpforms-epfl-payonline.php +++ b/wpforms-epfl-payonline.php @@ -41,7 +41,7 @@ // Plugin name. define( 'WPFORMS_EPFL_PAYONLINE_NAME', 'WPForms EPFL Payonline (saferpay)' ); // Latest WP version tested with this plugin. -define( 'WP_LATEST_VERSION_WPFORMS_EPFL_PAYONLINE', '6.1.1' ); +define( 'WP_LATEST_VERSION_WPFORMS_EPFL_PAYONLINE', '6.3' ); // Minimal WP version required for this plugin. define( 'WP_MIN_VERSION_WPFORMS_EPFL_PAYONLINE', '6.0.0' ); @@ -71,7 +71,6 @@ function wpforms_epfl_payonline() { require_once plugin_dir_path( __FILE__ ) . 'class-wpforms-saferpay.php'; require_once plugin_dir_path( __FILE__ ) . 'templates/class-epfl-conference-form-template.php'; require_once plugin_dir_path( __FILE__ ) . 'templates/class-epfl-donation-form-template.php'; - } add_action( 'wpforms_loaded', 'wpforms_epfl_payonline' ); @@ -79,8 +78,8 @@ function wpforms_epfl_payonline() { function load_epflpayonline_js() { wp_enqueue_script( 'wpforms-epfl-payonline', - WPFORMS_EPFL_PAYONLINE_PLUGIN_URL . "assets/js/wpforms-epfl-payonline.js", - [ 'wpforms-builder' ], + WPFORMS_EPFL_PAYONLINE_PLUGIN_URL . 'assets/js/wpforms-epfl-payonline.js', + array( 'wpforms-builder' ), WPFORMS_EPFL_PAYONLINE_VERSION, true ); @@ -94,7 +93,7 @@ function load_epflpayonline_js() { // `FS_METHOD` constant in `wp-confing.php`. add_filter( 'filesystem_method', - function() { + function () { return 'direct'; }, 10,