我的项目是使用Symfony 3.1.0和PHP 7.0开发的,我使用了许多软件包
由于几天我有很多弃用,有时工具栏会返回JS错误ERR_CONNECTION_RESET
您能帮我解决折旧方法吗?
如何理解日志?我应该更正我的代码吗?更新一些捆绑包?巫婆?
谢谢!
我的作曲家档案:
{
"name": "xxx",
"license": "proprietary",
"description": "xxx",
"type": "project",
"autoload": {
"psr-4": {
"": "src/"
},
"classmap": [
"app/AppKernel.php",
"app/AppCache.php"
]
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"require": {
"php": ">=5.5.9",
"symfony/symfony": "3.1.0",
"doctrine/orm": "^2.5",
"doctrine/doctrine-bundle": "^1.6",
"doctrine/doctrine-cache-bundle": "^1.2",
"symfony/swiftmailer-bundle": "^2.3",
"symfony/monolog-bundle": "^2.8",
"sensio/distribution-bundle": "^5.0",
"sensio/framework-extra-bundle": "^3.0.2",
"incenteev/composer-parameter-handler": "^2.0",
"doctrine/doctrine-fixtures-bundle": "~2.3",
"friendsofsymfony/user-bundle": "dev-master",
"friendsofsymfony/jsrouting-bundle": "2.0.0-alpha1",
"jms/serializer-bundle": "1.1.0",
"symfony/form": "3.1.0",
"javiereguiluz/easyadmin-bundle": "~1.14",
"cmen/google-charts-bundle": "1.*",
"blackknight467/star-rating-bundle": "^2.0",
"hwi/oauth-bundle": "0.5.x-dev",
"suncat/mobile-detect-bundle": "1.0.*",
"cspoo/swiftmailer-mailgun-bundle": "^0.3.1",
"php-http/guzzle5-adapter": "^1.0",
"symfony/finder": "^3.2",
"nategood/httpful": "^0.2.20",
"monolog/monolog": "^1.22",
"algolia/algolia-search-bundle": "^2.1",
"beberlei/DoctrineExtensions": "^1.0",
"coresphere/console-bundle": "^0.5.0",
"robertotru/to-inline-style-email-bundle": "^1.2"
},
"require-dev": {
"sensio/generator-bundle": "^3.0",
"symfony/phpunit-bridge": "^3.0",
"phpunit/phpunit": "5.4.4",
"symfony/browser-kit": "3.1.0",
"symfony/css-selector": "3.1.0"
},
"scripts": {
"post-install-cmd": [
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget"
],
"post-update-cmd": [
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget"
]
},
"extra": {
"symfony-app-dir": "app",
"symfony-bin-dir": "bin",
"symfony-var-dir": "var",
"symfony-web-dir": "web",
"symfony-tests-dir": "tests",
"symfony-assets-install": "relative",
"incenteev-parameters": {
"file": "app/config/parameters.yml"
}
}
}
我的弃用:
Referencing the "core" extension by its name (defined by getName()) is deprecated since 1.26 and will be removed in Twig 2.0. Use the Fully Qualified Extension Class Name instead. (2 times)
Referencing the "form" extension by its name (defined by getName()) is deprecated since 1.26 and will be removed in Twig 2.0. Use the Fully Qualified Extension Class Name instead. (70 times)
Calling "renderblock" on template "@WebProfiler/Collector/request.html.twig" from template "@WebProfiler/Profiler/toolbar.html.twig" is deprecated since version 1.28 and won't be supported anymore in 2.0. Use block("toolbar", template) instead)
Calling "renderblock" on template "@WebProfiler/Collector/time.html.twig" from template "@WebProfiler/Profiler/toolbar.html.twig" is deprecated since version 1.28 and won't be supported anymore in 2.0. Use block("toolbar", template) instead).
Calling "renderblock" on template "@WebProfiler/Collector/memory.html.twig" from template "@WebProfiler/Profiler/toolbar.html.twig" is deprecated since version 1.28 and won't be supported anymore in 2.0. Use block("toolbar", template) instead)
Calling "renderblock" on template "@WebProfiler/Collector/ajax.html.twig" from template "@WebProfiler/Profiler/toolbar.html.twig" is deprecated since version 1.28 and won't be supported anymore in 2.0. Use block("toolbar", template) instead)
Calling "renderblock" on template "@WebProfiler/Collector/form.html.twig" from template "@WebProfiler/Profiler/toolbar.html.twig" is deprecated since version 1.28 and won't be supported anymore in 2.0. Use block("toolbar", template) instead)
Silent display of undefined block "toolbar" in template "@WebProfiler/Profiler/base.html.twig" is deprecated since version 1.29 and will throw an exception in 2.0. Use the "block('toolbar') is defined" expression to test for block existence
Calling "renderblock" on template "@WebProfiler/Collector/exception.html.twig" from template "@WebProfiler/Profiler/toolbar.html.twig" is deprecated since version 1.28 and won't be supported anymore in 2.0. Use block("toolbar", template) instead)
Calling "renderblock" on template "@WebProfiler/Collector/logger.html.twig" from template "@WebProfiler/Profiler/toolbar.html.twig" is deprecated since version 1.28 and won't be supported anymore in 2.0. Use block("toolbar", template) instead)
Silent display of undefined block "toolbar" in template "@WebProfiler/Profiler/base.html.twig" is deprecated since version 1.29 and will throw an exception in 2.0. Use the "block('toolbar') is defined" expression to test for block existence.
Calling "renderblock" on template "@WebProfiler/Collector/events.html.twig" from template "@WebProfiler/Profiler/toolbar.html.twig" is deprecated since version 1.28 and won't be supported anymore in 2.0. Use block("toolbar", template) instead)
Calling "renderblock" on template "@WebProfiler/Collector/router.html.twig" from template "@WebProfiler/Profiler/toolbar.html.twig" is deprecated since version 1.28 and won't be supported anymore in 2.0. Use block("toolbar", template) instead)
Calling "renderblock" on template "@WebProfiler/Collector/translation.html.twig" from template "@WebProfiler/Profiler/toolbar.html.twig" is deprecated since version 1.28 and won't be supported anymore in 2.0. Use block("toolbar", template) instead)
Calling "renderblock" on template "@Security/Collector/security.html.twig" from template "@WebProfiler/Profiler/toolbar.html.twig" is deprecated since version 1.28 and won't be supported anymore in 2.0. Use block("toolbar", template) instead)
Calling "renderblock" on template "@WebProfiler/Collector/twig.html.twig" from template "@WebProfiler/Profiler/toolbar.html.twig" is deprecated since version 1.28 and won't be supported anymore in 2.0. Use block("toolbar", template) instead)
Calling "renderblock" on template "@Doctrine/Collector/db.html.twig" from template "@WebProfiler/Profiler/toolbar.html.twig" is deprecated since version 1.28 and won't be supported anymore in 2.0. Use block("toolbar", template) instead)
Calling "renderblock" on template "@Swiftmailer/Collector/swiftmailer.html.twig" from template "@WebProfiler/Profiler/toolbar.html.twig" is deprecated since version 1.28 and won't be supported anymore in 2.0. Use block("toolbar", template) instead)
Calling "renderblock" on template "@Debug/Profiler/dump.html.twig" from template "@WebProfiler/Profiler/toolbar.html.twig" is deprecated since version 1.28 and won't be supported anymore in 2.0. Use block("toolbar", template) instead)
Calling "renderblock" on template "@EasyAdmin/data_collector/easyadmin.html.twig" from template "@WebProfiler/Profiler/toolbar.html.twig" is deprecated since version 1.28 and won't be supported anymore in 2.0. Use block("toolbar", template) instead)
Calling "renderblock" on template "MobileDetectBundle:Collector:device.html.twig" from template "@WebProfiler/Profiler/toolbar.html.twig" is deprecated since version 1.28 and won't be supported anymore in 2.0. Use block("toolbar", template) instead)
Calling "renderblock" on template "CoreSphereConsoleBundle:Toolbar:toolbar.html.twig" from template "@WebProfiler/Profiler/toolbar.html.twig" is deprecated since version 1.28 and won't be supported anymore in 2.0. Use block("toolbar", template) instead)
Calling "renderblock" on template "@WebProfiler/Collector/config.html.twig" from template "@WebProfiler/Profiler/toolbar.html.twig" is deprecated since version 1.28 and won't be supported anymore in 2.0. Use block("toolbar", template) instead)
... etc...
答案 0 :(得分:0)
对于这些通知:
未定义块的静默显示"工具栏"在模板" @ WebProfiler / Profiler / base.html.twig"自版本1.29以来已弃用,并将在2.0中引发异常。使用"块('工具栏')已定义"用于测试块存在的表达式
您必须更正 base.html.twig 文件:
{% include('Bundle::file.html.twig') with {stylesheets: block('stylesheets')} %}
喜欢:
{% set sheets = null %}
{% if block('stylesheets') is defined %}
{% set sheets = block('stylesheets') %}
{% endif %}
{% include('Bundle::file.html.twig') with {stylesheets: sheets} %}