Migrasi ke PHP7
Agar bisa tetap menggunakan symfony 1.4 ketika migrasi ke PHP 7, kita dapat menggunakan forking symfony lexpress [1]
Untuk instalasi nya bisa via composer.
//file : composer.json di folder utama proyek
{
"require": {
"lexpress/symfony1": "dev-master",
"lexpress/doctrine1":"dev-master",
"swiftmailer/swiftmailer": "~5.2"
},
"config": {
"vendor-dir": "lib/vendor"
}
}
composer install
composer update
di config/ProjectConfiguration.class.php
require_once DIRNAME(__FILE__).'/../lib/vendor/autoload.php';
require_once DIRNAME(__FILE__).'/../lib/vendor/lexpress/symfony1/lib/autoload/sfCoreAutoload.class.php';
sfCoreAutoload::register();
class ProjectConfiguration extends sfProjectConfiguration
{
public function setup()
{
}
}
Kemudian, semua pemanggilan class Doctrine harus diganti menjadi Doctrine_Core [2]
Referensi
Fork of symfony 1.4 with DIC, form enhancements, latest Swiftmailer, better performance, composer compatible and PHP 7.0 support, https://github.com/LExpress/symfony1
LExpress/doctrine1 and Doctrine.php #108, https://github.com/LExpress/symfony1/issues/108