是否值得升级到最新版本的 CodeIgniter?

发布于 2024-07-07 17:51:54 字数 21 浏览 5 评论 0原文

我落后了大约 2 个小修改。

I am about 2 minor revisions behind.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

扛刀软妹 2024-07-14 17:51:54

我是那些总是升级东西的人之一。 但请查看官方变更日志,看看许多错误修复和新功能是否足够有趣给你。

我注意到 1.7.0 已经发布了,我一定要升级。 但我需要在升级后测试我的应用程序,因为更改可能会破坏现有代码。

I'm one of those guys who always upgrade stuff. But have a look at the official changelog and see if the many bugfixes and new features are interesting enough to you.

I noticed 1.7.0 is out, and I'm definetly going to upgrade. But I need to test my applications after upgrading, since changes could break existing code.

逐鹿 2024-07-14 17:51:54

如果有一些新功能你会觉得有用,或者它修复了一些一直困扰你的错误,绝对是这样。 如果您只落后于次要版本,则可能没有太多理由升级。

检查变更日志,如果有您感兴趣的内容,请升级。

我想“如果它没有坏,就不要修复它”这句话仍然适用,但如果这是一个小型的个人项目,为什么不尝试一下新的更闪亮的版本呢?

If there is some new feature you would find useful, or it fixes some bug that has been annoying you, absolutely. If you are only to minor versions behind, there probably isn't much reason to upgrade.

Check the changelog, if there's something that interests you, then upgrade.

I suppose the "if it's not broken, don't fix it" saying still applies, but if it's a small personal project, why not play around with the new shinier version?

少女的英雄梦 2024-07-14 17:51:54

我总是留意最新版本,尤其是我的一个宠物项目。 我升级到 1.7.0 时出现了一个问题,它破坏了我使用 CI 会话的身份验证过程。

我最终使用 Native 会话构建了自己的 Auth 库。

I always watch out for the latest version especially for a pet project of mine. There was just a problem with my upgrade to 1.7.0 which broke my authentication processes using CI sessions.

I ended up building my own Auth library using Native sessions.

风为裳 2024-07-14 17:51:54

我升级了,有一些很酷的新功能,例如表单验证类,您不再有 2 行单独的规则和字段。

以下是 Validation 类中的一些更改,例如:

第一个是加载验证库的任何位置。

旧的/已弃用的方法:$this->load->library('validation');

新方法:$this->load->library('form_validation');

您还需要更改字段和规则声明:

旧的/已弃用的方法: $rules['name'] = “trim|required|max_length[100]”; $fields['name'] = “你的名字”;

新方法:$this->form_validation->set_rules('name', 'your name', 'trim|required|max_length[100]');

最后,更改条件检查:

旧的/已弃用的方法: if ($this->validation->run() == TRUE) {}

新方法: if ($this->form_validation->run() = = 真){}

I upgraded, there's some cool new features like with the Form Validation class, you no longer have 2 separate lines for rules and fields.

Here are some of the changes in the Validation class, for example:

The first is anywhere you load the validation library.

Old/deprecated method: $this->load->library(’validation’);

New method: $this->load->library(’form_validation’);

You need to also change your fields and rule declarations:

Old/deprecated method: $rules['name'] = “trim|required|max_length[100]“; $fields['name'] = “your name”;

New method: $this->form_validation->set_rules(’name’, ‘your name’, ‘trim|required|max_length[100]‘);

And finally, change conditional checks:

Old/deprecated method: if ($this->validation->run() == TRUE) {}

New method: if ($this->form_validation->run() == TRUE) {}

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文