2017-03-23 30 views
0

我的項目開發與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

對於這些聲明:

未定義塊 「工具欄中的」 模板「的沉默顯示@ WebProfiler /探查/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} %} 
相關問題