This is no April Fool's joke, we're back: Typecho 1.2.0 released!

MissD
中文

Just now, Qi Ning, the initiator of the Typecho project, announced the release of the official version of Typecho 1.2.0 on the official blog with the developer account @joyqi - "This is not a joke, we are back!"

The arrival of this official version is an upgraded version of v1.2.0-rc.1 (Release Candidate version) released after the mainline version of Typecho announced its return in September last year.

Important improvements in the official version of Typecho 1.2.0

Compared with v1.2.0-rc.1, the new Typecho 1.2.0 official version has many important improvements:

  • New editor live preview auto-follow effect, and in-theme preview feature
  • Adaptation of the background interface to the mobile terminal
  • new installer
  • Enter the PHP 7.2 era, and better support for PHP 8
  • Better support for containerization

In addition to the above new and improved functions, the version number rules of the official version have also changed: the new version number will be composed of three regular groups of numbers (such as 1.2.0), which is suitable for the development mode of small steps and fast running.

Previously, due to the large version/time version (such as 1.1/17.10.30 representing version 1.1 released on October 30, 2017, the version number imitated the release version of ubuntu, which is more suitable for the release of a fixed version on a fixed date every year. form), which is not in line with the current development status of Typecho, so the new version number will be composed of conventional 3 sets of numbers.

For example, 1.2.0, the first two parts are large version numbers, which will change when important updates are made; the last one is suitable for minor updates, and updates for some minor bug fixes. The new version rules can make Typecho's version release more flexible, and minor version updates can be more frequent.

"Goodbye" PHP 5, "Hello" PHP 7.2

According to the initiator Qi Ning, the "birth" of Typecho coincided with the popularity of PHP 5. At that time, PHP 7 was still a "rookie", and PHP 8 was already on the stage in a blink of an eye. So, for Typecho to stay relevant, it's time for a change - the Typecho project will move to PHP 7 as a whole, more specifically PHP 7.2.

"Higher programming language versions can not only bring better execution efficiency, but also the key to improve programming efficiency." The reason why the Typecho project turned to the PHP 7.2 language version as a whole is mainly due to compatibility. Of course, for users, it is still recommended that you use a newer PHP version such as PHP 7.4 or PHP 8.0.

After upgrading to PHP 7.2, the Typecho code will have the following changes:

  • Class names are all changed from underscore style to backslash namespace style

// previous code

new Typecho_Widget_Helper_Form();

// code after

use Typecho\Widget\Helper\Form;
new Form();

  • The coding style is recommended to use PSR-12 uniformly
  • Stronger type constraints, all interface parameters and return values will be added with type constraints, so everyone should pay more attention to the specifications when using them.
  • Removed a lot of obsolete/useless code.

At present, the update of the project is under development in the dev branch, and the code of the Typecho namespace has basically been transformed. Thanks to the newly designed autoloading system, the old class names and usage methods will also be compatible, so you don't have to worry about the previous plugins and themes not working.

Brand new install script

The official version of Typecho 1.2.0 has developed a new installation script based on native UI components, which can be described as a complete rewrite compared to the previous "code flying" changes on the interface. In addition to more convenient interaction, the new installation script also supports silent installation on the command line through environment variables, creating conditions for subsequent changes.

Embrace containerization

With the strong rise of microservices in recent years, the basic containerization of microservices has already entered the vision of ordinary developers. Whether it is k8s or Docker, it has become a basic requirement to design for containerization during code deployment. The new Typecho 1.2.0 official version has also made great progress in containerization. At present, the official container has been officially launched:

Docker Hub: https://hub.docker.com/r/joyqi/typecho
Github: https://github.com/typecho/Dockerfile

The official Docker image supports PHP 7.3 PHP 7.4 PHP 8.0, and the operating environment supports FPM Apache Cli and other modes, and the operating system can be debian or a smaller alpine.

Typecho uses Github's pipeline for fully automated compilation and submission. In addition to automatic compilation when a new version is released, a nightly version is also automatically released every night (currently only this version, not the official code, is recommended for testing), and the Dockerfile documentation also in writing.

Continuous integration tools such as Github Actions make the development and release testing work more efficient, and Typecho has designed many interesting pipelines.

About Typecho

Typecho is a combination of the words type and echo, and comes from the brainstorming of the development team.

Typecho is a lightweight open source blog program (formerly an open source blog program called Magike) that is developed and constructed based on PHP 7 with a robust kernel, convenient extension, friendly experience, and smooth running. Typecho is released under the GPLVersion 2 license and can run on various platforms and supports multiple databases (Mysql , PostgreSQL , SQLite).

Reference link: https://joyqi.com/typecho/about-typecho-1-2-dev-plan.html

Qi Ning Joyqi, the founder and CTO of SegmentFault, graduated from the Department of Telecommunications of Huazhong University of Science and Technology, and is the 98th member of the Huake Dian team. He used to work in Alibaba, worked as a technical architect in a game company, and developed the open source blogging system Typecho during college, which has been loved by nearly a million independent developers and designers.

阅读 2.6k

SegmentFault_行业快讯
第一时间为开发者提供行业相关的实时热点资讯

SegmentFault 思否 技术编辑

868 声望
31 粉丝
0 条评论

SegmentFault 思否 技术编辑

868 声望
31 粉丝
文章目录
宣传栏