Skip to content

vodevel/php-intl-with-specific-icu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

php-intl-with-specific-icu

A collection of scripts for building PHP Intl with a custom ICU version.
Originally created for CentOS, but you are free to adapt them for any Linux distribution.

This project was inspired by the excellent work in shivammathur/icu-intl
If you are on Ubuntu, that project may suit your needs better and is highly recommended.


📦 Prerequisites

Before using the scripts, ensure your environment is correctly prepared.

1. Install a Recent G++ Compiler

For CentOS, run:

sudo yum install centos-release-scl -y
# yum list available | grep devtoolset
sudo yum install devtoolset-11-gcc devtoolset-11-gcc-c++ devtoolset-11-binutils

2. Install phpize

sudo yum install php-devel

3. Download helper scripts (required)

Clone or download the repository icu-intl by shivammathur:

https://github.com/shivammathur/icu-intl

Place it in a directory accessible to these build.sh script (set this path in the configuration variables of build.sh too).


⚙️ Configuration

Before executing any script, open the file and review the configuration block at the top to ensure it matches your system setup and desired ICU/PHP paths.


🚀 Workflow

build.sh

Builds:

  • The ICU library (custom version)
  • The PHP Intl extension compiled against the built ICU

apply.sh

Applies the newly built intl.so with the following behavior:

  • Automatically creates a backup of the original module
  • Restores the original version if any issue occurs

❤️ Good Luck!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages