Repository navigation
6.7.0
Immutable
release. Only release title and notes can be modified.
SEPA information decoded from the 05 detail records, the IBAN of an account, an OperationCode enum, readers that detect the format and stream large files, and JSON for every object.
Added
- SEPA information, decoded from the
05detail records by their qualifier (CFONB, Evolutions du relevé de compte 120
caractères, version 2.0):Operation::getSepaInformation()returns aSepaInformationwith the payer, the
beneficiary, the ultimate debtor and creditor (names, identifiers and their types), the remittance information (the
LCCandLC2lines joined, up to 140 characters), the structured remittance information, the end-to-end reference
and the purpose, the remittance and transaction references, the original amount and exchange rate of a transfer
(OriginalAmount), the accounts, and the mandate reference and sequence type of a direct debit. Each getter isnull
when the bank sends no detail record of its qualifier Operation::getFullLabel(): the label followed by theLIBdetail lines.Operation::getDetailsByQualifier()and
Operation::getDetail()find the details of a qualifier, given as a string or aDetailQualifierenum, the 18
qualifiers of the CFONB with their French labelsOperationDetail::getDetailQualifier(),OperationDetail::getAdditionalInformationField()(a field of the
additional information at a fixed offset, for the qualifiers that hold two), andOperationDetail::getOperationCode()- The
OperationCodeenum, the CFONB operation codes ofCfonbCodes::$codeswithlabel(),direction()(a
Directionenum:Debit,Credit,DebitOrCredit,CreditOrDebit),swiftCode()andswiftLabel().
Operation::getOperationCode()returns the case of an operation,nullfor a code the CFONB does not define Account, built byStatement::getAccount(),Balance::getAccount()andOperation::getAccount(): the bank code,
desk code and account number, with the RIB key (getRibKey()), the BBAN and the IBAN (getIban(),
getFormattedIban();FRby default,MCfor Monaco)CfonbReader::parse()reads a CFONB 120 or a CFONB 240 file, detected by the record code of its first line with the
newCfonbFormatenum (CfonbFormat::fromContent(),tryFromContent())Cfonb120Reader::iterate()andCfonb240Reader::iterate()yield the statements and transfers one by one, each as soon
as its closing record is read.iterateFile()reads a file line by line, so that the memory used does not grow with
the size of the file, and throws aRuntimeExceptionwhen the file cannot be openedtoArray()andJsonSerializableonStatement,Balance,Operation,OperationDetail,Transfer,Header,
Transaction,Total,SepaInformation,OriginalAmountandAccount: snake_case keys, dates asY-m-d, amounts
as exact decimal strings- Constructors that build a statement, a transfer or an operation at once:
new Statement($oldBalance, $newBalance, $operations),new Transfer($header, $transactions, $total), and the details as the last argument ofOperation.
Operation::withDetails()returns a copy with other details. The readers build them this way Transaction::getCurrencyIndex(),Transaction::getAmount(),Total::getAmount()and
OperationDetail::getAdditionalInformation(), the names of the getters they replace (see Deprecated)
Changed
parse()returns a list (list<Statement>,list<Transfer>) for static analysis, andgetOperations(),
getDetails()andgetTransactions()too: the values are the same
Fixed
- The label of the operation code
A5is "Prélèvements SEPA – reversements émis (par le créancier ou sa banque)": it
was the label ofA6, the business-to-business (interentreprises) one
Deprecated
7.0 removes them:
CfonbCodes: use theOperationCodeenum,OperationCode::tryFrom($code)?->label()Transaction::getCurIndex(),Transaction::getTransactionAmount(),Total::getTotalAmount()and
OperationDetail::getAdditionalInformations(): usegetCurrencyIndex(),getAmount()and
getAdditionalInformation()- The setters of the parsed objects, which 7.0 makes immutable:
Statement::setOldBalance(),setNewBalance()and
addOperation(),Transfer::setHeader(),addTransaction()andsetTotal(),Operation::addDetails(). Pass the
values to the constructors, or useOperation::withDetails()