dongzhiyong8577 2017-09-22 14:05
浏览 5
已采纳

如何更新CakePHP?

I have to update CakePHP from current, outdated version (2.7.7) to latest on 2 branch, because of PHP7 support.

While I've done numerous framework upgrades before, I found book.cakephp.org a more than a cryptic about key things which I ask here:

  • can it be done by replacing directoris
  • which directories are intended to be replaced (never edit dirs, like system in Codeigniter)
  • which directories are partially replaced if any
  • is there SQL commands that should be run?
  • is there other commands that should be run?

Any clue is appreciated, but 2 and 3 are of most value I guess. Thanks in advance.

  • 写回答

2条回答 默认 最新

  • dongqiang5865 2017-09-22 14:20
    关注

    Depending on how you've installed CakePHP, you either use composer to update the CakePHP core dependency:

    $ composer update
    

    or require a specific constraint/version if your current constraint doesn't allow upgrading:

    $ composer require cakephp/cakephp:^2.10.3
    

    If you're not using composer (I'd suggest to switch to using it), then you download the latest release package manually, and completely replace the /lib/Cake directory. With respect to the core, the upgrade is then complete.

    Then read the migration guides to figure the possible changes that you have to apply to your application code or database schemas, and also compare the "application template" changes (/app/) to your local application and apply changes in case necessary. After this, run your test suite to ensure that everything works as expected.

    With that being said, the upgrade from 2.7 to the latest 2.10 should be pretty easy, as it is said to be fully API compatible.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 脱敏项目合作,ner需求合作
  • ¥15 脱敏项目合作,ner需求合作
  • ¥30 Matlab打开默认名称带有/的光谱数据
  • ¥50 easyExcel模板 动态单元格合并列
  • ¥15 res.rows如何取值使用
  • ¥15 在odoo17开发环境中,怎么实现库存管理系统,或独立模块设计与AGV小车对接?开发方面应如何设计和开发?请详细解释MES或WMS在与AGV小车对接时需完成的设计和开发
  • ¥15 CSP算法实现EEG特征提取,哪一步错了?
  • ¥15 游戏盾如何溯源服务器真实ip?需要30个字。后面的字是凑数的
  • ¥15 vue3前端取消收藏的不会引用collectId
  • ¥15 delphi7 HMAC_SHA256方式加密