Open
Conversation
added 2 commits
September 3, 2025 22:37
… back preference for Symfony\Component\Console\Output\OutputInterface
| private function hashRecord(Record $record): string | ||
| { | ||
| return md5(json_encode($record->asArray(), JSON_THROW_ON_ERROR)); | ||
| return hash('sha256', json_encode($record->asArray(), JSON_THROW_ON_ERROR)); |
Contributor
There was a problem hiding this comment.
is this backward compatible?
Author
There was a problem hiding this comment.
I see no reason why it shouldn't be. It's a standard PHP function
Author
There was a problem hiding this comment.
But the preference for Symfony\Component\Console\Output\OutputInterface shouldn't be there. It was resolved in another issue. I'll look at this issue later and will fix the commits
Contributor
There was a problem hiding this comment.
Preference issue is solved on main - see your issue.
I ask if it is compatible because someone already using import module wont be able to compare old hashes with new ones (if old ones are kept in db for example). I have to check what that function does to make sure we are not breaking anything with it.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
I run php codesniffer and it couldn't pass the Magento2 technical review. I added proper output escaping, replaced md5 with sha256 and fixed
The code still doesn't pass the technical review as it doesn't use db_schema.xml, but I saw another pull request that fixes this problem