shubhamc4/zf1 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

shubhamc4/zf1

最新稳定版本:2.0.0

Composer 安装命令:

composer require shubhamc4/zf1

包简介

Zend Framework 1 updated for PHP 8.2 compatibility

README 文档

README

This is an updated version of the Zend Framework 1 package adapted to work with PHP 8.2.

Background

Zend Framework 1 (ZF1) officially ended its life on September 28, 2016. However, many applications still rely on it, and with PHP moving forward, compatibility issues have emerged.

This package aims to provide a PHP 8.2 compatible version of Zend Framework 1, allowing legacy applications to continue functioning on modern PHP environments.

PHP 8.2 Compatibility

This version of Zend Framework 1 has been updated to be fully compatible with PHP 8.2. Key updates include:

  • Added #[\ReturnTypeWillChange] attributes to interface implementations (Iterator, Countable, ArrayAccess, etc.)
  • Added #[AllowDynamicProperties] attribute to classes that use dynamic properties
  • Replaced deprecated utf8_encode()/utf8_decode() with mb_convert_encoding()
  • Updated string access syntax (replaced curly braces with square brackets)
  • Fixed constructor compatibility issues
  • Updated parameter default value ordering in method signatures
  • Removed usage of deprecated PHP functions and features

For more detailed information about the PHP 8.2 compatibility changes, see the PHP82_COMPATIBILITY.md file.

Installation

composer require shubhamc4/zf1

Requirements

  • PHP 8.2 or higher

Usage with Legacy Applications

When using this package with an existing ZF1 application, you may need to make some changes to your code to ensure compatibility with PHP 8.2:

  1. Add #[\ReturnTypeWillChange] to any custom classes that implement PHP interfaces
  2. Add property declarations or use #[AllowDynamicProperties] for classes that create properties dynamically
  3. Replace deprecated functions like utf8_encode(), utf8_decode(), create_function(), etc.
  4. Update string access syntax from $string{0} to $string[0]

License

BSD-3-Clause (same as the original Zend Framework)

统计信息

  • 总下载量: 16
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2025-05-09