OroCRM 4.1 中的 AbstractFieldsSanitizer ClassNotFoundError
当我运行以下命令来安装 orocrm 应用程序时
php bin/console oro:install --env=dev --timeout=2000
,或者
php bin/console oro:install --env=prod --timeout=2000
我收到以下错误
Symfony\Component\Debug\Exception\FatalThrowableError {#80
-originalClassName: "Symfony\Component\ErrorHandler\Error\ClassNotFoundError"
#message: """
Attempted to load class "AbstractFieldsSanitizer" from namespace "Oro\Bundle\SecurityBundle\Tools".\n
Did you forget a "use" statement for another namespace?
"""
#code: 0
#file: "./vendor/oro/platform-serialised-fields/Tools/SerializedFieldsSanitizer.php"
#line: 21
#severity: E_ERROR
trace: {
./vendor/oro/platform-serialised-fields/Tools/SerializedFieldsSanitizer.php:21 { …}
./vendor/symfony/symfony/src/Symfony/Component/Debug/DebugClassLoader.php:163 { …}
Symfony\Component\Debug\DebugClassLoader->loadClass() {}
spl_autoload_call() {}
./vendor/oro/platform/src/Oro/Bundle/PlatformBundle/DependencyInjection/Compiler/TwigServiceLocatorPass.php:59 { …}
./vendor/oro/platform/src/Oro/Bundle/PlatformBundle/DependencyInjection/Compiler/TwigServiceLocatorPass.php:29 { …}
./vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/Compiler.php:94 { …}
./vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ContainerBuilder.php:762 { …}
./vendor/oro/platform/src/Oro/Bundle/DistributionBundle/OroKernel.php:411 { …}
./vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:136 { …}
./vendor/oro/platform/src/Oro/Bundle/DistributionBundle/OroKernel.php:231 { …}
./vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:169 { …}
./vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:75 { …}
./vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:149 { …}
./bin/console:32 {
› $application = new Application($kernel);
› $application->run($input);
›
arguments: {
$input: Symfony\Component\Console\Input\ArgvInput {#4 …}
}
}
}
}
根据我的研究,此类在 Oro\Bundle\SecurityBundle\Tools\AbstractFieldsSanitizer
中不可用
任何人都可以让我知道如何解决这个错误?
此错误专门针对我收到的 orocrm 4.1
版本。
如果我从 SerializedFieldsSanitizer.php
注释 AbstractFieldsSanitizer
如下
class SerializedFieldsSanitizer //extends AbstractFieldsSanitizer
那么我会收到以下错误
In CheckExceptionOnInvalidReferenceBehaviorPass.php line 86:
The service "oro_serialized_fields.validator.extend_entity_serialized_data" has a dependency on a non-existent service "oro_e
ntity_config.validator.field_config_constraints_factory".
所以我还注释 line 86 from < code>CheckExceptionOnInvalidReferenceBehaviorPass.php
如下
//throw new ServiceNotFoundException($id, $currentId);
然后它允许我安装 orocrm 应用程序。
那么 orocrm 4.1 版本是否有任何错误或我这边缺少什么?
When I run following command to install orocrm application
php bin/console oro:install --env=dev --timeout=2000
or
php bin/console oro:install --env=prod --timeout=2000
I am getting following error
Symfony\Component\Debug\Exception\FatalThrowableError {#80
-originalClassName: "Symfony\Component\ErrorHandler\Error\ClassNotFoundError"
#message: """
Attempted to load class "AbstractFieldsSanitizer" from namespace "Oro\Bundle\SecurityBundle\Tools".\n
Did you forget a "use" statement for another namespace?
"""
#code: 0
#file: "./vendor/oro/platform-serialised-fields/Tools/SerializedFieldsSanitizer.php"
#line: 21
#severity: E_ERROR
trace: {
./vendor/oro/platform-serialised-fields/Tools/SerializedFieldsSanitizer.php:21 { …}
./vendor/symfony/symfony/src/Symfony/Component/Debug/DebugClassLoader.php:163 { …}
Symfony\Component\Debug\DebugClassLoader->loadClass() {}
spl_autoload_call() {}
./vendor/oro/platform/src/Oro/Bundle/PlatformBundle/DependencyInjection/Compiler/TwigServiceLocatorPass.php:59 { …}
./vendor/oro/platform/src/Oro/Bundle/PlatformBundle/DependencyInjection/Compiler/TwigServiceLocatorPass.php:29 { …}
./vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/Compiler.php:94 { …}
./vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ContainerBuilder.php:762 { …}
./vendor/oro/platform/src/Oro/Bundle/DistributionBundle/OroKernel.php:411 { …}
./vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:136 { …}
./vendor/oro/platform/src/Oro/Bundle/DistributionBundle/OroKernel.php:231 { …}
./vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:169 { …}
./vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:75 { …}
./vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:149 { …}
./bin/console:32 {
› $application = new Application($kernel);
› $application->run($input);
›
arguments: {
$input: Symfony\Component\Console\Input\ArgvInput {#4 …}
}
}
}
}
As per my research this class is not available inside Oro\Bundle\SecurityBundle\Tools\AbstractFieldsSanitizer
Anyone can let me know how can I resolve this error ?
This error specifically for orocrm 4.1
version I am getting.
If I comment AbstractFieldsSanitizer
from SerializedFieldsSanitizer.php
as below
class SerializedFieldsSanitizer //extends AbstractFieldsSanitizer
then I get following error
In CheckExceptionOnInvalidReferenceBehaviorPass.php line 86:
The service "oro_serialized_fields.validator.extend_entity_serialized_data" has a dependency on a non-existent service "oro_e
ntity_config.validator.field_config_constraints_factory".
So I also comment line 86 from CheckExceptionOnInvalidReferenceBehaviorPass.php
as below
//throw new ServiceNotFoundException($id, $currentId);
Then it allows me to install orocrm application.
So is there any bug with orocrm 4.1 version or anything missing from my side?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看来您没有安装 oro 软件包的兼容版本。请使用
composer update
命令将所有依赖项更新为最新可用版本。It seems you do have not compatible versions of oro packages installed. Please update all the dependencies to the latest available versions using the
composer update
command.