CakePHP 3手动安装 [英] CakePHP 3 manual installation

查看:223
本文介绍了CakePHP 3手动安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目前我使用CakePHP 2.6.8。我想迁移到CakePHP 3. Intallation指南建议使用Composer。但作曲家并没有完成所有的工作,文档不清楚。



当前输入是2.x目录结构:

https://github.com/cakephp/cakephp/tree/2.6.8



基本上哪些文件和文件夹应该为版本3更改?

例如lib / Cake文件在这里和这里。我们如何加入他们? https://github.com/cakephp/cakephp/tree/3.0.3

https://github.com/cakephp/app/tree/3.0.3



cakephp / upgrade工具使得大多数命名空间工作,并改变不推荐使用的类和方法。但它不会把正确的文件夹到新的位置。有一个文件夹结构这里,但它不清楚,在哪里是lib /蛋糕和应用程序文件夹。例如,旧的lib / Cake文件夹移动到Vendors / cakephp文件夹。



请在迁移指南升级工具



所有安装过程都应记录在案。 Composer可以用来转换旧的控制器,视图等文件。但是你知道,升级工具不会做所有必要的步骤。 (例如 https://github.com/cakephp/upgrade/issues/83 )用户应更改某个文件夹结构手动)

解决方案

Cakephp 3.0使用 composer ,而早期版本没有。在继续之前,请熟悉作曲家 - 作曲家不是迁移工具,它是一个依赖项管理器(在大多数PHP项目中使用的defacto标准),迁移工具只是一个插件,一个可选的依赖项。 / p>

请阅读迁移指南,您还可以找到教程如这一个有用。您还可能发现创建一个新项目来熟悉CakePHP 3.0的工作原理(例如,通过遵循 blog tutorial ),然后再尝试迁移现有项目。


Currently I use CakePHP 2.6.8. I want to migrate to CakePHP 3. Intallation guide recommends to use Composer. But composer doesn't make all jobs done, and documentation isn't clear. So I need a step by step guide.

Current input is 2.x directory structure:
https://github.com/cakephp/cakephp/tree/2.6.8

Basicly which files and folders should be changed for version 3 ?
For example lib/Cake files here and here. How can we join them ? https://github.com/cakephp/cakephp/tree/3.0.3
https://github.com/cakephp/app/tree/3.0.3

cakephp/upgrade tools makes most of the namespace work and change deprecated class and methods. But it doesn't put proper folders to new locations. There is a folder structure here but it's unclear that where is lib/Cake and app folders. For example does old lib/Cake folder moved to Vendors/cakephp folder.

Please include other steps for file and folder changes in migration guide and upgrade tool.

All installation process should be documented. Composer can be used to convert old controller, view etc. files. But you know, upgrade tool doesn't make all necessary steps. (For example https://github.com/cakephp/upgrade/issues/83) user should change some folder structure manually)

解决方案

Cakephp 3.0 uses composer whereas earlier versions did not. Please familiarize yourself with composer before continuing - composer is not the migration tool it is a dependency manager (the defacto standard used in most PHP projects), the migration tool is simply a plugin, an optional dependency.

Please do read the migration guide, you may also find tutorials such as this one useful. You may also find it useful to create a new project to familiarize yourself with how CakePHP 3.0 works (such as, by following the blog tutorial) before attempting to migrate an existing project.

这篇关于CakePHP 3手动安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆