Я пытаюсь разработать веб-приложение с использованием Symfony 3.1, и мне нужно использовать некоторую внешнюю библиотеку, такую как Faker и Guzzle. Тем не менее, каждый раз, когда я пытаюсь установить их с композитором, как это:Как установить стороннюю библиотеку в Symfony 3.1 через композитор?
composer require fzaninotto/Faker
Он всегда выбрасывает ошибки, как это:
Using version ^1.6 for fzaninotto/Faker
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
- Installing fzaninotto/faker (v1.6.0)
Loading from cache
Writing lock file
Generating autoload files
> Incenteev\ParameterHandler\ScriptHandler::buildParameters
Updating the "app/config/parameters.yml" file
> Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::buildBootstrap
> Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache
[Symfony\Component\Config\Exception\FileLoaderLoadException]
There is no extension able to load the configuration for "service" (in C:\xampp\htdocs\myapp\app/config\config.yml). Looked for namespace "service", found "framework", "securi
ty", "twig", "monolog", "swiftmailer", "doctrine", "doctrine_migrations", "sensio_framework_extra", "debug", "web_profiler", "sensio_distribution" in C:\xampp\htdocs\myapp\app
/config\config.yml (which is being imported from "C:\xampp\htdocs\myapp\app/config/config_dev.yml").
[Symfony\Component\DependencyInjection\Exception\InvalidArgumentException]
There is no extension able to load the configuration for "service" (in C:\xampp\htdocs\myapp\app/config\config.yml). Looked for namespace "service", found "framework", "securi
ty", "twig", "monolog", "swiftmailer", "doctrine", "doctrine_migrations", "sensio_framework_extra", "debug", "web_profiler", "sensio_distribution"
Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache handling the symfony-scripts event terminated with an exception
Installation failed, reverting ./composer.json to its original content.
[RuntimeException]
An error occurred when executing the ""cache:clear --no-warmup"" command:
[Symfony\Component\Config\Exception\FileLoaderLoadException]
There is no extension able to load the configuration for "service" (in C:\xampp\htdocs\myapp\app/config\config.yml). Looked for namespace "service", found "framework
", "securi
ty", "twig", "monolog", "swiftmailer", "doctrine", "doctrine_migrations", "sensio_framework_extra", "debug", "web_profiler", "sensio_distribution" in C:\xampp\htdocs\res
epkita\app
/config\config.yml (which is being imported from "C:\xampp\htdocs\myapp\app/config/config_dev.yml").
[Symfony\Component\DependencyInjection\Exception\InvalidArgumentException]
There is no extension able to load the configuration for "service" (in C:\xampp\htdocs\myapp\app/config\config.yml). Looked for namespace "service", found "framework
", "securi
ty", "twig", "monolog", "swiftmailer", "doctrine", "doctrine_migrations", "sensio_framework_extra", "debug", "web_profiler", "sensio_distribution"
.
require [--dev] [--prefer-source] [--prefer-dist] [--no-progress] [--no-update] [--no-scripts] [--update-no-dev] [--update-with-dependencies] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--] [<packages>]...
ли мне действительно нужно использовать 3rd партия Symfony сверток для этого или как Можно ли использовать библиотеку «как есть»?
спасибо! он работает сейчас. – Furunomoe