silarhi / cfonb-parser Goto Github PK
View Code? Open in Web Editor NEWA zero dependencies PHP parser for CFONB 120 / 240 format
Home Page: https://silarhi.fr
License: MIT License
A zero dependencies PHP parser for CFONB 120 / 240 format
Home Page: https://silarhi.fr
License: MIT License
Hello,
I receive the attached cfonb files from CIC and the parser is not working, i get the attached error
20221205.99.283300.releveautomatique.2f8d7d8a_20221205_052803 (1).txt
Can you help me?
Regards
First of all thanks for this amazing package.
During parsing i encounter several issue parsing cfonb from CIC.
But the most annoying is that 05 line (OperationDetail) are on multi line.
Are you okay if i make a PR to fix this ? (knowing that you actually throw an Exception if multiple 05 line are found for the same 01 line)
Thanks in advance :)
Some cfonb files does not follow strictly the spec and have empty values where is must not be.
Actually the lib raise an exception during parsing, but user should be able to opt out this feature.
We need to keep BC & tests working from php 7.2 to php 8.
This lead us to keep 2 phpunit files, one for phpunit 8 and the other for phpunit 9.
Maybe the solution is to use phpunit 8 only for now.
WDYT @fezfez?
Hello
I have an error since 8 days.
From this code :
/**
* @return Statement[]
*/
public function getStatements(Transaction $transaction): array
{
$content = wordwrap($transaction->getPlainOrderData(), 120, " \n", true);
$reader = new Cfonb120Reader();
return $reader->parse($content);
}
Error :
Unable to find a parser for the line :
"0430004056800041EUR2 0001015354918281223 281223DE BRUYNE JULIETTE EI 0000000 "
(there is this space between EI and 0000000 '********' github remove it in this window.)
from :
/vendor/silarhi/cfonb-parser/src/Parser/FileParser.php dans Silarhi\Cfonb\Parser\FileParser::findSupportedParserForLine ร la ligne 61
Can you help me please ?
I suspect that this line does not reading by reader. Am I wrong?
What do you think about this pattern for lib?
For users is simpler to know about single class that gathering all allowed methods for lib.
like here https://github.com/andrew-svirin/cfonb-php/blob/master/src/CfonbParser.php
https://refactoring.guru/fr/design-patterns/facade
Also this approach simplifies access to lib, because it is enough to add to container single lib.
Hi!
I used your library today, and i have a little, i have an official bank extract where the reference field is empty in the 04 line.
So the contruct of the Operation object failed because the field 'reference' cannot be null.
Could you think it is possible to make it nullable (?string reference instead of string reference) ?
I know that in the documentation of the format, the field is mandatory, but if it is empty...
Thank you.
Sylvain
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.