php


Updating web app from Zend Framework 1.7 to 1.8


I'm trying to update my current project from 1.7 to 1.8. What do I have to change so that it does not break?
most features will still work with legacy code. try it out on your test environment and read the ZF change log. one important thing is that the loader works differently now. especially if you're using autoload.
Until 1.7
require_once 'Zend/Loader.php';
Zend_Loader::registerAutoload();
Since 1.8
require_once 'Zend/Loader/Autoloader.php';
$loader = Zend_Loader_Autoloader::getInstance();
$loader->registerNamespace('Namespace_');
Short answer:
Run your test suite and check the results ;)
Long answer:
I remember two points where backward compatibility was broken:
If your bootstrapping does not set the Zend_Locale correctly, ZF >= 1.7.2 will throw an exception that it cannot detect the browsers Locale if you run a script via console.
Zend_View changes in 1.7.5
In Zend Framework 1.8 the constructor of Zend_Controller_Action was modified.
I have to mention this, because it broke my application until I found this error out after hours of debugging (for some reason xDebug nor PHP itself showed me that the constructor in my custom Controller_Action class was not the same as in Zend_Controller_Action anymore).
So have to change your constructor from
public function __construct(Zend_Controller_Request_Abstract $request, Zend_Controller_Response_Abstract $response, $invokeArgs = array())
to
public function __construct(Zend_Controller_Request_Abstract $request, Zend_Controller_Response_Abstract $response, array $invokeArgs = array())

Related Links

JSON_BIGINT_AS_STRING removed in php 5.5?
Calling a Model Function in View?
PHP Regex: Extracting content from piped curly braces
Merge these array values into a new array?
Compare directory contents to database column in Joomla
How to access the html contents in the php code segment within the same php file?
How to change the index name of array
New line chr in twitter feed breaks JSONP
FFmpeg failed to transcode - Error while opening encoder for output stream
need ideas for remote authentication (Wordpress) [closed]
get parent array name after array_walk_recursive function
How To Insert From Data From PHP to MySQL DB
Form, receive variables on same php file [duplicate]
Arrays and nested foreach
Sidenavigation. Load everything with one request or splitted?
Display TinyMCE inputted text causing undisplayable characters

Categories

HOME
opengl
key
dry
mirc
cypher
navigation
ipv6
share
repair
clone
gprs
xades4j
android-externalstorage
jquery-select2-4
freertos
pywinauto
closures
tfsbuild
device
jstree
data-collection
ruby-daemons
mdns
tightvnc
wampsharp
custom-keyboard
landscape
rdp
best-buy-api
oauth2
right-click
classnotfoundexception
hdiv
dbcc
jshint
linq-to-excel
common-table-expression
django-static-precompiler
htmlspecialchars
test-data
business-rules
d3v4
e
traversable
wolfram-language
android-sdcard
qpixmap
teensy
myfaces
deeplink
place
screen-orientation
featuretoggle
android-handler
artisan
hp-idol-ondemand
dc
xhprof
quantify
webmethod
commenting
refit
jack
pre
map
grails-2.3
non-ascii-characters
void-pointers
days
cgrectmake
idispatch
gamesalad
platform-independent
sigar
background-repeat
expression-web
fork-join
libxslt
fxruby
xap
twitter-feed
rootkit

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App