Skip to content

Instantly share code, notes, and snippets.

@dmaicher
dmaicher / package-lock.json
Created March 15, 2021 08:41
npm 7 benchmark
This file has been truncated, but you can view the full file.
{
"name": "proprietary",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "proprietary",
"dependencies": {
"@babel/runtime": "^7.13.9",
"@google/markerclusterer": "^1.0.3",
<?php
require_once 'vendor/autoload.php';
$expressionLang = new \Symfony\Component\Security\Core\Authorization\ExpressionLanguage(
new \Symfony\Component\Cache\Adapter\NullAdapter()
);
$iterations = 500000;
$rawExpression = "1 in [1, 2, 3, 4] and (1 == 2 or 1 > 2 or 'foo' in ['bar', 'foo'])";
<?php
require_once 'vendor/autoload.php';
$kernel = new AppKernel('prod', false);
$kernel->boot();
$router = $kernel->getContainer()->get('router');
$routes = $router->getRouteCollection();
$router->getContext()->setMethod('GET');
@dmaicher
dmaicher / TagAwareQueryResultCache.php
Last active April 16, 2020 08:47
use symfony/cache 3.2 tag aware cache as Doctrine DBAL query result cache
<?php
use Doctrine\DBAL\Cache\QueryCacheProfile;
use Symfony\Component\Cache\Adapter\TagAwareAdapterInterface;
use Symfony\Component\Cache\CacheItem;
use Symfony\Component\Cache\DoctrineProvider;
class TagAwareQueryResultCache extends DoctrineProvider
{
/**