                           Release Notes for
                         P4PHP, P4 API for PHP

                            Version 2026.1

Introduction

    This document contains release notes for P4PHP.

    Perforce numbers releases YYYY.R/CCCCC, e.g. 2009.2/234567.
    YYYY is the year; R is the release of that year; CCCCCC is the
    bug fix change level.  Each bug fix in these release notes is
    marked by its change number.  Any build includes (1) all bug fixes
    of all previous releases and (2) all bug fixes of the current
    release up to the bug fix change level.

    To determine the version of your P4PHP, run the following command:

    php --ri perforce

--------------------------------------------------------------------------

Important Product Rebrand Notice

	Helix Core is now P4
	Perforce has a new look and logo that reflects our place in DevOps
	workflows. As part of these changes, Helix Core is now P4. Name updates
	and new icons to align with the P4 branding will be rolled out soon.
	To learn more, see:
	 https://www.perforce.com/blog/vcs/introducing-the-p4-platform

--------------------------------------------------------------------------

Installation
    
    Unix and Mac: Building the P4PHP Extension

        The official version of P4PHP exists as source on:
        https://github.com/perforce/p4php

        Instructions for building are in the build.md file which can be found
        here - https://github.com/perforce/p4php/blob/master/build.md
        

    Windows: Building the P4PHP DLL

        For instructions how to build P4PHP on windows please contact
        support@perforce.com

--------------------------------------------------------------------------

Compatibility Statements

    Server Compatibility

        This release of P4PHP supports the 2026.1 P4 Server.
        Older releases might work but are not supported.

    API Compatibility

        This release of P4PHP requires the 2026.1 (2026.1/2951233) P4 C/C++ API.
        Older releases will not work and will fail to compile.

    OpenSSL compatibility

        The 2026.1 server requires OpenSSL 3.x.x.
        It is recommended to use the latest available patch version.

    PHP compatibility

        This release of P4PHP is compatible with PHP versions: 8.2.x - 8.5.x

    Platform compatibility

        Though P4PHP is generally portable, this release is tested on the
        following platforms:

            Linux kernel 2.6+ for Intel(x86_64)
                Ubuntu 22.04, 24.04
                Rocky Linux 9, 10
            Linux kernel 2.6+ for ARM(aarch64)
                Ubuntu 22.04, 24.04
                Rocky Linux 9, 10
            Windows for Intel(ntx64)
                Server 2016, 2019, 2022, 2025

    Compiler compatibility

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

        Attempting to use a different compiler or a different version of the
        compiler causes linker errors due to differences in name handling.
        
--------------------------------------------------------------------------

Testing P4PHP

    You can use the following small script to test P4PHP.  Place it into a file
    named "p4php_info.php":

    <?php
    $p4 = new P4();
    print_r($p4->identify());
    $p4->port = '<server>:<port>';
    $p4->user = '<user>';
    $p4->connect();
    print_r($p4->run('info'));
    $p4->disconnect();
    ?>

    Note: substitute <server> for the fully qualified server name,
          <port> for the port p4d/p4s is running on, and <user> for a
          valid P4 user.

    To execute the test script, run the following command:

        php -f p4php_info.php

    If it succeeds, you should see output like this:

        > php -f p4php_info.php

        Perforce - The Fast Software Configuration Management System.
        Copyright 1995-2010 Perforce Software.  All rights reserved.
        Rev. P4PHP/NTX86/2009.2/239532 (2009.2 API) (2010/03/24).
        Array

        (
            [0] => Array
                (
                    [userName] => jdoe
                    [password] => enabled
                    [clientName] => jdoe-ws
                    [clientRoot] => c:\Users\jdoe\ws
                    [clientCwd] => C:\Users\jdoe\ws
                    [clientHost] => jdoe-host
                    [clientAddress] => 127.0.0.1:12345
                    [monitor] => enabled
                    [security] => enabled
                    [serverAddress] => jdoe-host:1666
                    [serverRoot] => C:\Program Files\Perforce\Server
                    [serverDate] => 2010/03/29 15:09:00 -0700
                    [serverUptime] => 102:44:51
                    [serverVersion] => P4D/NTX64/2016.2/1457671 (2016/10/26)
                    [serverLicense] => none
                )
        )

--------------------------------------------------------------------------

Key to symbols used in change notes below.

      * -- requires new P4PHP
     ** -- requires P4PHP built with new P4 C/C++ API
    *** -- requires new p4d server program

--------------------------------------------------------------------------

New functionality in 2026.1

    #2948829 (Job #133660) * ** ***
        This release of P4PHP is built against P4 C/C++ API 2026.1

--------------------------------------------------------------------------

New functionality in 2025.2 Patch 2 (2025.2/2906131) (2026/03/05)

    #2904560 (Job #131389)
        Added support for PHP 8.5 on Rocky Linux 8.5 with OpenSSL 1.1.1.

--------------------------------------------------------------------------

New functionality in 2025.2 Patch 1 (2025.2/2891513) (2026/02/10)

    #2886462, #2886935 (Job #128771)
        Added support for PHP 8.5

    (Job #128765)
        Added support for windows server 2025

--------------------------------------------------------------------------

New functionalities in 2025.2 (2025.2/2863687) (2025/12/03)

    #2843010 (Job #128790)
        This release of P4PHP is built against P4 C/C++ API 2025.2 (2025.2/2852709)

    #2849852 (Job #128766)
        Added support for Rocky Linux 10.

--------------------------------------------------------------------------

New functionality in 2025.1 (2025.1/2767434) (2025/05/21)

    #2757772 (Job #125783) * ** ***
        This release of P4PHP is built against P4 C/C++ API 2025.1 (2025.1/2761706)

--------------------------------------------------------------------------

New functionality in 2024.2 Patch 1 (2024.2/2720535) (2025/02/13)

    #2685350 (Job #123452) * **
        Added support for PHP 8.4

--------------------------------------------------------------------------

New functionality in 2024.2 (2024.2/2681996) (2024/11/14)

    #2678429 (Job #122595) * ** ***
        This release of P4PHP is built against P4API 2024.2 (2024.2/2675662)
        
    #2661895 (Job #122168) * **
        Added support for Linux ARM64/AARCH64 architecture.

--------------------------------------------------------------------------

New functionality in 2024.1 (2024.1/2601561) (2024/05/22)

    #2599291 (Job #120163) * ** ***
        This release of P4PHP is built against P4API 2024.1 (2024.1/2596294)
        
    #2585123 (Job #119913) * **
        Added support for PHP 8.3

Bugs fixed in 2024.1 (2024.1/2601561) (2024/05/22)

    #2588747 (Job #119723) * **
        Fixed version mismatch issue in the output of identify() method 
        when running with windows DLL

--------------------------------------------------------------------------

New functionality in 2023.2 Patch 1 (2023.2/2568001) (2024/03/07)

	(Job #119717) * **
	    This release of P4PHP is built against P4API 2023.2 Patch 3 (2023.2/2563409)

--------------------------------------------------------------------------

New functionality in 2023.2 (2023.2/2552260) (2024/02/06)

	#2545331 (Job #119067) * **
	    This release of P4PHP is built against P4API 2023.2 (2023.2/2519561)

--------------------------------------------------------------------------

New functionality in 2023.1 Patch 1 (2023.1/2541299) (2024/01/12)
        
    (Job #118832) * **
        This release is built against P4API (2023.1/2513900),
        to address possible vulnerability: CVE-2023-5759.

--------------------------------------------------------------------------

New functionality in 2023.1 (2023.1/2469314) (2023/07/26)

    #2457062 (Job #116145) * **
        This release is built against latest P4API (2023.1/2442900)

    #2468224, #2460254 (Job #114508) * **
        Added support for Windows builds for PHP 8.2

--------------------------------------------------------------------------

New functionality in 2022.2 Patch 2 (2022.2/2541286) (2024/01/12)
        
    (Job #118832) * **
        This release is built against P4API (2022.2/2531894),
        to address possible vulnerability: CVE-2023-5759.

--------------------------------------------------------------------------

New functionality in 2022.2 Patch 1

    #2389314, #2388708 (Job #113738) * **
        Added support for PHP 8.2
        
    (Job #113737) * **
        This release is built against latest P4API (2022.2/2407422), which 
        supports OpenSSL3

--------------------------------------------------------------------------

New functionality in 2022.2

    #2371665 (Job #111053) * **
        Added support for PHP 8.1

--------------------------------------------------------------------------

New functionality in 2020.2

    #2106233 (Job #106089) * ** ***
        Updated the stored spec templates to match the 2020.2 server
        specs. This ensures new features are present in specs which are
        accessed offline.

    #2102271 (Job #102149) * **
        Added support for PHP 8.0

    #2093736 (Job #106090) * **
         Parallel sync no longer requires p4 executable.

--------------------------------------------------------------------------

New functionality in 2020.1

    #1993685 (Job #102864) * ** ***
        Updated the stored spec templates to match the 2020.1 server
        specs. This ensures new features are present in specs which are
        accessed offline.

    #1928845, #1992229, #1992308 (Jobs #101673, #102863) * **
        Added support for PHP 7.4

Bugs fixed since 2020.1/1997425

    #880735 (Job #66537) * **
        Fixed parameter processing in run_submit() method.

--------------------------------------------------------------------------

New functionality in 2019.2

    #1922953 (Job #101550) * ** ***
        Updated the stored spec templates to match the 2019.2 server
        specs. This ensures new features are present in specs which are
        accessed offline.

--------------------------------------------------------------------------

New functionality in 2018.2

    #1664628 * **
        A new handler interface for P4LOGINSSO has been added, allowing web
        applications to handle the callback rather than an external executable
        being invoked.

--------------------------------------------------------------------------

New functionality in 2016.2

    #1487051 (Job #86758) *
        Add support for PHP7. Since PHP5 and PHP7 are so different in their
        implementation, two separate releases will be provided. P4PHP will continue
        to support PHP5, while P4PHP7 is a release dedicate to PHP7.

    #1478705, 1478790 (Job #89654) * ** ***
        Add support for proxy-like connections for both PHP5 and PHP7

Bugs fixed since 2014.1/880729

    #880735 (Job #66537) *
        Fixed an array inconsistency issue with 'run_filelog'.  It will
        also now return the right depotpath as well.

--------------------------------------------------------------------------

New functionality in 2013.1

    #491487, #499320, #499365 (Job #57838) *
        Added support for PHP 5.4.

Bugs fixed since 2013.1/617119

    #643056 (Job #65572)
        Fixed a problem in the P4 Map Lhs, Rhs and ToA methods that
        could cause a crash when under load.

    #631971 (Job #65805)
        Correctly set the program version if specified.

Bugs fixed in 2013.1

    #597731 (Job #63968) *
        Fixed memory leak in the output handler code.  The memory leak
        was particularly noticeable when using output handlers with large
        files.

    #567338 (Job #62248)
        Test 013 'Identity' will now work correctly on Windows.

    #541820, #541832 (Job #60875) *
        Correctly determines the kernel version for Linux builds.

    #541502 (Job #60865) *
        Fixed a problem that caused a runtime error when running on
        Ubuntu 12.10.

--------------------------------------------------------------------------

New functionality in 2012.1

    #408393 (Job #51084) * ** ***
        Added support for SSL connections to SSL-enabled servers. No
        build changes are needed to include SSL support, as PHP itself
        is dynamically linked against OpenSSL libraries.

        The identify() method will then report the version of the OpenSSL
        library used for building the Perforce C++ API (not the version
        PHP is dynamically linked against).

    #Note:
        Although the 2012.1 server now supports action-resolve, P4PHP
        does not include support for this at this time.

Bugs fixed since 2012.1/442152

    #469976, #469763 (Jobs #55524, #56332) *
        Fixed a problem where the run_filelog() method could emit
        warnings and/or fail to populate revision objects correctly
        under some conditions.

Bugs fixed in 2012.1

    #439393 (Job #54125) *
        Setting the 'prog' property of the P4 class now actually takes
        effect.

    #429067 (Job #51901) *
        Updated the stored spec templates to match the 2012.1 server
        specs. This ensures new features are present in specs which are
        accessed offline.

--------------------------------------------------------------------------

New functionality in 2011.1

    #339007 (Job #42252) * **
        P4PHP supports a callback interface by providing a P4.handler
        property. Set P4.handler to an instance of a
        P4_OutputHandlerInterface implementor to enable callbacks. When
        a handler is defined, P4PHP will invoke the handler for every
        response it receives from the Perforce Server immediately instead
        of collecting all results together in an array first. This can be
        used to make applications more scalable and more responsive if
        large results are expected.
        See the documentation for details on the Output Handler.

    #332692 (Job #45863) * ** ***
        Enable streams in P4PHP by default. With this change, streams
        specific specs such as streams depots are listed. To disable the
        listing of streams specific specs either set the api_level to a
        value below 70 or disable stream handling by explicitly setting
        the P4.streams property to false.

Bugs fixed in 2011.1

    #424881 (Jobs #42375, #51886, #51917) *
        Fixed issues where p4 filelog could produce an erroneous result
        or cause a segmentation fault to occur.

    #385159 (Job #49324) **
        On Windows Vista, Windows 7, or Windows 2008, a client running
        as Administrator would fail to properly process file names in
        non-ASCII character sets (such as Shift-JIS).

    #359248 (Job #48691) *
        Fixed a dangling pointer issue that caused memory segmentation
        faults when P4PHP was run on Windows platforms.

    #359180 (Job #49040) *
        Minor adjustments done to make P4PHP run properly on Mac OS X
        Lion.

    #342679 (Job #47726) *
        Fixed a bug where P4PHP would not compile on Windows platforms
        due to the tsrm_ls variable not being present.

    #339053 (Job #47423) *
        Made command arguments and the input property support binary
        values which contain null bytes.

    #308036, #337730 (Jobs #44695, #47235) *
        Adjusted the version string to be consistent with other APIs.
        Added API patch level and made OS names consistent.

    #333583 (Job #45521) *
        Fixed a bug where P4PHP would erroneously convert custom spec
        fields which ended in a digit into an array. They are now passed
        through unchanged.

    #332681 (Job #47529) *
        Updated the stored spec templates to match the 2011.1 server
        specs. This ensures new features such as streams are present in
        specs which are accessed offline.

--------------------------------------------------------------------------

New functionality in 2010.2

    #262640 (Job #39740) * ** ***
        New methods 'GetStreams' and 'SetStreams' have been added to enable
        Streams support.

Bugs fixed in 2010.2

    #289739 (Job #43685) *
        Fixed a bug where P4PHP could segfault when attempting to use the
        'P4' instance during the late stages of a PHP process shutdown
        (via object destructors), where the instance being referenced may
        no longer be present in the zend_object_store. We guard against
        this scenario and emit a fatal zend_error.

    #273229 (Job #41378) *
        Fixed a pointer management bug that was causing crashes under
        Windows 64-bit.

    #264526 (Jobs #38248, #38488, #39008, #39471) *
        P4PHP now properly picks up the version string set in config.w32
        when compiled on a Windows platform.

--------------------------------------------------------------------------

New functionality in 2010.1

    #238024 (Job #38089) *
        A new property, 'expand_sequences' enables scripts to control
        whether keys with trailing numbers are expanded into arrays
        in tagged output. By default, 'expand_sequences' is true to
        maintain backwards compatibility. Note that expansion can be
        enabled and disabled on a per-command basis.

Bugs fixed in 2010.1

    #238014 (Job #38084) *
        Tagged output with numeric sequences (e.g. foo0, foo1, ...)
        could conflict with tags that are not numbered (e.g. foo).
        This could cause P4PHP to crash. This change detects the
        conflict and skips expansion.

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