2016-04-04 23 views
4

sylius üzerinde besteci güncellemeden sonra hata:Sylius i şöyle Sylius yüklemiş 0.17

$ composer create-project sylius/sylius 
$ cd sylius 
$ php app/console sylius:install 

Yüklü sürümleri: Symfony'nin 2.7.7 ve Sylius i besteci güncelleme yapana kadar

Tüm şeyin yolunda çalışıyorlardı 0.17 . İşte Symfony 2.8.4-dev güncellendi. Composer.json'da hiçbir şeyi değiştirmedim. Şimdi app_dev.php

'u çağırırsam, başlangıç ​​sayfasında bir hata haline geliyorum SyliusWebBundle'da bir şablonun oluşturulması sırasında bir istisna atılmıştır ("Doctrine available."): Frontend: layout.html.twig line 97 . 500 iç sunucu hatası - Twig_Error_Runtime 1 bağlı istisna:

RuntimeException » 

ayıklama-Bilgi: KRİTİK - yakalanmamış PHP istisna Twig_Error_Runtime: "bir istisna bir şablon oluşturulması sırasında atıldı (" Doktrini kullanılamaz. "SyliusWebBundle: Frontend: layout.html.twig" satırında "97" satırında. " /.../vendor/twig/twig/lib/Twig/Template.php line 182

Symfony ve Sylius sürüm numaralarını besteci güncellemesinde nasıl saklayabilirim?

Güncelleme 05.Apr 2016:

Sonucu besteci gösterisi -i sylius/sylius ait: Düşündüm de

name  : sylius/sylius 
descrip. : E-Commerce platform for PHP, based on Symfony framework. 
keywords : 
versions : * v0.17.0 
type  : project 
license : MIT License (MIT) (OSI approved) https://spdx.org/licenses/MIT.html#licenseText 
source : [git] https://github.com/Sylius/Sylius.git 73397b078f2b34982040b4bcfc8b79532262966d 
dist  : [zip] https://api.github.com/repos/Sylius/Sylius/zipball/73397b078f2b34982040b4bcfc8b79532262966d 73397b078f2b34982040b4bcfc8b79532262966d 
names : sylius/sylius, sylius/addressing, sylius/addressing-bundle, sylius/admin-bundle, sylius/api-bundle, sylius/archetype, sylius/archetype-bundle, sylius/attribute, sylius/attribute-bundle, sylius/cart, sylius/cart-bundle, sylius/contact, sylius/contact-bundle, sylius/content-bundle, sylius/core, sylius/core-bundle, sylius/currency, sylius/currency-bundle, sylius/fixtures-bundle, sylius/flow-bundle, sylius/installer-bundle, sylius/inventory, sylius/inventory-bundle, sylius/locale, sylius/locale-bundle, sylius/money-bundle, sylius/order, sylius/order-bundle, sylius/payment, sylius/payment-bundle, sylius/payum-bundle, sylius/pricing, sylius/pricing-bundle, sylius/product, sylius/product-bundle, sylius/promotion, sylius/promotion-bundle, sylius/rbac, sylius/rbac-bundle, sylius/registry, sylius/report, sylius/report-bundle, sylius/resource, sylius/resource-bundle, sylius/search-bundle, sylius/sequence, sylius/sequence-bundle, sylius/settings-bundle, sylius/shipping, sylius/shipping-bundle, sylius/storage, sylius/taxation, sylius/taxation-bundle, sylius/taxonomy, sylius/taxonomy-bundle, sylius/theme-bundle, sylius/translation, sylius/translation-bundle, sylius/ui-bundle, sylius/user, sylius/user-bundle, sylius/variation, sylius/variation-bundle, sylius/web-bundle 

autoload 
psr-0 
Sylius\ => src/ 

requires 
a2lix/translation-form-bundle ~2.0 
doctrine/collections ~1.2 
doctrine/common ~2.5 
doctrine/doctrine-bundle ~1.3 
doctrine/doctrine-cache-bundle ~1.0 
doctrine/doctrine-fixtures-bundle ~2.2 
doctrine/doctrine-migrations-bundle ~1.0 
doctrine/orm ^2.4.8,<2.5 
doctrine/phpcr-odm ^1.3 
ext-exif * 
ext-fileinfo * 
ext-gd * 
friendsofsymfony/elastica-bundle ^3.0.2 
friendsofsymfony/oauth-server-bundle ~1.4 
friendsofsymfony/rest-bundle ~1.5 
fzaninotto/faker ~1.2 
hwi/oauth-bundle ~0.3 
incenteev/composer-parameter-handler ~2.0 
jackalope/jackalope ^1.1.4 
jackalope/jackalope-doctrine-dbal ^1.1.2 
jms/serializer-bundle ^0.13|^1.0 
jms/translation-bundle ~1.1 
knplabs/knp-gaufrette-bundle ~0.1 
knplabs/knp-menu-bundle ~1.1 
knplabs/knp-snappy-bundle ~1.2 
liip/imagine-bundle ~1.0 
ocramius/proxy-manager ^1.0 
omnipay/omnipay ~2.3 
payum/omnipay-bridge ~1.0 
payum/payum ~1.0 
payum/payum-bundle ~1.0 
php ^5.5.9|^7.0 
sensio/distribution-bundle ~3.0 
stof/doctrine-extensions-bundle ~1.1 
swiftmailer/swiftmailer ~5.0 
symfony-cmf/block-bundle ~1.2 
symfony-cmf/content-bundle ~1.2 
symfony-cmf/create-bundle ~1.2 
symfony-cmf/media-bundle ~1.2 
symfony-cmf/menu-bundle ~1.2 
symfony-cmf/routing-bundle ^1.4.0-RC1 
symfony/assetic-bundle ^2.6 
symfony/event-dispatcher ^2.7 
symfony/expression-language ^2.7 
symfony/form ^2.7 
symfony/framework-bundle ^2.7 
symfony/intl ^2.7 
symfony/monolog-bundle ^2.7 
symfony/options-resolver ^2.7 
symfony/polyfill-iconv ~1.0 
symfony/polyfill-intl-icu ~1.0 
symfony/polyfill-mbstring ~1.0 
symfony/property-access ^2.7 
symfony/proxy-manager-bridge ^2.7 
symfony/swiftmailer-bundle ^2.3 
symfony/symfony ^2.7.7 
symfony/twig-bundle ^2.7 
twig/extensions ~1.0 
twig/twig ~1.11 
white-october/pagerfanta-bundle ~1.0 
willdurand/hateoas-bundle ^0.4|^1.0 
winzou/state-machine-bundle ~0.2 
zendframework/zend-hydrator ^1.0|^2.0 
zendframework/zend-stdlib ^2.0|^3.0 

requires (dev) 
akeneo/phpspec-skip-example-extension ~1.2 
behat/behat ~3.0 
behat/mink ~1.6 
behat/mink-browserkit-driver ~1.2 
behat/mink-extension ~2.0 
behat/mink-selenium2-driver ~1.2 
behat/symfony2-extension ~2.0 
bossa/phpspec2-expect ^1.0 
coduo/php-matcher ^[email protected] 
fabpot/php-cs-fixer ^1.11 
lakion/api-test-case ^[email protected] 
lakion/mink-debug-extension ^1.0.3 
malukenho/kawaii-gherkin ^0.1.2 
matthiasnoback/symfony-config-test ^1.4 
matthiasnoback/symfony-dependency-injection-test ^0.7.6 
phpspec/phpspec ^2.4 
phpunit/phpunit ~4.1 
se/selenium-server-standalone ^2.52 

suggests 
ext-iconv For better performance than using Symfony Polyfill Component 
ext-intl For better performance than using Symfony Polyfill Component 
ext-mbstring For better performance than using Symfony Polyfill Component 

replaces 
sylius/addressing self.version 
sylius/addressing-bundle self.version 
sylius/admin-bundle self.version 
sylius/api-bundle self.version 
sylius/archetype self.version 
sylius/archetype-bundle self.version 
sylius/attribute self.version 
sylius/attribute-bundle self.version 
sylius/cart self.version 
sylius/cart-bundle self.version 
sylius/contact self.version 
sylius/contact-bundle self.version 
sylius/content-bundle self.version 
sylius/core self.version 
sylius/core-bundle self.version 
sylius/currency self.version 
sylius/currency-bundle self.version 
sylius/fixtures-bundle self.version 
sylius/flow-bundle self.version 
sylius/installer-bundle self.version 
sylius/inventory self.version 
sylius/inventory-bundle self.version 
sylius/locale self.version 
sylius/locale-bundle self.version 
sylius/money-bundle self.version 
sylius/order self.version 
sylius/order-bundle self.version 
sylius/payment self.version 
sylius/payment-bundle self.version 
sylius/payum-bundle self.version 
sylius/pricing self.version 
sylius/pricing-bundle self.version 
sylius/product self.version 
sylius/product-bundle self.version 
sylius/promotion self.version 
sylius/promotion-bundle self.version 
sylius/rbac self.version 
sylius/rbac-bundle self.version 
sylius/registry self.version 
sylius/report self.version 
sylius/report-bundle self.version 
sylius/resource self.version 
sylius/resource-bundle self.version 
sylius/search-bundle self.version 
sylius/sequence self.version 
sylius/sequence-bundle self.version 
sylius/settings-bundle self.version 
sylius/shipping self.version 
sylius/shipping-bundle self.version 
sylius/storage self.version 
sylius/taxation self.version 
sylius/taxation-bundle self.version 
sylius/taxonomy self.version 
sylius/taxonomy-bundle self.version 
sylius/theme-bundle self.version 
sylius/translation self.version 
sylius/translation-bundle self.version 
sylius/ui-bundle self.version 
sylius/user self.version 
sylius/user-bundle self.version 
sylius/variation self.version 
sylius/variation-bundle self.version 
sylius/web-bundle self.version 
+0

, Sylius hangi sürümünü edilir Şimdi? Besteci gösterisi -i sylius/sylius'un sonuçlarını yapıştırabilir misiniz? –

+0

Bu hata Doktrin PHPCR'nin bir nedenden dolayı kullanılamamasının bir sonucu olarak –

+0

..by kullanılamıyor Demek istediğim, Doktrin PHPCR için servis kayıtlı değildir ve Twig için Symfony CMF yardımcısına enjekte edilmemiştir. –

cevap

1

, son symfony-cmf/çekirdek-demetine taahhüt inceledikten sonra

https://github.com/symfony-cmf/core-bundle/commit/d47ac0f193139a90ecece20c46f42e588213824e

daha iyi bir düzeltme sadece ana config.yml için aşağıdaki eklemektir:

cmf_core: 
    persistence: 
     phpcr: 
      enabled: true 

Bu ayarlayıcı fonksiyonu

Bu özel durum nedeni olduğuna inanıyoruz Symfony \ Cmf \ Bundle \ CoreBundle \ DependencyInjection \ CmfCoreExtension içinde ManagerRegistry hizmetini enjekte sağlayacak Doktrin \ Paketi \ PHPCRBundle \ ManagerRegistry hizmeti Symfony \ Cmf \ Bundle \ CoreBundle \ Templating \ Helper \ CmfHelper yapıcısına enjekte edilmiyor.

deneyin symfony-CMF bağımlılık enjeksiyon hizmeti yapılandırma dosyasına <argument type="service" id="doctrine_phpcr" on-invalid="ignore"/> ekleyerek symfony-cmf/core-bundle/Resources/config/services.xml şöyle: Kullanmakta Eğer besteci update` `yaptılar yana

<?xml version="1.0" ?> 

<container xmlns="http://symfony.com/schema/dic/services" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd"> 

    <parameters> 
     <parameter key="cmf_core.persistence.phpcr.manager_name">null</parameter> 
     <parameter key="cmf_core.twig_extension.class">Symfony\Cmf\Bundle\CoreBundle\Twig\Extension\CmfExtension</parameter> 
     <parameter key="cmf_core.templating.helper.class">Symfony\Cmf\Bundle\CoreBundle\Templating\Helper\CmfHelper</parameter> 
    </parameters> 

    <services> 

     <service id="cmf_core.twig.children_extension" class="%cmf_core.twig_extension.class%" public="false"> 
      <argument type="service" id="cmf_core.templating.helper"/> 
      <tag name="twig.extension"/> 
     </service> 

     <service id="cmf_core.templating.helper" class="%cmf_core.templating.helper.class%" public="false"> 
      <argument type="service" id="cmf_core.publish_workflow.checker" on-invalid="ignore"/> 
      <argument type="service" id="doctrine_phpcr" on-invalid="ignore"/> 
      <tag name="templating.helper" alias="cmf"/> 
     </service> 

    </services> 
</container> 

+0

config.yml'deki güncelleme çözümdü. Çok teşekkür ederim! – mondev