Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 35 lines (22 sloc) 2.385 kb
a53c2fb [2.0] Code cleanups. Preparations for DDC-193. Fixed DDC-399, type confi...
romanb authored
1 # Upgrade from 2.0-ALPHA2 to 2.0-ALPHA3
2
3 This section details the changes made to Doctrine 2.0-ALPHA3 to make it easier for you
4 to upgrade your projects to use this version.
5
6 ## CLI Changes
7
8 The $args variable used in the cli-config.php for configuring the Doctrine CLI has been renamed to $globalArguments.
9
10 ## Proxy class changes
11
12 You are now required to make supply some minimalist configuration with regards to proxy objects. That involves 2 new configuration options. First, the directory where generated proxy classes should be placed needs to be specified. Secondly, you need to configure the namespace used for proxy classes. The following snippet shows an example:
13
14 [php]
15 // step 1: configure directory for proxy classes
16 // $config instanceof Doctrine\ORM\Configuration
17 $config->setProxyDir('/path/to/myproject/lib/MyProject/Generated/Proxies');
18 $config->setProxyNamespace('MyProject\Generated\Proxies');
19
20 Note that proxy classes behave exactly like any other classes when it comes to class loading. Therefore you need to make sure the proxy classes can be loaded by some class loader. If you place the generated proxy classes in a namespace and directory under your projects class files, like in the example above, it would be sufficient to register the MyProject namespace on a class loader. Since the proxy classes are contained in that namespace and adhere to the standards for class loading, no additional work is required.
21 Generating the proxy classes into a namespace within your class library is the recommended setup.
22
23 Entities with initialized proxy objects can now be serialized and unserialized properly from within the same application.
24
25 For more details refer to the Configuration section of the manual.
26
27 ## Removed allowPartialObjects configuration option
28
29 The allowPartialObjects configuration option together with the `Configuration#getAllowPartialObjects` and `Configuration#setAllowPartialObjects` methods have been removed.
30 The new behavior is as if the option were set to FALSE all the time, basically disallowing partial objects globally. However, you can still use the `Query::HINT_FORCE_PARTIAL_LOAD` query hint to force a query to return partial objects for optimization purposes.
31
32 ## Renamed Methods
33
34 * Doctrine\ORM\Configuration#getCacheDir() to getProxyDir()
35 * Doctrine\ORM\Configuration#setCacheDir($dir) to setProxyDir($dir)
Something went wrong with that request. Please try again.