DivideBV/Postnl

composer require dividebv/postnl

Closed this issue · 3 comments

qlt commented

After running "composer clear-cache" and "composer require dividebv/postnl" it installs version 1.2.1. For some reason the downloaded files don't contain the same source code as the files I see on GitHub. For example, the downloaded Postnl.php file contains the following code:

public function __construct(
    $customerNumber,
    $customerCode,
    $customerName,
    $username,
    $password,
    $collectionLocation,
    $globalPack,
    $sandbox = false
) {
    $this->customerNumber = $customerNumber;
    $this->customerCode = $customerCode;
    $this->customerName = $customerName;
    $this->securityHeader = new ComplexTypes\SecurityHeader($username, $password);
    $this->collectionLocation = $collectionLocation;
    $this->globalPackBarcodeType = preg_filter('/^(.{2})(.{4})$/', '$1', $globalPack);
    $this->globalPackCustomerCode = preg_filter('/^(.{2})(.{4})$/', '$2', $globalPack);
    $this->sandbox = $sandbox;
}

Am I doing something wrong or is something not working properly?

That's because the 2.0 releases so far have been betas. You can force installation of the beta version by either setting composer's minimum-stability or making an exception for this lib with composer require dividebv/postnl:^2.0.0-beta2

qlt commented

That's because the 2.0 releases so far have been betas. You can force installation of the beta version by either setting composer's minimum-stability or making an exception for this lib with composer require dividebv/postnl:^2.0.0-beta2

Thanks a lot for taking the time to explain this to me.

You're welcome!