Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update backwards compat alias generation.
Generate aliases in the new files. This allows us to resolve issues where typehints result in fatal errors by ensuring that aliases exist when the new class is used. The old class location forces the new location to load which ensures that both names resolve to the same state (class + alias loaded). Unfortunately this requires relaxing the PSR1 side-effect rules as the `@codingStandardsIgnoreStart` tags did not work.
- Loading branch information
Showing
32 changed files
with
75 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,9 @@ | ||
<?xml version="1.0"?> | ||
<ruleset name="CakePHP Core"> | ||
<rule ref="./vendor/cakephp/cakephp-codesniffer/CakePHP/ruleset.xml"/> | ||
<rule ref="./vendor/cakephp/cakephp-codesniffer/CakePHP/ruleset.xml"/> | ||
|
||
<!-- Necessary for class aliases used for backwards compat --> | ||
<rule ref="PSR1.Files.SideEffects.FoundWithSymbols"> | ||
<severity>0</severity> | ||
</rule> | ||
</ruleset> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<?php | ||
// @deprecated Backwards compatibility with earlier 3.x versions. | ||
class_alias('Cake\Database\Schema\TableSchema', 'Cake\Database\Schema\Table'); | ||
// @deprecated Load new class and alias | ||
class_exists('Cake\Database\Schema\TableSchema'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<?php | ||
// @deprecated Backwards compatibility with earler 3.x versions. | ||
class_alias('Cake\Http\Client\Adapter\Stream', 'Cake\Network\Http\Adapter\Stream'); | ||
// @deprecated Load new class and alias. | ||
class_exists('Cake\Http\Client\Adapter\Stream'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<?php | ||
// @deprecated Backwards compatibility with earler 3.x versions. | ||
class_alias('Cake\Http\Client\Auth\Basic', 'Cake\Network\Http\Auth\Basic'); | ||
// @deprecated Load new class and alias. | ||
class_exists('Cake\Http\Client\Auth\Basic'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<?php | ||
// @deprecated Backwards compatibility with earler 3.x versions. | ||
class_alias('Cake\Http\Client\Auth\Digest', 'Cake\Network\Http\Auth\Digest'); | ||
// @deprecated Load new class and alias. | ||
class_exists('Cake\Http\Client\Auth\Digest'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<?php | ||
// @deprecated Backwards compatibility with earler 3.x versions. | ||
class_alias('Cake\Http\Client\Auth\Oauth', 'Cake\Network\Http\Auth\Oauth'); | ||
// @deprecated Load new class and alias. | ||
class_exists('Cake\Http\Client\Auth\Oauth'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<?php | ||
// @deprecated Backwards compatibility with earler 3.x versions. | ||
class_alias('Cake\Http\Client', 'Cake\Network\Http\Client'); | ||
// @deprecated Load new class and alias. | ||
class_exists('Cake\Http\Client'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<?php | ||
// @deprecated Backwards compatibility with earler 3.x versions. | ||
class_alias('Cake\Http\Client\CookieCollection', 'Cake\Network\Http\CookieCollection'); | ||
// @deprecated Load new class and alias. | ||
class_exists('Cake\Http\Client\CookieCollection'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<?php | ||
// @deprecated Backwards compatibility with earler 3.x versions. | ||
class_alias('Cake\Http\Client\FormData', 'Cake\Network\Http\FormData'); | ||
// @deprecated Load new class and alias. | ||
class_exists('Cake\Http\Client\FormData'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
<?php | ||
class_alias('Cake\Http\Client\FormDataPart', 'Cake\Network\Http\FormData\Part'); | ||
// @deprecated Load new class and alias. | ||
class_exists('Cake\Http\Client\FormDataPart'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<?php | ||
// @deprecated Backwards compatibility with earler 3.x versions. | ||
class_alias('Cake\Http\Client\Message', 'Cake\Network\Http\Message'); | ||
// @deprecated Load new class and alias. | ||
class_exists('Cake\Http\Client\Message'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<?php | ||
// @deprecated Backwards compatibility with earler 3.x versions. | ||
class_alias('Cake\Http\Client\Request', 'Cake\Network\Http\Request'); | ||
// @deprecated Load new class and alias. | ||
class_exists('Cake\Http\Client\Request'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<?php | ||
// @deprecated Backwards compatibility with earler 3.x versions. | ||
class_alias('Cake\Http\Client\Response', 'Cake\Network\Http\Response'); | ||
// @deprecated Load new class and alias. | ||
class_exists('Cake\Http\Client\Response'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<?php | ||
// @deprecated Backwards compatibility with earler 3.x versions. | ||
class_alias('Cake\Http\ServerRequest', 'Cake\Network\Request'); | ||
// @deprecated Load new class and alias | ||
class_exists('Cake\Http\ServerRequest'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<?php | ||
// @deprecated Backwards compatibility with earler 3.x versions. | ||
class_alias('Cake\Http\Response', 'Cake\Network\Response'); | ||
// @deprecated Load new class and alias | ||
class_exists('Cake\Http\Response'); |