19 | */
20 | class Configuration implements ConfigurationInterface
21 | {
22 |
23 | /**
24 | * @var bool
25 | */
26 | private $debug;
27 |
28 | /**
29 | * Constructor
30 | *
31 | * @param Boolean $debug Whether to use the debug mode
32 | */
33 | public function __construct($debug)
34 | {
35 | $this->debug = (Boolean)$debug;
36 | }
37 |
38 | /**
39 | * Generates the configuration tree builder.
40 | *
41 | * @return TreeBuilder The tree builder
42 | */
43 | public function getConfigTreeBuilder()
44 | {
45 | $treeBuilder = new TreeBuilder();
46 | $rootNode = $treeBuilder->root('cache');
47 |
48 | $rootNode->children()
49 | ->append($this->getClustersNode())
50 | ->append($this->addSessionSupportSection())
51 | ->append($this->addDoctrineSection())
52 | ->append($this->addRouterSection())
53 | ->end();
54 |
55 | return $treeBuilder;
56 | }
57 |
58 | /**
59 | * @return ArrayNodeDefinition
60 | */
61 | private function getClustersNode()
62 | {
63 | $treeBuilder = new TreeBuilder();
64 | $node = $treeBuilder->root('instances');
65 |
66 | $node
67 | ->requiresAtLeastOneElement()
68 | ->addDefaultChildrenIfNoneSet('default')
69 | ->useAttributeAsKey('name')
70 | ->prototype('array')
71 | ->children()
72 | ->enumNode('type')
73 | ->values(array('redis', 'php_file', 'file_system', 'array', 'memcached', 'apc'))
74 | ->end()
75 | ->scalarNode('id')
76 | ->defaultNull()
77 | ->end()
78 | ->scalarNode('namespace')
79 | ->defaultNull()
80 | ->info("Namespace for doctrine keys.")
81 | ->end()
82 | ->integerNode('database')
83 | ->defaultNull()
84 | ->info("For Redis: Specify what database you want.")
85 | ->end()
86 | ->scalarNode('persistent')
87 | ->defaultNull()
88 | ->beforeNormalization()
89 | ->ifTrue(
90 | function ($v) {
91 | return $v === 'true' || $v === 'false';
92 | }
93 | )
94 | ->then(
95 | function ($v) {
96 | return (bool) $v;
97 | }
98 | )
99 | ->end()
100 | ->info("For Redis and Memcached: Specify the persistent id if you want persistent connections.")
101 | ->end()
102 | ->scalarNode('auth_password')
103 | ->info("For Redis: Authorization info.")
104 | ->end()
105 | ->scalarNode('directory')
106 | ->info("For File System and PHP File: Directory to store cache.")
107 | ->defaultNull()
108 | ->end()
109 | ->scalarNode('extension')
110 | ->info("For File System and PHP File: Extension to use.")
111 | ->defaultNull()
112 | ->end()
113 | ->arrayNode('options')
114 | ->info("Options for Redis and Memcached.")
115 | ->children()
116 | ->append($this->getMemcachedOptions())
117 | ->end()
118 | ->end()
119 | ->arrayNode('hosts')
120 | ->prototype('array')
121 | ->children()
122 | ->scalarNode('host')
123 | ->defaultNull()
124 | ->end()
125 | ->scalarNode('port')
126 | ->defaultNull()
127 | ->validate()
128 | ->ifTrue(
129 | function ($v) {
130 | return !is_null($v) && !is_numeric($v);
131 | }
132 | )
133 | ->thenInvalid("Host port must be numeric")
134 | ->end()
135 | ->end()
136 | ->scalarNode('weight')
137 | ->info("For Memcached: Weight for given host.")
138 | ->defaultNull()
139 | ->validate()
140 | ->ifTrue(
141 | function ($v) {
142 | return !is_null($v) && !is_numeric($v);
143 | }
144 | )
145 | ->thenInvalid('host weight must be numeric')
146 | ->end()
147 | ->end()
148 | ->scalarNode('timeout')
149 | ->info("For Redis and Memcache: Timeout for the given host.")
150 | ->defaultNull()
151 | ->validate()
152 | ->ifTrue(
153 | function ($v) {
154 | return !is_null($v) && !is_numeric($v);
155 | }
156 | )
157 | ->thenInvalid('host timeout must be numeric')
158 | ->end()
159 | ->end()
160 | ->end()
161 | ->end()
162 | ->end()
163 | ->end()
164 | ->end()
165 | ;
166 |
167 | return $node;
168 | }
169 |
170 | /**
171 | * @return ArrayNodeDefinition
172 | */
173 | private function getMemcachedOptions()
174 | {
175 | $treeBuilder = new TreeBuilder();
176 | $node = $treeBuilder->root('memcached');
177 |
178 | if (class_exists('\Memcached')) {
179 | $node
180 | ->children()
181 | ->enumNode('serializer')
182 | ->values(array('php', 'igbinary', 'json'))
183 | ->end()
184 | ->enumNode('hash')
185 | ->values(array('default', 'md5', 'crc', 'fnv1_64', 'fnv1a_64', 'fnv1_32', 'fnv1a_32', 'hsieh', 'murmur'))
186 | ->end()
187 | ->enumNode('distribution')
188 | ->values(array('modula', 'consistent'))
189 | ->end()
190 | ->booleanNode('compression')->end()
191 | ->scalarNode('prefix_key')->end()
192 | ->booleanNode('libketama_compatible')->end()
193 | ->booleanNode('uffer_writes')->end()
194 | ->booleanNode('binary_protocol')->end()
195 | ->booleanNode('no_block')->end()
196 | ->booleanNode('tcp_nodelay')->end()
197 | ->integerNode('socket_send_size')->end()
198 | ->integerNode('socket_recv_size')->end()
199 | ->integerNode('connect_timeout')->end()
200 | ->integerNode('retry_timeout')->end()
201 | ->integerNode('send_timeout')->end()
202 | ->integerNode('recv_timeout')->end()
203 | ->integerNode('poll_timeout')->end()
204 | ->booleanNode('cache_lookups')->end()
205 | ->integerNode('server_failure_limit')->end()
206 | ->end();
207 | }
208 |
209 | return $node;
210 | }
211 |
212 | /**
213 | * Configure the "aequasi_cache.session" section
214 | *
215 | * @return ArrayNodeDefinition
216 | */
217 | private function addSessionSupportSection()
218 | {
219 | $tree = new TreeBuilder();
220 | $node = $tree->root('session');
221 |
222 | $node
223 | ->addDefaultsIfNotSet()
224 | ->children()
225 | ->booleanNode('enabled')
226 | ->defaultFalse()
227 | ->end()
228 | ->scalarNode('instance')->end()
229 | ->scalarNode('prefix')
230 | ->defaultValue("session_")
231 | ->end()
232 | ->scalarNode('ttl')->end()
233 | ->end()
234 | ;
235 |
236 | return $node;
237 | }
238 |
239 | /**
240 | * Configure the "aequasi_cache.doctrine" section
241 | *
242 | * @return ArrayNodeDefinition
243 | */
244 | private function addDoctrineSection()
245 | {
246 | $tree = new TreeBuilder();
247 | $node = $tree->root('doctrine');
248 |
249 | $node
250 | ->addDefaultsIfNotSet()
251 | ->children()
252 | ->booleanNode('enabled')
253 | ->defaultFalse()
254 | ->isRequired()
255 | ->end()
256 | ->end()
257 | ;
258 |
259 | $types = array('metadata', 'result', 'query');
260 | foreach ($types as $type) {
261 | $node->children()
262 | ->arrayNode($type)
263 | ->canBeUnset()
264 | ->children()
265 | ->scalarNode('instance')
266 | ->end()
267 | ->arrayNode('entity_managers')
268 | ->defaultValue(array())
269 | ->beforeNormalization()
270 | ->ifString()
271 | ->then(
272 | function ($v) {
273 | return (array) $v;
274 | }
275 | )
276 | ->end()
277 | ->prototype('scalar')
278 | ->end()
279 | ->end()
280 | ->arrayNode('document_managers')
281 | ->defaultValue(array())
282 | ->beforeNormalization()
283 | ->ifString()
284 | ->then(
285 | function ($v) {
286 | return (array) $v;
287 | }
288 | )
289 | ->end()
290 | ->prototype('scalar')
291 | ->end()
292 | ->end()
293 | ->end()
294 | ->end();
295 | }
296 |
297 | return $node;
298 | }
299 |
300 | /**
301 | * Configure the "aequasi_cache.router" section
302 | *
303 | * @return ArrayNodeDefinition
304 | */
305 | private function addRouterSection()
306 | {
307 | $tree = new TreeBuilder();
308 | $node = $tree->root('router');
309 |
310 | $node->addDefaultsIfNotSet()
311 | ->children()
312 | ->booleanNode('enabled')
313 | ->defaultFalse()
314 | ->end()
315 | ->scalarNode('instance')
316 | ->defaultNull()
317 | ->end()
318 | ->end();
319 |
320 | return $node;
321 | }
322 | }
323 |
--------------------------------------------------------------------------------
/src/Resources/config/collector.yml:
--------------------------------------------------------------------------------
1 | parameters:
2 | aequasi_cache.data_collector.class: Aequasi\Bundle\CacheBundle\DataCollector\CacheDataCollector
3 | aequasi_cache.data_collector.template: AequasiCacheBundle:Collector:cache.html.twig
4 |
5 | services:
6 | data_collector.cache:
7 | class: %aequasi_cache.data_collector.class%
8 | tags:
9 | - { name: data_collector, template: %aequasi_cache.data_collector.template%, id: 'cache' }
10 |
11 |
--------------------------------------------------------------------------------
/src/Resources/config/services.yml:
--------------------------------------------------------------------------------
1 |
2 | services:
3 | aequasi_cache.abstract.apc:
4 | class: Doctrine\Common\Cache\ApcCache
5 | abstract: true
6 |
7 | aequasi_cache.abstract.array:
8 | class: Doctrine\Common\Cache\ArrayCache
9 | abstract: true
10 |
11 | aequasi_cache.abstract.file_system:
12 | class: Doctrine\Common\Cache\FilesystemCache
13 | abstract: true
14 |
15 | aequasi_cache.abstract.memcache:
16 | class: Doctrine\Common\Cache\MemcacheCache
17 | abstract: true
18 |
19 | aequasi_cache.abstract.memcached:
20 | class: Doctrine\Common\Cache\MemcachedCache
21 | abstract: true
22 |
23 | aequasi_cache.abstract.redis:
24 | class: Doctrine\Common\Cache\RedisCache
25 | abstract: true
26 |
27 | aequasi_cache.abstract.php_file:
28 | class: Doctrine\Common\Cache\PhpFileCache
29 | abstract: true
30 |
31 | aequasi_cache.abstract.win_cache:
32 | class: Doctrine\Common\Cache\WinCacheCache
33 | abstract: true
34 |
35 | aequasi_cache.abstract.xcache:
36 | class: Doctrine\Common\Cache\XcacheCache
37 | abstract: true
38 |
39 | aequasi_cache.zend_data:
40 | class: Doctrine\Common\Cache\ZendDataCache
41 | abstract: true
42 |
--------------------------------------------------------------------------------
/src/Resources/views/Collector/cache.html.twig:
--------------------------------------------------------------------------------
1 | {% extends 'WebProfilerBundle:Profiler:layout.html.twig' %}
2 |
3 | {% block toolbar %}
4 | {% set icon %}
5 |
7 | {{ collector.totals.calls }}
8 | {% if collector.totals.calls > 0 %}
9 | in {{ '%0.2f'|format(collector.totals.time * 1000) }}
10 | ms
11 | {% endif %}
12 | {% endset %}
13 | {% set text %}
14 |
15 | Cache Calls
16 | {{ collector.totals.calls }}
17 |
18 |
19 | Total time
20 | {{ '%0.2f'|format(collector.totals.time * 1000) }} ms
21 |
22 |
23 | Cache hits
24 | {{ collector.totals.hits }}/{{ collector.totals.reads }} ({{ collector.totals.ratio }})
25 |
26 |
27 | Cache writes
28 | {{ collector.totals.writes }}
29 |
30 | {% endset %}
31 | {% include 'WebProfilerBundle:Profiler:toolbar_item.html.twig' with { 'link': profiler_url } %}
32 | {% endblock %}
33 |
34 | {% block menu %}
35 |
36 |
37 |
39 |
40 | Cache
41 |
42 | {{ collector.totals.calls }}
43 | {{ '%0.0f'|format(collector.totals.time * 1000) }} ms
44 |
45 |
46 | {% endblock %}
47 |
48 | {% block panel %}
49 | Cache
50 | {% for name, calls in collector.calls %}
51 | Statistics for '{{ name }}'
52 |
53 |
54 |
55 | {% for key, value in collector.statistics[name] %}
56 | {{ key|capitalize }} |
57 | {% endfor %}
58 |
59 |
60 |
61 |
62 | {% for key, value in collector.statistics[name] %}
63 | {% if key == 'time' %}
64 | {{ '%0.2f'|format(value * 1000) }} ms |
65 | {% else %}
66 | {{ value }} |
67 | {% endif %}
68 | {% endfor %}
69 |
70 |
71 |
72 |
73 | Calls for '{{ name }}'
74 |
75 | {% if not collector.totals.calls %}
76 |
77 | No calls.
78 |
79 | {% else %}
80 |
94 | {% endif %}
95 | {% endfor %}
96 |
97 | {% endblock %}
98 |
--------------------------------------------------------------------------------
/src/Routing/Matcher/CacheUrlMatcher.php:
--------------------------------------------------------------------------------
1 |
19 | */
20 | class CacheUrlMatcher extends UrlMatcher
21 | {
22 | const CACHE_LIFETIME = 604800; // a week
23 |
24 | /**
25 | * @var CacheItemPoolInterface
26 | */
27 | protected $cache;
28 |
29 | /**
30 | * @param string $pathInfo
31 | *
32 | * @return array
33 | */
34 | public function match($pathInfo)
35 | {
36 | $host = strtr($this->context->getHost(), '.', '_');
37 | $method = strtolower($this->context->getMethod());
38 | $key = 'route_' . $method . '_' . $host . '_' . $pathInfo;
39 |
40 | if ($this->cache->hasItem($key)) {
41 | return $this->cache->getItem($key)->get();
42 | }
43 |
44 | $match = parent::match($pathInfo);
45 | $item = $this->cache->getItem($key);
46 | $item->set($match)
47 | ->expiresAfter(self::CACHE_LIFETIME);
48 |
49 | return $match;
50 | }
51 |
52 | /**
53 | * @param CacheItemPoolInterface $cache
54 | */
55 | public function setCache(CacheItemPoolInterface $cache)
56 | {
57 | $this->cache = $cache;
58 | }
59 |
60 | /**
61 | * @return CacheItemPoolInterface
62 | */
63 | public function getCache()
64 | {
65 | return $this->cache;
66 | }
67 | }
68 |
--------------------------------------------------------------------------------
/src/Routing/Router.php:
--------------------------------------------------------------------------------
1 |
22 | */
23 | class Router extends BaseRouter
24 | {
25 | const CACHE_LIFETIME = 604800; // a week
26 |
27 | /**
28 | * @var ContainerInterface
29 | */
30 | protected $container;
31 |
32 | /**
33 | * @var CacheItemPoolInterface
34 | */
35 | protected $cache;
36 |
37 | /**
38 | * @return CacheUrlMatcher|null|\Symfony\Component\Routing\Matcher\UrlMatcherInterface
39 | */
40 | public function getMatcher()
41 | {
42 | if (null !== $this->matcher) {
43 | return $this->matcher;
44 | }
45 |
46 | $matcher = new CacheUrlMatcher($this->getRouteCollection(), $this->context);
47 | $matcher->setCache($this->cache);
48 |
49 | return $this->matcher = $matcher;
50 | }
51 |
52 | /**
53 | * {@inheritdoc}
54 | */
55 | public function getRouteCollection()
56 | {
57 | $key = 'route_collection';
58 |
59 | if (null === $this->collection) {
60 | if ($this->cache->hasItem($key)) {
61 | $collection = $this->cache->getItem($key)->get();
62 | if ($collection !== null) {
63 | $this->collection = $collection;
64 |
65 | return $this->collection;
66 | }
67 | }
68 |
69 | $this->collection = parent::getRouteCollection();
70 | $item = $this->cache->getItem($key);
71 | $item->set($this->collection)
72 | ->expiresAfter(self::CACHE_LIFETIME);
73 | }
74 |
75 | return $this->collection;
76 | }
77 |
78 | /**
79 | * @param CacheItemPoolInterface $cache
80 | *
81 | * @return Router
82 | */
83 | public function setCache(CacheItemPoolInterface $cache)
84 | {
85 | $this->cache = $cache;
86 |
87 | return $this;
88 | }
89 | }
90 |
--------------------------------------------------------------------------------
/src/Session/SessionHandler.php:
--------------------------------------------------------------------------------
1 |
5 | * @date 2013
6 | * @license http://www.apache.org/licenses/LICENSE-2.0.html Apache License, Version 2.0
7 | */
8 |
9 | namespace Aequasi\Bundle\CacheBundle\Session;
10 |
11 | use Doctrine\Common\Cache\Cache;
12 | use Psr\Cache\CacheItemPoolInterface;
13 |
14 | /**
15 | * Class SessionHandler
16 | *
17 | * @author Aaron Scherer
18 | */
19 | class SessionHandler implements \SessionHandlerInterface
20 | {
21 | /**
22 | * @var CacheItemPoolInterface Cache driver.
23 | */
24 | private $cache;
25 |
26 | /**
27 | * @var integer Time to live in seconds
28 | */
29 | private $ttl;
30 |
31 | /**
32 | * @var string Key prefix for shared environments.
33 | */
34 | private $prefix;
35 |
36 | /**
37 | * Constructor.
38 | *
39 | * List of available options:
40 | * * prefix: The prefix to use for the cache keys in order to avoid collision
41 | * * expiretime: The time to live in seconds
42 | *
43 | * @param CacheItemPoolInterface $cache A Cache instance
44 | * @param array $options An associative array of cache options
45 | *
46 | * @throws \InvalidArgumentException When unsupported options are passed
47 | */
48 | public function __construct(CacheItemPoolInterface $cache, array $options = array())
49 | {
50 | $this->cache = $cache;
51 |
52 | $this->ttl = isset($options['cookie_lifetime']) ? (int) $options['cookie_lifetime'] : 86400;
53 | $this->prefix = isset($options['prefix']) ? $options['prefix'] : 'sf2ses_';
54 | }
55 |
56 | /**
57 | * {@inheritDoc}
58 | */
59 | public function open($savePath, $sessionName)
60 | {
61 | return true;
62 | }
63 |
64 | /**
65 | * {@inheritDoc}
66 | */
67 | public function close()
68 | {
69 | return true;
70 | }
71 |
72 | /**
73 | * {@inheritDoc}
74 | */
75 | public function read($sessionId)
76 | {
77 | $item = $this->cache->getItem($this->prefix.$sessionId);
78 | if ($item->isHit()) {
79 | return $item->get();
80 | }
81 |
82 | return '';
83 | }
84 |
85 | /**
86 | * {@inheritDoc}
87 | */
88 | public function write($sessionId, $data)
89 | {
90 | $item = $this->cache->getItem($this->prefix . $sessionId);
91 | $item->set($data)
92 | ->expiresAfter($this->ttl);
93 |
94 | return $this->cache->save($item);
95 | }
96 |
97 | /**
98 | * {@inheritDoc}
99 | */
100 | public function destroy($sessionId)
101 | {
102 | $item = $this->cache->getItem($this->prefix . $sessionId);
103 |
104 | return $this->cache->deleteItem($item);
105 | }
106 |
107 | /**
108 | * {@inheritDoc}
109 | */
110 | public function gc($lifetime)
111 | {
112 | // not required here because cache will auto expire the records anyhow.
113 | return true;
114 | }
115 | }
116 |
--------------------------------------------------------------------------------
/tests/ContainerTest.php:
--------------------------------------------------------------------------------
1 |
5 | * @date 2013
6 | * @license http://www.apache.org/licenses/LICENSE-2.0.html Apache License, Version 2.0
7 | */
8 |
9 | namespace Aequasi\Bundle\CacheBundle\Tests;
10 |
11 | /**
12 | * Class ContainerTest
13 | *
14 | * @author Aaron Scherer
15 | */
16 | class ContainerTest extends TestCase
17 | {
18 | /**
19 | *
20 | */
21 | public function testContainer()
22 | {
23 | //$container = $this->createContainer();
24 |
25 | // @TODO Create Tests.....
26 | $this->assertTrue(true);
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/tests/DependencyInjection/AequasiCacheExtensionTest.php:
--------------------------------------------------------------------------------
1 |
19 | */
20 | class AequasiCacheExtensionTest extends TestCase
21 | {
22 |
23 | /**
24 | *
25 | */
26 | public function testServiceBuilder()
27 | {
28 | $container = $this->createContainerFromFile('service');
29 |
30 | $this->assertTrue($container->hasDefinition($this->getAlias().'.instance.default'));
31 | $this->assertTrue($container->hasAlias($this->getAlias().'.default'));
32 |
33 | $this->assertInstanceOf(
34 | CacheItemPoolInterface::class,
35 | $container->get($this->getAlias().'.instance.default')
36 | );
37 |
38 | $this->assertInstanceOf(
39 | DoctrineCacheBridge::class,
40 | $container->get($this->getAlias().'.instance.default.bridge')
41 | );
42 | }
43 |
44 | /**
45 | *
46 | */
47 | public function testRouterBuilder()
48 | {
49 | $container = $this->createContainerFromFile('router');
50 |
51 | $config = $container->getParameter($this->getAlias().'.router');
52 |
53 | $this->assertTrue(isset($config['enabled']));
54 | $this->assertTrue(isset($config['instance']));
55 |
56 | $this->assertTrue($config['enabled']);
57 | $this->assertEquals($config['instance'], 'default');
58 |
59 | $this->assertEquals('Aequasi\Bundle\CacheBundle\Routing\Router', $container->getParameter('router.class'));
60 | }
61 |
62 | /**
63 | * @return string
64 | */
65 | private function getAlias()
66 | {
67 | return 'aequasi_cache';
68 | }
69 | }
70 |
--------------------------------------------------------------------------------
/tests/Fixtures/router.yml:
--------------------------------------------------------------------------------
1 | aequasi_cache:
2 | instances:
3 | default:
4 | type: array
5 | router:
6 | enabled: true
7 | instance: default
--------------------------------------------------------------------------------
/tests/Fixtures/service.yml:
--------------------------------------------------------------------------------
1 | aequasi_cache:
2 | instances:
3 | default:
4 | type: array
--------------------------------------------------------------------------------
/tests/TestCase.php:
--------------------------------------------------------------------------------
1 |
5 | * @date 2013
6 | * @license http://www.apache.org/licenses/LICENSE-2.0.html Apache License, Version 2.0
7 | */
8 |
9 | namespace Aequasi\Bundle\CacheBundle\Tests;
10 |
11 | use Aequasi\Bundle\CacheBundle\DependencyInjection\AequasiCacheExtension;
12 | use Symfony\Component\DependencyInjection\ContainerBuilder;
13 | use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag;
14 | use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
15 | use Symfony\Component\Config\FileLocator;
16 |
17 | /**
18 | * Class TestCase
19 | *
20 | * @author Aaron Scherer
21 | */
22 | class TestCase extends \PHPUnit_Framework_TestCase
23 | {
24 |
25 | /**
26 | * @param ContainerBuilder $container
27 | * @param string $file
28 | */
29 | protected function loadFromFile(ContainerBuilder $container, $file)
30 | {
31 | $loader = new YamlFileLoader($container, new FileLocator(__DIR__ . '/Fixtures'));
32 | $loader->load($file . '.yml');
33 | }
34 |
35 | /**
36 | * @param array $data
37 | *
38 | * @return ContainerBuilder
39 | */
40 | protected function createContainer(array $data = array())
41 | {
42 | return new ContainerBuilder(new ParameterBag(array_merge(
43 | array(
44 | 'kernel.bundles' => array('FrameworkBundle' => 'Symfony\\Bundle\\FrameworkBundle\\FrameworkBundle'),
45 | 'kernel.cache_dir' => __DIR__,
46 | 'kernel.debug' => false,
47 | 'kernel.environment' => 'test',
48 | 'kernel.name' => 'kernel',
49 | 'kernel.root_dir' => __DIR__,
50 | ),
51 | $data
52 | )));
53 | }
54 |
55 | /**
56 | * @param string $file
57 | * @param array $data
58 | *
59 | * @return ContainerBuilder
60 | */
61 | protected function createContainerFromFile($file, $data = array())
62 | {
63 | $container = $this->createContainer($data);
64 | $container->registerExtension(new AequasiCacheExtension());
65 | $this->loadFromFile($container, $file);
66 |
67 | $container->getCompilerPassConfig()
68 | ->setOptimizationPasses(array());
69 | $container->getCompilerPassConfig()
70 | ->setRemovingPasses(array());
71 | $container->compile();
72 |
73 | return $container;
74 | }
75 | }
76 |
--------------------------------------------------------------------------------
/tests/bootstrap.php:
--------------------------------------------------------------------------------
1 |