Skip to content

Commit 3ffaedc

Browse files
2023.2 release code drop.
This release of P4PHP is built against P4API 2023.2
1 parent e6b70f7 commit 3ffaedc

File tree

11 files changed

+204
-156
lines changed

11 files changed

+204
-156
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[![Support](https://img.shields.io/badge/Support-Official-green.svg)](mailto:[email protected])
22

3-
# p4php
4-
P4PHP is a wrapper for the P4 C++ API in PHP.
3+
# p4php7
4+
P4PHP7 is a wrapper for the P4 C++ API in PHP.

RELNOTES.txt

Lines changed: 83 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Release Notes for
22
P4PHP, Perforce's script API for PHP
33

4-
Version 2020.2
4+
Version 2023.2
55

66
Introduction
77

@@ -20,99 +20,72 @@ Introduction
2020

2121
--------------------------------------------------------------------------
2222

23-
Unix and Mac: Building the P4PHP Extension
23+
Installation
24+
25+
Unix and Mac: Building the P4PHP Extension
2426

25-
To build P4PHP, you need the header files and libraries used by
26-
PHP and the "phpize" command-line utility. Both of these
27-
requirements can be met by installing PHP from source or by
28-
installing the development php packages (php-devel) appropriate
29-
for your operating system.
27+
The official version of P4Python exists as source on:
28+
https://github.com/perforce/p4php
3029

31-
After you have obtained the required files and the phpize utility,
32-
perform the following steps:
30+
Instructions for building are in the build.md file which can be found
31+
here - https://github.com/perforce/p4php/blob/master/build.md
32+
3333

34-
1. Download the Perforce P4PHP files.
35-
ftp://ftp.perforce.com/perforce/r20.2/bin.tools/p4php.tgz
36-
for the 2020.2 P4PHP.
34+
Windows: Building the P4PHP DLL
3735

38-
2. Download the Perforce C++ API from the Perforce FTP site at
39-
"ftp://ftp.perforce.com/perforce". The API archive is located
40-
in release and platform-specific subdirectories, choose one
41-
matching OpenSSL version available at target system and the
42-
C library, for example p4api-glibc2.12-openssl1.1.1.tgz.
36+
For instructions how to build P4PHP on windows please contact
37+
4338

44-
Note: 32-bit builds of P4PHP require a 32-bit version of the
45-
C++ API and a 32-bit version of PHP. 64-bit builds of
46-
P4PHP require a 64-bit version of the C++ API and a
47-
64-bit version of PHP.
48-
49-
3. Extract both archives into an empty directory.
50-
51-
4. To build P4PHP, change to the p4php-<version> directory, and run
52-
the following commands:
53-
54-
phpize
55-
56-
./configure --with-perforce=<path to Perforce C++ API>
57-
58-
make
59-
60-
5. To test your P4PHP build, run the following command:
61-
62-
make test
63-
64-
Note: the test harness requires a copy of the Perforce server
65-
executable, p4d, be installed in the current working
66-
directory.
67-
68-
6. To install P4PHP, run the following command:
69-
70-
make install
71-
72-
Note: the installation typically needs to be performed as
73-
the root user.
74-
75-
7. To enable P4PHP, edit your "php.ini" file and add the following
76-
line:
77-
78-
extension=perforce.so;
39+
--------------------------------------------------------------------------
7940

80-
Note: to locate your "php.ini" file, run the following command:
41+
Compatibility Statements
8142

82-
php --ini
43+
Server Compatibility
8344

84-
Now run:
45+
You can use any release of P4PHP with any release of the Perforce server
46+
later than 2001.1 but it is recommended to use the 2023.2 release
8547

86-
php -m
48+
API Compatibility
8749

88-
to confirm that the P4PHP module is being loaded.
50+
This release of P4PHP requires the 2023.2 (2023.2/2519561) Perforce API.
51+
Older releases will not work and will fail to compile.
8952

90-
8. To verify that P4PHP works, run the following command:
53+
OpenSSL compatibility
9154

92-
php --ri perforce
55+
The minimum version of OpenSSL libraries required is driven by the
56+
2023.2 server; the minimum version needed is 1.0.2. The latest 3.0.x or
57+
1.1.1 patch is recommended.
9358

94-
If the extension is correctly installed, P4PHP displays
95-
its version information.
59+
PHP compatibility
9660

97-
SSL support
98-
-----------
61+
This release of P4PHP is compatible with PHP versions: 7.2.x - 8.2.x
9962

100-
Perforce Server 2020.2 supports SSL connections and the C++ API has
101-
been compiled with this support. This means that in order to build
102-
P4PHP, the underlying PHP framework must include OpenSSL.
63+
Platform compatibility
10364

104-
--------------------------------------------------------------------------
65+
Though P4PHP is generally portable, this release is tested on the
66+
following platforms:
67+
68+
Linux
69+
Ubuntu 16.04, 18.04, 20.04, 22.04
70+
CentOS/Rocky Linux 7, 8
71+
Windows
72+
Server 2016
10573

106-
Windows: Building the P4PHP DLL
74+
Compiler compatibility
10775

108-
For instructions how to build P4PHP on windows please contact [email protected]
76+
To build P4PHP from source, you must use a version of PHP that has been
77+
compiled with the same compiler used to build the Perforce C++ API. For
78+
most platforms, use gcc/g++.
10979

80+
Attempting to use a different compiler or a different version of the
81+
compiler causes linker errors due to differences in name handling.
82+
11083
--------------------------------------------------------------------------
11184

11285
Testing P4PHP
11386

114-
You can use the following small script to test P4PHP. Place it
115-
into a file named "p4php_info.php":
87+
You can use the following small script to test P4PHP. Place it into a file
88+
named "p4php_info.php":
11689

11790
<?php
11891
$p4 = new P4();
@@ -164,52 +137,62 @@ Testing P4PHP
164137

165138
--------------------------------------------------------------------------
166139

167-
Compatibility Statements
140+
Key to symbols used in change notes below.
168141

169-
Server Compatibility
142+
* -- requires new P4PHP
143+
** -- requires P4PHP built with new P4API
144+
*** -- requires new p4d server program
170145

171-
You can use any release of P4PHP with any release of the
172-
Perforce server later than 2001.1
146+
--------------------------------------------------------------------------
173147

174-
API Compatibility
148+
New functionality in 2023.2 (2023.2/2552260) (2024/02/06)
175149

176-
The 2020.2 release of P4PHP requires the 2020.2 Perforce API.
177-
Older releases will not work and will fail to compile.
150+
#2545331 (Job #119067) * **
151+
This release of P4PHP is built against P4API 2023.2 (2023.2/2519561)
178152

179-
OpenSSL compatibility
153+
--------------------------------------------------------------------------
180154

181-
The minimum version of OpenSSL libraries required is driven
182-
by the 2020.2 server; the minimum version needed is 1.0.2.
155+
New functionality in 2023.1 Patch 1 (2023.1/2541299) (2024/01/12)
156+
157+
(Job #118832) * **
158+
This release is built against P4API (2023.1/2513900),
159+
to address possible vulnerability: CVE-2023-5759.
183160

184-
PHP compatibility
161+
--------------------------------------------------------------------------
185162

186-
The 2020.2 release of P4PHP is compatible with PHP versions: 7.2.x - 8.0.x
163+
New functionality in 2023.1 (2023.1/2469314) (2023/07/26)
187164

188-
Platform compatibility
165+
#2457062 (Job #116145) * **
166+
This release is built against latest P4API (2023.1/2442900)
189167

190-
Though P4PHP is generally portable, this release is certified
191-
only on the following platforms:
168+
#2468224, #2460254 (Job #114508) * **
169+
Added support for Windows builds for PHP 8.2
192170

193-
Linux 2.6 Intel (x86, x86_64)
194-
Windows 10, 2016, 2019
171+
--------------------------------------------------------------------------
195172

196-
Compiler compatibility
173+
New functionality in 2022.2 Patch 2 (2022.2/2541286) (2024/01/12)
174+
175+
(Job #118832) * **
176+
This release is built against P4API (2022.2/2531894),
177+
to address possible vulnerability: CVE-2023-5759.
197178

198-
To build P4PHP from source, you must use a version of PHP that
199-
has been compiled with the same compiler used to build the
200-
Perforce C++ API. For most platforms, use gcc/g++.
179+
--------------------------------------------------------------------------
201180

202-
Attempting to use a different compiler or a different version
203-
of the compiler causes linker errors due to differences in name
204-
handling.
181+
New functionality in 2022.2 Patch 1
182+
183+
#2389314, #2388708 (Job #113738) * **
184+
Added support for PHP 8.2
185+
186+
(Job #113737) * **
187+
This release is built against latest P4API (2022.2/2407422), which
188+
supports OpenSSL3
205189

206190
--------------------------------------------------------------------------
207191

208-
Key to symbols used in change notes below.
192+
New functionality in 2022.2
209193

210-
* -- requires new P4PHP
211-
** -- requires P4PHP built with new P4API
212-
*** -- requires new p4d server program
194+
#2371665 (Job #111053) * **
195+
Added support for PHP 8.1
213196

214197
--------------------------------------------------------------------------
215198

@@ -456,4 +439,4 @@ Bugs fixed in 2010.1
456439

457440
#237983 (Job #38074) *
458441
Text output could be truncated if it contained null characters.
459-
This change makes handling of text output binary-safe.
442+
This change makes handling of text output binary-safe.

config.w32

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ if (PHP_PERFORCE != "no") {
1313
CHECK_LIB("libsupp.lib", "perforce", PHP_PERFORCE) &&
1414
CHECK_LIB("libeay32.lib", "perforce", PHP_PERFORCE) &&
1515
CHECK_LIB("ssleay32.lib", "perforce", PHP_PERFORCE) &&
16+
CHECK_LIB("Crypt32.lib", "perforce", PHP_PERFORCE) &&
1617
//CHECK_LIB("advapi32.lib", "perforce") &&
1718
//CHECK_LIB("oldnames.lib", "perforce") &&
1819
//CHECK_LIB("kernel32.lib", "perforce") &&

php_p4.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,7 @@ PHP_METHOD(P4, run)
634634
cmdString << " " << Z_LVAL(args[i]);
635635
break;
636636
case IS_DOUBLE:
637-
cmdString << " " << Z_DVAL(args[i]);
637+
cmdString << " " << static_cast<P4INT64>(Z_DVAL(args[i]));
638638
break;
639639
case IS_TRUE:
640640
cmdString << " " << "TRUE";

0 commit comments

Comments
 (0)