Skip to content
Permalink
Browse files

Move aliases to compatbility shims.

Move the backwards compatibility aliases out of the bootstrap and into
stub files. By using stub files we don't force the aliased classes to be
eagerly loaded on every request. Instead they are only loaded when they
are used.
  • Loading branch information...
markstory committed Apr 30, 2016
1 parent 74e70e6 commit d553414eb7b09d87f0841d1b7b950f1b319976de
@@ -17,19 +17,6 @@
define('TIME_START', microtime(true));
// @deprecated Backward compatibility with 2.x series
if (PHP_VERSION_ID < 70000) {
class_alias('Cake\Utility\Text', 'Cake\Utility\String');
}
// @deprecated Backward compatibility with 2.x, 3.0.x
class_alias('Cake\Mailer\AbstractTransport', 'Cake\Network\Email\AbstractTransport');
class_alias('Cake\Mailer\Transport\DebugTransport', 'Cake\Network\Email\DebugTransport');
class_alias('Cake\Mailer\Email', 'Cake\Network\Email\Email');
class_alias('Cake\Mailer\Transport\MailTransport', 'Cake\Network\Email\MailTransport');
class_alias('Cake\Mailer\Transport\SmtpTransport', 'Cake\Network\Email\SmtpTransport');
require CAKE . 'basics.php';
// Sets the initial router state so future reloads work.
@@ -0,0 +1,3 @@
<?php
// @deprecated Backward compatibility with 2.x, 3.0.x
class_alias('Cake\Mailer\AbstractTransport', 'Cake\Network\Email\AbstractTransport');
@@ -0,0 +1,3 @@
<?php
// @deprecated Backward compatibility with 2.x, 3.0.x
class_alias('Cake\Mailer\Transport\DebugTransport', 'Cake\Network\Email\DebugTransport');
@@ -0,0 +1,3 @@
<?php
// @deprecated Backward compatibility with 2.x, 3.0.x
class_alias('Cake\Mailer\Email', 'Cake\Network\Email\Email');
@@ -0,0 +1,3 @@
<?php
// @deprecated Backward compatibility with 2.x, 3.0.x
class_alias('Cake\Mailer\Transport\MailTransport', 'Cake\Network\Email\MailTransport');
@@ -0,0 +1,3 @@
<?php
// @deprecated Backward compatibility with 2.x, 3.0.x
class_alias('Cake\Mailer\Transport\SmtpTransport', 'Cake\Network\Email\SmtpTransport');
@@ -0,0 +1,5 @@
<?php
// @deprecated Backward compatibility with 2.x series
if (PHP_VERSION_ID < 70000) {
class_alias('Cake\Utility\Text', 'Cake\Utility\String');
}

0 comments on commit d553414

Please sign in to comment.
You can’t perform that action at this time.