View Source

<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 &quot;un/registerPrefix()&quot; methods. These will handle classes that have a<br />
vendor prefix.</li>
<li>Modified the &quot;un/registerNamespace()&quot; 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 &quot;true&quot; value as the third argument.</li>
</ul>


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


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


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


<p>Zend_Cache:</p>
<ul>
<li>&quot;Backend&quot; renamed to &quot;Backend\AbstractBackend&quot;</li>
<li>&quot;Backend_Interface&quot; renamed to &quot;Backend&quot;</li>
<li>New interface created, &quot;Frontend&quot;. Any previous typehints for<br />
&quot;Zend_Cache_Core&quot; should now be rewritten to &quot;Zend\Cache\Frontend&quot;</li>
<li>&quot;Core&quot; renamed to &quot;Frontend\Core&quot;</li>
<li>&quot;Backend_ExtendedInterface&quot; renamed to &quot;Backend\ExtendedBackend&quot;</li>
<li>&quot;Backend_ZendServer&quot; renamed to &quot;Backend\ZendServer\AbstractZendServer&quot;</li>
<li>&quot;Backend_Static&quot; renamed to &quot;Backend\StaticBackend&quot;</li>
<li>&quot;Backend_Test&quot; renamed to &quot;Backend\TestBackend&quot;</li>
<li>&quot;Frontend_Class&quot; renamed to &quot;Frontend\ClassFrontend&quot;</li>
<li>&quot;Frontend_Function&quot; renamed to &quot;Frontend\FunctionFrontend&quot;</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>&quot;Zend_Measure&quot; prefix now becomes &quot;Zend\Measure&quot; namespace</li>
<li>&quot;Zend_Measure_Abstract&quot; becomes &quot;Zend\Measure\AbstractMeasure&quot;</li>
</ul>


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



<p>Zend_Filter:</p>
<ul>
<li>&quot;Filter&quot; broken into &quot;FilterChain&quot; and &quot;StaticFilter&quot;</li>
<li>For filter chains, use the new FilterChain class</li>
<li>For static usage, use the new StaticFilter class</li>
<li>Additionally, &quot;filterStatic()&quot; was renamed to &quot;execute()&quot;</li>
<li>&quot;FilterInterface&quot; renamed to &quot;Filter&quot;</li>
<li>Interface now defines &quot;__invoke($value)&quot; instead of &quot;filter($value)&quot;. 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>&quot;Compress_CompressInterface&quot; renamed to &quot;Compress\CompressionAlgorithm&quot;</li>
<li>&quot;Compress_CompressAbstract&quot; renamed to &quot;Compress\AbstractCompressionAlgorithm&quot;</li>
<li>&quot;Encrypt_Interface&quot; renamed to &quot;Encrypt\EncryptionAlgorithm&quot;</li>
<li>Added &quot;toString()&quot; method to the interface; please update implementing<br />
classes accordingly</li>
<li>&quot;Word_Separator_Abstract&quot; renamed to &quot;Word\AbstractSeparator&quot;; please update<br />
extending classes accordingly.</li>
<li>Input:</li>
<li>&quot;VALIDATE&quot; constant removed in favor of &quot;VALIDATOR&quot; (already defined, but<br />
previously never used)</li>
<li>Class loading always uses namespaces now</li>
</ul>


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


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


<p>Zend_Http</p>
<ul>
<li>&quot;Zend_Http_*&quot; becomes Zend\HTTP*</li>
</ul>


<p>Zend_OpenId</p>
<ul>
<li>&quot;Zend_OpenId_*&quot; becomes Zend\OpenID*</li>
</ul>


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


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


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


<p>Zend_Console</p>
<ul>
<li>&quot;Zend_Console_Getopt_Exception&quot; becomes &quot;Zend\Console\GetoptException&quot;</li>
</ul>


<p>Zend_Dom</p>
<ul>
<li>&quot;Zend_Dom_Query_Result&quot; becomes &quot;Zend\Dom\NodeList&quot;</li>
<li>&quot;Zend_Dom_Query_Css2Xpath&quot; becomes &quot;Zend\Dom\Css2Xpath&quot;</li>
<li>&quot;Zend_Dom_Query::query()&quot; becomes &quot;Zend\Dom\Query::execute()&quot;</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>&quot;getUri()&quot; becomes &quot;generate()&quot;</li>
<li>&quot;check()&quot; becomes &quot;isValid()&quot;, and is no longer static</li>
<li>&quot;fromString()&quot; 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>&quot;Zend_Pdf&quot; prefix now becomes &quot;Zend\PDF&quot; namespace</li>
<li>&quot;Zend_Pdf&quot; class becomes &quot;Zend\PDF\PDFDocument</li>
<li>&quot;Zend_Pdf_Action_Goto&quot; becomes &quot;Zend\PDF\Action\GoToAction&quot;</li>
</ul>


<p>Zend_Barcode</p>
<ul>
<li>&quot;Zend_Barcode&quot; prefix now becomes &quot;Zend\Barcode&quot; namespace</li>
<li>&quot;Zend_Barcode&quot; class becomes &quot;Zend\Barcode\Barcode&quot;</li>
<li>Barcode classes and renderers become case sensitive</li>
<li>&quot;Pdf&quot; barcode renderer becomes &quot;PDF&quot;</li>
<li>&quot;Zend_Barcode_Object&quot; return/parameter type is replaced with<br />
&quot;Zend\Barcode\Object\ObjectInterface&quot; interface<br />
&quot;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 &quot;default&quot; font.</li>
<li>&quot;Zend_Barcode_Renderer&quot; return/parameter type is replaced with<br />
&quot;Zend\Barcode\Renderer\RendererInterface&quot; interface<br />
&quot;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>&quot;Zend_Search_Lucene&quot; prefix now becomes &quot;Zend\Search\Lucene&quot; namespace</li>
<li>All &quot;Zend\Search\Lucene\Lucene&quot; methods except static create(), open(),<br />
setDefault*() and getDefault*() methods are moved into new class &quot;Zend\Search\Lucene\Index&quot;</li>
<li>&quot;Zend_Search_Lucene_Analysis_TokenFilter&quot; abstract class becomes<br />
&quot;\Zend\Search\Lucene\Analysis\TokenFilter\TokenFilterInterface&quot; interface</li>
<li>&quot;Zend_Search_Lucene_Document&quot; class becomes &quot;Zend\Search\Lucene\Document\Document&quot;</li>
<li>&quot;Zend_Search_Lucene_Field&quot; class becomes &quot;Zend\Search\Lucene\Document\Field&quot;</li>
<li>&quot;Zend_Search_Lucene_Document_Html&quot; class becomes &quot;Zend\Search\Lucene\Document\HTML&quot;</li>
<li>&quot;Zend_Search_Lucene_Search_Highlighter_Default&quot; class becomes<br />
&quot;\Zend\Search\Lucene\Search\Highlighter\DefaultHighlighter&quot;</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 -&gt; MySQL, Mysqli -&gt; MySQLi, Pdo -&gt; PDO, Pgsql -&gt; PGSQL, Oci -&gt; OCI, Ibm -&gt; IBM<br />
Mssql -&gt; MSSQL, Sqlite -&gt; SQLite, Sqlsrv -&gt; 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 -&gt; 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>