Skip to content
Connor edited this page Mar 21, 2024 · 13 revisions

From 1.4.x to 1.5.x

  • Create an empty composer.json if it does not already exist.
  • If it already exists, you can install symfony1 with composer require friendsofsymfony1/symfony1 "^1.5".
  • You must remove the sfCoreAutoload::register() call from the ProjectConfiguration.php file and you need to replace the path to the autoloader:
<?php

require_once(__DIR__.'/../vendor/autoload.php');

class ProjectConfiguration extends sfProjectConfiguration {

Doctrine related changes to do

  • You can install doctrine1 using the composer require friendsofsymfony1/doctrine1"^1.5" command. In this case, you need to set the sf_doctrine_dir option in sfConfig, which should point to the vendor/friendsofsymfony1/doctrine1/lib directory.
  • You must change all Doctrine class occurrences to Doctrine_Core. The easiest way to do this is to create a Doctrine proxy class and tag it with @deprecated:
/** @deprecated */
class Doctrine extends Doctrine_Core
{

}

After that your IDE or phpstan with deprecation rules extension can list the Doctrine class occurrences very well. Don't forget to check the plugins folder (sfDoctrineGuardPlugin).

  • If you have configured doctrine by calling the configureDoctrineEvent or configureDoctrine methods in the ProjectConfiguration file, you must subscribe to doctrine.configure even in the setup method:
class ProjectConfiguration extends sfProjectConfiguration
{
  public function setup()
  {
    // ...

    $this->dispatcher->connect('doctrine.configure', array($this, 'configureDoctrineEvent'));
  }

  public function configureDoctrineEvent(sfEvent $event)
  {
    $manager = $event->getSubject();
    $manager->setAttribute(Doctrine_Core::ATTR_USE_DQL_CALLBACKS, false);
  }
}

From 1.5.18 to 1.5.19

  • If you are using sfAPCCache you will need to switch to sfAPCuCache.
  • If you are using sfEAcceleratorCache you will need to switch to some other supported cache.
  • If you are using sfXCacheCache you will need to switch to some other supported cache.

Todo

  • ?
Clone this wiki locally