Skip to main content
added 3 characters in body
Source Link
Marius
  • 198.5k
  • 55
  • 424
  • 833

I see that Magento 2 has 3 factory classes (4 if you count the abstract one).

  • \Magento\Framework\ObjectManager\Factory\Dynamic\Developer
  • \Magento\Framework\ObjectManager\Factory\Dynamic\Production
  • \Magento\Framework\ObjectManager\Factory\Compiled

All of the above extend \Magento\Framework\ObjectManager\Factory\AbstractFactory.
I assumed that when on developer mode, the Developer factory would be used, but sometimes the Compiled one is used and I cannot pinpoint the conditions for this.
Can

Can someone please explain when each factory is used and what are the differences between thethem?

I see that Magento 2 has 3 factory classes (4 if you count the abstract one).

  • \Magento\Framework\ObjectManager\Factory\Dynamic\Developer
  • \Magento\Framework\ObjectManager\Factory\Dynamic\Production
  • \Magento\Framework\ObjectManager\Factory\Compiled

All of the above extend \Magento\Framework\ObjectManager\Factory\AbstractFactory.
I assumed that when on developer mode, the Developer factory would be used, but sometimes the Compiled one is used and I cannot pinpoint the conditions for this.
Can someone please explain when each factory is used and what are the differences between the?

I see that Magento 2 has 3 factory classes (4 if you count the abstract one).

  • \Magento\Framework\ObjectManager\Factory\Dynamic\Developer
  • \Magento\Framework\ObjectManager\Factory\Dynamic\Production
  • \Magento\Framework\ObjectManager\Factory\Compiled

All of the above extend \Magento\Framework\ObjectManager\Factory\AbstractFactory.
I assumed that when on developer mode, the Developer factory would be used, but sometimes the Compiled one is used and I cannot pinpoint the conditions for this.

Can someone please explain when each factory is used and what are the differences between them?

What are the ObjectManager Factories diffencesdifferences?

Tweeted twitter.com/StackMagento/status/743018683346395137
Source Link
Marius
  • 198.5k
  • 55
  • 424
  • 833

What are the ObjectManager Factories diffences?

I see that Magento 2 has 3 factory classes (4 if you count the abstract one).

  • \Magento\Framework\ObjectManager\Factory\Dynamic\Developer
  • \Magento\Framework\ObjectManager\Factory\Dynamic\Production
  • \Magento\Framework\ObjectManager\Factory\Compiled

All of the above extend \Magento\Framework\ObjectManager\Factory\AbstractFactory.
I assumed that when on developer mode, the Developer factory would be used, but sometimes the Compiled one is used and I cannot pinpoint the conditions for this.
Can someone please explain when each factory is used and what are the differences between the?