-
Notifications
You must be signed in to change notification settings - Fork 349
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2687 from laboro/fix/BAP-10013_1.12
BAP-10013: A plural alias for "Extend\Entity\EV_Prod_Inventory_Status…
- Loading branch information
Showing
20 changed files
with
189 additions
and
66 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
17 changes: 0 additions & 17 deletions
17
src/Oro/Bundle/EmailBundle/Form/Model/ExtendMailboxProcessSettings.php
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
62 changes: 62 additions & 0 deletions
62
src/Oro/Bundle/EntityExtendBundle/Cache/CacheWarmerAggregate.php
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
<?php | ||
|
||
namespace Oro\Bundle\EntityExtendBundle\Cache; | ||
|
||
use Oro\Bundle\InstallerBundle\CommandExecutor; | ||
use Symfony\Component\HttpKernel\CacheWarmer\CacheWarmerInterface; | ||
use Symfony\Component\HttpKernel\CacheWarmer\CacheWarmerAggregate as BaseCacheWarmerAggregate; | ||
|
||
class CacheWarmerAggregate implements CacheWarmerInterface | ||
{ | ||
/** @var BaseCacheWarmerAggregate */ | ||
private $baseCacheWarmerAggregate; | ||
|
||
/** @var CacheWarmerInterface[] Warmers required for extend bundle */ | ||
private $warmers; | ||
|
||
/** | ||
* @param BaseCacheWarmerAggregate $baseCacheWarmerAggregate | ||
*/ | ||
public function __construct(BaseCacheWarmerAggregate $baseCacheWarmerAggregate) | ||
{ | ||
$this->baseCacheWarmerAggregate = $baseCacheWarmerAggregate; | ||
} | ||
|
||
/** {@inheritdoc} */ | ||
public function enableOptionalWarmers() | ||
{ | ||
$this->baseCacheWarmerAggregate->enableOptionalWarmers(); | ||
} | ||
|
||
/** {@inheritdoc} */ | ||
public function isOptional() | ||
{ | ||
return $this->baseCacheWarmerAggregate->isOptional(); | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
* | ||
* Do not warmup caches if extend caches are not up to date | ||
*/ | ||
public function warmUp($cacheDir) | ||
{ | ||
if (CommandExecutor::isCurrentCommand('oro:entity-extend:cache:', true)) { | ||
foreach ($this->warmers as $warmer) { | ||
$warmer->warmUp($cacheDir); | ||
} | ||
|
||
return; | ||
} | ||
|
||
$this->baseCacheWarmerAggregate->warmUp($cacheDir); | ||
} | ||
|
||
/** | ||
* @param CacheWarmerInterface $cacheWarmer | ||
*/ | ||
public function addWarmer(CacheWarmerInterface $cacheWarmer) | ||
{ | ||
$this->warmers[] = $cacheWarmer; | ||
} | ||
} |
This file contains 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
31 changes: 31 additions & 0 deletions
31
src/Oro/Bundle/EntityExtendBundle/DependencyInjection/Compiler/WarmerPass.php
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
|
||
namespace Oro\Bundle\EntityExtendBundle\DependencyInjection\Compiler; | ||
|
||
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; | ||
use Symfony\Component\DependencyInjection\ContainerBuilder; | ||
use Symfony\Component\DependencyInjection\Reference; | ||
|
||
class WarmerPass implements CompilerPassInterface | ||
{ | ||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function process(ContainerBuilder $container) | ||
{ | ||
if (!$container->hasDefinition('oro_entity_extend.cache_warmer')) { | ||
return; | ||
} | ||
|
||
$taggedServices = $container->findTaggedServiceIds('oro_entity_extend.warmer'); | ||
if (!$taggedServices) { | ||
return; | ||
} | ||
|
||
$definition = $container->getDefinition('oro_entity_extend.cache_warmer'); | ||
|
||
foreach ($taggedServices as $id => $attributes) { | ||
$definition->addMethodCall('addWarmer', [new Reference($id)]); | ||
} | ||
} | ||
} |
Oops, something went wrong.