-
Notifications
You must be signed in to change notification settings - Fork 48
Use the UnterstuetzteSEPADatenformateTrait in all Actions to avoid xml namespace missmatches #496
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| <?php | ||
| /** @noinspection PhpUnused */ | ||
|
|
||
| namespace Fhp\Segment; | ||
|
|
||
| interface UnterstuetzteSEPADatenformate | ||
| { | ||
| /** @return string[] */ | ||
| public function getUnterstuetzteSEPADatenformate(): array; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a little odd that we have both spelling variants. Renaming one of them would be a breaking change, but I think we should still do it. Not only would that get rid of the weird fallback here, but it would also make the library's API more consistent for users.
I don't use this API myself, so I don't know whether typical users of this API would have
->unterstuetzteSEPADatenformatein their code. Though I suspect that accessing that field directly isn't generally necessary to use this API. What do you think?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also think we should change it to be consistent, but didn't want to break anything. Thinking about it further, I doubt that people are using
->unterstuetzteSepaDatenformatein their own code.As the spec uses 'SEPA' (and not 'Sepa'), changing
$unterstuetzteSepaDatenformateto$unterstuetzteSEPADatenformateshould do to the trick.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
" I doubt that people are using x" - famous last words. :)
I would suggest any breaking change to be released in a v4.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nemiah Is it easy to do v4? Are there release notes anywhere? Or is there a branch where we can store changes to enter the next breaking release?
It's surprising to me that this would be the first breaking change since v3 five (!) years ago. Maybe this library has a different policy for mildly breaking changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While I'm not against using "SEPA" instead of "Sepa", the spec doesn't make for a relevant argument here. It's written as prose text, where acronyms are fully capitalized, of course. But here we have a camel-case identifier, where the general opinion out there is to treat acronyms like any other words, i.e. without internal capitalization. There's only some side discussions whether this should also apply to very short acronyms or not.
(((One argument I hear often is that transformation to e.g. snake case should be mechanical. So if we want
unterstuetzte_sepa_datenformateand notunterstuetzte_s_e_p_a_datenformate, then the camel case must beunterstuetzteSepaDatenformate, or a typically dumb IDE would make mistakes when transforming automatically. Another argument is that lower-camel-case is otherwise tricky, e.g. should it besEPAFooorsepaFooorsePAFoo. Personally, I don't give these arguments much weight because to a human it's clear what to do in each case; but I still see these cases as an indicator for what's the most proper solution if given no other signal.)))That said, this library is currently not consistent at all:
phpFinTSis the repo name,FinTsis the main class name. In terms of acronyms coming straight from the spec,MT940, segment classes likeHITANandBPDare all-caps, whereasDeg,Kti,Ibanand such are not.So while we can't realistically achieve total consistency across all identifiers in the library, if we want to make
unterstuetzteS???Datenformateconsistent, we should loook at howSEPAis typically spelled elsewhere in this library, to be self-consistent at least. (And ignore the spec.)Some quick grepping shows that
SEPAcurrently has the majority. So I'd err on that side to achieve eventual consistency. Another option (if we want to side-step the breaking change) is to punt on this for now (leave as is, non-breaking) and send a separate commit to a new v4 branch that fixes this plus the few remainingSepacases.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are correct with all your observations. I have no preferences how the names should be.
Right now I would just leave it handling both cases and maybe revisit the problem in a larger context, making everything more consistent.