All notable changes to mjaschen/collmex
will be documented in this file.
This project adheres to Semantic Versioning.
Updates should follow the Keep a CHANGELOG
principles.
InvoiceOutput
type. Thanks @Johnny99211!
- support for PHP 8
- removed duplicate array key in
TypeFactory
AddressGroups
andAddressGroupsGet
types. Thanks @Johnny99211!
Address
type. Thanks @Johnny99211!
MultiRequest
class for easily sending multiple records to the Collmex API. Thanks @timopaulAbstractRequest
andRequestInterface
- new types
PRDGRP
andPRODUCT_GROUPS_GET
TypeFactory
now uses a mapping array instead of a huge switch/case for creating instances of response records.Request
extends the newAbstractRequest
class
Voucher
andVoucherGet
types. Thanks @flowdee!
- support for Laravel 7.x in Composer dependencies
- field
account_id
inPaymentConfirmation
- add missing type casting for Collmex response error line value
- type error when trying to extract the CSV data from a
ZipResponse
ProductionOrder
andProductionOrderGet
types
Warning: Backwards-compatibility-breaking changes
- increase the minimum required PHP version to 7.1
- prod dependencies for several used libraries are raised:
"neitanod/forceutf8": "^2.0"
"symfony/finder": "^4.0"
"symfony/http-foundation": "^4.0"
- all dev dependencies (except for PHPUnit) are required at their current major release
- upgrade to PHPUnit 7
- use strict comparisons where suitable
- use proper camelCase for all method names (
toJSON()
→toJson()
,getJSON()
→getJson()
) - use the
strict_types=1
execution directive globally - use return type hints globally
- use method argument type hints globally (where suitable)
- introduced visibility declarations for all class constants (all constants in the Type classes were kept public)
- reduce the visibility of some
Response
methods - Throw an exception if a Zip cannot be opened:
ZipArchive::open()
returns error codes on failure, notfalse
- change behaviour for invalid Zip responses: If a Zip response doesn't contain the CSV part, an
InvalidZipResponseException
is thrown as such a response is invalid regarding to the Collmex documentation. The previous behaviour was to silently accept such an invalid response and returnnull
. - Hard-code the CSV delimiter and enclosure: As the delimiter and enclosure are not subject to change for Collmex, they're hardcoded to reduce code complexity
- update the Collmex API Base URL
- added @oliverklee to
composer.json
as developer
- drop LeagueParser, as
SimpleParser
works well enough for CSV files with current versions of PHP - remove the deprecated FilterInterface::filter method, as this method has been deprecated in the past
- drop the parser parameter from the request constructor: there is only one parser here, and there is no need for this flexibility now.
- drop the generator parameter from the AbstractType constructor: now that there is only one generator, there is no need to be flexible about the kind of generator that is used.
Warning: Backwards-compatibility-breaking changes
- support for PHP 5.6 was dropped, PHP 7.0 is the minimum required version now
- added support for PHP 7.3 for Composer and Travis-CI
- re-enabled Psalm static analysis in Travis-CI runs
- updated Psalm to version 3
- CodeSniffer runs against PSR-2 and PSR-12 rules now
- simplified composer install for Travis-CI; settings moved to
composer.json
Warning: Backwards-compatibility-breaking changes
- support for
StockChange
inTypeFactory
. Thanks to @Argee88! - new field
not_confirmed
inShipmentConfirm
- field names renamed in
StockChange
:supplier_order_id
→purchase_order_id
supplier_order_position
→purchase_order_position
- new type
PriceGroupsGet
(PRICE_GROUPS_GET
). Thanks to @Argee88! - new type
PriceGroup
(PRICE_GROUP
). Thanks to @Argee88!
- add PHP 7.3 to the list of supported versions in Composer config
- typo in field name
quantitiy
→quantity
inDelivery
type was introduced again during a merge, it's fixed now – Warning: breaks backwards compatibility!
Warning: Backwards-compatibility-breaking changes
- new type
StockChange
(STOCK_CHANGE
). Thanks to @Argee88! - new type
StockChangeGet
(STOCK_CHANGE_GET
). Thanks to @Argee88! - new type
ShipmentOrdersGet
(SHIPMENT_ORDERS_GET
). Thanks to @Argee88!
- fix Psalm type warnings. Thanks to @oliverklee!
- add missing required PHP extensions to the
composer.json
. Thanks to @oliverklee! - field name
quantitiy
→quantity
inDelivery
type – Warning: breaks backwards compatibility!
- misc. code cleanups. Thanks to @oliverklee!
- support for League CSV 9.x alongside 8.x
- update
DeliveryGet
to match fields with the documentation - update README with an example on how to use a custom CSV parser for API responses
- new type
ShipmentConfirm
(SHIPMENT_CONFIRM
). Thanks to @Argee88!
- new type
SendShipmentNotification
(SHIPMENT_NOTIFICATION_SEND
). Thanks to @Argee88!
- new field
output_required
inInvoiceGet
type
- class constants for output media (type
InvoiceOutputSet
)
- new type
InvoiceOutputSet
(INVOICE_OUTPUT_SET
)
- new types
BillOfMaterial
(CMXBOM
) andBillOfMaterialGet
(BILL_OF_MATERIAL_GET
). Thanks to @Argee88!
- new types
ProjectStaff
(PROJECT_STAFF
) andProjectStaffGet
(PROJECT_STAFF_GET
). Thanks to @Naoray!
- new
AccountDocument
(ACCDOC
),AccountDocumentGet
(ACCDOC_GET
). Thanks to @Naoray!
- Typo in type identifier (
ACCBAL
→ACC_BAL
). Thanks to @Naoray!
- Types
OPEN_ITEM
andOPEN_ITEMS_GET
. Thanks to @Argee88!
- Psalm static analyzer to dev requirements.
- Composer scripts for running static analyzer.
- Updated some internals after running a static analysis
- splitted filter method into separate methods for filtering strings and arrays
- removed code duplication
- removed setting attribute with the result of a method which returns void
- replaced switch statement with a simple if
- Updated some PHPDoc blocks after running a static analysis.
- Replaced double quotes with single quotes.
- Typo in type identifier. Thanks to @Naoray!
- New field
storage_bin
inProduct
. Thanks to @Argee88!
- Class names are no longer built dynamically in
TypeFactory
.
- Composer scripts for PHP linting and running tests. Thanks to @oliverklee!
- @property tags in all
Type
doc blocks for better support in IDEs.
- new parser class using the CSV library from The PHP League.
- Type
ACCBAL_GET
. Thanks to @Naoray! - Type
ACCBAL
.
- Updated Invoice type fields to match API. Thanks to @Argee88!
- Support for Laravel package auto-discovery. Thanks to @Naoray!
- Links to Packagist and Travis CI in the README. Thanks to @oliverklee!
- Make the runtime dependencies more lenient. Thanks to @oliverklee!
- Announce PHP compatibility only up to 7.2.x. Thanks to @oliverklee!
- As of version 0.7.0 the Collmex SDK requires at least PHP 5.6.
- new types:
PurchaseOrder
(CMXPOD
) andPurchaseOrderGet
(PURCHASE_ORDER_GET
). Thanks to @Argee88!
- new methods
toArray()
andtoJSON()
for types.
- return type hint for
getCSV()
in doc block.
- updated the included Laravel service provider for compatibility with Laravel 5.x. Thanks to Naoray!
- new types:
Member
(CMXMGD
),MemberGet
(MEMBER_GET
). Thanks to Sebastian Gunreben!
- new type:
TrackingNumber
(TRACKING_NUMBER
). Thanks @Argee88!
- The unparsed contents of the Collmex response can be accessed with
CsvResponse::getResponseRaw()
.
- new type:
ProductPriceChange
(CMXPRI_CHANGE
). Thanks @Argee88!
- new type:
PaymentConfirmation
(PAYMENT_CONFIRMATION
). Thanks @Argee88!
- new types:
Delivery
(CMXDLV
),DeliveryGet
(DELIVERY_GET
),DifferentShippingAddress
(CMXEPF
). Thanks @Argee88! - new fields in
Customer
type. Thanks @Argee88!
- new types:
ProductPrice
(CMXPRI
),ProductPriceGet
(PRODUCT_PRICE_GET
),Stock
(CMXSTK
),StockAvailable
(STOCK_AVAILABLE
),StockAvailableGet
(STOCK_AVAILABLE_GET
),StockGet (
STOCK_GET)
. Thanks @Argee88!
- Verifying field names in mass-assignment (
populateData()
)
- Travis-CI: add PHP 7.1 and remove HHVM.
- new type:
SalesOrderGet
(SALES_ORDER_GET
). Thanks @cryshell!
- Throw
InvalidResponseMimeTypeException
instead of\RuntimeException
.
ResponseInterface
- The ResponseFactory throws an exception if the MIME type can't be determined.
- new type:
SubscriptionGet
(ABO_GET
). Thanks @karameloso!
- new types:
Product
andProductGet
. Thanks @tojibon!
- #2: Invalid CSV is no longer generated if a CSV field contains a backslash
directly followed by a double-quote (fixed only in the
SimpleGenerator
class,LeagueCsvGenerator
still produces invalid CSV)
- the minimum required version of Symfony components is now 2.5.0 (before: 3.0)
- removed meaningless badges from README
league/csv
is installed viarequire-dev
to be able to run the unit tests
- the require-dependency on
league/csv
was changed to suggest, because it's not required for using the Collmex library and I'm trying to reduce the dependencies which are pulled in by default.
- Integrated PHP League CSV, can be used for CSV generation instead of
SimpleGenerator
- Removed PHP 5.4 from Travis CI config
- Updated minimum required PHP version to 5.5.9 (minimum version for Symfony 3.x)
- Updated to Symfony 3.x packages (use the 0.4 branch if you're using Symfony 2.x packages)
- Bugfix: missing return statement in CsvResponse::isError()
- removed support for PHP 5.3; PHP 5.4 is the minimum required PHP version now
- introduced
toJSON()
method for types
- code style fixes to comply with PSR-2
- Check if
line
field in error message is set
TypeFactory
supportsCustomerOrder
type
- new record type
CustomerOrder
(CMXORD-2) - run Travis tests against PHP 5.6
- Updated dependencies (Symfony components 2.3 → 2.5; new UTF-8 encoding fixer)
- initial release