0

I see a couple of VersionControl folders across Magento source code.

  • Magento\Framework\Model\ResourceModel\Db\VersionControl
  • Magento\Customer\Model\ResourceModel\Db\VersionControl
  • Magento\Eav\Model\Entity\VersionControl etc.

Does anyone have any idea what are the purpose of the clases residing under the VersionControl folder and when|how are they used?

1 Answer 1

1

Interesting find. This is news to me to. They are implemented in certain classes.

https://github.com/magento/magento2/blob/2.3/app/code/Magento/Customer/Model/ResourceModel/Address.php

Scanning over the code and further reading suggests this was part of 'Content Versioning' which was silently dropped for 'Content Staging' feature.

So basically not used. Or not used how intended. They are still implemented. If you get my point.

Nothing to do with git or svn.

3
  • So...It's basically leftovers Jun 8, 2019 at 7:24
  • In summary, yes. I'm not seeing any evidence it's anything more than that. Jun 8, 2019 at 13:10
  • It is used in CustomerRepository:save(). It uses Magento\Eav\Model\Entity\VersionControl\AbstractEntity. I suspect it's a way of tracking if changes were made to the entity to prevent multiple saves inside an application run. Jun 8, 2019 at 13:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.