exit(1
);
}require __DIR__ . '/autoload.php';
use Shopware\Components\HttpCache\AppCache;
use Shopware\Kernel;
use Symfony\Component\HttpFoundation\Request;
$environment =
getenv('SHOPWARE_ENV'
) ?:
getenv('REDIRECT_SHOPWARE_ENV'
) ?: 'production';
$kernel =
new Kernel($environment,
$environment !== 'production'
);
if ($kernel->
isHttpCacheEnabled()) { $kernel =
new AppCache($kernel,
$kernel->
getHttpCacheConfig());
}// Set commandline args as request uri
// This is used for legacy cronjob routing.
// e.g: /usr/bin/php shopware.php /backend/cron
if (PHP_SAPI === 'cli' &&
isset($_SERVER['argv'
][1
])) { $_SERVER['REQUEST_URI'
] =
$_SERVER['argv'
][1
];
// We have to use a shutdown function to prevent "headers already sent" errors.
register_shutdown_function(function D
) {