Github user dcelasun commented on a diff in the pull request:

    https://github.com/apache/thrift/pull/1479#discussion_r174183533
  
    --- Diff: lib/php/README.md ---
    @@ -20,34 +19,46 @@ KIND, either express or implied. See the License for the
     specific language governing permissions and limitations
     under the License.
     
    -Using Thrift with PHP
    -=====================
    +# Using Thrift with PHP
     
     Thrift requires PHP 5. Thrift makes as few assumptions about your PHP
     environment as possible while trying to make some more advanced PHP
     features (i.e. APC cacheing using asbolute path URLs) as simple as 
possible.
     
     To use Thrift in your PHP codebase, take the following steps:
     
    -#1) Copy all of thrift/lib/php/lib into your PHP codebase
    -#2) Configure Symfony Autoloader (or whatever you usually use)
    +1. Copy all of thrift/lib/php/lib into your PHP codebase
    +2. Configure Symfony Autoloader (or whatever you usually use)
     
     After that, you have to manually include the Thrift package
     created by the compiler:
     
    +```
     require_once 'packages/Service/Service.php';
     require_once 'packages/Service/Types.php';
    +```
     
    -Dependencies
    -============
    +# Dependencies
     
     PHP_INT_SIZE
     
    -  This built-in signals whether your architecture is 32 or 64 bit and is
    -  used by the TBinaryProtocol to properly use pack() and unpack() to
    -  serialize data.
    +    This built-in signals whether your architecture is 32 or 64 bit and is
    +    used by the TBinaryProtocol to properly use pack() and unpack() to
    +    serialize data.
     
     apc_fetch(), apc_store()
     
    -  APC cache is used by the TSocketPool class. If you do not have APC 
installed,
    -  Thrift will fill in null stub function definitions.
    +    APC cache is used by the TSocketPool class. If you do not have APC 
installed,
    +    Thrift will fill in null stub function definitions.
    +
    +# Breaking Changes
    +
    +## 0.12.0
    +
    +1. For thrift compiler, `psr4` flag is opened default, generated code 
match psr4 code struct.
    +
    +    If you want old-style directory struct, use `classmap` option. (i.e. 
`-gen php:classmap`)
    +
    +2. For ThriftClassloader, if use psr4 code struct, must use 
`$thriftClassLoader->registerNamespace('namespace', '<path>')` to register 
autoload.
    --- End diff --
    
    Better phrasing:
    
    If using PSR4, use `$thriftClassLoader->registerNamespace('namespace', 
'<path>')` instead of `$thriftClassLoader->registerDefinition('namespace', 
'<path>')`.


---

Reply via email to