Nginx Pimcore不创建我的安装程序类的服务
我正在尝试创建自己的pimcore包。但是现在我的安装程序类出现了问题。当我尝试安装捆绑包时,出现以下错误消息:Nginx Pimcore不创建我的安装程序类的服务,nginx,php-7,pimcore,bundles,pimcore-v5,Nginx,Php 7,Pimcore,Bundles,Pimcore V5,我正在尝试创建自己的pimcore包。但是现在我的安装程序类出现了问题。当我尝试安装捆绑包时,出现以下错误消息: Message: You have requested a non-existent service "Pimcore\Bundle\TestBundle\Tools\Installer". Did you mean this: "Pimcore\Bundle\EcommerceFrameworkBundle\Tools\Installer"? 这是我的代码: 测试包 我尝试了这么
Message: You have requested a non-existent service "Pimcore\Bundle\TestBundle\Tools\Installer". Did you mean this: "Pimcore\Bundle\EcommerceFrameworkBundle\Tools\Installer"?
这是我的代码:
测试包
我尝试了这么长时间,但仍然不起作用。不幸的是,我在官方的pimcore文档中找不到一些文档
多谢各位 对我来说,您似乎试图手动复制电子商务捆绑包。理论上,它应该可以工作,但可以肯定的是,将其集成到pimcore目录中并不是最好的主意 要生成新捆绑包,应在CLI中使用bin/console pimcore:generate:bundle更多信息如下: !!请注意,此命令仅适用于开发和测试环境,请参阅
<?php
namespace Pimcore\Bundle\TestBundle;
use Pimcore\Bundle\TestBundle\Tools\Installer;
use Pimcore\Extension\Bundle\AbstractPimcoreBundle;
use Symfony\Component\DependencyInjection\ContainerBuilder;
/**
* Class TestBundle
* @package Pimcore\Bundle\TestBundle
*/
class TestBundle extends AbstractPimcoreBundle
{
const BUNDLE_NAME = "TestBundle";
const BUNDLE_DESCRIPTION = "Just a test!";
const BUNDLE_VERSION = "1.0";
/**
* @inheritDoc
*/
public function getNiceName()
{
return self::BUNDLE_NAME;
}
/**
* @inheritDoc
*/
public function getDescription()
{
return self::BUNDLE_DESCRIPTION;
}
/**
* @inheritDoc
*/
public function build(ContainerBuilder $container)
{
}
/**
* @inheritDoc
*/
public function getVersion()
{
return self::BUNDLE_VERSION;
}
/**
* @return array
*/
public function getCssPaths()
{
return [
'/bundles/' . strtolower(self::BUNDLE_NAME) . '/css/pricing.css'
];
}
/**
* @return array
*/
public function getJsPaths()
{
return [];
}
/**
* @return Installer
*/
public function getInstaller()
{
return $this->container->get(Installer::class);
}
}
<?php
namespace Pimcore\Bundle\TestBundle\Tools;
use Pimcore\Extension\Bundle\Installer\AbstractInstaller;
use Psr\Log\LoggerInterface;
class Installer extends AbstractInstaller
{
public function __construct(LoggerInterface $logger)
{
}
/**
* installs e-commerce framework
*
* @throws \Exception
*/
public function install()
{
}
/**
* @return bool
*/
public function canBeInstalled()
{
}
/**
* checks, if install is possible. otherwise throws exception
*
* @throws \Exception
*/
protected function checkCanBeInstalled()
{
}
public function canBeUninstalled()
{
return true;
}
/**
* uninstalls e-commerce framework
*/
public function uninstall()
{
}
/**
*
* @return bool
*/
public function needsReloadAfterInstall()
{
return true;
}
/**
* indicates if this bundle is currently installed
*
* @return bool
*/
public function isInstalled()
{
}
}
services:
_defaults:
public: true
autowire: true
autoconfigure: true
#
# INSTALLER
#
pimcore.testbundle.installer: '@Pimcore\Bundle\TestBundle\Tools\Installer'
Pimcore\Bundle\TestBundle\Tools\Installer:
tags:
- { name: monolog.logger, channel: pimcore_testbundle.installer }
#
# CONTROLLERS
#
# auto-register all controllers as services
Pimcore\Bundle\TestBundle\Controller\:
resource: '../../Controller'
public: true
tags: ['controller.service_arguments']