Yesterday, I upgraded the eZ publish setup in SCIM project website from 3.5 to latest stable version 3.8. For your references, here I will present the details about how to achieve this.

Before anything else, first make your eZ offline in case users want to access it. You can achieve this easily by just replace the eZ index.php with a file stating that “the site is undergoing an upgrade and will back online soon” or similar.

First, update the database. The sql update files I applied include:

update/database/mysql/3.6/dbupdate-3.5.2-to-3.6.0.sql    
update/database/mysql/3.8/dbupdate-3.6.0-to-3.8.0.sql    
update/database/mysql/3.8/dbupdate-3.8.0-to-3.8.1.sql

Second, run the provided update scripts under update/common/scripts/. I figured these are required for my particular needs:

update/common/scripts/convertxmllinks.php    
update/common/scripts/updateattributefilter.php      
update/common/scripts/updatemultilingual.php    
update/common/scripts/updatesearchindex.php    
update/common/scripts/updatesession.php    
update/common/scripts/updatetoplevel.php    
update/common/scripts/updatetranslations.php    
update/common/scripts/updatexmltext.php    
update/common/scripts/updatecontentobjectname.php    
update/common/scripts/updatetranslations.php

You may need to run other scripts if you use the online shop support in eZ. Some of these script may require siteaccess to be specified explicitly, please see the help (-h option, as usual) for details. If you have several siteaccess using one database, just run a script using one of the them is enough.

Then I went though/review the custom template files and updated them accordingly.

In eZ 3.5, I used to have a modified version of object.tpl which renders an object inline if its view attribute equals text_linked. As in eZ 3.8, a new tag embed-inline is introduced, I have to update all the xml attribute. Luckily, it is trivial to modify one of the update script to achieve this. Here is the patch:

Index: update/common/scripts/updatexmltext.php
===================================================================
--- update/common/scripts/updatexmltext.php     (revision 16004)
+++ update/common/scripts/updatexmltext.php     (working copy)
@@ -198,8 +198,24 @@
                     $foundLinks = true;
                 }
             }
-        }
-        if ( findAndReplaceLinks( $doc, $child ) )
+        } else if ( $child->name() == 'embed' || $child->name() == 'object')
+        {
+            echo $child->toString()." Original\n";
+            $objectid = $child->attributeValue('id');
+            unset($mchild);
+            $mchild =& $child;
+            $mchild->removeNamedAttribute( 'id' );
+            if($mchild->attributeValue('view') == 'text_linked')
+                $mchild->setName('embed-inline');
+            else
+                $mchild->setName('embed');
+
+            if(is_numeric($objectid))
+                $mchild->set_attribute('object_id',$objectid);
+            echo $mchild->toString()." Converted\n";
+            //$child->removeAttribute();
+       }
+        else if ( findAndReplaceLinks( $doc, $child ) )
             $foundLinks = true;
         unset( $child );
     }