Skip to end of metadata
Go to start of metadata

<p>This document serves as a list of BC breaks between the 1.x series and 2.0.<br />
------------------------------</p>

<p>Zend_Loader_Autoloader:</p>
<ul>
<li>Added "un/registerPrefix()" methods. These will handle classes that have a<br />
vendor prefix.</li>
<li>Modified the "un/registerNamespace()" methods to handle PHP 5.3 namespaces,<br />
and not vendor prefixes. If you are using registerNamespace() and have not<br />
updated your code to use namespaces, you should update your calls to use<br />
registerPrefix() instead.</li>
<li>push/unshiftAutoloader() now accepts a third, boolean argument for indicating<br />
whether the autoloader is a namespace or prefix autoloader. By default, it<br />
assumes it's a namespace autoloader. If you are registering a prefix<br />
autoloader in this way, pass a boolean "true" value as the third argument.</li>
</ul>

<p>Zend_Config:</p>
<ul>
<li>"Writer" renamed to "Writer\AbstractWriter"</li>
<li>"Writer_FileAbstract" renamed to "Writer\AbstractFileWriter"</li>
<li>"Writer_Array" renamed to "Writer\ArrayWriter"</li>
</ul>

<p>Zend_Currency:</p>
<ul>
<li>"Zend_Currency" prefix now becomes "Zend\Currency" namespace</li>
<li>"Zend_Currency" becomes "Zend\Currency\Currency"</li>
<li>"CurrencyInterface" is renamed to "CurrencyServiceInterface"</li>
</ul>

<p>Zend_Log:</p>
<ul>
<li>"Log" becomes "Logger"</li>
<li>"FactoryInterface" becomes "Factory"</li>
<li>Additionally, the factory() method's first argument is now optional,<br />
defaulting to "array()". If you have implemented this interface in the<br />
past, you will need to update your method signature.</li>
<li>"Filter_Interface" becomes "Filter"</li>
<li>"Filter_Abstract" becomes "Filter\AbstractFilter"</li>
<li>"Filter_Suppress" becomes "Filter\SuppressFilter"</li>
<li>"Formatter_Interface" becomes "Formatter"</li>
<li>"Writer_Abstract" becomes "Writer\AbstractWriter"</li>
<li>Created a new interface, "Writer"; typehint on this instead of<br />
"Writer\AbstractWriter"</li>
</ul>

<p>Zend_Cache:</p>
<ul>
<li>"Backend" renamed to "Backend\AbstractBackend"</li>
<li>"Backend_Interface" renamed to "Backend"</li>
<li>New interface created, "Frontend". Any previous typehints for<br />
"Zend_Cache_Core" should now be rewritten to "Zend\Cache\Frontend"</li>
<li>"Core" renamed to "Frontend\Core"</li>
<li>"Backend_ExtendedInterface" renamed to "Backend\ExtendedBackend"</li>
<li>"Backend_ZendServer" renamed to "Backend\ZendServer\AbstractZendServer"</li>
<li>"Backend_Static" renamed to "Backend\StaticBackend"</li>
<li>"Backend_Test" renamed to "Backend\TestBackend"</li>
<li>"Frontend_Class" renamed to "Frontend\ClassFrontend"</li>
<li>"Frontend_Function" renamed to "Frontend\FunctionFrontend"</li>
</ul>

<p>Zend_Locale:</p>
<ul>
<li>Locale data resources moved from Locale/Data/ to Locale/Data/resources/</li>
</ul>

<p>Zend_Measure:</p>
<ul>
<li>"Zend_Measure" prefix now becomes "Zend\Measure" namespace</li>
<li>"Zend_Measure_Abstract" becomes "Zend\Measure\AbstractMeasure"</li>
</ul>

<p>Zend_Memory:</p>
<ul>
<li>"Zend_Memory" prefix now becomes "Zend\Memory" namespace</li>
<li>"Zend_Memory" class and "Zend_Memory::factory()" method are removed,<br />
"new Zend\Memory\MemoryManager(Zend\Cache\Frontend $cache = null)" has to be used <br />
directly now.</li>
<li>"Zend_Memory_Container" prefix now becomes "Zend\Memory\Container" namespace</li>
<li>"Zend_Memory_Manager" becomes "Zend\Memory\MemoryManager"</li>
</ul>

<p>Zend_Filter:</p>
<ul>
<li>"Filter" broken into "FilterChain" and "StaticFilter"</li>
<li>For filter chains, use the new FilterChain class</li>
<li>For static usage, use the new StaticFilter class</li>
<li>Additionally, "filterStatic()" was renamed to "execute()"</li>
<li>"FilterInterface" renamed to "Filter"</li>
<li>Interface now defines "__invoke($value)" instead of "filter($value)". If<br />
you have created custom filters in the past, you will need to now implement<br />
Zend\Filter\Filter and rename your filter() method to __invoke().</li>
<li>"Compress_CompressInterface" renamed to "Compress\CompressionAlgorithm"</li>
<li>"Compress_CompressAbstract" renamed to "Compress\AbstractCompressionAlgorithm"</li>
<li>"Encrypt_Interface" renamed to "Encrypt\EncryptionAlgorithm"</li>
<li>Added "toString()" method to the interface; please update implementing<br />
classes accordingly</li>
<li>"Word_Separator_Abstract" renamed to "Word\AbstractSeparator"; please update<br />
extending classes accordingly.</li>
<li>Input:</li>
<li>"VALIDATE" constant removed in favor of "VALIDATOR" (already defined, but<br />
previously never used)</li>
<li>Class loading always uses namespaces now</li>
</ul>

<p>Zend_Validate:</p>
<ul>
<li>"Validate" broken into "AbstractValidator", "ValidatorChain" and "StaticValidator"</li>
<li>"Zend_Validate" prefix now becomes "Zend\Validator" namespace</li>
<li>"ValidatorInterface" moved to "Zend\Validator\Validator"</li>
</ul>

<p>Zend_Uri</p>
<ul>
<li>"Zend_Uri" removed</li>
<li>"Zend_Uri_Adapter_Http" becomes "Zend\URI\URL"</li>
<li>"Zend_Uri::factory()" should be replaced with "new Zend\URI\URL()"</li>
<li>Zend\URI\URL can handle any URL scheme, not just Http & Https</li>
</ul>

<p>Zend_Http</p>
<ul>
<li>"Zend_Http_" becomes Zend\HTTP</li>
</ul>

<p>Zend_OpenId</p>
<ul>
<li>"Zend_OpenId_" becomes Zend\OpenID</li>
</ul>

<p>Zend_Server:</p>
<ul>
<li>"Zend_Server" prefix now becomes "Zend\Server" namespace</li>
<li>"Zend_Server_Method" prefix now becomes "Zend\Server\Method" namespace</li>
<li>"Zend_Server_Reflection" prefix now becomes "Zend\Server\Reflection" namespace</li>
<li>"Zend_Server_Reflection" becomes "Zend\Server\Reflection\Reflection"</li>
<li>"Zend_Server_Reflection_Class" becomes "Zend\Server\Reflection\ReflectionClass"</li>
<li>"Zend_Server_Reflection_Function" becomes "Zend\Server\Reflection\FunctionReflection"</li>
<li>"Zend_Server_Reflection_Method" becomes "Zend\Server\Reflection\ReflectionMethod"</li>
<li>"Zend_Server_Reflection_Parameter" becomes "Zend\Server\Reflection\ReflectionParameter"</li>
<li>"Zend_Server_Reflection_ReturnValue" becomes "Zend\Server\Reflection\ReflectionReturnValue"</li>
<li>"Zend_Server_Reflection_Function_Abstract" becomes "Zend\Server\Reflection\AbstractFunction"</li>
</ul>

<p>Zend_Translator</p>
<ul>
<li>"Zend_Translator" prefix now becomes "Zend\Translator" namespace</li>
<li>"Zend_Translator" becomes "Zend\Translator\Translator"</li>
<li>"Zend\Translator\Adapter\Array" renamed to "Zend\Translator\Adapter\ArrayAdapter"</li>
<li>Translation adapter interface is now "Zend\Translator\Adapter"</li>
</ul>

<p>Zend_Acl</p>
<ul>
<li>"Zend_Acl_Role_Interface" becomes "Zend\Acl\Role"</li>
<li>"Zend_Acl_Role" becomes "Zend\Acl\Role\GenericRole"</li>
<li>"Zend_Acl_Resource_Interface" becomes "Zend\Acl\Resource"</li>
<li>"Zend_Acl_Resource" becomes "Zend\Acl\Resource\GenericResource"</li>
<li>"Zend_Acl_Assert_Interface" becomes "Zend\Acl\Assertion"</li>
<li>Acl class:</li>
<li>"add()" removed</li>
<li>"get()" renamed to "getResource()"</li>
<li>"has()" renamed to "hasResource()"</li>
<li>"inherits()" renamed to "resourceInherits()"</li>
<li>"remove()" renamed to "removeResource()"</li>
<li>"removeAll()" renamed to "removeResourceAll()"</li>
<li>Removed "getRegisteredResources()" method (marked as deprecated)</li>
</ul>

<p>Zend_Console</p>
<ul>
<li>"Zend_Console_Getopt_Exception" becomes "Zend\Console\GetoptException"</li>
</ul>

<p>Zend_Dom</p>
<ul>
<li>"Zend_Dom_Query_Result" becomes "Zend\Dom\NodeList"</li>
<li>"Zend_Dom_Query_Css2Xpath" becomes "Zend\Dom\Css2Xpath"</li>
<li>"Zend_Dom_Query::query()" becomes "Zend\Dom\Query::execute()"</li>
</ul>

<p>Zend_Url</p>
<ul>
<li>Component renamed to Zend\URI, with class URL</li>
<li>Zend\URI\URL now provides comprehensive support for URLs, via parse_url()</li>
<li>Removed Zend_Url::factory(), and Zend_Url_Http as unnecessary.</li>
<li>"getUri()" becomes "generate()"</li>
<li>"check()" becomes "isValid()", and is no longer static</li>
<li>"fromString()" has been removed; simply pass to the constructor</li>
</ul>

<p>Zend_HTTP</p>
<ul>
<li>Component renamed to Zend_HTTP</li>
</ul>

<p>Zend_PDF</p>
<ul>
<li>"Zend_Pdf" prefix now becomes "Zend\PDF" namespace</li>
<li>"Zend_Pdf" class becomes "Zend\PDF\PDFDocument</li>
<li>"Zend_Pdf_Action_Goto" becomes "Zend\PDF\Action\GoToAction"</li>
</ul>

<p>Zend_Barcode</p>
<ul>
<li>"Zend_Barcode" prefix now becomes "Zend\Barcode" namespace</li>
<li>"Zend_Barcode" class becomes "Zend\Barcode\Barcode"</li>
<li>Barcode classes and renderers become case sensitive</li>
<li>"Pdf" barcode renderer becomes "PDF"</li>
<li>"Zend_Barcode_Object" return/parameter type is replaced with<br />
"Zend\Barcode\Object\ObjectInterface" interface<br />
"Zend\Barcode\Object\AbstractObject implements this interface and can be used <br />
for subclassing</li>
<li>Zend\Barcode\Object\ObjectInterface doesn't include static setBarcodeFont() method<br />
which actually sets "default" font.</li>
<li>"Zend_Barcode_Renderer" return/parameter type is replaced with<br />
"Zend\Barcode\Renderer\RendererInterface" interface<br />
"Zend\Barcode\Renderer\AbstractRenderer implements this interface and can be used <br />
for subclassing</li>
<li>Barcode objects and renderers names are case sensitive now and must start with uppercase character</li>
</ul>

<p>Zend_Auth</p>
<ul>
<li>Renamed to Zend\Authentication</li>
<li>Zend_Auth renamed to Zend\Authentication\AuthenticationService</li>
<li>Singleton removed from Zend\Authentication\AuthenticationService</li>
</ul>

<p>Zend_Service_Abstract</p>
<ul>
<li>Renamed to Zend\Service\AbstractService</li>
<li>Made set/getHttpClient() methods non-static</li>
<li>Added new set/getDefaultHTTPClient() static methods for setting global<br />
clients; can accept either a class name or instance. getHttpClient() will<br />
proxy to getDefaultHTTPClient() when no client is present.</li>
<li>Renamed Zend_Service_LiveDocx to Zend\Service\AbstractLiveDocx</li>
<li>Renamed Zend_Service_LiveDocx_MailMerge to Zend\Service\LiveDocx\MailMerge</li>
<li>Renamed Zend_Service_LiveDocx_Exception to Zend\Service\LiveDocx\Exception</li>
</ul>

<p>Zend_Search_Lucene</p>
<ul>
<li>"Zend_Search_Lucene" prefix now becomes "Zend\Search\Lucene" namespace</li>
<li>All "Zend\Search\Lucene\Lucene" methods except static create(), open(),<br />
setDefault*() and getDefault*() methods are moved into new class "Zend\Search\Lucene\Index"</li>
<li>"Zend_Search_Lucene_Analysis_TokenFilter" abstract class becomes<br />
"\Zend\Search\Lucene\Analysis\TokenFilter\TokenFilterInterface" interface</li>
<li>"Zend_Search_Lucene_Document" class becomes "Zend\Search\Lucene\Document\Document"</li>
<li>"Zend_Search_Lucene_Field" class becomes "Zend\Search\Lucene\Document\Field"</li>
<li>"Zend_Search_Lucene_Document_Html" class becomes "Zend\Search\Lucene\Document\HTML"</li>
<li>"Zend_Search_Lucene_Search_Highlighter_Default" class becomes<br />
"\Zend\Search\Lucene\Search\Highlighter\DefaultHighlighter"</li>
</ul>

<p>Zend_Db</p>
<ul>
<li>Zend_Db becomes Zend\DB</li>
<li>Zend\DB\Table becomes Zend\DB\Table\Table</li>
<li>Various capitolization changes:<br />
Mysql -> MySQL, Mysqli -> MySQLi, Pdo -> PDO, Pgsql -> PGSQL, Oci -> OCI, Ibm -> IBM<br />
Mssql -> MSSQL, Sqlite -> SQLite, Sqlsrv -> SQLSRV</li>
</ul>

<p>Zend_Mime:</p>
<ul>
<li>Zend_Mime becomes Zend\Mime</li>
</ul>

<p>Zend_Mail:</p>
<ul>
<li>Zend_Mail becomes Zend\Mail</li>
<li>See classes mapping for other names transformations</li>
</ul>

<p>Zend_Soap:</p>
<ul>
<li>Zend_Soap becomes Zend\Soap</li>
<li>Zend_Soap_AutoDiscover becomes Zend\Soap\AutoDiscover\AutoDiscover</li>
<li>Zend_Soap_Client becomes Zend\Soap\Client\Client</li>
<li>Zend_Soap_Server becomes Zend\Soap\Server\Server</li>
<li>Zend_Soap_Wsdl becomes Zend\Soap\WSDL\WSDL</li>
<li>Zend_Soap_Wsdl_Strategy_Abstract becomes Zend\Soap\WSDL\Strategy\AbstractStrategy</li>
<li>Zend_Soap_Wsdl_Strategy_Interface becomes Zend\Soap\WSDL\Strategy\StrategyInterface</li>
<li>Wsdl -> WSDL change within classes and methods names.</li>
</ul>

<p>Zend_Queue:</p>
<ul>
<li>Zend_Queue becomes Zend\Queue</li>
<li>'adapterNamespace' \Zend\Queue\Queue option and adapter name \Zend\Queue\Queue constructor parameter are case sensitive now</li>
<li>'Array' adapter becomes 'ArrayAdapter'</li>
</ul>

<p>Zend_Service_Twitter:</p>
<ul>
<li>In the Search class, the method for searching has been renamed for search() to execute(). Method signature is still the same</li>
</ul>

Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.