for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Happyr\AnnotationWarmer\Loader;
use Happyr\AnnotationWarmer\Service\AnnotationManager;
use Symfony\Component\Serializer\Mapping\ClassMetadataInterface;
use Symfony\Component\Serializer\Mapping\Loader\YamlFileLoader;
/**
* Pretend that we will load from Yaml, but serve content from annotation cache instead.
*
* @author Tobias Nyholm <[email protected]>
*/
final class FakeSerializerLoader extends YamlFileLoader
{
private $manager;
public function __construct(AnnotationManager $manager)
$this->manager = $manager;
}
public function loadClassMetadata(ClassMetadataInterface $classMetadata)
// We dont need to do anything. The AnnotationLoader will handle things
public function getMappedClasses()
return $this->manager->getAllClasses();