From 22d313978227bb2009004675101315d32933e384 Mon Sep 17 00:00:00 2001 From: Dmitrii Derepko Date: Thu, 30 Jan 2025 18:29:28 +0300 Subject: [PATCH 01/10] doc: update macos instruction --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c5376f67725cd..c33ffb607e9e0 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,10 @@ On Ubuntu, you can install these using: sudo apt install -y pkg-config build-essential autoconf bison re2c \ libxml2-dev libsqlite3-dev +On MacOS, you can install these using: + + brew install build-essential autoconf bison re2c iconv + On Fedora, you can install these using: sudo dnf install re2c bison autoconf make libtool ccache libxml2-devel sqlite-devel @@ -63,7 +67,7 @@ Configure your build. `--enable-debug` is recommended for development, see Build PHP. To speed up the build, specify the maximum number of jobs using `-j`: - make -j4 + make -j$(nproc) The number of jobs should usually match the number of available cores, which can be determined using `nproc`. From 5422adc8b6ecd9ba7daaa903e71d354d5b814e43 Mon Sep 17 00:00:00 2001 From: Dmitrii Derepko Date: Thu, 30 Jan 2025 18:30:42 +0300 Subject: [PATCH 02/10] ignore intellij idea config dir --- .gitignore | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.gitignore b/.gitignore index 52dde98ed43b6..cc811fcc5a616 100644 --- a/.gitignore +++ b/.gitignore @@ -290,6 +290,11 @@ tmp-php.ini /junit.out.xml /.ccache/ +# ------------------------------------------------------------------------------ +# Intellij IDEA configuration directory +# ------------------------------------------------------------------------------ +/.idea + # ------------------------------------------------------------------------------ # Special cases to invert previous ignore patterns # ------------------------------------------------------------------------------ From 70c451fa1b7fbd6b591e6a7399b993d644f9af07 Mon Sep 17 00:00:00 2001 From: Dmitrii Derepko Date: Thu, 30 Jan 2025 19:54:32 +0300 Subject: [PATCH 03/10] doc: wrap shell commands into language specific section --- README.md | 39 +++++++++++++++++++++++++++------------ 1 file changed, 27 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index c33ffb607e9e0..81a4e150ce926 100644 --- a/README.md +++ b/README.md @@ -42,32 +42,43 @@ a default build, you will additionally need libxml2 and libsqlite3. On Ubuntu, you can install these using: - sudo apt install -y pkg-config build-essential autoconf bison re2c \ - libxml2-dev libsqlite3-dev +```shell +sudo apt install -y pkg-config build-essential autoconf bison re2c libxml2-dev libsqlite3-dev +``` On MacOS, you can install these using: - brew install build-essential autoconf bison re2c iconv +```shell +brew install build-essential autoconf bison re2c iconv +``` On Fedora, you can install these using: - sudo dnf install re2c bison autoconf make libtool ccache libxml2-devel sqlite-devel +```shell +sudo dnf install re2c bison autoconf make libtool ccache libxml2-devel sqlite-devel +``` Generate configure: - ./buildconf +```shell +./buildconf +``` Configure your build. `--enable-debug` is recommended for development, see `./configure --help` for a full list of options. - # For development - ./configure --enable-debug - # For production - ./configure +```shell +# For development +./configure --enable-debug +# For production +./configure +``` Build PHP. To speed up the build, specify the maximum number of jobs using `-j`: - make -j$(nproc) +```shell +make -j$(nproc) +``` The number of jobs should usually match the number of available cores, which can be determined using `nproc`. @@ -80,7 +91,9 @@ successful compilation of the sources to run this test suite. It is possible to run tests using multiple cores by setting `-jN` in `TEST_PHP_ARGS`: - make TEST_PHP_ARGS=-j4 test +```shell +make TEST_PHP_ARGS=-j4 test +``` Shall run `make test` with a maximum of 4 concurrent jobs: Generally the maximum number of jobs should not exceed the number of cores available. @@ -92,7 +105,9 @@ testing and quality assurance. After a successful build (and test), PHP may be installed with: - make install +```shell +make install +``` Depending on your permissions and prefix, `make install` may need super user permissions. From bd548d86425e345c8d456e281e504a29ea733f53 Mon Sep 17 00:00:00 2001 From: Dmitrii Derepko Date: Thu, 30 Jan 2025 19:58:00 +0300 Subject: [PATCH 04/10] doc: add example how to run specific tests dirs --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 81a4e150ce926..aea07dd190bed 100644 --- a/README.md +++ b/README.md @@ -98,6 +98,12 @@ make TEST_PHP_ARGS=-j4 test Shall run `make test` with a maximum of 4 concurrent jobs: Generally the maximum number of jobs should not exceed the number of cores available. +Use `TESTS` variable to tests only specific directories: + +```shell +make TESTS=Zend/tests/throw/ test +``` + The [qa.php.net](https://qa.php.net) site provides more detailed info about testing and quality assurance. From e817be8f0c433538adf847f8d891a5a4566cd9ca Mon Sep 17 00:00:00 2001 From: Dmitrii Derepko Date: Thu, 30 Jan 2025 19:58:10 +0300 Subject: [PATCH 05/10] doc: fix typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index aea07dd190bed..09f7bf9d6f219 100644 --- a/README.md +++ b/README.md @@ -115,7 +115,7 @@ After a successful build (and test), PHP may be installed with: make install ``` -Depending on your permissions and prefix, `make install` may need super user +Depending on your permissions and prefix, `make install` may need superuser permissions. ## PHP extensions From 4b0ce1e6b59ff0e83109deeaa30ca77024d1a207 Mon Sep 17 00:00:00 2001 From: Dmitrii Derepko Date: Thu, 30 Jan 2025 20:14:18 +0300 Subject: [PATCH 06/10] doc: remove undefined package instruction --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 09f7bf9d6f219..43f6aa0f96907 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ sudo apt install -y pkg-config build-essential autoconf bison re2c libxml2-dev l On MacOS, you can install these using: ```shell -brew install build-essential autoconf bison re2c iconv +brew install autoconf bison re2c iconv ``` On Fedora, you can install these using: From e47a8218a2cfe05f88457c504d602b52be00956e Mon Sep 17 00:00:00 2001 From: Dmitrii Derepko Date: Sun, 2 Feb 2025 15:11:49 +0300 Subject: [PATCH 07/10] doc: change example dir --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 43f6aa0f96907..7fdf510e1d7a3 100644 --- a/README.md +++ b/README.md @@ -101,7 +101,7 @@ number of jobs should not exceed the number of cores available. Use `TESTS` variable to tests only specific directories: ```shell -make TESTS=Zend/tests/throw/ test +make TESTS=tests/lang/ test ``` The [qa.php.net](https://qa.php.net) site provides more detailed info about From 5a339c556e84c7be61a3d02c4e28e0478beafac0 Mon Sep 17 00:00:00 2001 From: Dmitrii Derepko Date: Sun, 2 Feb 2025 15:17:48 +0300 Subject: [PATCH 08/10] doc: rewrite doc about speeding build --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7fdf510e1d7a3..b06b1d8f8adcb 100644 --- a/README.md +++ b/README.md @@ -74,8 +74,14 @@ Configure your build. `--enable-debug` is recommended for development, see ./configure ``` -Build PHP. To speed up the build, specify the maximum number of jobs using `-j`: +Build PHP. To speed up the build, specify the maximum number of jobs using `-j` argument: +On Windows: +```shell +make -j4 +``` + +On Unix system: ```shell make -j$(nproc) ``` From 69c83b79f9635397b81d162eb303d1d951e3db45 Mon Sep 17 00:00:00 2001 From: Dmitrii Derepko Date: Sun, 2 Feb 2025 15:20:17 +0300 Subject: [PATCH 09/10] doc: add missing dependencies for macos --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b06b1d8f8adcb..eb2a49f738ab4 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ sudo apt install -y pkg-config build-essential autoconf bison re2c libxml2-dev l On MacOS, you can install these using: ```shell -brew install autoconf bison re2c iconv +brew install autoconf bison re2c iconv libxml2 sqlite ``` On Fedora, you can install these using: From 79e5cab985b83ce88ff0c39bec2c3444e6284d46 Mon Sep 17 00:00:00 2001 From: Dmitrii Derepko Date: Tue, 6 May 2025 07:19:55 +0300 Subject: [PATCH 10/10] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index eb2a49f738ab4..a159d4f852ac3 100644 --- a/README.md +++ b/README.md @@ -83,7 +83,7 @@ make -j4 On Unix system: ```shell -make -j$(nproc) +make -j4 ``` The number of jobs should usually match the number of available cores, which