前提:

官方 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

或者(我执行下面的成功了 参考:https://stackoverflow.com/questions/54000039/installing-symfony-project-with-php-7-3-version

composer create-project --ignore-platform-reqs --stability=dev symfony-cmf/sandbox:dev-master 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:
Stack trace:
# E:\_My_File_____\_work\MyCode\Symfony\cmf-sandbox\vendor\symfony-cmf\routing\
src\ChainRouter.php(): Symfony\Cmf\Component\Routing\ChainRouter->all()
# E:\_My_File_____\_work\MyCode\Symfony\cmf-sandbox\var\cache\dev\appDevDebugPr
ojectContainer.php(): Symfony\Cmf\Component\Routing\ChainRouter->setContext(
Object(Symfony\Component\Routing\RequestContext))
# E:\_My_File_____\_work\MyCode\Symfony\cmf-sandbox\vendor\symfony\symfony\src\
Symfony\Component\DependencyInjection\Container.php(): appDevDebugProjectCont
ainer->getCmfRouting_RouterService()
# E:\_My_File_____\_work\MyCode\Symfony\cmf-sandbox\var\cache\dev\appDevDebugPr
ojectContainer.php(): Symfony\Component\DependencyInjection\Container->get('
cmf_routing.rou...')
# E:\_My_File in E:\_My_File_____\_work\MyCode\Symfony\cmf-sandbox\vendor\symfo
ny-cmf\routing\src\ChainRouter.php on line
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-cmf\
routing\src\ChainRouter.php:
Stack trace:
# E:\_My_File_____\_work\MyCode\Symfony\cmf-sandbox\vendor\symfony-cmf\routing\
src\ChainRouter.php(): Symfony\Cmf\Component\Routing\ChainRouter->all()
# E:\_My_File_____\_work\MyCode\Symfony\cmf-sandbox\var\cache\dev\appDevDebugPr
ojectContainer.php(): Symfony\Cmf\Component\Routing\ChainRouter->setContext(
Object(Symfony\Component\Routing\RequestContext))
# E:\_My_File_____\_work\MyCode\Symfony\cmf-sandbox\vendor\symfony\symfony\src\
Symfony\Component\DependencyInjection\Container.php(): appDevDebugProjectCont
ainer->getCmfRouting_RouterService()
# E:\_My_File_____\_work\MyCode\Symfony\cmf-sandbox\var\cache\dev\appDevDebugPr
ojectContainer.php(): Symfony\Component\DependencyInjection\Container->get('
cmf_routing.rou...')
# E:\_My_File in E:\_My_File_____\_work\MyCode\Symfony\cmf-sandbox\vendor\symfo
ny-cmf\routing\src\ChainRouter.php on line
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:
Stack trace:
# E:\_My_File_____\_work\MyCode\Symfony\cmf-sandbox\vendor\symfony-cmf\rou
ting\src\ChainRouter.php(): Symfony\Cmf\Component\Routing\ChainRouter->a
ll()
# E:\_My_File_____\_work\MyCode\Symfony\cmf-sandbox\var\cache\dev\appDevDe
bugProjectContainer.php(): Symfony\Cmf\Component\Routing\ChainRouter->s
etContext(Object(Symfony\Component\Routing\RequestContext))
# E:\_My_File_____\_work\MyCode\Symfony\cmf-sandbox\vendor\symfony\symfony
\src\Symfony\Component\DependencyInjection\Container.php(): appDevDebugP
rojectContainer->getCmfRouting_RouterService()
# E:\_My_File_____\_work\MyCode\Symfony\cmf-sandbox\var\cache\dev\appDevDe
bugProjectContainer.php(): Symfony\Component\DependencyInjection\Contai
ner->get('cmf_routing.rou...')
# E:\_My_File in E:\_My_File_____\_work\MyCode\Symfony\cmf-sandbox\vendor\
symfony-cmf\routing\src\ChainRouter.php on line 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:
Stack trace:
# E:\_My_File_____\_work\MyCode\Symfony\cmf-sandbox\vendor\symfony-cmf\rou
ting\src\ChainRouter.php(): Symfony\Cmf\Component\Routing\ChainRouter->a
ll()
# E:\_My_File_____\_work\MyCode\Symfony\cmf-sandbox\var\cache\dev\appDevDe
bugProjectContainer.php(): Symfony\Cmf\Component\Routing\ChainRouter->s
etContext(Object(Symfony\Component\Routing\RequestContext))
# E:\_My_File_____\_work\MyCode\Symfony\cmf-sandbox\vendor\symfony\symfony
\src\Symfony\Component\DependencyInjection\Container.php(): appDevDebugP
rojectContainer->getCmfRouting_RouterService()
# E:\_My_File_____\_work\MyCode\Symfony\cmf-sandbox\var\cache\dev\appDevDe
bugProjectContainer.php(): Symfony\Component\DependencyInjection\Contai
ner->get('cmf_routing.rou...')
# E:\_My_File in E:\_My_File_____\_work\MyCode\Symfony\cmf-sandbox\vendor\
symfony-cmf\routing\src\ChainRouter.php on line 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>]

建议大家使用php7.1

然后按照官方教程执行

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

最新文章

  1. screen
  2. JavaScript字符串排序localeCompare()笔记
  3. dictionary 添加数据
  4. z-index详解
  5. python读取excel的行数
  6. IIS 发布网站遇到的问题
  7. delphi xe5 android sample 中的 SimpleList 是怎样绑定的
  8. session cookie 相结合实现
  9. JQuery中如何click中传递参数
  10. Hibernate对应关系(了解)
  11. FormData上传文件(input file)
  12. Python3学习笔记04-运算符
  13. UE4入门(三)
  14. VS Code:让你工作效率翻倍的23个插件和23个编辑技巧
  15. Win-Lin双系统重装Windows找回Linux启动
  16. 【Codeforces666E】Forensic Examination 后缀自动机 + 线段树合并
  17. HelloWorld 之JasperReports初步
  18. javascript:typeof与instanceof区别
  19. Java中 堆 栈,常量池等概念解析(转载)
  20. Spring Boot系列教程七:Spring boot集成MyBatis

热门文章

  1. Mysql UPF 安装文档
  2. C程序优化
  3. JAVA10以上版本 搜索不到 dt.jar和tools.jar
  4. UVA-10462.Is There A Second Way Left(Kruskal+次小生成树)
  5. Lpl and Energy-saving Lamps
  6. 把java(springboot)程序打包docker镜像
  7. nginx负载均衡的搭建和简单例子
  8. FFmpeg从入门到出家(FLV文件结构解析)
  9. nativescript(angular2)——ListView组件
  10. Sublime-emmet插件的使用