Fixes
Some checks failed
Gitea Actions / Run-Tests-On-Arm64 (push) Failing after 1m58s
Gitea Actions / Run-Tests-On-Amd64 (push) Failing after 3m33s

This commit is contained in:
Thomas 2025-05-23 15:21:45 +02:00
parent 70d096f866
commit 140badb63e
9 changed files with 105 additions and 84 deletions

View File

@ -8,7 +8,16 @@ services:
- ${APPLICATION_CODE_PATH_HOST?}:${APPLICATION_CODE_PATH_CONTAINER?} - ${APPLICATION_CODE_PATH_HOST?}:${APPLICATION_CODE_PATH_CONTAINER?}
php-cron: php-cron:
environment: environment:
- PHP_IDE_CONFIG=${PHP_IDE_CONFIG?}
- APP_ENV=dev - APP_ENV=dev
networks:
- network
cap_add:
- "SYS_PTRACE"
security_opt:
- "seccomp=unconfined"
extra_hosts:
- host.docker.internal:host-gateway
volumes: volumes:
- ${APP_CODE_PATH_HOST?}:${APP_CODE_PATH_CONTAINER?} - ${APP_CODE_PATH_HOST?}:${APP_CODE_PATH_CONTAINER?}
web: web:
@ -28,18 +37,6 @@ services:
volumes: volumes:
- ${APP_CODE_PATH_HOST?}:${APP_CODE_PATH_CONTAINER?} - ${APP_CODE_PATH_HOST?}:${APP_CODE_PATH_CONTAINER?}
php-cron:
environment:
- PHP_IDE_CONFIG=${PHP_IDE_CONFIG?}
networks:
- network
cap_add:
- "SYS_PTRACE"
security_opt:
- "seccomp=unconfined"
extra_hosts:
- host.docker.internal:host-gateway
chrome: chrome:
ports: ports:
- "7900:7900" - "7900:7900"

View File

@ -21,7 +21,11 @@ class Kernel extends BaseKernel
try { try {
if (extension_loaded('mongodb')) { if (extension_loaded('mongodb')) {
if ($_ENV['APP_ENV'] == 'test') {
$collection = (new \MongoDB\Client('mongodb://mongodb/'))->psc_test->Plugin;
} else {
$collection = (new \MongoDB\Client('mongodb://mongodb/'))->psc->Plugin; $collection = (new \MongoDB\Client('mongodb://mongodb/'))->psc->Plugin;
}
$plugins = $collection->find(array('installed' => true)); $plugins = $collection->find(array('installed' => true));

View File

@ -25,7 +25,6 @@ use Symfony\Component\HttpKernel\Bundle\Bundle;
*/ */
class PSCShopThemeBundle extends Bundle class PSCShopThemeBundle extends Bundle
{ {
public function build(ContainerBuilder $container) public function build(ContainerBuilder $container)
{ {
parent::build($container); parent::build($container);
@ -33,7 +32,12 @@ class PSCShopThemeBundle extends Bundle
try { try {
if (extension_loaded('mongodb')) { if (extension_loaded('mongodb')) {
if ($_ENV['APP_ENV'] == 'test') {
$collection = (new \MongoDB\Client('mongodb://mongodb/'))->psc_test->Plugin;
} else {
$collection = (new \MongoDB\Client('mongodb://mongodb/'))->psc->Plugin; $collection = (new \MongoDB\Client('mongodb://mongodb/'))->psc->Plugin;
}
$plugins = $collection->find(array('installed' => true)); $plugins = $collection->find(array('installed' => true));
foreach ($plugins as $plugin) { foreach ($plugins as $plugin) {

View File

@ -18,7 +18,12 @@ class PluginCompiler implements CompilerPassInterface
public function process(ContainerBuilder $container) public function process(ContainerBuilder $container)
{ {
try { try {
if ($_ENV['APP_ENV'] == 'test') {
$collection = (new \MongoDB\Client('mongodb://mongodb/'))->psc_test->Plugin;
} else {
$collection = (new \MongoDB\Client('mongodb://mongodb/'))->psc->Plugin; $collection = (new \MongoDB\Client('mongodb://mongodb/'))->psc->Plugin;
}
$plugins = $collection->find(array('installed' => true)); $plugins = $collection->find(array('installed' => true));
/** /**
* @var Plugin $plugin * @var Plugin $plugin

View File

@ -47,7 +47,12 @@ class PSCSystemPluginExtension extends Extension implements PrependExtensionInte
$loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
$loader->load('services.yml'); $loader->load('services.yml');
try { try {
if ($_ENV['APP_ENV'] == 'test') {
$collection = (new \MongoDB\Client('mongodb://mongodb/'))->psc_test->Plugin;
} else {
$collection = (new \MongoDB\Client('mongodb://mongodb/'))->psc->Plugin; $collection = (new \MongoDB\Client('mongodb://mongodb/'))->psc->Plugin;
}
$plugins = $collection->find(array('installed' => true)); $plugins = $collection->find(array('installed' => true));
foreach ($plugins as $plugin) { foreach ($plugins as $plugin) {
if (file_exists($container->getParameter('kernel.project_dir') . '/var/plugins/' . $plugin['path'] . '/Resources/config/services.yml')) { if (file_exists($container->getParameter('kernel.project_dir') . '/var/plugins/' . $plugin['path'] . '/Resources/config/services.yml')) {

View File

@ -25,7 +25,12 @@ class RequestListener
public function onKernelRequest(RequestEvent $event) public function onKernelRequest(RequestEvent $event)
{ {
try { try {
if ($_ENV['APP_ENV'] == 'test') {
$collection = (new \MongoDB\Client('mongodb://mongodb/'))->psc_test->Plugin;
} else {
$collection = (new \MongoDB\Client('mongodb://mongodb/'))->psc->Plugin; $collection = (new \MongoDB\Client('mongodb://mongodb/'))->psc->Plugin;
}
} catch (\Exception $e) { } catch (\Exception $e) {
return; return;
} }

View File

@ -37,7 +37,12 @@ class PluginRouteLoader extends Loader
{ {
$routes = new RouteCollection(); $routes = new RouteCollection();
try { try {
if ($_ENV['APP_ENV'] == 'test') {
$collection = (new \MongoDB\Client('mongodb://mongodb/'))->psc_test->Plugin;
} else {
$collection = (new \MongoDB\Client('mongodb://mongodb/'))->psc->Plugin; $collection = (new \MongoDB\Client('mongodb://mongodb/'))->psc->Plugin;
}
$plugins = $collection->find(array('installed' => true)); $plugins = $collection->find(array('installed' => true));
/** @var Plugin $plugin */ /** @var Plugin $plugin */
foreach ($plugins as $plugin) { foreach ($plugins as $plugin) {

View File

@ -157,8 +157,6 @@ trait RefreshDatabaseTrait
$doc->clear(); $doc->clear();
} }
return $kernel; return $kernel;
} }

View File

@ -35,7 +35,6 @@
*/ */
class PreflightController extends TP_Controller_Action class PreflightController extends TP_Controller_Action
{ {
protected $_extAllow = 'ppt,inx,idml,indd,qxd,ps,cdr,cdx,jpg,gif,pdf,xls,docx,png,doc,jpeg,tif,tiff,ai,eps,psd,phtml,zip,jrxml,ttf,otf,plt,csv,docx,xlsx,pptx,svg'; protected $_extAllow = 'ppt,inx,idml,indd,qxd,ps,cdr,cdx,jpg,gif,pdf,xls,docx,png,doc,jpeg,tif,tiff,ai,eps,psd,phtml,zip,jrxml,ttf,otf,plt,csv,docx,xlsx,pptx,svg';
protected function FileSize($file, $setup = null) protected function FileSize($file, $setup = null)
@ -47,8 +46,7 @@ class PreflightController extends TP_Controller_Action
return number_format($FZ / pow(1024, $I = floor(log($FZ, 1024))), ($i >= 1) ? 2 : 0) . ' ' . $FS[$I]; return number_format($FZ / pow(1024, $I = floor(log($FZ, 1024))), ($i >= 1) ? 2 : 0) . ' ' . $FS[$I];
} elseif ($setup == 'INT') { } elseif ($setup == 'INT') {
return number_format($FZ); return number_format($FZ);
} } else {
else {
return number_format($FZ / pow(1024, $setup), ($setup >= 1) ? 2 : 0) . ' ' . $FS[$setup]; return number_format($FZ / pow(1024, $setup), ($setup >= 1) ? 2 : 0) . ' ' . $FS[$setup];
} }
} }
@ -193,7 +191,7 @@ class PreflightController extends TP_Controller_Action
} }
} }
if ($isPdf && ((int)$check->check_site_count > 0 || $check->check_site_count_rel != "")) { if (false && $isPdf && ((int)$check->check_site_count > 0 || $check->check_site_count_rel != "")) {
try { try {
$p = new pdflib(); $p = new pdflib();
@ -372,7 +370,7 @@ class PreflightController extends TP_Controller_Action
$boxes[] = "ArtBox"; $boxes[] = "ArtBox";
} }
if ($isPdf && $check->check_fonts_embedded) { if (false && $isPdf && $check->check_fonts_embedded) {
$p = new pdflib(); $p = new pdflib();
$indoc = $p->open_pdi_document($file, ""); $indoc = $p->open_pdi_document($file, "");
@ -391,7 +389,7 @@ class PreflightController extends TP_Controller_Action
} }
} }
if ($isPdf && count($boxes) > 0 && count($checks) > 0) { if (false && $isPdf && count($boxes) > 0 && count($checks) > 0) {
$isFormat = false; $isFormat = false;
@ -529,7 +527,7 @@ class PreflightController extends TP_Controller_Action
} }
} }
if ($isPdf && ((int)$check->check_site_count || $check->check_site_count_rel)) { if (false && $isPdf && ((int)$check->check_site_count || $check->check_site_count_rel)) {
$p = new pdflib(); $p = new pdflib();
$indoc = $p->open_pdi_document($file, ""); $indoc = $p->open_pdi_document($file, "");
@ -673,7 +671,7 @@ class PreflightController extends TP_Controller_Action
$boxes[] = "ArtBox"; $boxes[] = "ArtBox";
} }
if ($isPdf && $check->check_fonts_embedded) { if (false && $isPdf && $check->check_fonts_embedded) {
$p = new pdflib(); $p = new pdflib();
$indoc = $p->open_pdi_document($file, ""); $indoc = $p->open_pdi_document($file, "");
@ -692,7 +690,7 @@ class PreflightController extends TP_Controller_Action
} }
} }
if ($isPdf && count($boxes) > 0 && count($checks) > 0) { if (false && $isPdf && count($boxes) > 0 && count($checks) > 0) {
$isFormat = false; $isFormat = false;