Skip to content

Commit a21332f

Browse files
committed
doctrine-bundle 2.3 bug
1 parent 502e75b commit a21332f

5 files changed

Lines changed: 13554 additions & 12 deletions

File tree

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
.idea
2020
.DS_Store
2121
node_modules
22-
composer.lock
2322
composer.local.json
2423
public/vendor/
2524
public/uploads/

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,22 @@
11
# TEEBB 0.x版本进入维护状态。即将重构代码,敬请期待。
2+
##### doctrine-bundle 2.3以上版本使用PhpArrayCache缓存ORM注解Metadata,会引起TEEBB在生产环境下重大BUG。
3+
```php
4+
// 需要修改 doctrine-bundle 源码解决此问题
5+
// vendor/doctrine/doctrine-bundle/DependencyInjection/DoctrineExtension.php
6+
protected function loadOrmCacheDrivers(array $entityManager, ContainerBuilder $container)
7+
{
8+
$this->loadCacheDriver('metadata_cache', $entityManager['name'], $entityManager['metadata_cache_driver'], $container);
9+
$this->loadCacheDriver('result_cache', $entityManager['name'], $entityManager['result_cache_driver'], $container);
10+
$this->loadCacheDriver('query_cache', $entityManager['name'], $entityManager['query_cache_driver'], $container);
11+
12+
if ($container->getParameter('kernel.debug')) {
13+
return;
14+
}
15+
16+
// 需要注释下面一行代码解决BUG
17+
// $this->registerMetadataPhpArrayCaching($entityManager['name'], $container);
18+
}
19+
```
220

321
# TEEBB内容管理系统使用文档
422
TEEBB是基于Symfony框架开发的一款可自由扩展的内容管理系统。您可以自由使用本软件来构建您的博客、网站等应用。本项目将会长期开发维护,欢迎使用。

composer.json

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,23 @@
1717
"php": "^7.2.5",
1818
"ext-ctype": "*",
1919
"ext-iconv": "*",
20-
"api-platform/api-pack": "^1.2",
20+
"api-platform/core": "^2.6",
2121
"babdev/pagerfanta-bundle": "^2.4",
22+
"composer/package-versions-deprecated": "1.11.99.3",
23+
"doctrine/annotations": "^1.0",
24+
"doctrine/common": "^2",
25+
"doctrine/doctrine-bundle": "^2",
26+
"doctrine/doctrine-migrations-bundle": "^2",
27+
"doctrine/orm": "^2",
2228
"friendsofsymfony/ckeditor-bundle": "^2.2",
2329
"friendsofsymfony/jsrouting-bundle": "^2.6",
2430
"knplabs/knp-menu-bundle": "^3.0",
2531
"knplabs/knp-time-bundle": "^1.13",
2632
"liip/imagine-bundle": "^2.3",
33+
"nelmio/cors-bundle": "^2.1",
2734
"oneup/flysystem-bundle": "^3.5",
2835
"pagerfanta/pagerfanta": "^2.3",
36+
"phpdocumentor/reflection-docblock": "^5.2",
2937
"sensio/framework-extra-bundle": "^5.1",
3038
"sonata-project/block-bundle": "^4.4",
3139
"stof/doctrine-extensions-bundle": "^1.4",
@@ -42,23 +50,30 @@
4250
"symfony/mime": "^5.0",
4351
"symfony/monolog-bundle": "^3.1",
4452
"symfony/notifier": "^5.0",
45-
"symfony/orm-pack": "*",
4653
"symfony/process": "^5.0",
54+
"symfony/property-access": "^5.0",
55+
"symfony/property-info": "^5.0",
4756
"symfony/security-bundle": "^5.0",
48-
"symfony/serializer-pack": "*",
57+
"symfony/serializer": "^5.0",
4958
"symfony/string": "^5.0",
5059
"symfony/translation": "^5.0",
51-
"symfony/twig-pack": "*",
60+
"symfony/twig-bundle": "^5.0",
5261
"symfony/validator": "^5.0",
5362
"symfony/web-link": "^5.0",
5463
"symfony/yaml": "^5.0",
55-
"teebbstudios/core-bundle": "^0.1.0"
64+
"teebbstudios/core-bundle": "^0.1.0",
65+
"twig/extra-bundle": "^2.12|^3.0",
66+
"twig/twig": "^2.12|^3.0"
5667
},
5768
"require-dev": {
58-
"symfony/debug-pack": "*",
69+
"phpunit/phpunit": "^9.5",
70+
"symfony/browser-kit": "^5.3",
71+
"symfony/css-selector": "^5.3",
72+
"symfony/debug-bundle": "^5.3",
5973
"symfony/maker-bundle": "^1.0",
60-
"symfony/profiler-pack": "*",
61-
"symfony/test-pack": "*"
74+
"symfony/phpunit-bridge": "^5.3",
75+
"symfony/stopwatch": "^5.3",
76+
"symfony/web-profiler-bundle": "^5.3"
6277
},
6378
"config": {
6479
"preferred-install": {

0 commit comments

Comments
 (0)