Use of vendor/magento/magento2-base?

After setting up a Magento shop with composer create-project –repository=https://repo.magento.com/ magento/project-community-edition I’ve got a file structure that seems to be identical to the content of magento/magento2-base in the vendor directory. Probably because it is a just copy of those files. Why does this dependency exist? I guess no code in the vendor directory gets executed,…

Get attribute value in magento2

I am using an object manager to get the attribute value even though it’s not recommended. I am getting NULL in product-object which causing error “GetattributeText() on NULL”. Below is the code that so far I tried $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $product = $objectManager->get(‘Magento\Framework\Registry’)->registry(‘current_product’); echo gettype($product); $slot_break = $product->getAttributeText(‘choose_slot_break’); when I echo gettype it shows “NULLObject”.…