As far as I know you can set a preference for an Interface in the di.xml
of an extension.
But i see several Interfaces without any reference in the di.xml
.
How are these instantiated?
Examples: app/code/Magento/Directory/Model/ResourceModel/Country/Collection.php
The constructor contains that code:
\Magento\Framework\DB\Adapter\AdapterInterface $connection = null,
or app/code/Magento/Payment/Model/Info.php
\Magento\Framework\Encryption\EncryptorInterface $encryptor