Development

HowToUpgradeToVersion1.1

You must first sign up to be able to contribute.

Version 5 (modified by NooBox, 7 years ago)
--

How to upgrade your project

This page was created in the wiki from the textual upgrade instructions. A version with better formatting can be found in the installation instructions.

Latest beta or release candidate

All documentation resources on 1.1 can be found at:

The following upgrade instructions are under construction. They're essentially a wikified version of the UPGRADE file in the repository. They're here a) to make them easier to read (monospaced fonts are harder to read), and b) to have a one page checklist that's easier to use for managing the upgrade process. Always check the UPGRADE file as well, in case any changes there didn't not get carried over here.

New Prerequisites

* PHP 5.1 or greater is required for symfony 1.1

Upgrade Steps

  1. Check your current plugins to see if they have 1.1 versions available. If not, you may wish to defer upgrading.
  2. Backup your project.
    1. Some files, such as the front controllers, are likely to need merges, so a backup is critical.
    2. To be really safe, consider backing up your database as well as the project.
    3. If you keep your project in Subversion or other source code management system, you may not a separate backup, but you should make sure all of your files are checked in before starting an upgrade.
  3. Download or install the latest release candidate using whichever mechanism you currently use.
    1. Note: If you use a source download (i.e., tar file), you don't need to unpack it on top of your previous symfony tree. Just configure symfony to use it from wherever you unpacked it, as described in the next two steps.
    2. Note: If you checkout directly from the symfony subversion repository, then you can use a new working copy or simply switch your current one. If you switch your current working copy, first check to see if there are any modified or new files.
  4. Manually patch your symfony file
  5. Manually create a ProjectConfiguration.class.php file, customizing it to point to your symfony 1.1 installation.
    1. WARNING: If you're an early adopter and already have a ProjectConfiguration.class.php file, you may need to manually upgrade it anyway due to later changes during 1.1 development.
  6. Run the project:upgrade1.1 task
  7. Review the log of your project:upgrade1.1 task, to see if you need to make manual edits. Some of these are discussed below.
  8. Check and upgrade your configuration:
    1. Migrate any config.php settings. The config.php files are no longer used in 1.1, but must be deleted manually. These will be mentioned in the log of the upgrade1.1 task.
    2. Confirm that the new routing configuration, found in factories.yml, is what you want. (This is the configuration of the routing module, not the individual routing rules in your routing.yml files.)
    3. Confirm that the logging configuration, now found in factories.yml, is what you want.
    4. Upgrade your i18n configuration. The i18n.yml file is obsolete, so you'll need to make changes in factories.yml and/or settings.yml.
    5. Upgrade your session timeout setting if necessary.
    6. Check your php configuration using check_configuration.php, preferably from the web. The php.yml file has been removed.
  9. Turn on compatibility mode if you're not planning on upgrading the validation or mailing systems.
  10. Review your code for incompatibilities.
    1. Upgrade your batch scripts manually if you still wish to use them. The initial lines of batch scripts must be changed.
      1. Review your batch scripts for subframeworks whose configuration and loading mechanisms have changed:
        • sfDatabaseManager
        • sfI18N
        • sfPatternRouting
    2. Double check your custom php files. In addition to your modules and model files, don't forget your shared files (i.e., in apps/*/lib), and any custom generator templates (in data/generator).
    3. Here are the documented incompatibilities:
      1. Upgrade your use of sfI18N, sfRouting, and sfLogger.
      2. If you referred to the VERSION file in code, you'll need to use the SYMFONY_VERSION constant instead.
      3. Review your code for changes in routing that may be needed.
      4. Core classes don't return internationalized strings anymore. Review your code to see if you need to add explcit i18n calls.
      5. If you're not using compatibility mode, review your code for deprecated methods:
        • sfAction
        • sfRequest
        • sfWebRequest
      6. The initialize method is now called automatically from __construct methods. Review your code for any calls on initialize that need to be removed or changed.
      7. Check your code for references to $sf_symfony_data_dir that need to be fixed. That variable has been removed, and the files relocated to the lib directory.
      8. Check your usage of sfLoader and sfCore.
      9. Upgrade your front controllers (index.php, backend.php, etc.)
      10. Check your usage of sfConfig constants that end with _dir_name. These have been removed.
      11. Check your usage of cache keys.
      12. Manually upgrade your layout.php files.
      13. If you've scripted the use of any symfony command line tasks, you'll need to upgrade the task names.

outdated information