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

PHP - File get contents and proper encoding
Error (check link)
CI - Help Inserting Multiple Select Form with each having Multiple Selected Options
How to output variable inside an object in PHP
How $_POST value missing unless field specified within model rules?
Addind DISCUS commenting system to your site
Incorrectly executed script for the selection of IP addresses
How to calculate time range between sale start and sale end including the second?
Dynamically add columns in an existing table on the fly in CakePHP 3
Custom post query in single post type
PHP check value against multiple values with OR-operator
Incorrect table definition; there can be only one auto column and it must be defined as a key Codeigniter
problems passing php variable into input value [duplicate]
php regex to replace spaces in braces including braces
Is there some tool to test PHP code against SQL injection, out of range values, etc? [duplicate]
How to optimize SQL settings for fully cached wordpress site

Categories

HOME
amazon-web-services
powerbi
libgdx
angular-ui-grid
yahoo-weather-api
swi-prolog
tcsh
adobe
tcp
google-sheets-query
dji-sdk
google-search-console
stored-procedures
wagtail
pyresttest
specifications
wine
amazon-emr
rangy
spring-amqp
pygobject
exec-maven-plugin
susy-sass
cloudsim
codefluent
pfobject
spyder
android-permissions
pst
sharedpreferences
substring
unordered-multimap
jackrabbit-oak
react-bootstrap-table
sendmessage
boolean-logic
amazon-iam
seafile-server
quickcheck
payeezy
gnu-classpath
bean-validation
subclassing
testlink
python-sounddevice
grunt-contrib-watch
plane
contactless-smartcard
kitura
deployd
sigsegv
htmlspecialchars
prefetch
allegro
okio
between
declarative
powerpoint-2013
univocity
vim-plugin
supersocket.net
domino-designer-eclipse
textscan
sablecc
mxe
mutators
kognitio-wx2
accessory
stripe.net
.htpasswd
cidr
strdup
application-blocks
jquery-transit
django-facebook
blobstorage
sly-scroller
cyrillic
smartfox
multiple-dispatch
chronometer
multidrop-bus
webresponse
aggregator
urchin
self-tracking-entities
aspbutton
html-components
.net-client-profile
accumulator
ning
version-control-migration
chronic
downloadfile

Resources

Database Users
RDBMS discuss
Database Dev&Adm
javascript
java
csharp
php
android
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App