从零开始创建 symfony-cmf

Posted amos-turing

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了从零开始创建 symfony-cmf相关的知识,希望对你有一定的参考价值。

 

前提:

官方 https://symfony.com/doc/master/cmf/quick_tour/the_big_picture.html#setting-up-the-database

由于

$ composer create-project symfony-cmf/sandbox cmf-sandbox
报错因此按照以下命令执行(上篇https://www.cnblogs.com/Amos-Turing/p/11541573.html)

https://github.com/symfony-cmf/standard-edition/releases

 

1:

composer create-project --ignore-platform-reqs symfony-cmf/sandbox cmf-sandbox

执行后如下:

Installing symfony-cmf/sandbox (2.0.0)
  - Installing symfony-cmf/sandbox (2.0.0): Loading from cache
Created project in cmf-sandbox
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Package operations: 111 installs, 0 updates, 0 removals
  - Installing twig/twig (v1.34.4): Loading from cache
  - Installing symfony/polyfill-util (v1.5.0): Loading from cache
  - Installing paragonie/random_compat (v2.0.10): Loading from cache
  - Installing symfony/polyfill-php70 (v1.5.0): Loading from cache
  - Installing symfony/polyfill-php56 (v1.5.0): Loading from cache
  - Installing symfony/polyfill-mbstring (v1.5.0): Loading from cache
  - Installing symfony/symfony (v3.3.6): Loading from cache

 。。。。

技术图片
Creating the "app/config/parameters.yml" file
Some parameters are missing. Please provide them.
locale (en):
locales ([en, fr, de]):
secret (ThisTokenIsNotSoSecretChangeIt): dsfkdsahflkdsahfkdsafjdsafkdsajfh
coffee.extension (\\.coffee-disabled$):
coffee.bin (‘‘):
coffee.node (‘‘):
database_driver (pdo_sqlite):
database_host (null):
database_port (null):
database_name (null):
database_user (null):
database_password (null):
database_path (%kernel.root_dir%/../var/app.sqlite):
mailer_transport (smtp):
mailer_host (localhost):
mailer_user (null):
mailer_password (null):
Creating the "app/config/phpcr.yml" file
Some parameters are missing. Please provide them.
phpcr_backend ( logging: true, profiling: true, type: doctrinedbal, connection:
 default, caches:  meta: doctrine_cache.providers.phpcr_meta, nodes: doctrine_c
ache.providers.phpcr_nodes , parameters:  jackalope.check_login_on_server: fal
se  ):
phpcr_workspace (default):
phpcr_user (admin):
phpcr_pass (admin):
> Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap
> Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache

Fatal error: Uncaught Symfony\\Component\\Debug\\Exception\\ContextErrorException: W
arning: count(): Parameter must be an array or an object that implements Countab
le in E:\\_My_File_____\\_work\\MyCode\\Symfony\\cmf-sandbox\\vendor\\symfony-cmf\\routi
ng\\src\\ChainRouter.php:101
Stack trace:
#0 E:\\_My_File_____\\_work\\MyCode\\Symfony\\cmf-sandbox\\vendor\\symfony-cmf\\routingsrc\\ChainRouter.php(308): Symfony\\Cmf\\Component\\Routing\\ChainRouter->all()
#1 E:\\_My_File_____\\_work\\MyCode\\Symfony\\cmf-sandbox\\var\\cache\\dev\\appDevDebugPr
ojectContainer.php(1670): Symfony\\Cmf\\Component\\Routing\\ChainRouter->setContext(
Object(Symfony\\Component\\Routing\\RequestContext))
#2 E:\\_My_File_____\\_work\\MyCode\\Symfony\\cmf-sandbox\\vendor\\symfony\\symfony\\srcSymfony\\Component\\DependencyInjection\\Container.php(335): appDevDebugProjectCont
ainer->getCmfRouting_RouterService()
#3 E:\\_My_File_____\\_work\\MyCode\\Symfony\\cmf-sandbox\\var\\cache\\dev\\appDevDebugPr
ojectContainer.php(1106): Symfony\\Component\\DependencyInjection\\Container->get(cmf_routing.rou...)
#4 E:\\_My_File in E:\\_My_File_____\\_work\\MyCode\\Symfony\\cmf-sandbox\\vendor\\symfo
ny-cmf\\routing\\src\\ChainRouter.php on line 101
PHP Fatal error:  Uncaught Symfony\\Component\\Debug\\Exception\\ContextErrorExcepti
on: Warning: count(): Parameter must be an array or an object that implements Co
untable in E:\\_My_File_____\\_work\\MyCode\\Symfony\\cmf-sandbox\\vendor\\symfony-cmfrouting\\src\\ChainRouter.php:101
Stack trace:
#0 E:\\_My_File_____\\_work\\MyCode\\Symfony\\cmf-sandbox\\vendor\\symfony-cmf\\routingsrc\\ChainRouter.php(308): Symfony\\Cmf\\Component\\Routing\\ChainRouter->all()
#1 E:\\_My_File_____\\_work\\MyCode\\Symfony\\cmf-sandbox\\var\\cache\\dev\\appDevDebugPr
ojectContainer.php(1670): Symfony\\Cmf\\Component\\Routing\\ChainRouter->setContext(
Object(Symfony\\Component\\Routing\\RequestContext))
#2 E:\\_My_File_____\\_work\\MyCode\\Symfony\\cmf-sandbox\\vendor\\symfony\\symfony\\srcSymfony\\Component\\DependencyInjection\\Container.php(335): appDevDebugProjectCont
ainer->getCmfRouting_RouterService()
#3 E:\\_My_File_____\\_work\\MyCode\\Symfony\\cmf-sandbox\\var\\cache\\dev\\appDevDebugPr
ojectContainer.php(1106): Symfony\\Component\\DependencyInjection\\Container->get(cmf_routing.rou...)
#4 E:\\_My_File in E:\\_My_File_____\\_work\\MyCode\\Symfony\\cmf-sandbox\\vendor\\symfo
ny-cmf\\routing\\src\\ChainRouter.php on line 101
Script Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache handl
ing the post-install-cmd event terminated with an exception


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


  Fatal error: Uncaught Symfony\\Component\\Debug\\Exception\\ContextErrorExcepti
  on: Warning: count(): Parameter must be an array or an object that implemen
  ts Countable in E:\\_My_File_____\\_work\\MyCode\\Symfony\\cmf-sandbox\\vendor\\sy
  mfony-cmf\\routing\\src\\ChainRouter.php:101
  Stack trace:
  #0 E:\\_My_File_____\\_work\\MyCode\\Symfony\\cmf-sandbox\\vendor\\symfony-cmf\\rou
  ting\\src\\ChainRouter.php(308): Symfony\\Cmf\\Component\\Routing\\ChainRouter->a
  ll()
  #1 E:\\_My_File_____\\_work\\MyCode\\Symfony\\cmf-sandbox\\var\\cache\\dev\\appDevDe
  bugProjectContainer.php(1670): Symfony\\Cmf\\Component\\Routing\\ChainRouter->s
  etContext(Object(Symfony\\Component\\Routing\\RequestContext))
  #2 E:\\_My_File_____\\_work\\MyCode\\Symfony\\cmf-sandbox\\vendor\\symfony\\symfony
  \\src\\Symfony\\Component\\DependencyInjection\\Container.php(335): appDevDebugP
  rojectContainer->getCmfRouting_RouterService()
  #3 E:\\_My_File_____\\_work\\MyCode\\Symfony\\cmf-sandbox\\var\\cache\\dev\\appDevDe
  bugProjectContainer.php(1106): Symfony\\Component\\DependencyInjection\\Contai
  ner->get(cmf_routing.rou...)
  #4 E:\\_My_File in E:\\_My_File_____\\_work\\MyCode\\Symfony\\cmf-sandbox\\vendor  symfony-cmf\\routing\\src\\ChainRouter.php on line 101


  PHP Fatal error:  Uncaught Symfony\\Component\\Debug\\Exception\\ContextErrorEx
  ception: Warning: count(): Parameter must be an array or an object that imp
  lements Countable in E:\\_My_File_____\\_work\\MyCode\\Symfony\\cmf-sandbox\\vend
  or\\symfony-cmf\\routing\\src\\ChainRouter.php:101
  Stack trace:
  #0 E:\\_My_File_____\\_work\\MyCode\\Symfony\\cmf-sandbox\\vendor\\symfony-cmf\\rou
  ting\\src\\ChainRouter.php(308): Symfony\\Cmf\\Component\\Routing\\ChainRouter->a
  ll()
  #1 E:\\_My_File_____\\_work\\MyCode\\Symfony\\cmf-sandbox\\var\\cache\\dev\\appDevDe
  bugProjectContainer.php(1670): Symfony\\Cmf\\Component\\Routing\\ChainRouter->s
  etContext(Object(Symfony\\Component\\Routing\\RequestContext))
  #2 E:\\_My_File_____\\_work\\MyCode\\Symfony\\cmf-sandbox\\vendor\\symfony\\symfony
  \\src\\Symfony\\Component\\DependencyInjection\\Container.php(335): appDevDebugP
  rojectContainer->getCmfRouting_RouterService()
  #3 E:\\_My_File_____\\_work\\MyCode\\Symfony\\cmf-sandbox\\var\\cache\\dev\\appDevDe
  bugProjectContainer.php(1106): Symfony\\Component\\DependencyInjection\\Contai
  ner->get(cmf_routing.rou...)
  #4 E:\\_My_File in E:\\_My_File_____\\_work\\MyCode\\Symfony\\cmf-sandbox\\vendor  symfony-cmf\\routing\\src\\ChainRouter.php on line 101


create-project [-s|--stability STABILITY] [--prefer-source] [--prefer-dist] [--r
epository REPOSITORY] [--repository-url REPOSITORY-URL] [--dev] [--no-dev] [--no
-custom-installers] [--no-scripts] [--no-progress] [--no-secure-http] [--keep-vc
s] [--remove-vcs] [--no-install] [--ignore-platform-reqs] [--] [<package>] [<dir
ectory>] [<version>]
View Code

 

以上是关于从零开始创建 symfony-cmf的主要内容,如果未能解决你的问题,请参考以下文章

从零开始学习CANoe—— CANdb++ 创建 dbc文件

从零开始学习CANoe(十九)—— Python和CANoe的数据交互

从零开始学习CANoe(十五)—— Graphics

从零开始学习CANoe—— 新建工程

从零开始-使用IDEA创建SpringBoot项目

用Python从零开始创建区块链