Plugin Directory

Changeset 3068120


Ignore:
Timestamp:
04/10/2024 12:04:27 AM (2 years ago)
Author:
antidot-dev
Message:

Release 3.1.0

Location:
bpost-shipping/trunk
Files:
22 edited

Legend:

Unmodified
Added
Removed
  • bpost-shipping/trunk/bpost-shipping.php

    r3043055 r3068120  
    66 * Author: bpost
    77 * Author URI: https://www.bpost.be/
    8  * Version: 3.0.7
     8 * Version: 3.1.0
    99 * WC requires at least: 3.0
    1010 * WC tested up to: 8.9
     
    1515define( 'BPOST_PLUGIN_DIR', __DIR__ );
    1616define( 'BPOST_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
    17 define( 'BPOST_PLUGIN_VERSION', '3.0.7' );
     17define( 'BPOST_PLUGIN_VERSION', '3.1.0' );
    1818
    1919/**
     
    7777
    7878// Checkout: After the closing of the SHM, save bpost data into the order
    79 add_action( 'woocommerce_checkout_update_order_meta', array( $bpost_shipping_hooks, 'bpost_shipping_update_order_metas' ) );
     79add_action( 'woocommerce_checkout_update_order_meta',
     80    array( $bpost_shipping_hooks, 'bpost_shipping_update_order_metas' ) );
    8081
    8182// Checkout: After the closing of the SHM, save bpost data into the order
     
    119120add_filter( 'woocommerce_shipping_methods', array( $bpost_shipping_hooks, 'bpost_shipping_add_method' ) );
    120121
     122foreach ( [ 'edit-shop_order', 'woocommerce_page_wc-orders' ] as $screen ) {
    121123// Admin: Add a bulk action to print labels
    122 add_filter( 'bulk_actions-edit-shop_order', array( $bpost_shipping_hooks, 'bpost_shipping_add_order_bulk_action' ) );
    123 add_filter( 'handle_bulk_actions-edit-shop_order', array( $bpost_shipping_hooks, 'handle_bulk_actions' ), 10, 3 );
     124    add_filter( "bulk_actions-$screen", array( $bpost_shipping_hooks, 'bpost_shipping_add_order_bulk_action' ) );
     125// Admin: Handle the bulk action to print labels
     126    add_filter( "handle_bulk_actions-$screen", array( $bpost_shipping_hooks, 'handle_bulk_actions' ), 10, 3 );
     127}
    124128
    125129// Checkout: Put 'as from' at the estimated shipping cost
  • bpost-shipping/trunk/classes/adapter/class-wc-bpost-shipping-adapter-woocommerce.php

    r1562900 r3068120  
    9595    /**
    9696     * @param $file_array
    97      * @param $post_id
    9897     * @param null $desc
    9998     * @param array $post_data
     
    101100     * @return int|\WP_Error
    102101     */
    103     public function media_handle_sideload( $file_array, $post_id, $desc = null, $post_data = array() ) {
     102    public function media_handle_sideload( $file_array, $desc = null, $post_data = array() ) {
    104103        if ( ! function_exists( 'media_handle_sideload' ) ) {
    105104            require_once( ABSPATH . 'wp-admin/includes/image.php' );
     
    107106        }
    108107
    109         return media_handle_sideload( $file_array, $post_id, $desc, $post_data );
     108        return media_handle_sideload( $file_array, 0, $desc, $post_data );
    110109    }
    111110
     
    180179    public function date_i18n( $dateformatstring, $unixtimestamp = false, $gmt = false ) {
    181180        return date_i18n( $dateformatstring, $unixtimestamp, $gmt );
    182     }
    183 
    184     /**
    185      * @see get_post_meta
    186      *
    187      * @param int $post_id
    188      * @param string $key
    189      * @param bool $single
    190      *
    191      * @return mixed
    192      */
    193     public function get_post_meta( $post_id, $key = '', $single = false ) {
    194         return get_post_meta( $post_id, $key, $single );
    195     }
    196 
    197     /**
    198      * @see add_post_meta
    199      *
    200      * @param int $post_id
    201      * @param string $meta_key
    202      * @param string $meta_value
    203      * @param bool $unique
    204      *
    205      * @return int|false Meta ID on success, false on failure.
    206      */
    207     public function add_post_meta( $post_id, $meta_key, $meta_value, $unique = false ) {
    208         return add_post_meta( $post_id, $meta_key, $meta_value, $unique );
    209181    }
    210182
  • bpost-shipping/trunk/classes/class-wc-bpost-shipping-container.php

    r2981896 r3068120  
    1414use WC_BPost_Shipping\Options\WC_BPost_Shipping_Options_Label;
    1515use WC_BPost_Shipping_Logger;
    16 use WC_BPost_Shipping_Logger_Handler;
    1716use WC_BPost_Shipping_Meta_Type;
    18 use WC_Logger;
     17use WC_Log_Levels;
    1918
    2019class WC_Bpost_Shipping_Container {
    21     private static $objects = array();
     20    private static array $objects = [];
    2221
    2322    private static function get( $class_name ) {
    24         if ( empty( self::$objects[ $class_name ] ) ) {
     23        if ( ! array_key_exists( $class_name, self::$objects ) ) {
    2524            self::$objects[ $class_name ] = self::get_class_instance( $class_name );
    2625        }
     
    3837
    3938            case WC_BPost_Shipping_Label_Path_Resolver::class:
    40                 return new WC_BPost_Shipping_Label_Path_Resolver( self::get( WC_BPost_Shipping_Options_Label::class ) );
     39                return new WC_BPost_Shipping_Label_Path_Resolver( self::get_options_label() );
    4140
    4241            case WC_BPost_Shipping_Label_Url_Generator::class:
     
    4746
    4847            case WC_BPost_Shipping_Logger::class:
    49                 $handler = new WC_BPost_Shipping_Logger_Handler( new WC_Logger() );
     48                $options  = self::get_options_label();
     49                $threshold = $options->is_logs_debug_mode() ? WC_Log_Levels::DEBUG : null;
    5050
    51                 /** @var WC_BPost_Shipping_Options_Label $options */
    52                 $options = self::get( WC_BPost_Shipping_Options_Label::class );
    53                 if ( ! $options->is_logs_debug_mode() ) {
    54                     $handler->setLevel( \Monolog\Logger::NOTICE );
    55                 }
    56 
    57                 return new WC_BPost_Shipping_Logger( BPOST_PLUGIN_ID, array( $handler ) );
     51                return new WC_BPost_Shipping_Logger( null, $threshold );
    5852
    5953            case WC_BPost_Shipping_Api_Factory::class:
    6054                return new WC_BPost_Shipping_Api_Factory(
    61                     self::get( WC_BPost_Shipping_Options_Label::class ),
    62                     self::get( WC_BPost_Shipping_Logger::class )
     55                    self::get_options_label(),
     56                    self::get_logger()
    6357                );
    6458
    6559            case WC_BPost_Shipping_Label_Retriever::class:
    6660                return new WC_BPost_Shipping_Label_Retriever(
    67                     self::get_adapter(),
    68                     self::get( WC_BPost_Shipping_Api_Factory::class ),
    69                     self::get( WC_BPost_Shipping_Label_Url_Generator::class ),
    70                     self::get( WC_BPost_Shipping_Label_Path_Resolver::class ),
    71                     self::get( WC_BPost_Shipping_Options_Label::class )
     61                    self::get_api_factory(),
     62                    self::get_label_url_generator(),
     63                    self::get_label_resolver_path(),
     64                    self::get_options_label()
    7265                );
    7366
     
    8073            case WC_BPost_Shipping_Meta_Type::class:
    8174                return new WC_BPost_Shipping_Meta_Type( self::get_adapter() );
    82 
    8375        }
    8476
     
    8678    }
    8779
    88     /**
    89      * @return Adapter
    90      */
    91     public static function get_adapter() {
     80    public static function get_adapter(): Adapter {
    9281        return self::get( Adapter::class );
    9382    }
    9483
    95     /**
    96      * @return WC_BPost_Shipping_Options_Label
    97      */
    98     public static function get_options_label() {
     84    public static function get_options_label(): WC_BPost_Shipping_Options_Label {
    9985        return self::get( WC_BPost_Shipping_Options_Label::class );
    10086    }
    10187
    102     /**
    103      * @return WC_BPost_Shipping_Label_Path_Resolver
    104      */
    105     public static function get_label_resolver_path() {
     88    public static function get_label_resolver_path(): WC_BPost_Shipping_Label_Path_Resolver {
    10689        return self::get( WC_BPost_Shipping_Label_Path_Resolver::class );
    10790    }
    10891
    109     /**
    110      * @return WC_BPost_Shipping_Label_Url_Generator
    111      */
    112     public static function get_label_url_generator() {
     92    public static function get_label_url_generator(): WC_BPost_Shipping_Label_Url_Generator {
    11393        return self::get( WC_BPost_Shipping_Label_Url_Generator::class );
    11494    }
    11595
    116     /**
    117      * @return WC_BPost_Shipping_Logger
    118      */
    119     public static function get_logger() {
     96    public static function get_logger(): WC_BPost_Shipping_Logger {
    12097        return self::get( WC_BPost_Shipping_Logger::class );
    12198    }
    12299
    123     /**
    124      * @return WC_BPost_Shipping_Api_Factory
    125      */
    126     public static function get_api_factory() {
     100    public static function get_api_factory(): WC_BPost_Shipping_Api_Factory {
    127101        return self::get( WC_BPost_Shipping_Api_Factory::class );
    128102    }
    129103
    130     /**
    131      * @return WC_BPost_Shipping_Label_Retriever
    132      */
    133     public static function get_label_retriever() {
     104    public static function get_label_retriever(): WC_BPost_Shipping_Label_Retriever {
    134105        return self::get( WC_BPost_Shipping_Label_Retriever::class );
    135106    }
    136107
    137     /**
    138      * @return WC_BPost_Shipping_Assets_Management
    139      */
    140     public static function get_assets_management() {
     108    public static function get_assets_management(): WC_BPost_Shipping_Assets_Management {
    141109        return self::get( WC_BPost_Shipping_Assets_Management::class );
    142110    }
    143111
    144     /**
    145      * @return WC_BPost_Shipping_Meta_Type
    146      */
    147     public static function get_meta_type() {
     112    public static function get_meta_type(): WC_BPost_Shipping_Meta_Type {
    148113        return self::get( WC_BPost_Shipping_Meta_Type::class );
    149114    }
  • bpost-shipping/trunk/classes/class-wc-bpost-shipping-hooks.php

    r3035889 r3068120  
    3434    }
    3535
     36    /**
     37     * In the plugins list, the links below the plugin name
     38     */
    3639    function plugin_action_links( $links, $file ) {
    3740        if ( basename( $file ) === 'bpost-shipping.php' ) {
     
    6467    /**
    6568     * Admin: Add the plugin to the shipping methods list
    66      *
    67      * @param array $methods
    68      *
    69      * @return array
    70      */
    71     public function bpost_shipping_add_method( $methods ) {
     69     */
     70    public function bpost_shipping_add_method( array $methods ): array {
    7271        $methods[ BPOST_PLUGIN_ID ] = 'WC_BPost_Shipping_Method';
    7372
     
    7574    }
    7675
    77     public function bpost_shipping_add_order_bulk_action( $actions ) {
     76    /**
     77     * Admin: In the orders list, add a bulk action
     78     */
     79    public function bpost_shipping_add_order_bulk_action( array $actions ): array {
    7880        if ( ! isset( $actions['bpost_shipping_print_labels'] ) ) {
    7981            $actions['bpost_shipping_print_labels'] = bpost__( 'Print bpost labels' );
     
    130132    }
    131133
     134    private function get_wc_order( $post_or_order ): WC_Order {
     135        if ( $post_or_order instanceof WC_Order ) {
     136            return $post_or_order;
     137        }
     138
     139        if ( $order = wc_get_order( $post_or_order ) ) {
     140            return $order;
     141        }
     142
     143        throw new InvalidArgumentException( 'Cannot retrieve WC_Order from argument' );
     144    }
     145
    132146    /**
    133147     * Checkout: After the order creation, update order meta with bpost data
     
    182196            Container::get_adapter(),
    183197            Container::get_assets_management(),
    184             new WC_BPost_Shipping_Meta_Handler(
    185                 Container::get_adapter(),
    186                 Container::get_meta_type(),
    187                 $order->get_id()
    188             ),
     198            new WC_BPost_Shipping_Meta_Handler( Container::get_meta_type(), $order ),
    189199            Container::get_options_label(),
    190200            $order
     
    254264            Container::get_adapter(),
    255265            Container::get_assets_management(),
    256             new WC_BPost_Shipping_Meta_Handler(
    257                 Container::get_adapter(),
    258                 Container::get_meta_type(),
    259                 $order->get_id()
    260             ),
     266            new WC_BPost_Shipping_Meta_Handler( Container::get_meta_type(), $order ),
    261267            $order
    262268        );
     
    411417     */
    412418    public function bpost_shipping_order_shipping_method( $shipping_method, WC_Abstract_Order $order ) {
     419        $order = $this->get_wc_order( $order );
    413420        if ( ! $this->is_bpost_shipping_from_order( $order ) ) {
    414421            return $shipping_method;
     
    419426        }
    420427
    421         $meta_handler = new \WC_BPost_Shipping_Meta_Handler(
    422             Container::get_adapter(),
    423             Container::get_meta_type(),
    424             $order->get_id()
    425         );
     428        $meta_handler = new \WC_BPost_Shipping_Meta_Handler( Container::get_meta_type(), $order );
    426429
    427430        return $shipping_method . ' - ' . bpost__( 'status: ' ) . $meta_handler->get_status();
     
    498501    }
    499502
    500     /**
    501      * @param WC_Abstract_Order $order
    502      *
    503      * @return bool
    504      */
    505     private function is_bpost_shipping_from_order( WC_Abstract_Order $order ) {
     503    private function is_bpost_shipping_from_order( WC_Order $order ): bool {
    506504        return $this->bpost_shipping_get_shipping_method_id( $order ) === BPOST_PLUGIN_ID;
    507505    }
     
    509507    /**
    510508     * @param string $post_type
    511      * @param WP_Post $post
    512      */
    513     public function bpost_order_details_box_meta( $post_type, $post ) {
    514         if ( $post_type !== 'shop_order' || ! $post instanceof WP_Post ) {
    515             return;
    516         }
    517         $order = new WC_Order( $post->ID );
     509     */
     510    public function bpost_order_details_box_meta( $post_type, $order ) {
     511        if ( ! in_array( $post_type, [ 'shop_order', 'woocommerce_page_wc-orders' ] ) ) {
     512            return;
     513        }
     514
     515        if ( ! ( $order instanceof WC_Order || $order instanceof WP_Post ) ) {
     516            return;
     517        }
     518
     519        $order = $this->get_wc_order( $order );
    518520
    519521        if ( ! $this->is_bpost_shipping_from_order( $order ) ) {
     
    532534
    533535    /**
    534      * @param WP_Post $post
    535      */
    536     public function bpost_order_details_box_meta_add( WP_Post $post ) {
     536     * @param WC_Order|WP_Post $order
     537     *
     538     * @return void
     539     */
     540    public function bpost_order_details_box_meta_add( $order ) {
     541        if ( $order instanceof WP_Post ) {
     542            $order = wc_get_order( $order );
     543        }
    537544        $adapter      = Container::get_adapter();
    538         $meta_handler = new \WC_BPost_Shipping_Meta_Handler(
    539             $adapter,
    540             new \WC_BPost_Shipping_Meta_Type( $adapter ),
    541             $post->ID
    542         );
     545        $meta_handler = new \WC_BPost_Shipping_Meta_Handler( new \WC_BPost_Shipping_Meta_Type( $adapter ), $order );
    543546
    544547        $label_meta_box_controller = new WC_BPost_Shipping_Label_Meta_Box_Controller(
    545548            $adapter,
    546549            new WC_BPost_Shipping_Label_Attachment(
    547                 Container::get_adapter(),
    548                 Container::get_options_label(),
    549550                Container::get_label_url_generator(),
    550551                Container::get_label_retriever(),
    551552                Container::get_label_resolver_path(),
    552                 new WC_BPost_Shipping_Label_Post( $meta_handler, new WC_Order( $post->ID ) )
     553                new WC_BPost_Shipping_Label_Post( $meta_handler, $order )
    553554            )
    554555        );
     
    558559
    559560    /**
    560      * @param $actions
    561      * @param WC_Order $the_order
    562      *
    563      * @return string[]
    564      */
    565     public function bpost_order_review_admin_actions( $actions, WC_Order $the_order ) {
     561     * Admin: Add "Print bpost label" at each bpost order line
     562     */
     563    public function bpost_order_review_admin_actions( $actions, WC_Order $the_order ): array {
    566564        if ( ! $this->is_bpost_shipping_from_order( $the_order ) ) {
    567565            return $actions;
    568566        }
    569567
    570         $meta_handler = new \WC_BPost_Shipping_Meta_Handler(
    571             Container::get_adapter(),
    572             Container::get_meta_type(),
    573             $the_order->get_id()
    574         );
     568        $meta_handler = new \WC_BPost_Shipping_Meta_Handler( Container::get_meta_type(), $the_order );
    575569
    576570        $label_attachment = new WC_BPost_Shipping_Label_Attachment(
    577             Container::get_adapter(),
    578             Container::get_options_label(),
    579571            Container::get_label_url_generator(),
    580572            Container::get_label_retriever(),
     
    695687        // array_key_exists( 'bpost_shm_already_called', $posted_data ) && $posted_data['bpost_shm_already_called'] === 'yes'
    696688        if (
    697             !array_key_exists( 'bpost_shm_already_called', $posted_data )
     689            ! array_key_exists( 'bpost_shm_already_called', $posted_data )
    698690            || $posted_data['bpost_shm_already_called'] !== 'yes'
    699691        ) {
  • bpost-shipping/trunk/classes/class-wc-bpost-shipping-logger.php

    r2890340 r3068120  
    11<?php
    2 use Monolog\Logger;
     2use Psr\Log\LoggerInterface;
    33
    44/**
     
    77 *  - PSR3 logger
    88 */
    9 class WC_BPost_Shipping_Logger extends Logger {
     9class WC_BPost_Shipping_Logger extends WC_Logger implements LoggerInterface {
    1010
    11     /**
    12      * @param $message
    13      * @param WC_Order $order
    14      */
    15     public function log_order( $message, WC_Order $order ) {
    16         $this->info(
    17             $message,
    18             array(
    19                 'order_id'  => $order->get_id(),
    20                 'order_key' => $order->order_key,
    21                 'origin_ip' => $order->customer_ip_address,
    22             )
    23         );
    24     }
    25 
    26     /**
    27      * @param Exception $exception
    28      * @param int $log_level
    29      */
    30     public function log_exception( Exception $exception, $log_level = self::ERROR ) {
     11    public function log_exception( Exception $exception, string $log_level = WC_Log_Levels::ERROR ) {
    3112        $this->log(
    3213            $log_level,
  • bpost-shipping/trunk/classes/class-wc-bpost-shipping-meta-handler.php

    r2977804 r3068120  
    2525    const KEY_DELIVERY_METHOD_POINT_ID = 'delivery_method_point_id';
    2626
    27     /** @var WC_BPost_Shipping_Adapter_Woocommerce */
    28     private $adapter;
    29 
    30     /** @var int */
    31     private $order_id;
     27    private ?WC_Order $order = null;
     28
    3229    /**
    3330     * @var WC_BPost_Shipping_Meta_Type
     
    3532    private $meta_type;
    3633
    37     /**
    38      * WC_BPost_Shipping_Meta_Handler constructor.
    39      *
    40      * @param WC_BPost_Shipping_Adapter_Woocommerce $adapter
    41      * @param WC_BPost_Shipping_Meta_Type $meta_type
    42      * @param int $order_id
    43      */
    4434    public function __construct(
    45         WC_BPost_Shipping_Adapter_Woocommerce $adapter,
    4635        WC_BPost_Shipping_Meta_Type $meta_type,
    47         $order_id
     36        WC_Order $order
    4837    ) {
    49         $this->adapter   = $adapter;
    5038        $this->meta_type = $meta_type;
    51         $this->order_id  = (int) $order_id;
     39        $this->order     = $order;
    5240    }
    5341
     
    6048
    6149    /**
    62      * @param int $delivery_point_type
    63      */
    64     public function set_delivery_point_type( $delivery_point_type ) {
    65         $this->set_meta( self::KEY_DELIVERY_POINT_TYPE, $delivery_point_type );
    66     }
    67 
    68     /**
    6950     * @return int
    7051     */
     
    7859     */
    7960    public function set_meta( $key, $value ) {
    80         update_post_meta( $this->order_id, WC_BPost_Shipping_Meta_Type::BPOST_KEY_PREFIX . $key, $value );
     61        $this->order->update_meta_data( WC_BPost_Shipping_Meta_Type::BPOST_KEY_PREFIX . $key, $value );
     62        $this->order->save_meta_data();
    8163    }
    8264
     
    213195     */
    214196    private function get_value( $key, $type = WC_BPost_Shipping_Meta_Type::VALUE_TYPE_RAW ) {
    215         $meta = $this->adapter->get_post_meta(
    216             $this->order_id,
    217             WC_BPost_Shipping_Meta_Type::BPOST_KEY_PREFIX . $key
    218         );
    219 
    220         if ( ! is_array( $meta ) || count( $meta ) === 0 || count( $meta ) > 2 ) {
    221             return '';
    222         }
    223 
    224         /**
    225          * Before, we stored type, then value
    226          * Now, we store only the value
    227          * To be compatible, we get the last item (so, the value)
    228          */
    229         $value = array_pop( $meta );
     197
     198        $value = $this->order->get_meta( WC_BPost_Shipping_Meta_Type::BPOST_KEY_PREFIX . $key );
    230199
    231200        return $this->meta_type->get_bpost_meta_typed_value( $value, $type );
  • bpost-shipping/trunk/classes/class-wc-bpost-shipping-order-updater.php

    r2977804 r3068120  
    3737        $adapter            = new WC_BPost_Shipping_Adapter_Woocommerce();
    3838        $this->meta_handler = new WC_BPost_Shipping_Meta_Handler(
    39             $adapter,
    4039            new WC_BPost_Shipping_Meta_Type( $adapter ),
    41             $this->order->get_id()
     40            $this->order
    4241        );
    4342    }
  • bpost-shipping/trunk/classes/label/class-wc-bpost-shipping-label-attachment.php

    r2890340 r3068120  
    99use WC_BPost_Shipping\Adapter\WC_BPost_Shipping_Adapter_Woocommerce;
    1010use WC_BPost_Shipping\Label\Exception\WC_BPost_Shipping_Label_Exception_Temporary_File;
    11 use WC_BPost_Shipping\Options\WC_BPost_Shipping_Options_Base;
    12 use WC_BPost_Shipping\Options\WC_BPost_Shipping_Options_Label;
     11use WC_BPost_Shipping\WC_Bpost_Shipping_Container as Container;
     12use WC_Order;
    1313
    1414/**
     
    1818class WC_BPost_Shipping_Label_Attachment {
    1919
    20     /** @var WC_BPost_Shipping_Options_Base */
    21     private $options_label;
    22     /** @var WC_BPost_Shipping_Label_Post */
    23     private $post;
    24     /** @var WC_BPost_Shipping_Label_Url_Generator */
    25     private $url_generator;
    26     /** @var WC_BPost_Shipping_Label_Retriever */
    27     private $label_retriever;
    28     /** @var WC_BPost_Shipping_Adapter_Woocommerce */
    29     private $adapter;
    30     /** @var WC_BPost_Shipping_Label_Path_Resolver */
    31     private $label_path_resolver;
     20    private WC_BPost_Shipping_Label_Post $label_post;
     21    private WC_BPost_Shipping_Label_Url_Generator $url_generator;
     22    private WC_BPost_Shipping_Label_Retriever $label_retriever;
     23    private WC_BPost_Shipping_Adapter_Woocommerce $adapter;
     24    private WC_BPost_Shipping_Label_Path_Resolver $label_path_resolver;
    3225
    33     /**
    34      * WC_BPost_Shipping_Label_Attachments constructor.
    35      *
    36      * @param WC_BPost_Shipping_Adapter_Woocommerce $adapter
    37      * @param WC_BPost_Shipping_Options_Label $options_label
    38      * @param WC_BPost_Shipping_Label_Url_Generator $url_generator
    39      * @param WC_BPost_Shipping_Label_Retriever $label_retriever
    40      * @param WC_BPost_Shipping_Label_Path_Resolver $label_path_resolver
    41      * @param WC_BPost_Shipping_Label_Post $post
    42      */
    4326    public function __construct(
    44         WC_BPost_Shipping_Adapter_Woocommerce $adapter,
    45         WC_BPost_Shipping_Options_Label $options_label,
    4627        WC_BPost_Shipping_Label_Url_Generator $url_generator,
    4728        WC_BPost_Shipping_Label_Retriever $label_retriever,
    4829        WC_BPost_Shipping_Label_Path_Resolver $label_path_resolver,
    49         WC_BPost_Shipping_Label_Post $post
     30        WC_BPost_Shipping_Label_Post $label_post
    5031    ) {
    51         $this->adapter             = $adapter;
    52         $this->options_label       = $options_label;
    53         $this->post                = $post;
     32        $this->adapter             = Container::get_adapter();
     33        $this->label_post          = $label_post;
    5434        $this->label_retriever     = $label_retriever;
    5535        $this->url_generator       = $url_generator;
     
    6848     */
    6949    public function create_attachment( $filepath ) {
    70         $this->label_retriever->get_label_as_file( $filepath, $this->post );
     50        $this->label_retriever->get_label_as_file( $filepath, $this->label_post );
    7151
    72         $desc       = $this->post->get_order_reference();
     52        $desc       = $this->label_post->get_order_reference();
    7353        $file_array = array();
    7454
    7555        // Set variables for storage
    7656        // fix file filename for query strings
    77         $file_array['name']     = $this->label_path_resolver->get_filename( $this->post );
     57        $file_array['name']     = $this->label_path_resolver->get_filename( $this->label_post );
    7858        $file_array['tmp_name'] = $filepath;
    7959
    8060        // do the validation and storage stuff
    81         $attach_id = $this->adapter->media_handle_sideload( $file_array, $this->post->get_post_id(), $desc );
     61        $attach_id = $this->adapter->media_handle_sideload( $file_array, $desc );
    8262
    8363        if ( is_wp_error( $attach_id ) ) {
     
    10181     * @throws \Exception
    10282     */
    103     public function get_url() {
    104         if ( $post = $this->get_post() ) {
    105             return wp_get_attachment_url( $post->ID );
     83    public function get_url( WC_Order $order ) {
     84        if ( $order->get_meta( 'label_attachment_id' ) ) {
     85            return wp_get_attachment_url( $order->get_meta( 'label_attachment_id' ) );
    10686        }
    10787
     
    11292
    11393        $attach_id = $this->create_attachment( $temp_filename );
     94        $order->set_meta_data( [ 'label_attachment_id' => $attach_id ] );
    11495
    11596        return wp_get_attachment_url( $attach_id );
     
    120101     */
    121102    public function get_generate_url() {
    122         return $this->url_generator->get_generate_url( array( $this->post->get_post_id() ) );
     103        return $this->url_generator->get_generate_url( array( $this->label_post->get_post_id() ) );
    123104    }
    124105
     
    131112            'numberposts' => 1,
    132113            'post_status' => 'any',
    133             'post_parent' => $this->post->get_post_id(),
     114            'post_parent' => $this->label_post->get_post_id(),
    134115        );
    135116    }
     
    152133     */
    153134    public function get_order_reference() {
    154         return $this->post->get_order_reference();
     135        return $this->label_post->get_order_reference();
    155136    }
    156137
     
    169150     */
    170151    public function get_shipping_postal_code() {
    171         return $this->post->get_order()->get_shipping_postcode();
     152        return $this->label_post->get_order()->get_shipping_postcode();
    172153    }
    173154}
  • bpost-shipping/trunk/classes/label/class-wc-bpost-shipping-label-retriever.php

    r2890340 r3068120  
    88use Bpost\BpostApiClient\Exception\BpostApiResponseException\BpostInvalidSelectionException;
    99use Bpost\BpostApiClient\Exception\XmlException\BpostXmlNoReferenceFoundException;
    10 use WC_BPost_Shipping\Adapter\WC_BPost_Shipping_Adapter_Woocommerce;
    1110use WC_BPost_Shipping\Api\WC_BPost_Shipping_Api_Factory;
    1211use WC_BPost_Shipping\Api\WC_BPost_Shipping_Api_Label;
     
    1514use WC_BPost_Shipping\WC_Bpost_Shipping_Container as Container;
    1615use WC_BPost_Shipping_Logger;
     16use WC_Order;
     17
     18use function wc_get_order;
    1719
    1820class WC_BPost_Shipping_Label_Retriever {
    1921
    20     /** @var WC_BPost_Shipping_Adapter_Woocommerce */
    21     private $adapter;
    22 
    23     /** @var WC_BPost_Shipping_Api_Label */
    24     private $api_label;
    25     /** @var WC_BPost_Shipping_Label_Url_Generator */
    26     private $url_generator;
    27     /** @var WC_BPost_Shipping_Label_Path_Resolver */
    28     private $label_path_resolver;
    29     /** @var WC_BPost_Shipping_Options_Label */
    30     private $options_label;
    31     /** @var WC_BPost_Shipping_Logger */
    32     private $logger;
     22    private WC_BPost_Shipping_Api_Label $api_label;
     23    private WC_BPost_Shipping_Label_Url_Generator $url_generator;
     24    private WC_BPost_Shipping_Label_Path_Resolver $label_path_resolver;
     25    private WC_BPost_Shipping_Options_Label $options_label;
     26    private WC_BPost_Shipping_Logger $logger;
    3327
    3428    public function __construct(
    35         WC_BPost_Shipping_Adapter_Woocommerce $adapter,
    3629        WC_BPost_Shipping_Api_Factory $api_factory,
    3730        WC_BPost_Shipping_Label_Url_Generator $url_generator,
     
    3932        WC_BPost_Shipping_Options_Label $options_label
    4033    ) {
    41         $this->adapter             = $adapter;
    4234        $this->api_label           = $api_factory->get_label();
    4335        $this->url_generator       = $url_generator;
     
    5042
    5143    /**
    52      * @param string $filepath
    53      * @param WC_BPost_Shipping_Label_Post $post
    54      *
    5544     * @throws BpostCurlException
    5645     * @throws BpostInvalidResponseException
    5746     * @throws BpostInvalidSelectionException
    5847     * @throws BpostXmlNoReferenceFoundException
     48     * @throws WC_BPost_Shipping_Label_Exception_Not_Found
    5949     */
    60     public function get_label_as_file( $filepath, WC_BPost_Shipping_Label_Post $post ) {
     50    public function get_label_as_file( string $filepath, WC_BPost_Shipping_Label_Post $post ) {
    6151        if ( ! $post->get_order_reference() ) {
    62             $this->logger->warning( 'The order does not contain order reference', array( 'order_id' => $post->get_post_id() ) );
     52            $this->logger->warning( 'The order does not contain order reference',
     53                array( 'order_id' => $post->get_post_id() ) );
    6354
    6455            return;
     
    7970    /**
    8071     * Save into temp file (/tmp/xxx or whatever a label provided as attachment)
    81      *
    82      * @param string $filepath
    83      * @param Label $label_retrieved
    8472     */
    85     private function save_label( $filepath, Label $label_retrieved ) {
     73    private function save_label( string $filepath, Label $label_retrieved ) {
    8674        $handle = fopen( $filepath, 'w' );
    8775        fwrite( $handle, $label_retrieved->getBytes() );
     
    9179
    9280    /**
    93      * @param array $post_ids
    94      *
    95      * @return array
    9681     * @throws \Exception
    9782     */
    98     public function get_labels_contents( array $post_ids ) {
     83    public function get_labels_contents( array $post_ids ): array {
    9984        $contents = array();
    10085
     
    10287
    10388        foreach ( $post_ids as $post_id ) {
     89            $order = wc_get_order( $post_id );
    10490            if ( $are_labels_as_files ) {
    105                 $url = $this->get_label_file_url( $post_id );
     91                $url = $this->get_label_file_url( $order );
    10692            } else {
    107                 $url = $this->get_label_attachment_url( $post_id );
     93                $url = $this->get_label_attachment_url( $order );
    10894            }
    10995
     
    120106     * @throws \Exception
    121107     */
    122     private function get_label_attachment_url( $post_id ) {
     108    private function get_label_attachment_url( WC_Order $order ) {
    123109        $label_attach = new WC_BPost_Shipping_Label_Attachment(
    124             $this->adapter,
    125             $this->options_label,
    126110            $this->url_generator,
    127111            $this,
    128112            $this->label_path_resolver,
    129             $this->get_label_post( $post_id )
     113            $this->get_label_post( $order )
    130114        );
    131115
    132         return $label_attach->get_url();
     116        return $label_attach->get_url( $order );
    133117    }
    134118
     
    139123     * @throws \Exception
    140124     */
    141     private function get_label_file_url( $post_id ) {
    142         $post = $this->get_label_post( $post_id );
    143         $url  = $this->label_path_resolver->get_storage_file_path( $post );
    144         $this->get_label_as_file( $url, $post );
     125    private function get_label_file_url( WC_Order $order ) {
     126        $label_post = $this->get_label_post( $order );
     127        $url        = $this->label_path_resolver->get_storage_file_path( $label_post );
     128        $this->get_label_as_file( $url, $label_post );
    145129
    146130        return $url;
    147131    }
    148132
    149     private function get_label_post( $post_id ) {
    150         $meta_handler = new \WC_BPost_Shipping_Meta_Handler(
    151             $this->adapter,
    152             new \WC_BPost_Shipping_Meta_Type( $this->adapter ),
    153             $post_id
    154         );
     133    private function get_label_post( WC_Order $order ) {
     134        $meta_handler = new \WC_BPost_Shipping_Meta_Handler( Container::get_meta_type(), $order );
    155135
    156         return new WC_BPost_Shipping_Label_Post( $meta_handler, new \WC_Order( $post_id ) );
    157 
     136        return new WC_BPost_Shipping_Label_Post( $meta_handler, $order );
    158137    }
    159138}
  • bpost-shipping/trunk/classes/status/class-wc-bpost-shipping-status-controller.php

    r2977804 r3068120  
    6060
    6161        foreach ( $this->post_ids as $post_id ) {
    62             $meta_handler = new \WC_BPost_Shipping_Meta_Handler(
    63                 $this->adapter,
    64                 new \WC_BPost_Shipping_Meta_Type( $this->adapter ),
    65                 $post_id
    66             );
     62            $meta_handler = new \WC_BPost_Shipping_Meta_Handler( Container::get_meta_type(), wc_get_order( $post_id ) );
    6763
    6864            try {
    6965                $status = $this->bpost_api_status->get_status( $meta_handler->get_order_reference() );
    70                 $meta_handler->set_meta(WC_BPost_Shipping_Meta_Handler::KEY_STATUS, $status );
     66                $meta_handler->set_meta( WC_BPost_Shipping_Meta_Handler::KEY_STATUS, $status );
    7167                $bpost_statuses[ $post_id ] = $status;
    72 
    7368            } catch ( BpostException $e ) {
     69                wc_get_logger()->error(
     70                    $e->getMessage(),
     71                    [ 'exception' => get_class( $e ), 'file' => $e->getFile(), 'line' => $e->getLine() ]
     72                );
    7473                $bpost_statuses[ $post_id ] = 'UNKNOWN';
    7574            }
  • bpost-shipping/trunk/composer.json

    r3043055 r3068120  
    33  "description": "WooCommerce plugin for bpost shipping",
    44  "type": "wordpress-plugin",
    5   "version": "3.0.7",
     5  "version": "3.1.0",
    66
    77  "require": {
  • bpost-shipping/trunk/languages/bpost_shipping.pot

    r3043055 r3068120  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: bpost shipping 3.0.7\n"
     5"Project-Id-Version: bpost shipping 3.1.0\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/package\n"
    7 "POT-Creation-Date: 2024-02-29 10:05:05+00:00\n"
     7"POT-Creation-Date: 2024-04-10 00:05:25+00:00\n"
    88"MIME-Version: 1.0\n"
    99"Content-Type: text/plain; charset=UTF-8\n"
     
    8787msgstr ""
    8888
    89 #: classes/class-wc-bpost-shipping-hooks.php:41
     89#: classes/class-wc-bpost-shipping-hooks.php:44
    9090msgid "Configure"
    9191msgstr ""
    9292
    93 #: classes/class-wc-bpost-shipping-hooks.php:79
     93#: classes/class-wc-bpost-shipping-hooks.php:81
    9494msgid "Print bpost labels"
    9595msgstr ""
    9696
    97 #: classes/class-wc-bpost-shipping-hooks.php:223
     97#: classes/class-wc-bpost-shipping-hooks.php:233
    9898msgid "(as from)"
    9999msgstr ""
    100100
    101 #: classes/class-wc-bpost-shipping-hooks.php:227
     101#: classes/class-wc-bpost-shipping-hooks.php:237
    102102msgid "Free shipping available"
    103103msgstr ""
    104104
    105 #: classes/class-wc-bpost-shipping-hooks.php:427
     105#: classes/class-wc-bpost-shipping-hooks.php:430
    106106msgid "status: "
    107107msgstr ""
    108108
    109 #: classes/class-wc-bpost-shipping-hooks.php:525
     109#: classes/class-wc-bpost-shipping-hooks.php:527
    110110msgid "bpost labels"
    111111msgstr ""
    112112
     113#: classes/class-wc-bpost-shipping-hooks.php:692
     114msgid "You have to specify a delivery method"
     115msgstr ""
     116
     117#: classes/class-wc-bpost-shipping-hooks.php:694
     118msgid "Your bpost delivery method"
     119msgstr ""
     120
     121#: classes/class-wc-bpost-shipping-hooks.php:699
     122msgid "bpost_method_Regular"
     123msgstr ""
     124
    113125#: classes/class-wc-bpost-shipping-hooks.php:700
    114 msgid "You have to specify a delivery method"
     126msgid "bpost_method_Pugo"
     127msgstr ""
     128
     129#: classes/class-wc-bpost-shipping-hooks.php:701
     130msgid "bpost_method_Parcels depot"
    115131msgstr ""
    116132
    117133#: classes/class-wc-bpost-shipping-hooks.php:702
    118 msgid "Your bpost delivery method"
    119 msgstr ""
    120 
    121 #: classes/class-wc-bpost-shipping-hooks.php:707
    122 msgid "bpost_method_Regular"
    123 msgstr ""
    124 
    125 #: classes/class-wc-bpost-shipping-hooks.php:708
    126 msgid "bpost_method_Pugo"
    127 msgstr ""
    128 
    129 #: classes/class-wc-bpost-shipping-hooks.php:709
    130 msgid "bpost_method_Parcels depot"
    131 msgstr ""
    132 
    133 #: classes/class-wc-bpost-shipping-hooks.php:710
    134134msgid "bpost_method_bpack BUSINESS"
    135135msgstr ""
    136136
    137 #: classes/class-wc-bpost-shipping-hooks.php:711
     137#: classes/class-wc-bpost-shipping-hooks.php:703
    138138msgid "bpost_method_Pugo international"
    139139msgstr ""
    140140
    141 #: classes/class-wc-bpost-shipping-hooks.php:720
     141#: classes/class-wc-bpost-shipping-hooks.php:712
    142142msgid "Change the delivery method"
    143143msgstr ""
    144144
    145 #: classes/class-wc-bpost-shipping-hooks.php:746
     145#: classes/class-wc-bpost-shipping-hooks.php:738
    146146msgid "Please, specify a bpost delivery method!"
    147147msgstr ""
     
    197197msgstr ""
    198198
    199 #. #-#-#-#-#  bpost_shipping.pot (bpost shipping 3.0.7)  #-#-#-#-#
     199#. #-#-#-#-#  bpost_shipping.pot (bpost shipping 3.1.0)  #-#-#-#-#
    200200#. Author of the plugin/theme
    201201#: classes/class-wc-bpost-shipping-method.php:264
     
    224224msgstr ""
    225225
    226 #: classes/class-wc-bpost-shipping-order-updater.php:83
     226#: classes/class-wc-bpost-shipping-order-updater.php:82
    227227msgid "bpost -"
    228228msgstr ""
     
    447447msgstr ""
    448448
    449 #: classes/label/class-wc-bpost-shipping-label-attachment.php:110
     449#: classes/label/class-wc-bpost-shipping-label-attachment.php:90
    450450msgid "Could not create Temporary file."
    451451msgstr ""
     
    475475msgstr ""
    476476
    477 #: classes/label/class-wc-bpost-shipping-label-retriever.php:74
     477#: classes/label/class-wc-bpost-shipping-label-retriever.php:65
    478478msgid "This label is not available for print."
    479479msgstr ""
  • bpost-shipping/trunk/readme.txt

    r3043055 r3068120  
    1 === Plugin Name ===
     1=== bpost shipping ===
    22
    33Tags: woocommerce extension,shipping methods,bpost,Belgian post,delivery,shop
     
    66Author URI: https://www.bpost.be/
    77Requires at least: 4.9
    8 Tested up to: 6.4
     8Tested up to: 6.5
    99Requires PHP: 7.4
    10 Stable tag: 3.0.7
     10Stable tag: 3.1.0
    1111License: GPLv2 or later
    1212License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    1201205. Configure your bpost shipping settings under the Woocommerce shipping > bpost shipping tab
    121121== Changelog ==
     122
     123#### 3.1.0
     124
     125*Release date: 2024-04-10*
     126
     127* Add compatibility with HPOS
     128* Confirm compatibility with WP 6.5
     129* Logs are now *WC logs* compliant
    122130
    123131#### 3.0.7
  • bpost-shipping/trunk/vendor/antidot-be/bpost-api-library/src/Geo6.php

    r2977804 r3068120  
    277277        $xml = $this->doCall('search', $parameters);
    278278
    279         if (!isset($xml->Poi)) {
     279        if (!isset($xml->PoiList->Poi)) {
    280280            throw new BpostInvalidXmlResponseException();
    281281        }
    282282
    283283        $pois = array();
    284         foreach ($xml->Poi as $poi) {
     284        foreach ($xml->PoiList->Poi as $poi) {
    285285            $pois[] = array(
    286286                'poi' => Poi::createFromXML($poi),
  • bpost-shipping/trunk/vendor/autoload.php

    r2411285 r3068120  
    55require_once __DIR__ . '/composer/autoload_real.php';
    66
    7 return ComposerAutoloaderInitc5f64c972ca3c21533b986287cc5e6a3::getLoader();
     7return ComposerAutoloaderInit0eb9f3f17f2a6b3490ad5896bc55f38a::getLoader();
  • bpost-shipping/trunk/vendor/composer/ClassLoader.php

    r2021946 r3068120  
    3838 * @author Fabien Potencier <fabien@symfony.com>
    3939 * @author Jordi Boggiano <j.boggiano@seld.be>
    40  * @see    http://www.php-fig.org/psr/psr-0/
    41  * @see    http://www.php-fig.org/psr/psr-4/
     40 * @see    https://www.php-fig.org/psr/psr-0/
     41 * @see    https://www.php-fig.org/psr/psr-4/
    4242 */
    4343class ClassLoader
    4444{
     45    /** @var ?string */
     46    private $vendorDir;
     47
    4548    // PSR-4
     49    /**
     50     * @var array[]
     51     * @psalm-var array<string, array<string, int>>
     52     */
    4653    private $prefixLengthsPsr4 = array();
     54    /**
     55     * @var array[]
     56     * @psalm-var array<string, array<int, string>>
     57     */
    4758    private $prefixDirsPsr4 = array();
     59    /**
     60     * @var array[]
     61     * @psalm-var array<string, string>
     62     */
    4863    private $fallbackDirsPsr4 = array();
    4964
    5065    // PSR-0
     66    /**
     67     * @var array[]
     68     * @psalm-var array<string, array<string, string[]>>
     69     */
    5170    private $prefixesPsr0 = array();
     71    /**
     72     * @var array[]
     73     * @psalm-var array<string, string>
     74     */
    5275    private $fallbackDirsPsr0 = array();
    5376
     77    /** @var bool */
    5478    private $useIncludePath = false;
     79
     80    /**
     81     * @var string[]
     82     * @psalm-var array<string, string>
     83     */
    5584    private $classMap = array();
     85
     86    /** @var bool */
    5687    private $classMapAuthoritative = false;
     88
     89    /**
     90     * @var bool[]
     91     * @psalm-var array<string, bool>
     92     */
    5793    private $missingClasses = array();
     94
     95    /** @var ?string */
    5896    private $apcuPrefix;
    5997
     98    /**
     99     * @var self[]
     100     */
     101    private static $registeredLoaders = array();
     102
     103    /**
     104     * @param ?string $vendorDir
     105     */
     106    public function __construct($vendorDir = null)
     107    {
     108        $this->vendorDir = $vendorDir;
     109    }
     110
     111    /**
     112     * @return string[]
     113     */
    60114    public function getPrefixes()
    61115    {
    62116        if (!empty($this->prefixesPsr0)) {
    63             return call_user_func_array('array_merge', $this->prefixesPsr0);
     117            return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
    64118        }
    65119
     
    67121    }
    68122
     123    /**
     124     * @return array[]
     125     * @psalm-return array<string, array<int, string>>
     126     */
    69127    public function getPrefixesPsr4()
    70128    {
     
    72130    }
    73131
     132    /**
     133     * @return array[]
     134     * @psalm-return array<string, string>
     135     */
    74136    public function getFallbackDirs()
    75137    {
     
    77139    }
    78140
     141    /**
     142     * @return array[]
     143     * @psalm-return array<string, string>
     144     */
    79145    public function getFallbackDirsPsr4()
    80146    {
     
    82148    }
    83149
     150    /**
     151     * @return string[] Array of classname => path
     152     * @psalm-return array<string, string>
     153     */
    84154    public function getClassMap()
    85155    {
     
    88158
    89159    /**
    90      * @param array $classMap Class to filename map
     160     * @param string[] $classMap Class to filename map
     161     * @psalm-param array<string, string> $classMap
     162     *
     163     * @return void
    91164     */
    92165    public function addClassMap(array $classMap)
     
    103176     * appending or prepending to the ones previously set for this prefix.
    104177     *
    105      * @param string       $prefix  The prefix
    106      * @param array|string $paths   The PSR-0 root directories
    107      * @param bool         $prepend Whether to prepend the directories
     178     * @param string          $prefix  The prefix
     179     * @param string[]|string $paths   The PSR-0 root directories
     180     * @param bool            $prepend Whether to prepend the directories
     181     *
     182     * @return void
    108183     */
    109184    public function add($prefix, $paths, $prepend = false)
     
    148223     * appending or prepending to the ones previously set for this namespace.
    149224     *
    150      * @param string       $prefix  The prefix/namespace, with trailing '\\'
    151      * @param array|string $paths   The PSR-4 base directories
    152      * @param bool         $prepend Whether to prepend the directories
     225     * @param string          $prefix  The prefix/namespace, with trailing '\\'
     226     * @param string[]|string $paths   The PSR-4 base directories
     227     * @param bool            $prepend Whether to prepend the directories
    153228     *
    154229     * @throws \InvalidArgumentException
     230     *
     231     * @return void
    155232     */
    156233    public function addPsr4($prefix, $paths, $prepend = false)
     
    196273     * replacing any others previously set for this prefix.
    197274     *
    198      * @param string       $prefix The prefix
    199      * @param array|string $paths  The PSR-0 base directories
     275     * @param string          $prefix The prefix
     276     * @param string[]|string $paths  The PSR-0 base directories
     277     *
     278     * @return void
    200279     */
    201280    public function set($prefix, $paths)
     
    212291     * replacing any others previously set for this namespace.
    213292     *
    214      * @param string       $prefix The prefix/namespace, with trailing '\\'
    215      * @param array|string $paths  The PSR-4 base directories
     293     * @param string          $prefix The prefix/namespace, with trailing '\\'
     294     * @param string[]|string $paths  The PSR-4 base directories
    216295     *
    217296     * @throws \InvalidArgumentException
     297     *
     298     * @return void
    218299     */
    219300    public function setPsr4($prefix, $paths)
     
    235316     *
    236317     * @param bool $useIncludePath
     318     *
     319     * @return void
    237320     */
    238321    public function setUseIncludePath($useIncludePath)
     
    257340     *
    258341     * @param bool $classMapAuthoritative
     342     *
     343     * @return void
    259344     */
    260345    public function setClassMapAuthoritative($classMapAuthoritative)
     
    277362     *
    278363     * @param string|null $apcuPrefix
     364     *
     365     * @return void
    279366     */
    280367    public function setApcuPrefix($apcuPrefix)
     
    297384     *
    298385     * @param bool $prepend Whether to prepend the autoloader or not
     386     *
     387     * @return void
    299388     */
    300389    public function register($prepend = false)
    301390    {
    302391        spl_autoload_register(array($this, 'loadClass'), true, $prepend);
     392
     393        if (null === $this->vendorDir) {
     394            return;
     395        }
     396
     397        if ($prepend) {
     398            self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders;
     399        } else {
     400            unset(self::$registeredLoaders[$this->vendorDir]);
     401            self::$registeredLoaders[$this->vendorDir] = $this;
     402        }
    303403    }
    304404
    305405    /**
    306406     * Unregisters this instance as an autoloader.
     407     *
     408     * @return void
    307409     */
    308410    public function unregister()
    309411    {
    310412        spl_autoload_unregister(array($this, 'loadClass'));
     413
     414        if (null !== $this->vendorDir) {
     415            unset(self::$registeredLoaders[$this->vendorDir]);
     416        }
    311417    }
    312418
     
    315421     *
    316422     * @param  string    $class The name of the class
    317      * @return bool|null True if loaded, null otherwise
     423     * @return true|null True if loaded, null otherwise
    318424     */
    319425    public function loadClass($class)
     
    324430            return true;
    325431        }
     432
     433        return null;
    326434    }
    327435
     
    368476    }
    369477
     478    /**
     479     * Returns the currently registered loaders indexed by their corresponding vendor directories.
     480     *
     481     * @return self[]
     482     */
     483    public static function getRegisteredLoaders()
     484    {
     485        return self::$registeredLoaders;
     486    }
     487
     488    /**
     489     * @param  string       $class
     490     * @param  string       $ext
     491     * @return string|false
     492     */
    370493    private function findFileWithExtension($class, $ext)
    371494    {
     
    439562 *
    440563 * Prevents access to $this/self from included files.
     564 *
     565 * @param  string $file
     566 * @return void
     567 * @private
    441568 */
    442569function includeFile($file)
  • bpost-shipping/trunk/vendor/composer/InstalledVersions.php

    r2706083 r3068120  
    327327                    $installed[] = self::$installedByVendor[$vendorDir];
    328328                } elseif (is_file($vendorDir.'/composer/installed.php')) {
    329                     $installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php';
     329                    /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
     330                    $required = require $vendorDir.'/composer/installed.php';
     331                    $installed[] = self::$installedByVendor[$vendorDir] = $required;
    330332                    if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
    331333                        self::$installed = $installed[count($installed) - 1];
     
    339341            // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
    340342            if (substr(__DIR__, -8, 1) !== 'C') {
    341                 self::$installed = require __DIR__ . '/installed.php';
     343                /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
     344                $required = require __DIR__ . '/installed.php';
     345                self::$installed = $required;
    342346            } else {
    343347                self::$installed = array();
    344348            }
    345349        }
    346         $installed[] = self::$installed;
     350
     351        if (self::$installed !== array()) {
     352            $installed[] = self::$installed;
     353        }
    347354
    348355        return $installed;
  • bpost-shipping/trunk/vendor/composer/autoload_classmap.php

    r1529584 r3068120  
    77
    88return array(
     9    'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
    910    'TijsVerkoyen\\Bpost\\Bpack247' => $vendorDir . '/antidot-be/bpost-api-library/src/tijsverkoyen_classes.php',
    1011    'TijsVerkoyen\\Bpost\\Bpack247\\Customer' => $vendorDir . '/antidot-be/bpost-api-library/src/tijsverkoyen_classes.php',
  • bpost-shipping/trunk/vendor/composer/autoload_real.php

    r2411285 r3068120  
    33// autoload_real.php @generated by Composer
    44
    5 class ComposerAutoloaderInitc5f64c972ca3c21533b986287cc5e6a3
     5class ComposerAutoloaderInit0eb9f3f17f2a6b3490ad5896bc55f38a
    66{
    77    private static $loader;
     
    1414    }
    1515
     16    /**
     17     * @return \Composer\Autoload\ClassLoader
     18     */
    1619    public static function getLoader()
    1720    {
     
    2023        }
    2124
    22         spl_autoload_register(array('ComposerAutoloaderInitc5f64c972ca3c21533b986287cc5e6a3', 'loadClassLoader'), true, true);
    23         self::$loader = $loader = new \Composer\Autoload\ClassLoader();
    24         spl_autoload_unregister(array('ComposerAutoloaderInitc5f64c972ca3c21533b986287cc5e6a3', 'loadClassLoader'));
     25        require __DIR__ . '/platform_check.php';
     26
     27        spl_autoload_register(array('ComposerAutoloaderInit0eb9f3f17f2a6b3490ad5896bc55f38a', 'loadClassLoader'), true, true);
     28        self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
     29        spl_autoload_unregister(array('ComposerAutoloaderInit0eb9f3f17f2a6b3490ad5896bc55f38a', 'loadClassLoader'));
    2530
    2631        $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
    2732        if ($useStaticLoader) {
    28             require_once __DIR__ . '/autoload_static.php';
     33            require __DIR__ . '/autoload_static.php';
    2934
    30             call_user_func(\Composer\Autoload\ComposerStaticInitc5f64c972ca3c21533b986287cc5e6a3::getInitializer($loader));
     35            call_user_func(\Composer\Autoload\ComposerStaticInit0eb9f3f17f2a6b3490ad5896bc55f38a::getInitializer($loader));
    3136        } else {
    3237            $map = require __DIR__ . '/autoload_namespaces.php';
  • bpost-shipping/trunk/vendor/composer/autoload_static.php

    r2411285 r3068120  
    55namespace Composer\Autoload;
    66
    7 class ComposerStaticInitc5f64c972ca3c21533b986287cc5e6a3
     7class ComposerStaticInit0eb9f3f17f2a6b3490ad5896bc55f38a
    88{
    99    public static $prefixLengthsPsr4 = array (
     
    3838
    3939    public static $classMap = array (
     40        'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
    4041        'TijsVerkoyen\\Bpost\\Bpack247' => __DIR__ . '/..' . '/antidot-be/bpost-api-library/src/tijsverkoyen_classes.php',
    4142        'TijsVerkoyen\\Bpost\\Bpack247\\Customer' => __DIR__ . '/..' . '/antidot-be/bpost-api-library/src/tijsverkoyen_classes.php',
     
    7778    {
    7879        return \Closure::bind(function () use ($loader) {
    79             $loader->prefixLengthsPsr4 = ComposerStaticInitc5f64c972ca3c21533b986287cc5e6a3::$prefixLengthsPsr4;
    80             $loader->prefixDirsPsr4 = ComposerStaticInitc5f64c972ca3c21533b986287cc5e6a3::$prefixDirsPsr4;
    81             $loader->classMap = ComposerStaticInitc5f64c972ca3c21533b986287cc5e6a3::$classMap;
     80            $loader->prefixLengthsPsr4 = ComposerStaticInit0eb9f3f17f2a6b3490ad5896bc55f38a::$prefixLengthsPsr4;
     81            $loader->prefixDirsPsr4 = ComposerStaticInit0eb9f3f17f2a6b3490ad5896bc55f38a::$prefixDirsPsr4;
     82            $loader->classMap = ComposerStaticInit0eb9f3f17f2a6b3490ad5896bc55f38a::$classMap;
    8283
    8384        }, null, ClassLoader::class);
  • bpost-shipping/trunk/vendor/composer/installed.json

    r2890340 r3068120  
    1 [
    2     {
    3         "name": "antidot-be/bpost-api-library",
    4         "version": "3.4.11",
    5         "version_normalized": "3.4.11.0",
    6         "source": {
    7             "type": "git",
    8             "url": "https://github.com/Antidot-be/bpost-api-library.git",
    9             "reference": "eff1fe611d1b39f56d257515d293a4f61ba0cc2c"
     1{
     2    "packages": [
     3        {
     4            "name": "antidot-be/bpost-api-library",
     5            "version": "3.4.11",
     6            "version_normalized": "3.4.11.0",
     7            "source": {
     8                "type": "git",
     9                "url": "https://github.com/Antidot-be/bpost-api-library.git",
     10                "reference": "eff1fe611d1b39f56d257515d293a4f61ba0cc2c"
     11            },
     12            "dist": {
     13                "type": "zip",
     14                "url": "https://api.github.com/repos/Antidot-be/bpost-api-library/zipball/eff1fe611d1b39f56d257515d293a4f61ba0cc2c",
     15                "reference": "eff1fe611d1b39f56d257515d293a4f61ba0cc2c",
     16                "shasum": ""
     17            },
     18            "require": {
     19                "ext-curl": "*",
     20                "ext-dom": "*",
     21                "ext-mbstring": "*",
     22                "ext-simplexml": "*",
     23                "php": ">=5.3.0",
     24                "psr/log": "*"
     25            },
     26            "require-dev": {
     27                "friendsofphp/php-cs-fixer": "=3.9.5",
     28                "phpunit/phpunit": "^5"
     29            },
     30            "time": "2022-11-22T14:19:58+00:00",
     31            "type": "library",
     32            "installation-source": "dist",
     33            "autoload": {
     34                "psr-4": {
     35                    "Bpost\\BpostApiClient\\": "src/"
     36                },
     37                "classmap": [
     38                    "src/tijsverkoyen_classes.php"
     39                ]
     40            },
     41            "notification-url": "https://packagist.org/downloads/",
     42            "license": [
     43                "BSD-3-Clause"
     44            ],
     45            "authors": [
     46                {
     47                    "name": "Raphaël Pommier",
     48                    "email": "rpommier@antidot.com",
     49                    "role": "Developer"
     50                },
     51                {
     52                    "name": "kouinkouin",
     53                    "email": "me@kouinkouin.com",
     54                    "role": "Developer"
     55                },
     56                {
     57                    "name": "Tijs Verkoyen",
     58                    "email": "bpost@verkoyen.eu",
     59                    "role": "Developer"
     60                }
     61            ],
     62            "description": "bpost API library is a PHP library to communicate with the bpost API.",
     63            "homepage": "https://github.com/Antidot-be/bpost-api-library",
     64            "support": {
     65                "issues": "https://github.com/Antidot-be/bpost-api-library/issues",
     66                "source": "https://github.com/Antidot-be/bpost-api-library/tree/3.4.11"
     67            },
     68            "install-path": "../antidot-be/bpost-api-library"
    1069        },
    11         "dist": {
    12             "type": "zip",
    13             "url": "https://api.github.com/repos/Antidot-be/bpost-api-library/zipball/eff1fe611d1b39f56d257515d293a4f61ba0cc2c",
    14             "reference": "eff1fe611d1b39f56d257515d293a4f61ba0cc2c",
    15             "shasum": ""
     70        {
     71            "name": "monolog/monolog",
     72            "version": "2.9.1",
     73            "version_normalized": "2.9.1.0",
     74            "source": {
     75                "type": "git",
     76                "url": "https://github.com/Seldaek/monolog.git",
     77                "reference": "f259e2b15fb95494c83f52d3caad003bbf5ffaa1"
     78            },
     79            "dist": {
     80                "type": "zip",
     81                "url": "https://api.github.com/repos/Seldaek/monolog/zipball/f259e2b15fb95494c83f52d3caad003bbf5ffaa1",
     82                "reference": "f259e2b15fb95494c83f52d3caad003bbf5ffaa1",
     83                "shasum": ""
     84            },
     85            "require": {
     86                "php": ">=7.2",
     87                "psr/log": "^1.0.1 || ^2.0 || ^3.0"
     88            },
     89            "provide": {
     90                "psr/log-implementation": "1.0.0 || 2.0.0 || 3.0.0"
     91            },
     92            "require-dev": {
     93                "aws/aws-sdk-php": "^2.4.9 || ^3.0",
     94                "doctrine/couchdb": "~1.0@dev",
     95                "elasticsearch/elasticsearch": "^7 || ^8",
     96                "ext-json": "*",
     97                "graylog2/gelf-php": "^1.4.2 || ^2@dev",
     98                "guzzlehttp/guzzle": "^7.4",
     99                "guzzlehttp/psr7": "^2.2",
     100                "mongodb/mongodb": "^1.8",
     101                "php-amqplib/php-amqplib": "~2.4 || ^3",
     102                "phpspec/prophecy": "^1.15",
     103                "phpstan/phpstan": "^0.12.91",
     104                "phpunit/phpunit": "^8.5.14",
     105                "predis/predis": "^1.1 || ^2.0",
     106                "rollbar/rollbar": "^1.3 || ^2 || ^3",
     107                "ruflin/elastica": "^7",
     108                "swiftmailer/swiftmailer": "^5.3|^6.0",
     109                "symfony/mailer": "^5.4 || ^6",
     110                "symfony/mime": "^5.4 || ^6"
     111            },
     112            "suggest": {
     113                "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB",
     114                "doctrine/couchdb": "Allow sending log messages to a CouchDB server",
     115                "elasticsearch/elasticsearch": "Allow sending log messages to an Elasticsearch server via official client",
     116                "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)",
     117                "ext-curl": "Required to send log messages using the IFTTTHandler, the LogglyHandler, the SendGridHandler, the SlackWebhookHandler or the TelegramBotHandler",
     118                "ext-mbstring": "Allow to work properly with unicode symbols",
     119                "ext-mongodb": "Allow sending log messages to a MongoDB server (via driver)",
     120                "ext-openssl": "Required to send log messages using SSL",
     121                "ext-sockets": "Allow sending log messages to a Syslog server (via UDP driver)",
     122                "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server",
     123                "mongodb/mongodb": "Allow sending log messages to a MongoDB server (via library)",
     124                "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib",
     125                "rollbar/rollbar": "Allow sending log messages to Rollbar",
     126                "ruflin/elastica": "Allow sending log messages to an Elastic Search server"
     127            },
     128            "time": "2023-02-06T13:44:46+00:00",
     129            "type": "library",
     130            "extra": {
     131                "branch-alias": {
     132                    "dev-main": "2.x-dev"
     133                }
     134            },
     135            "installation-source": "dist",
     136            "autoload": {
     137                "psr-4": {
     138                    "Monolog\\": "src/Monolog"
     139                }
     140            },
     141            "notification-url": "https://packagist.org/downloads/",
     142            "license": [
     143                "MIT"
     144            ],
     145            "authors": [
     146                {
     147                    "name": "Jordi Boggiano",
     148                    "email": "j.boggiano@seld.be",
     149                    "homepage": "https://seld.be"
     150                }
     151            ],
     152            "description": "Sends your logs to files, sockets, inboxes, databases and various web services",
     153            "homepage": "https://github.com/Seldaek/monolog",
     154            "keywords": [
     155                "log",
     156                "logging",
     157                "psr-3"
     158            ],
     159            "support": {
     160                "issues": "https://github.com/Seldaek/monolog/issues",
     161                "source": "https://github.com/Seldaek/monolog/tree/2.9.1"
     162            },
     163            "funding": [
     164                {
     165                    "url": "https://github.com/Seldaek",
     166                    "type": "github"
     167                },
     168                {
     169                    "url": "https://tidelift.com/funding/github/packagist/monolog/monolog",
     170                    "type": "tidelift"
     171                }
     172            ],
     173            "install-path": "../monolog/monolog"
    16174        },
    17         "require": {
    18             "ext-curl": "*",
    19             "ext-dom": "*",
    20             "ext-mbstring": "*",
    21             "ext-simplexml": "*",
    22             "php": ">=5.3.0",
    23             "psr/log": "*"
    24         },
    25         "require-dev": {
    26             "friendsofphp/php-cs-fixer": "=3.9.5",
    27             "phpunit/phpunit": "^5"
    28         },
    29         "time": "2022-11-22T14:19:58+00:00",
    30         "type": "library",
    31         "installation-source": "dist",
    32         "autoload": {
    33             "psr-4": {
    34                 "Bpost\\BpostApiClient\\": "src/"
    35             },
    36             "classmap": [
    37                 "src/tijsverkoyen_classes.php"
    38             ]
    39         },
    40         "notification-url": "https://packagist.org/downloads/",
    41         "license": [
    42             "BSD-3-Clause"
    43         ],
    44         "authors": [
    45             {
    46                 "name": "Raphaël Pommier",
    47                 "email": "rpommier@antidot.com",
    48                 "role": "Developer"
    49             },
    50             {
    51                 "name": "kouinkouin",
    52                 "email": "me@kouinkouin.com",
    53                 "role": "Developer"
    54             },
    55             {
    56                 "name": "Tijs Verkoyen",
    57                 "email": "bpost@verkoyen.eu",
    58                 "role": "Developer"
    59             }
    60         ],
    61         "description": "bpost API library is a PHP library to communicate with the bpost API.",
    62         "homepage": "https://github.com/Antidot-be/bpost-api-library",
    63         "support": {
    64             "issues": "https://github.com/Antidot-be/bpost-api-library/issues",
    65             "source": "https://github.com/Antidot-be/bpost-api-library/tree/3.4.11"
     175        {
     176            "name": "psr/log",
     177            "version": "1.1.4",
     178            "version_normalized": "1.1.4.0",
     179            "source": {
     180                "type": "git",
     181                "url": "https://github.com/php-fig/log.git",
     182                "reference": "d49695b909c3b7628b6289db5479a1c204601f11"
     183            },
     184            "dist": {
     185                "type": "zip",
     186                "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11",
     187                "reference": "d49695b909c3b7628b6289db5479a1c204601f11",
     188                "shasum": ""
     189            },
     190            "require": {
     191                "php": ">=5.3.0"
     192            },
     193            "time": "2021-05-03T11:20:27+00:00",
     194            "type": "library",
     195            "extra": {
     196                "branch-alias": {
     197                    "dev-master": "1.1.x-dev"
     198                }
     199            },
     200            "installation-source": "dist",
     201            "autoload": {
     202                "psr-4": {
     203                    "Psr\\Log\\": "Psr/Log/"
     204                }
     205            },
     206            "notification-url": "https://packagist.org/downloads/",
     207            "license": [
     208                "MIT"
     209            ],
     210            "authors": [
     211                {
     212                    "name": "PHP-FIG",
     213                    "homepage": "https://www.php-fig.org/"
     214                }
     215            ],
     216            "description": "Common interface for logging libraries",
     217            "homepage": "https://github.com/php-fig/log",
     218            "keywords": [
     219                "log",
     220                "psr",
     221                "psr-3"
     222            ],
     223            "support": {
     224                "source": "https://github.com/php-fig/log/tree/1.1.4"
     225            },
     226            "install-path": "../psr/log"
    66227        }
    67     },
    68     {
    69         "name": "monolog/monolog",
    70         "version": "2.9.1",
    71         "version_normalized": "2.9.1.0",
    72         "source": {
    73             "type": "git",
    74             "url": "https://github.com/Seldaek/monolog.git",
    75             "reference": "f259e2b15fb95494c83f52d3caad003bbf5ffaa1"
    76         },
    77         "dist": {
    78             "type": "zip",
    79             "url": "https://api.github.com/repos/Seldaek/monolog/zipball/f259e2b15fb95494c83f52d3caad003bbf5ffaa1",
    80             "reference": "f259e2b15fb95494c83f52d3caad003bbf5ffaa1",
    81             "shasum": ""
    82         },
    83         "require": {
    84             "php": ">=7.2",
    85             "psr/log": "^1.0.1 || ^2.0 || ^3.0"
    86         },
    87         "provide": {
    88             "psr/log-implementation": "1.0.0 || 2.0.0 || 3.0.0"
    89         },
    90         "require-dev": {
    91             "aws/aws-sdk-php": "^2.4.9 || ^3.0",
    92             "doctrine/couchdb": "~1.0@dev",
    93             "elasticsearch/elasticsearch": "^7 || ^8",
    94             "ext-json": "*",
    95             "graylog2/gelf-php": "^1.4.2 || ^2@dev",
    96             "guzzlehttp/guzzle": "^7.4",
    97             "guzzlehttp/psr7": "^2.2",
    98             "mongodb/mongodb": "^1.8",
    99             "php-amqplib/php-amqplib": "~2.4 || ^3",
    100             "phpspec/prophecy": "^1.15",
    101             "phpstan/phpstan": "^0.12.91",
    102             "phpunit/phpunit": "^8.5.14",
    103             "predis/predis": "^1.1 || ^2.0",
    104             "rollbar/rollbar": "^1.3 || ^2 || ^3",
    105             "ruflin/elastica": "^7",
    106             "swiftmailer/swiftmailer": "^5.3|^6.0",
    107             "symfony/mailer": "^5.4 || ^6",
    108             "symfony/mime": "^5.4 || ^6"
    109         },
    110         "suggest": {
    111             "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB",
    112             "doctrine/couchdb": "Allow sending log messages to a CouchDB server",
    113             "elasticsearch/elasticsearch": "Allow sending log messages to an Elasticsearch server via official client",
    114             "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)",
    115             "ext-curl": "Required to send log messages using the IFTTTHandler, the LogglyHandler, the SendGridHandler, the SlackWebhookHandler or the TelegramBotHandler",
    116             "ext-mbstring": "Allow to work properly with unicode symbols",
    117             "ext-mongodb": "Allow sending log messages to a MongoDB server (via driver)",
    118             "ext-openssl": "Required to send log messages using SSL",
    119             "ext-sockets": "Allow sending log messages to a Syslog server (via UDP driver)",
    120             "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server",
    121             "mongodb/mongodb": "Allow sending log messages to a MongoDB server (via library)",
    122             "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib",
    123             "rollbar/rollbar": "Allow sending log messages to Rollbar",
    124             "ruflin/elastica": "Allow sending log messages to an Elastic Search server"
    125         },
    126         "time": "2023-02-06T13:44:46+00:00",
    127         "type": "library",
    128         "extra": {
    129             "branch-alias": {
    130                 "dev-main": "2.x-dev"
    131             }
    132         },
    133         "installation-source": "dist",
    134         "autoload": {
    135             "psr-4": {
    136                 "Monolog\\": "src/Monolog"
    137             }
    138         },
    139         "notification-url": "https://packagist.org/downloads/",
    140         "license": [
    141             "MIT"
    142         ],
    143         "authors": [
    144             {
    145                 "name": "Jordi Boggiano",
    146                 "email": "j.boggiano@seld.be",
    147                 "homepage": "https://seld.be"
    148             }
    149         ],
    150         "description": "Sends your logs to files, sockets, inboxes, databases and various web services",
    151         "homepage": "https://github.com/Seldaek/monolog",
    152         "keywords": [
    153             "log",
    154             "logging",
    155             "psr-3"
    156         ],
    157         "support": {
    158             "issues": "https://github.com/Seldaek/monolog/issues",
    159             "source": "https://github.com/Seldaek/monolog/tree/2.9.1"
    160         }
    161     },
    162     {
    163         "name": "psr/log",
    164         "version": "1.1.4",
    165         "version_normalized": "1.1.4.0",
    166         "source": {
    167             "type": "git",
    168             "url": "https://github.com/php-fig/log.git",
    169             "reference": "d49695b909c3b7628b6289db5479a1c204601f11"
    170         },
    171         "dist": {
    172             "type": "zip",
    173             "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11",
    174             "reference": "d49695b909c3b7628b6289db5479a1c204601f11",
    175             "shasum": ""
    176         },
    177         "require": {
    178             "php": ">=5.3.0"
    179         },
    180         "time": "2021-05-03T11:20:27+00:00",
    181         "type": "library",
    182         "extra": {
    183             "branch-alias": {
    184                 "dev-master": "1.1.x-dev"
    185             }
    186         },
    187         "installation-source": "dist",
    188         "autoload": {
    189             "psr-4": {
    190                 "Psr\\Log\\": "Psr/Log/"
    191             }
    192         },
    193         "notification-url": "https://packagist.org/downloads/",
    194         "license": [
    195             "MIT"
    196         ],
    197         "authors": [
    198             {
    199                 "name": "PHP-FIG",
    200                 "homepage": "https://www.php-fig.org/"
    201             }
    202         ],
    203         "description": "Common interface for logging libraries",
    204         "homepage": "https://github.com/php-fig/log",
    205         "keywords": [
    206             "log",
    207             "psr",
    208             "psr-3"
    209         ],
    210         "support": {
    211             "source": "https://github.com/php-fig/log/tree/1.1.4"
    212         }
    213     }
    214 ]
     228    ],
     229    "dev": false,
     230    "dev-package-names": []
     231}
  • bpost-shipping/trunk/vendor/composer/installed.php

    r2890340 r3068120  
    66        'install_path' => __DIR__ . '/../../',
    77        'aliases' => array(),
    8         'reference' => NULL,
     8        'reference' => null,
    99        'name' => 'antidot/woocommerce-bpost-shipping',
    10         'dev' => true,
     10        'dev' => false,
    1111    ),
    1212    'versions' => array(
     
    2626            'install_path' => __DIR__ . '/../../',
    2727            'aliases' => array(),
    28             'reference' => NULL,
     28            'reference' => null,
    2929            'dev_requirement' => false,
    30         ),
    31         'dealerdirect/phpcodesniffer-composer-installer' => array(
    32             'pretty_version' => 'v1.0.0',
    33             'version' => '1.0.0.0',
    34             'type' => 'composer-plugin',
    35             'install_path' => __DIR__ . '/../dealerdirect/phpcodesniffer-composer-installer',
    36             'aliases' => array(),
    37             'reference' => '4be43904336affa5c2f70744a348312336afd0da',
    38             'dev_requirement' => true,
    39         ),
    40         'doctrine/deprecations' => array(
    41             'pretty_version' => 'v1.0.0',
    42             'version' => '1.0.0.0',
    43             'type' => 'library',
    44             'install_path' => __DIR__ . '/../doctrine/deprecations',
    45             'aliases' => array(),
    46             'reference' => '0e2a4f1f8cdfc7a92ec3b01c9334898c806b30de',
    47             'dev_requirement' => true,
    48         ),
    49         'doctrine/instantiator' => array(
    50             'pretty_version' => '1.5.0',
    51             'version' => '1.5.0.0',
    52             'type' => 'library',
    53             'install_path' => __DIR__ . '/../doctrine/instantiator',
    54             'aliases' => array(),
    55             'reference' => '0a0fa9780f5d4e507415a065172d26a98d02047b',
    56             'dev_requirement' => true,
    57         ),
    58         'facebook/webdriver' => array(
    59             'dev_requirement' => true,
    60             'replaced' => array(
    61                 0 => '*',
    62             ),
    6330        ),
    6431        'monolog/monolog' => array(
     
    7037            'reference' => 'f259e2b15fb95494c83f52d3caad003bbf5ffaa1',
    7138            'dev_requirement' => false,
    72         ),
    73         'myclabs/deep-copy' => array(
    74             'pretty_version' => '1.11.1',
    75             'version' => '1.11.1.0',
    76             'type' => 'library',
    77             'install_path' => __DIR__ . '/../myclabs/deep-copy',
    78             'aliases' => array(),
    79             'reference' => '7284c22080590fb39f2ffa3e9057f10a4ddd0e0c',
    80             'dev_requirement' => true,
    81         ),
    82         'phar-io/manifest' => array(
    83             'pretty_version' => '1.0.1',
    84             'version' => '1.0.1.0',
    85             'type' => 'library',
    86             'install_path' => __DIR__ . '/../phar-io/manifest',
    87             'aliases' => array(),
    88             'reference' => '2df402786ab5368a0169091f61a7c1e0eb6852d0',
    89             'dev_requirement' => true,
    90         ),
    91         'phar-io/version' => array(
    92             'pretty_version' => '1.0.1',
    93             'version' => '1.0.1.0',
    94             'type' => 'library',
    95             'install_path' => __DIR__ . '/../phar-io/version',
    96             'aliases' => array(),
    97             'reference' => 'a70c0ced4be299a63d32fa96d9281d03e94041df',
    98             'dev_requirement' => true,
    99         ),
    100         'php-webdriver/webdriver' => array(
    101             'pretty_version' => '1.14.0',
    102             'version' => '1.14.0.0',
    103             'type' => 'library',
    104             'install_path' => __DIR__ . '/../php-webdriver/webdriver',
    105             'aliases' => array(),
    106             'reference' => '3ea4f924afb43056bf9c630509e657d951608563',
    107             'dev_requirement' => true,
    108         ),
    109         'phpdocumentor/reflection-common' => array(
    110             'pretty_version' => '2.2.0',
    111             'version' => '2.2.0.0',
    112             'type' => 'library',
    113             'install_path' => __DIR__ . '/../phpdocumentor/reflection-common',
    114             'aliases' => array(),
    115             'reference' => '1d01c49d4ed62f25aa84a747ad35d5a16924662b',
    116             'dev_requirement' => true,
    117         ),
    118         'phpdocumentor/reflection-docblock' => array(
    119             'pretty_version' => '5.3.0',
    120             'version' => '5.3.0.0',
    121             'type' => 'library',
    122             'install_path' => __DIR__ . '/../phpdocumentor/reflection-docblock',
    123             'aliases' => array(),
    124             'reference' => '622548b623e81ca6d78b721c5e029f4ce664f170',
    125             'dev_requirement' => true,
    126         ),
    127         'phpdocumentor/type-resolver' => array(
    128             'pretty_version' => '1.7.1',
    129             'version' => '1.7.1.0',
    130             'type' => 'library',
    131             'install_path' => __DIR__ . '/../phpdocumentor/type-resolver',
    132             'aliases' => array(),
    133             'reference' => 'dfc078e8af9c99210337325ff5aa152872c98714',
    134             'dev_requirement' => true,
    135         ),
    136         'phpspec/prophecy' => array(
    137             'pretty_version' => 'v1.10.3',
    138             'version' => '1.10.3.0',
    139             'type' => 'library',
    140             'install_path' => __DIR__ . '/../phpspec/prophecy',
    141             'aliases' => array(),
    142             'reference' => '451c3cd1418cf640de218914901e51b064abb093',
    143             'dev_requirement' => true,
    144         ),
    145         'phpstan/phpdoc-parser' => array(
    146             'pretty_version' => '1.16.1',
    147             'version' => '1.16.1.0',
    148             'type' => 'library',
    149             'install_path' => __DIR__ . '/../phpstan/phpdoc-parser',
    150             'aliases' => array(),
    151             'reference' => 'e27e92d939e2e3636f0a1f0afaba59692c0bf571',
    152             'dev_requirement' => true,
    153         ),
    154         'phpunit/php-code-coverage' => array(
    155             'pretty_version' => '5.3.2',
    156             'version' => '5.3.2.0',
    157             'type' => 'library',
    158             'install_path' => __DIR__ . '/../phpunit/php-code-coverage',
    159             'aliases' => array(),
    160             'reference' => 'c89677919c5dd6d3b3852f230a663118762218ac',
    161             'dev_requirement' => true,
    162         ),
    163         'phpunit/php-file-iterator' => array(
    164             'pretty_version' => '1.4.5',
    165             'version' => '1.4.5.0',
    166             'type' => 'library',
    167             'install_path' => __DIR__ . '/../phpunit/php-file-iterator',
    168             'aliases' => array(),
    169             'reference' => '730b01bc3e867237eaac355e06a36b85dd93a8b4',
    170             'dev_requirement' => true,
    171         ),
    172         'phpunit/php-text-template' => array(
    173             'pretty_version' => '1.2.1',
    174             'version' => '1.2.1.0',
    175             'type' => 'library',
    176             'install_path' => __DIR__ . '/../phpunit/php-text-template',
    177             'aliases' => array(),
    178             'reference' => '31f8b717e51d9a2afca6c9f046f5d69fc27c8686',
    179             'dev_requirement' => true,
    180         ),
    181         'phpunit/php-timer' => array(
    182             'pretty_version' => '1.0.9',
    183             'version' => '1.0.9.0',
    184             'type' => 'library',
    185             'install_path' => __DIR__ . '/../phpunit/php-timer',
    186             'aliases' => array(),
    187             'reference' => '3dcf38ca72b158baf0bc245e9184d3fdffa9c46f',
    188             'dev_requirement' => true,
    189         ),
    190         'phpunit/php-token-stream' => array(
    191             'pretty_version' => '2.0.2',
    192             'version' => '2.0.2.0',
    193             'type' => 'library',
    194             'install_path' => __DIR__ . '/../phpunit/php-token-stream',
    195             'aliases' => array(),
    196             'reference' => '791198a2c6254db10131eecfe8c06670700904db',
    197             'dev_requirement' => true,
    198         ),
    199         'phpunit/phpunit' => array(
    200             'pretty_version' => '6.5.14',
    201             'version' => '6.5.14.0',
    202             'type' => 'library',
    203             'install_path' => __DIR__ . '/../phpunit/phpunit',
    204             'aliases' => array(),
    205             'reference' => 'bac23fe7ff13dbdb461481f706f0e9fe746334b7',
    206             'dev_requirement' => true,
    207         ),
    208         'phpunit/phpunit-mock-objects' => array(
    209             'pretty_version' => '5.0.10',
    210             'version' => '5.0.10.0',
    211             'type' => 'library',
    212             'install_path' => __DIR__ . '/../phpunit/phpunit-mock-objects',
    213             'aliases' => array(),
    214             'reference' => 'cd1cf05c553ecfec36b170070573e540b67d3f1f',
    215             'dev_requirement' => true,
    216         ),
    217         'phpunit/phpunit-selenium' => array(
    218             'pretty_version' => '4.1.0',
    219             'version' => '4.1.0.0',
    220             'type' => 'library',
    221             'install_path' => __DIR__ . '/../phpunit/phpunit-selenium',
    222             'aliases' => array(),
    223             'reference' => '9872e1d452f44976ca9f4e3fab2a33f8f9c4bcdc',
    224             'dev_requirement' => true,
    22539        ),
    22640        'psr/log' => array(
     
    23953            ),
    24054        ),
    241         'sebastian/code-unit-reverse-lookup' => array(
    242             'pretty_version' => '1.0.2',
    243             'version' => '1.0.2.0',
    244             'type' => 'library',
    245             'install_path' => __DIR__ . '/../sebastian/code-unit-reverse-lookup',
    246             'aliases' => array(),
    247             'reference' => '1de8cd5c010cb153fcd68b8d0f64606f523f7619',
    248             'dev_requirement' => true,
    249         ),
    250         'sebastian/comparator' => array(
    251             'pretty_version' => '2.1.3',
    252             'version' => '2.1.3.0',
    253             'type' => 'library',
    254             'install_path' => __DIR__ . '/../sebastian/comparator',
    255             'aliases' => array(),
    256             'reference' => '34369daee48eafb2651bea869b4b15d75ccc35f9',
    257             'dev_requirement' => true,
    258         ),
    259         'sebastian/diff' => array(
    260             'pretty_version' => '2.0.1',
    261             'version' => '2.0.1.0',
    262             'type' => 'library',
    263             'install_path' => __DIR__ . '/../sebastian/diff',
    264             'aliases' => array(),
    265             'reference' => '347c1d8b49c5c3ee30c7040ea6fc446790e6bddd',
    266             'dev_requirement' => true,
    267         ),
    268         'sebastian/environment' => array(
    269             'pretty_version' => '3.1.0',
    270             'version' => '3.1.0.0',
    271             'type' => 'library',
    272             'install_path' => __DIR__ . '/../sebastian/environment',
    273             'aliases' => array(),
    274             'reference' => 'cd0871b3975fb7fc44d11314fd1ee20925fce4f5',
    275             'dev_requirement' => true,
    276         ),
    277         'sebastian/exporter' => array(
    278             'pretty_version' => '3.1.5',
    279             'version' => '3.1.5.0',
    280             'type' => 'library',
    281             'install_path' => __DIR__ . '/../sebastian/exporter',
    282             'aliases' => array(),
    283             'reference' => '73a9676f2833b9a7c36968f9d882589cd75511e6',
    284             'dev_requirement' => true,
    285         ),
    286         'sebastian/global-state' => array(
    287             'pretty_version' => '2.0.0',
    288             'version' => '2.0.0.0',
    289             'type' => 'library',
    290             'install_path' => __DIR__ . '/../sebastian/global-state',
    291             'aliases' => array(),
    292             'reference' => 'e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4',
    293             'dev_requirement' => true,
    294         ),
    295         'sebastian/object-enumerator' => array(
    296             'pretty_version' => '3.0.4',
    297             'version' => '3.0.4.0',
    298             'type' => 'library',
    299             'install_path' => __DIR__ . '/../sebastian/object-enumerator',
    300             'aliases' => array(),
    301             'reference' => 'e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2',
    302             'dev_requirement' => true,
    303         ),
    304         'sebastian/object-reflector' => array(
    305             'pretty_version' => '1.1.2',
    306             'version' => '1.1.2.0',
    307             'type' => 'library',
    308             'install_path' => __DIR__ . '/../sebastian/object-reflector',
    309             'aliases' => array(),
    310             'reference' => '9b8772b9cbd456ab45d4a598d2dd1a1bced6363d',
    311             'dev_requirement' => true,
    312         ),
    313         'sebastian/recursion-context' => array(
    314             'pretty_version' => '3.0.1',
    315             'version' => '3.0.1.0',
    316             'type' => 'library',
    317             'install_path' => __DIR__ . '/../sebastian/recursion-context',
    318             'aliases' => array(),
    319             'reference' => '367dcba38d6e1977be014dc4b22f47a484dac7fb',
    320             'dev_requirement' => true,
    321         ),
    322         'sebastian/resource-operations' => array(
    323             'pretty_version' => '1.0.0',
    324             'version' => '1.0.0.0',
    325             'type' => 'library',
    326             'install_path' => __DIR__ . '/../sebastian/resource-operations',
    327             'aliases' => array(),
    328             'reference' => 'ce990bb21759f94aeafd30209e8cfcdfa8bc3f52',
    329             'dev_requirement' => true,
    330         ),
    331         'sebastian/version' => array(
    332             'pretty_version' => '2.0.1',
    333             'version' => '2.0.1.0',
    334             'type' => 'library',
    335             'install_path' => __DIR__ . '/../sebastian/version',
    336             'aliases' => array(),
    337             'reference' => '99732be0ddb3361e16ad77b68ba41efc8e979019',
    338             'dev_requirement' => true,
    339         ),
    340         'squizlabs/php_codesniffer' => array(
    341             'pretty_version' => '3.7.2',
    342             'version' => '3.7.2.0',
    343             'type' => 'library',
    344             'install_path' => __DIR__ . '/../squizlabs/php_codesniffer',
    345             'aliases' => array(),
    346             'reference' => 'ed8e00df0a83aa96acf703f8c2979ff33341f879',
    347             'dev_requirement' => true,
    348         ),
    349         'symfony/polyfill-mbstring' => array(
    350             'pretty_version' => 'v1.27.0',
    351             'version' => '1.27.0.0',
    352             'type' => 'library',
    353             'install_path' => __DIR__ . '/../symfony/polyfill-mbstring',
    354             'aliases' => array(),
    355             'reference' => '8ad114f6b39e2c98a8b0e3bd907732c207c2b534',
    356             'dev_requirement' => true,
    357         ),
    358         'symfony/polyfill-php80' => array(
    359             'pretty_version' => 'v1.27.0',
    360             'version' => '1.27.0.0',
    361             'type' => 'library',
    362             'install_path' => __DIR__ . '/../symfony/polyfill-php80',
    363             'aliases' => array(),
    364             'reference' => '7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936',
    365             'dev_requirement' => true,
    366         ),
    367         'symfony/process' => array(
    368             'pretty_version' => 'v5.4.21',
    369             'version' => '5.4.21.0',
    370             'type' => 'library',
    371             'install_path' => __DIR__ . '/../symfony/process',
    372             'aliases' => array(),
    373             'reference' => 'd4ce417ebcb0b7d090b4c178ed6d3accc518e8bd',
    374             'dev_requirement' => true,
    375         ),
    376         'theseer/tokenizer' => array(
    377             'pretty_version' => '1.2.1',
    378             'version' => '1.2.1.0',
    379             'type' => 'library',
    380             'install_path' => __DIR__ . '/../theseer/tokenizer',
    381             'aliases' => array(),
    382             'reference' => '34a41e998c2183e22995f158c581e7b5e755ab9e',
    383             'dev_requirement' => true,
    384         ),
    385         'webmozart/assert' => array(
    386             'pretty_version' => '1.11.0',
    387             'version' => '1.11.0.0',
    388             'type' => 'library',
    389             'install_path' => __DIR__ . '/../webmozart/assert',
    390             'aliases' => array(),
    391             'reference' => '11cb2199493b2f8a3b53e7f19068fc6aac760991',
    392             'dev_requirement' => true,
    393         ),
    394         'wp-coding-standards/wpcs' => array(
    395             'pretty_version' => '2.3.0',
    396             'version' => '2.3.0.0',
    397             'type' => 'phpcodesniffer-standard',
    398             'install_path' => __DIR__ . '/../wp-coding-standards/wpcs',
    399             'aliases' => array(),
    400             'reference' => '7da1894633f168fe244afc6de00d141f27517b62',
    401             'dev_requirement' => true,
    402         ),
    40355    ),
    40456);
Note: See TracChangeset for help on using the changeset viewer.