Doctrine orm 致命错误:`Class';条令\Common\Cache\ArrayCache';没有找到。作曲家工作不正常 // autoload_static.php @generated by Composer namespace Composer\Autoload; class ComposerStaticInita89eb0d2fe0809574fc31efca00ceb2f { public static $prefixLengthsPsr4 = array ( 'c' => array ( 'core\\' => 5, ), 'R' => array ( 'RedeyeVentures\\GeoPattern\\SVGElements\\' => 38, 'RedeyeVentures\\GeoPattern\\' => 26, ), 'L' => array ( 'Bundle\\Resources\\Fnc\\' => 24, 'Bundle\\Entity\\' => 17, ), 'D' => array ( 'DoctrineProxies\\__CG__\\Bundle\\Entity\\' => 40, ), ); public static $prefixDirsPsr4 = array ( 'core\\' => array ( 0 => __DIR__ . '/../..' . '/src/core', ), 'RedeyeVentures\\GeoPattern\\SVGElements\\' => array ( 0 => __DIR__ . '/../..' . '/src/ComponentsOthers/geopattern-php-master/src/GeoPattern/SVGElements', ), 'RedeyeVentures\\GeoPattern\\' => array ( 0 => __DIR__ . '/../..' . '/src/ComponentsOthers/geopattern-php-master/src/GeoPattern', ), 'Bundle\\Resources\\Fnc\\' => array ( 0 => __DIR__ . '/../..' . '/src/Bundle/Resources/Fnc', ), 'Bundle\\Entity\\' => array ( 0 => __DIR__ . '/../..' . '/src/Bundle/Entity', ), 'Bundle\\DataFixtures\\ownFixtures\\' => array ( 0 => __DIR__ . '/../..' . '/src/Bundle/DataFixtures/ownFixtures', ), 'Bundle\\DataFixtures\\ORM\\' => array ( 0 => __DIR__ . '/../..' . '/src/Bundle/DataFixtures/ORM', ), 'Bundle\\Controller\\' => array ( 0 => __DIR__ . '/../..' . '/src/Bundle/Controller', ), 'Bundle\\Components\\StringC\\' => array ( 0 => __DIR__ . '/../..' . '/src/Bundle/Components/StringC', ), 'Bundle\\Components\\SocialC\\' => array ( 0 => __DIR__ . '/../..' . '/src/Bundle/Components/SocialC', ), 'Bundle\\Components\\HttC\\' => array ( 0 => __DIR__ . '/../..' . '/src/Bundle/Components/HttC', ), 'Bundle\\Components\\FormC\\' => array ( 0 => __DIR__ . '/../..' . '/src/Bundle/Components/FormC', ), 'Bundle\\Components\\FileC\\' => array ( 0 => __DIR__ . '/../..' . '/src/Bundle/Components/FileC', ), 'Bundle\\Components\\ErrC\\' => array ( 0 => __DIR__ . '/../..' . '/src/Bundle/Components/ErrC', ), 'Bundle\\Components\\ArrayC\\' => array ( 0 => __DIR__ . '/../..' . '/src/Bundle/Components/ArrayC', ), 'DoctrineProxies\\__CG__\\Bundle\\Entity\\' => array ( 0 => __DIR__ . '/../..' . '/src/Bundle/Proxies', ), ); public static $prefixesPsr0 = array ( 'M' => array ( 'Migrations' => array ( 0 => __DIR__ . '/../..' . '/src/migrations', ), ), 'L' => array ( 'Bundle\\Entity\\' => array ( 0 => __DIR__ . '/../..' . '/src/Bundle/Entity', ), ), ); public static $fallbackDirsPsr0 = array ( 0 => __DIR__ . '/../..' . '/src', ); public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { $loader->prefixLengthsPsr4 = ComposerStaticInita89eb0d2fe0809574fc31efca00ceb2f::$prefixLengthsPsr4; $loader->prefixDirsPsr4 = ComposerStaticInita89eb0d2fe0809574fc31efca00ceb2f::$prefixDirsPsr4; $loader->prefixesPsr0 = ComposerStaticInita89eb0d2fe0809574fc31efca00ceb2f::$prefixesPsr0; $loader->fallbackDirsPsr0 = ComposerStaticInita89eb0d2fe0809574fc31efca00ceb2f::$fallbackDirsPsr0; }, null, ClassLoader::class); } }
我已经开始发现关于缺少类的错误(尽管它们存在),尽管我没有改变任何东西。我已经重新安装了编写器和供应商 有时我会遇到这样的错误: 在第310行的htdocs\type705c\src\bootstrap.php中找不到类'core\SomeClass' 有时出现的错误是未找到原则Doctrine orm 致命错误:`Class';条令\Common\Cache\ArrayCache';没有找到。作曲家工作不正常 // autoload_static.php @generated by Composer namespace Composer\Autoload; class ComposerStaticInita89eb0d2fe0809574fc31efca00ceb2f { public static $prefixLengthsPsr4 = array ( 'c' => array ( 'core\\' => 5, ), 'R' => array ( 'RedeyeVentures\\GeoPattern\\SVGElements\\' => 38, 'RedeyeVentures\\GeoPattern\\' => 26, ), 'L' => array ( 'Bundle\\Resources\\Fnc\\' => 24, 'Bundle\\Entity\\' => 17, ), 'D' => array ( 'DoctrineProxies\\__CG__\\Bundle\\Entity\\' => 40, ), ); public static $prefixDirsPsr4 = array ( 'core\\' => array ( 0 => __DIR__ . '/../..' . '/src/core', ), 'RedeyeVentures\\GeoPattern\\SVGElements\\' => array ( 0 => __DIR__ . '/../..' . '/src/ComponentsOthers/geopattern-php-master/src/GeoPattern/SVGElements', ), 'RedeyeVentures\\GeoPattern\\' => array ( 0 => __DIR__ . '/../..' . '/src/ComponentsOthers/geopattern-php-master/src/GeoPattern', ), 'Bundle\\Resources\\Fnc\\' => array ( 0 => __DIR__ . '/../..' . '/src/Bundle/Resources/Fnc', ), 'Bundle\\Entity\\' => array ( 0 => __DIR__ . '/../..' . '/src/Bundle/Entity', ), 'Bundle\\DataFixtures\\ownFixtures\\' => array ( 0 => __DIR__ . '/../..' . '/src/Bundle/DataFixtures/ownFixtures', ), 'Bundle\\DataFixtures\\ORM\\' => array ( 0 => __DIR__ . '/../..' . '/src/Bundle/DataFixtures/ORM', ), 'Bundle\\Controller\\' => array ( 0 => __DIR__ . '/../..' . '/src/Bundle/Controller', ), 'Bundle\\Components\\StringC\\' => array ( 0 => __DIR__ . '/../..' . '/src/Bundle/Components/StringC', ), 'Bundle\\Components\\SocialC\\' => array ( 0 => __DIR__ . '/../..' . '/src/Bundle/Components/SocialC', ), 'Bundle\\Components\\HttC\\' => array ( 0 => __DIR__ . '/../..' . '/src/Bundle/Components/HttC', ), 'Bundle\\Components\\FormC\\' => array ( 0 => __DIR__ . '/../..' . '/src/Bundle/Components/FormC', ), 'Bundle\\Components\\FileC\\' => array ( 0 => __DIR__ . '/../..' . '/src/Bundle/Components/FileC', ), 'Bundle\\Components\\ErrC\\' => array ( 0 => __DIR__ . '/../..' . '/src/Bundle/Components/ErrC', ), 'Bundle\\Components\\ArrayC\\' => array ( 0 => __DIR__ . '/../..' . '/src/Bundle/Components/ArrayC', ), 'DoctrineProxies\\__CG__\\Bundle\\Entity\\' => array ( 0 => __DIR__ . '/../..' . '/src/Bundle/Proxies', ), ); public static $prefixesPsr0 = array ( 'M' => array ( 'Migrations' => array ( 0 => __DIR__ . '/../..' . '/src/migrations', ), ), 'L' => array ( 'Bundle\\Entity\\' => array ( 0 => __DIR__ . '/../..' . '/src/Bundle/Entity', ), ), ); public static $fallbackDirsPsr0 = array ( 0 => __DIR__ . '/../..' . '/src', ); public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { $loader->prefixLengthsPsr4 = ComposerStaticInita89eb0d2fe0809574fc31efca00ceb2f::$prefixLengthsPsr4; $loader->prefixDirsPsr4 = ComposerStaticInita89eb0d2fe0809574fc31efca00ceb2f::$prefixDirsPsr4; $loader->prefixesPsr0 = ComposerStaticInita89eb0d2fe0809574fc31efca00ceb2f::$prefixesPsr0; $loader->fallbackDirsPsr0 = ComposerStaticInita89eb0d2fe0809574fc31efca00ceb2f::$fallbackDirsPsr0; }, null, ClassLoader::class); } },doctrine-orm,composer-php,Doctrine Orm,Composer Php,我已经开始发现关于缺少类的错误(尽管它们存在),尽管我没有改变任何东西。我已经重新安装了编写器和供应商 有时我会遇到这样的错误: 在第310行的htdocs\type705c\src\bootstrap.php中找不到类'core\SomeClass' 有时出现的错误是未找到原则ArrayCache: 致命错误:在第258行的C:\Bitnami\wampstack-5.6.30-2\apache2\htdocs\type705c\src\bootstrap.php中找不到类'doctor\Co
ArrayCache
:
致命错误:在第258行的C:\Bitnami\wampstack-5.6.30-2\apache2\htdocs\type705c\src\bootstrap.php中找不到类'doctor\Common\Cache\ArrayCache'
我只是不断删除供应商/编写器目录,有时会出现一个或另一个错误
一类存在于
\vendor\doctor\cache\lib\doctor\Common\cache\ArrayCache.php
\core中存在SomeClass类
Bootstrap.php
<..>
use Doctrine\ORM\Tools\Setup;
use Doctrine\ORM\EntityManager;
use Doctrine\ORM\Configuration;
use Symfony\Component\Console\Application;
use Doctrine\Common\Cache\ArrayCache;
use Doctrine\Common\Cache\ApcCache;
$entitiesPaths = array( __DIR__.'/Bundle/Entity' );
$proxiesPaths = array( __DIR__.'/Bundle/Proxies' );
if ($isDevMode) {
$cache = new \Doctrine\Common\Cache\ArrayCache;
} else {
$cache = new \Doctrine\Common\Cache\ApcCache;
}
$config = new Configuration;
$config->setMetadataCacheImpl($cache);
$driverImpl = $config->newDefaultAnnotationDriver($entitiesPaths);
$config->setMetadataDriverImpl($driverImpl);
$config->setQueryCacheImpl($cache);
$config->setProxyDir($proxiesPaths);
$config->setProxyNamespace('DoctrineProxies\__CG__\Bundle\Proxies');
if ($isDevMode) {
$config->setAutoGenerateProxyClasses(true);
} else {
$config->setAutoGenerateProxyClasses(false);
}
<..>
$some='some';
echo "<br> 307 ".$some; //echoes if ArrayCache is found, else do not
use core\SomeClass;
$ecind = new SomeClass();
原因是,
我无意中将core文件夹移动到了另一个位置,因此composer.json没有指向正确的文件夹,也没有找到类
// autoload_static.php @generated by Composer
namespace Composer\Autoload;
class ComposerStaticInita89eb0d2fe0809574fc31efca00ceb2f
{
public static $prefixLengthsPsr4 = array (
'c' =>
array (
'core\\' => 5,
),
'R' =>
array (
'RedeyeVentures\\GeoPattern\\SVGElements\\' => 38,
'RedeyeVentures\\GeoPattern\\' => 26,
),
'L' =>
array (
'Bundle\\Resources\\Fnc\\' => 24,
'Bundle\\Entity\\' => 17,
),
'D' =>
array (
'DoctrineProxies\\__CG__\\Bundle\\Entity\\' => 40,
),
);
public static $prefixDirsPsr4 = array (
'core\\' =>
array (
0 => __DIR__ . '/../..' . '/src/core',
),
'RedeyeVentures\\GeoPattern\\SVGElements\\' =>
array (
0 => __DIR__ . '/../..' . '/src/ComponentsOthers/geopattern-php-master/src/GeoPattern/SVGElements',
),
'RedeyeVentures\\GeoPattern\\' =>
array (
0 => __DIR__ . '/../..' . '/src/ComponentsOthers/geopattern-php-master/src/GeoPattern',
),
'Bundle\\Resources\\Fnc\\' =>
array (
0 => __DIR__ . '/../..' . '/src/Bundle/Resources/Fnc',
),
'Bundle\\Entity\\' =>
array (
0 => __DIR__ . '/../..' . '/src/Bundle/Entity',
),
'Bundle\\DataFixtures\\ownFixtures\\' =>
array (
0 => __DIR__ . '/../..' . '/src/Bundle/DataFixtures/ownFixtures',
),
'Bundle\\DataFixtures\\ORM\\' =>
array (
0 => __DIR__ . '/../..' . '/src/Bundle/DataFixtures/ORM',
),
'Bundle\\Controller\\' =>
array (
0 => __DIR__ . '/../..' . '/src/Bundle/Controller',
),
'Bundle\\Components\\StringC\\' =>
array (
0 => __DIR__ . '/../..' . '/src/Bundle/Components/StringC',
),
'Bundle\\Components\\SocialC\\' =>
array (
0 => __DIR__ . '/../..' . '/src/Bundle/Components/SocialC',
),
'Bundle\\Components\\HttC\\' =>
array (
0 => __DIR__ . '/../..' . '/src/Bundle/Components/HttC',
),
'Bundle\\Components\\FormC\\' =>
array (
0 => __DIR__ . '/../..' . '/src/Bundle/Components/FormC',
),
'Bundle\\Components\\FileC\\' =>
array (
0 => __DIR__ . '/../..' . '/src/Bundle/Components/FileC',
),
'Bundle\\Components\\ErrC\\' =>
array (
0 => __DIR__ . '/../..' . '/src/Bundle/Components/ErrC',
),
'Bundle\\Components\\ArrayC\\' =>
array (
0 => __DIR__ . '/../..' . '/src/Bundle/Components/ArrayC',
),
'DoctrineProxies\\__CG__\\Bundle\\Entity\\' =>
array (
0 => __DIR__ . '/../..' . '/src/Bundle/Proxies',
),
);
public static $prefixesPsr0 = array (
'M' =>
array (
'Migrations' =>
array (
0 => __DIR__ . '/../..' . '/src/migrations',
),
),
'L' =>
array (
'Bundle\\Entity\\' =>
array (
0 => __DIR__ . '/../..' . '/src/Bundle/Entity',
),
),
);
public static $fallbackDirsPsr0 = array (
0 => __DIR__ . '/../..' . '/src',
);
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInita89eb0d2fe0809574fc31efca00ceb2f::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInita89eb0d2fe0809574fc31efca00ceb2f::$prefixDirsPsr4;
$loader->prefixesPsr0 = ComposerStaticInita89eb0d2fe0809574fc31efca00ceb2f::$prefixesPsr0;
$loader->fallbackDirsPsr0 = ComposerStaticInita89eb0d2fe0809574fc31efca00ceb2f::$fallbackDirsPsr0;
}, null, ClassLoader::class);
}
}
而不是/src/core
我意外地从/src
搬到/core