2014-10-07 15 views
8

Symfony2 projemde çalışırken, herhangi bir sayfaya giderken rastgele InvalidArgumentException: The service definition "templating.helpers.assets" does not exist. hatasını aldım. Daha önceki işlemlere geri dönmeyi denedim, ama bu hiçbir şeyi değiştirmiyor. Yani kendi kaynak kodumun hiçbiri gibi görünmüyor. Ayrıca composer update'u da kullanamıyorum. Ben önbelleği, satıcı dizinini ve composer.lock dosyasını kaldırma denedi, ama yine de bu hatayı alıyorum:Symfony2: InvalidArgumentException: "templating.helpers.assets" hizmet tanımı yok

Loading composer repositories with package information

Updating dependencies (including require-dev)

Generating autoload files

Updating the "app/config/parameters.yml" file

[Symfony\Component\DependencyInjection\Exception\InvalidArgumentException]
The service definition "templating.helpers.assets" does not exist.

Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache handling the post-update-cmd event terminated with an exception

[RuntimeException]
An error occurred when executing the "'cache:clear --no-warmup'" command.

Herhangi bir fikir?

+0

bu grup ekleyin O Symfony\Bundle\FrameworkBundle\FrameworkBundle() tarafından oluşturulan ve Resources\config\templating_php.xml

<service id="templating.helper.assets" class="%templating.helper.assets.class%"> <tag name="templating.helper" alias="assets" /> <argument /> <!-- default package --> <argument type="collection" /> <!-- named packages --> </service> 

tanımlanan templating.helper.assets

php app/console container:debug templating.helper.assets [container] Information for service templating.helper.assets Service Id templating.helper.assets Class Symfony\Component\Templating\Helper\CoreAssetsHelper Tags - templating.helper (alias: assets) Scope request Public yes Synthetic no Lazy no Synchronized no Abstract no 

mevcut hizmet . Olmaması gereken: 'templating.helper.assets' (no s). Bağımlılıklarınız bunu kullanmaya çalışıyor mu? Projeni bu dizge için aramayı denedin mi? Besteci paketlerinizden hiç biri güncellendi mi? Sabit versiyonları kullanıyor musunuz? – Fred

+0

Sabit sürüm kullanmıyorum, ancak sorun oluştuğunda paketleri güncelleştirmedim. Projemde dize aramayı denedim, ama hiçbir şey bana çok yardımcı olmadı (en azından benim için). Önbelleği temizlemeden önce TwigBundle Assets Extension ve bazı önbellek gibi şeyler. Ama herhangi bir dal dosyası düzenlemedim, o zaman sadece scss. Artık çoğul halini aldığınıza göre, scss dosyalarımı düzenliyordum ve 'helpers' adında css klasöründe bir alt klasör oluşturdum. Ama bu klasörü kaldırmayı bile denedim ve hata hala devam ediyordu. – ryanwiesjahn

+0

Neyse ki sorun önce bir uzak sunucuya kodu dağıtmıştı, bu yüzden bunu alıp, benim problemimi "düzeltmiş" olan en son taahhüdünü güncelleyebildim. Yine de bu soruna neyin neden olacağını göremiyorum. – ryanwiesjahn

cevap

0

Bilginize Bu bir yazım hatası gibi görünüyor Yani appKernel.php

public function registerBundles() 
{ 
    $bundles = array(
     //Standard 
     new Symfony\Bundle\FrameworkBundle\FrameworkBundle(), 
     //others bundles