Skip to content

Commit

Permalink
Add warnings for moved classes.
Browse files Browse the repository at this point in the history
Using moved classes will now emit deprecation warnings.
  • Loading branch information
markstory committed Nov 25, 2017
1 parent 89c1885 commit 37bbe08
Show file tree
Hide file tree
Showing 22 changed files with 22 additions and 59 deletions.
2 changes: 2 additions & 0 deletions src/Cache/Engine/ApcEngine.php
Expand Up @@ -16,3 +16,5 @@

// @deprecated Add backwards compat alias.
class_alias('Cake\Cache\Engine\ApcuEngine', 'Cake\Cache\Engine\ApcEngine');

deprecationWarning('Use Cake\Cache\Engine\ApcuEngine instead of Cake\Cache\Engine\ApcEngine.');
1 change: 1 addition & 0 deletions src/Database/Schema/Table.php
@@ -1,3 +1,4 @@
<?php
// @deprecated Load new class and alias
class_exists('Cake\Database\Schema\TableSchema');
deprecationWarning('Use Cake\Database\Schema\TableSchema instead of Cake\Database\Schema\Table.');
1 change: 1 addition & 0 deletions src/Network/Email/AbstractTransport.php
@@ -1,3 +1,4 @@
<?php
// @deprecated Backward compatibility with 2.x, 3.0.x
class_alias('Cake\Mailer\AbstractTransport', 'Cake\Network\Email\AbstractTransport');
deprecationWarning('Use Cake\Mailer\AbstractTransport instead of Cake\Network\Email\AbstractTransport.');
1 change: 1 addition & 0 deletions src/Network/Email/DebugTransport.php
@@ -1,3 +1,4 @@
<?php
// @deprecated Backward compatibility with 2.x, 3.0.x
class_alias('Cake\Mailer\Transport\DebugTransport', 'Cake\Network\Email\DebugTransport');
deprecationWarning('Use Cake\Mailer\Transport\DebugTransport instead of Cake\Network\Email\DebugTransport.');
1 change: 1 addition & 0 deletions src/Network/Email/Email.php
@@ -1,3 +1,4 @@
<?php
// @deprecated Backward compatibility with 2.x, 3.0.x
class_alias('Cake\Mailer\Email', 'Cake\Network\Email\Email');
deprecationWarning('Use Cake\Mailer\Email instead of Cake\Network\Email\Email.');
1 change: 1 addition & 0 deletions src/Network/Email/MailTransport.php
@@ -1,3 +1,4 @@
<?php
// @deprecated Backward compatibility with 2.x, 3.0.x
class_alias('Cake\Mailer\Transport\MailTransport', 'Cake\Network\Email\MailTransport');
deprecationWarning('Use Cake\Mailer\Transport\MailTransport instead of Cake\Network\Email\MailTransport.');
1 change: 1 addition & 0 deletions src/Network/Email/SmtpTransport.php
@@ -1,3 +1,4 @@
<?php
// @deprecated Backward compatibility with 2.x, 3.0.x
class_alias('Cake\Mailer\Transport\SmtpTransport', 'Cake\Network\Email\SmtpTransport');
deprecationWarning('Use Cake\Mailer\Transport\SmtpTransport instead of Cake\Network\Email\SmtpTransport.');
1 change: 1 addition & 0 deletions src/Network/Http/Adapter/Stream.php
@@ -1,3 +1,4 @@
<?php
// @deprecated Load new class and alias.
class_exists('Cake\Http\Client\Adapter\Stream');
deprecationWarning('Use Cake\Http\Client\Adapter\Stream instead of Cake\Network\Http\Adapter\Stream.');
1 change: 1 addition & 0 deletions src/Network/Http/Auth/Basic.php
@@ -1,3 +1,4 @@
<?php
// @deprecated Load new class and alias.
class_exists('Cake\Http\Client\Auth\Basic');
deprecationWarning('Use Cake\Http\Client\Auth\Basic instead of Cake\Network\Http\Auth\Basic.');
1 change: 1 addition & 0 deletions src/Network/Http/Auth/Digest.php
@@ -1,3 +1,4 @@
<?php
// @deprecated Load new class and alias.
class_exists('Cake\Http\Client\Auth\Digest');
deprecationWarning('Use Cake\Http\Client\Auth\Digest instead of Cake\Network\Http\Auth\Digest.');
1 change: 1 addition & 0 deletions src/Network/Http/Auth/Oauth.php
@@ -1,3 +1,4 @@
<?php
// @deprecated Load new class and alias.
class_exists('Cake\Http\Client\Auth\Oauth');
deprecationWarning('Use Cake\Http\Client\Auth\Oauth instead of Cake\Network\Http\Auth\Oauth.');
1 change: 1 addition & 0 deletions src/Network/Http/Client.php
@@ -1,3 +1,4 @@
<?php
// @deprecated Load new class and alias.
class_exists('Cake\Http\Client');
deprecationWarning('Use Cake\Http\Client instead of Cake\Network\Http\Client.');
1 change: 1 addition & 0 deletions src/Network/Http/CookieCollection.php
@@ -1,3 +1,4 @@
<?php
// @deprecated Load new class and alias.
class_exists('Cake\Http\Client\CookieCollection');
deprecationWarning('Use Cake\Http\Client\CookieCollection instead of Cake\Network\Http\CookieCollection.');
1 change: 1 addition & 0 deletions src/Network/Http/FormData.php
@@ -1,3 +1,4 @@
<?php
// @deprecated Load new class and alias.
class_exists('Cake\Http\Client\FormData');
deprecationWarning('Use Cake\Http\Client\FormData instead of Cake\Network\Http\FormData.');
1 change: 1 addition & 0 deletions src/Network/Http/FormData/Part.php
@@ -1,3 +1,4 @@
<?php
// @deprecated Load new class and alias.
class_exists('Cake\Http\Client\FormDataPart');
deprecationWarning('Use Cake\Http\Client\FormDataPart instead of Cake\Network\Http\FormData\Part.');
1 change: 1 addition & 0 deletions src/Network/Http/Message.php
@@ -1,3 +1,4 @@
<?php
// @deprecated Load new class and alias.
class_exists('Cake\Http\Client\Message');
deprecationWarning('Use Cake\Http\Client\Message instead of Cake\Network\Http\Message.');
1 change: 1 addition & 0 deletions src/Network/Http/Request.php
@@ -1,3 +1,4 @@
<?php
// @deprecated Load new class and alias.
class_exists('Cake\Http\Client\Request');
deprecationWarning('Use Cake\Http\Client\Request instead of Cake\Network\Http\Request.');
1 change: 1 addition & 0 deletions src/Network/Http/Response.php
@@ -1,3 +1,4 @@
<?php
// @deprecated Load new class and alias.
class_exists('Cake\Http\Client\Response');
deprecationWarning('Use Cake\Http\Client\Response instead of Cake\Network\Http\Response.');
1 change: 1 addition & 0 deletions src/Network/Request.php
@@ -1,3 +1,4 @@
<?php
// @deprecated Load new class and alias
class_exists('Cake\Http\ServerRequest');
deprecationWarning('Use Cake\Http\ServerRequest instead of Cake\Network\Request.');
1 change: 1 addition & 0 deletions src/Network/Response.php
@@ -1,3 +1,4 @@
<?php
// @deprecated Load new class and alias
class_exists('Cake\Http\Response');
deprecationWarning('Use Cake\Http\Response instead of Cake\Network\Response.');
1 change: 1 addition & 0 deletions src/Utility/String.php
Expand Up @@ -2,4 +2,5 @@
// @deprecated Backward compatibility with 2.x series
if (PHP_VERSION_ID < 70000) {
class_alias('Cake\Utility\Text', 'Cake\Utility\String');
deprecationWarning('Use Cake\Utility\Text instead of Cake\Utility\String.');
}
59 changes: 0 additions & 59 deletions tests/TestCase/Network/MoveToHttpTest.php

This file was deleted.

0 comments on commit 37bbe08

Please sign in to comment.