mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Remove all todo from core, create tickets for them
This commit is contained in:
parent
56225bcca3
commit
e02eab05d5
17 changed files with 7 additions and 32 deletions
|
@ -78,7 +78,6 @@ class TemplateTask extends AppShell {
|
|||
|
||||
$paths[] = $core;
|
||||
|
||||
// TEMPORARY TODO remove when all paths are DS terminated
|
||||
foreach ($paths as $i => $path) {
|
||||
$paths[$i] = rtrim($path, DS) . DS;
|
||||
}
|
||||
|
|
|
@ -755,7 +755,7 @@ class Controller extends Object implements CakeEventListener {
|
|||
extract($status, EXTR_OVERWRITE);
|
||||
}
|
||||
$event = new CakeEvent('Controller.beforeRedirect', $this, array($url, $status, $exit));
|
||||
//TODO: Remove the following line when the events are fully migrated to the CakeEventManager
|
||||
|
||||
list($event->break, $event->breakOn, $event->collectReturn) = array(true, false, true);
|
||||
$this->getEventManager()->dispatch($event);
|
||||
|
||||
|
|
|
@ -987,7 +987,6 @@ class Multibyte {
|
|||
* @param string $charset charset to use for encoding. defaults to UTF-8
|
||||
* @param string $newline
|
||||
* @return string
|
||||
* @TODO: add support for 'Q'('Quoted Printable') encoding
|
||||
*/
|
||||
public static function mimeEncode($string, $charset = null, $newline = "\r\n") {
|
||||
if (!Multibyte::checkMultibyte($string) && strlen($string) < 75) {
|
||||
|
|
|
@ -588,7 +588,6 @@ class TreeBehavior extends ModelBehavior {
|
|||
* 'parent' the values of the parent_id field will be used to populate the left and right fields. The missingParentAction
|
||||
* parameter only applies to "parent" mode and determines what to do if the parent field contains an id that is not present.
|
||||
*
|
||||
* @todo Could be written to be faster, *maybe*. Ideally using a subquery and putting all the logic burden on the DB.
|
||||
* @param Model $Model Model instance
|
||||
* @param string $mode parent or tree
|
||||
* @param string|integer $missingParentAction 'return' to do nothing and return, 'delete' to
|
||||
|
|
|
@ -55,7 +55,6 @@ class BehaviorCollection extends ObjectCollection implements CakeEventListener {
|
|||
/**
|
||||
* Attaches a model object and loads a list of behaviors
|
||||
*
|
||||
* @todo Make this method a constructor instead..
|
||||
* @param string $modelName
|
||||
* @param array $behaviors
|
||||
* @return void
|
||||
|
|
|
@ -322,7 +322,6 @@ class DataSource extends Object {
|
|||
* @param Model $linkModel Instance of model to replace $__cakeForeignKey__$
|
||||
* @param array $stack
|
||||
* @return string String of query data with placeholders replaced.
|
||||
* @todo Remove and refactor $assocData, ensure uses of the method have the param removed too.
|
||||
*/
|
||||
public function insertQueryData($query, $data, $association, $assocData, Model $model, Model $linkModel, $stack) {
|
||||
$keys = array('{$__cakeID__$}', '{$__cakeForeignKey__$}');
|
||||
|
|
|
@ -219,7 +219,6 @@ class HttpResponse implements ArrayAccess {
|
|||
|
||||
$chunkSize = 0;
|
||||
$hexLength = 0;
|
||||
$chunkExtensionName = '';
|
||||
$chunkExtensionValue = '';
|
||||
if (isset($match[0])) {
|
||||
$chunkSize = $match[0];
|
||||
|
@ -227,9 +226,6 @@ class HttpResponse implements ArrayAccess {
|
|||
if (isset($match[1])) {
|
||||
$hexLength = $match[1];
|
||||
}
|
||||
if (isset($match[2])) {
|
||||
$chunkExtensionName = $match[2];
|
||||
}
|
||||
if (isset($match[3])) {
|
||||
$chunkExtensionValue = $match[3];
|
||||
}
|
||||
|
@ -237,9 +233,6 @@ class HttpResponse implements ArrayAccess {
|
|||
$body = substr($body, strlen($chunkSize));
|
||||
$chunkLength = hexdec($hexLength);
|
||||
$chunk = substr($body, 0, $chunkLength);
|
||||
if (!empty($chunkExtensionName)) {
|
||||
// @todo See if there are popular chunk extensions we should implement
|
||||
}
|
||||
$decodedBody .= $chunk;
|
||||
if ($chunkLength !== 0) {
|
||||
$body = substr($body, $chunkLength + strlen("\r\n"));
|
||||
|
@ -291,7 +284,6 @@ class HttpResponse implements ArrayAccess {
|
|||
*
|
||||
* @param array $header Header array containing one ore more 'Set-Cookie' headers.
|
||||
* @return mixed Either false on no cookies, or an array of cookies received.
|
||||
* @todo Make this 100% RFC 2965 confirm
|
||||
*/
|
||||
public function parseCookies($header) {
|
||||
$cookieHeader = $this->getHeader('Set-Cookie', $header);
|
||||
|
@ -334,7 +326,6 @@ class HttpResponse implements ArrayAccess {
|
|||
* @param string $token Token to unescape
|
||||
* @param array $chars
|
||||
* @return string Unescaped token
|
||||
* @todo Test $chars parameter
|
||||
*/
|
||||
protected function _unescapeToken($token, $chars = null) {
|
||||
$regex = '/"([' . implode('', $this->_tokenEscapeChars(true, $chars)) . '])"/';
|
||||
|
@ -348,7 +339,6 @@ class HttpResponse implements ArrayAccess {
|
|||
* @param boolean $hex true to get them as HEX values, false otherwise
|
||||
* @param array $chars
|
||||
* @return array Escape chars
|
||||
* @todo Test $chars parameter
|
||||
*/
|
||||
protected function _tokenEscapeChars($hex = true, $chars = null) {
|
||||
if (!empty($chars)) {
|
||||
|
|
|
@ -901,7 +901,6 @@ class HttpSocket extends CakeSocket {
|
|||
*
|
||||
* @param array $cookies Array of cookies to send with the request.
|
||||
* @return string Cookie header string to be sent with the request.
|
||||
* @todo Refactor token escape mechanism to be configurable
|
||||
*/
|
||||
public function buildCookies($cookies) {
|
||||
$header = array();
|
||||
|
@ -917,7 +916,6 @@ class HttpSocket extends CakeSocket {
|
|||
* @param string $token Token to escape
|
||||
* @param array $chars
|
||||
* @return string Escaped token
|
||||
* @todo Test $chars parameter
|
||||
*/
|
||||
protected function _escapeToken($token, $chars = null) {
|
||||
$regex = '/([' . implode('', $this->_tokenEscapeChars(true, $chars)) . '])/';
|
||||
|
@ -931,7 +929,6 @@ class HttpSocket extends CakeSocket {
|
|||
* @param boolean $hex true to get them as HEX values, false otherwise
|
||||
* @param array $chars
|
||||
* @return array Escape chars
|
||||
* @todo Test $chars parameter
|
||||
*/
|
||||
protected function _tokenEscapeChars($hex = true, $chars = null) {
|
||||
if (!empty($chars)) {
|
||||
|
|
|
@ -4054,7 +4054,6 @@ class ModelReadTest extends BaseModelTest {
|
|||
/**
|
||||
* testFindAllWithConditionInChildQuery
|
||||
*
|
||||
* @todo external conditions like this are going to need to be revisited at some point
|
||||
* @return void
|
||||
*/
|
||||
public function testFindAllWithConditionInChildQuery() {
|
||||
|
|
|
@ -1551,7 +1551,6 @@ class HttpSocketTest extends CakeTestCase {
|
|||
* testBuildCookies method
|
||||
*
|
||||
* @return void
|
||||
* @todo Test more scenarios
|
||||
*/
|
||||
public function testBuildCookies() {
|
||||
$cookies = array(
|
||||
|
|
|
@ -1538,7 +1538,6 @@ class RouterTest extends CakeTestCase {
|
|||
* test url generation with legacy (1.2) style prefix routes.
|
||||
*
|
||||
* @return void
|
||||
* @todo Remove tests related to legacy style routes.
|
||||
* @see testUrlGenerationWithAutoPrefixes
|
||||
*/
|
||||
public function testUrlGenerationWithLegacyPrefixes() {
|
||||
|
|
|
@ -279,7 +279,7 @@ class ScaffoldViewTest extends CakeTestCase {
|
|||
|
||||
$this->assertRegExp('/<h2>View Scaffold Mock<\/h2>/', $result);
|
||||
$this->assertRegExp('/<dl>/', $result);
|
||||
//TODO: add specific tests for fields.
|
||||
|
||||
$this->assertRegExp('/<a href="\/scaffold_users\/view\/1">1<\/a>/', $result); //belongsTo links
|
||||
$this->assertRegExp('/<li><a href="\/scaffold_mock\/edit\/1">Edit Scaffold Mock<\/a>\s<\/li>/', $result);
|
||||
$this->assertRegExp('/<a href="\#" onclick="if[^>]*>Delete Scaffold Mock<\/a>\s<\/li>/', $result);
|
||||
|
@ -370,7 +370,7 @@ class ScaffoldViewTest extends CakeTestCase {
|
|||
|
||||
$this->assertRegExp('/<h2>Scaffold Mock<\/h2>/', $result);
|
||||
$this->assertRegExp('/<table cellpadding="0" cellspacing="0">/', $result);
|
||||
//TODO: add testing for table generation
|
||||
|
||||
$this->assertRegExp('/<li><a href="\/admin\/scaffold_mock\/add">New Scaffold Mock<\/a><\/li>/', $result);
|
||||
|
||||
Configure::write('Routing.prefixes', $_backAdmin);
|
||||
|
@ -454,7 +454,7 @@ class ScaffoldViewTest extends CakeTestCase {
|
|||
|
||||
$this->assertRegExp('/<h2>Scaffold Mock<\/h2>/', $result);
|
||||
$this->assertRegExp('/<table cellpadding="0" cellspacing="0">/', $result);
|
||||
//TODO: add testing for table generation
|
||||
|
||||
$this->assertRegExp('/<li><a href="\/member\/scaffold_mock\/add">New Scaffold Mock<\/a><\/li>/', $result);
|
||||
|
||||
Configure::write('Routing.prefixes', $_backAdmin);
|
||||
|
|
|
@ -674,6 +674,6 @@ abstract class CakeTestCase extends PHPUnit_Framework_TestCase {
|
|||
}
|
||||
return $condition;
|
||||
}
|
||||
// @codingStandardsIgnoreStop
|
||||
// @codingStandardsIgnoreEnd
|
||||
|
||||
}
|
||||
|
|
|
@ -103,7 +103,7 @@ abstract class ObjectCollection {
|
|||
if (empty($event->omitSubject)) {
|
||||
$subject = $event->subject();
|
||||
}
|
||||
//TODO: Temporary BC check, while we move all the triggers system into the CakeEventManager
|
||||
|
||||
foreach (array('break', 'breakOn', 'collectReturn', 'modParams') as $opt) {
|
||||
if (isset($event->{$opt})) {
|
||||
$options[$opt] = $event->{$opt};
|
||||
|
|
|
@ -64,7 +64,6 @@ class Security {
|
|||
*
|
||||
* @param string $authKey Authorization hash
|
||||
* @return boolean Success
|
||||
* @todo Complete implementation
|
||||
*/
|
||||
public static function validateAuthKey($authKey) {
|
||||
return true;
|
||||
|
|
|
@ -599,7 +599,6 @@ class Helper extends Object {
|
|||
* @param string $id The name of the 'id' attribute.
|
||||
* @return mixed If $options was an array, an array will be returned with $id set. If a string
|
||||
* was supplied, a string will be returned.
|
||||
* @todo Refactor this method to not have as many input/output options.
|
||||
*/
|
||||
public function domId($options = null, $id = 'id') {
|
||||
if (is_array($options) && array_key_exists($id, $options) && $options[$id] === null) {
|
||||
|
@ -632,7 +631,6 @@ class Helper extends Object {
|
|||
* @param string $key The name of the attribute to be set, defaults to 'name'
|
||||
* @return mixed If an array was given for $options, an array with $key set will be returned.
|
||||
* If a string was supplied a string will be returned.
|
||||
* @todo Refactor this method to not have as many input/output options.
|
||||
*/
|
||||
protected function _name($options = array(), $field = null, $key = 'name') {
|
||||
if ($options === null) {
|
||||
|
@ -676,7 +674,6 @@ class Helper extends Object {
|
|||
* @param string $key The name of the attribute to be set, defaults to 'value'
|
||||
* @return mixed If an array was given for $options, an array with $key set will be returned.
|
||||
* If a string was supplied a string will be returned.
|
||||
* @todo Refactor this method to not have as many input/output options.
|
||||
*/
|
||||
public function value($options = array(), $field = null, $key = 'value') {
|
||||
if ($options === null) {
|
||||
|
|
|
@ -885,7 +885,7 @@ class View extends Object {
|
|||
$this->getEventManager()->dispatch(new CakeEvent('View.beforeRenderFile', $this, array($viewFile)));
|
||||
$content = $this->_evaluate($viewFile, $data);
|
||||
$afterEvent = new CakeEvent('View.afterRenderFile', $this, array($viewFile, $content));
|
||||
//TODO: For BC puporses, set extra info in the event object. Remove when appropriate
|
||||
|
||||
$afterEvent->modParams = 1;
|
||||
$this->getEventManager()->dispatch($afterEvent);
|
||||
$content = $afterEvent->data[1];
|
||||
|
|
Loading…
Reference in a new issue