Skip to content

Commit

Permalink
Remove deprecated and backwards compatibility code.
Browse files Browse the repository at this point in the history
  • Loading branch information
ADmad committed Jan 1, 2015
1 parent 9b38cac commit 6647e8f
Show file tree
Hide file tree
Showing 29 changed files with 8 additions and 979 deletions.
18 changes: 0 additions & 18 deletions config/bootstrap.php
Expand Up @@ -15,22 +15,4 @@

define('TIME_START', microtime(true));

// Compatibility aliases. These will be removed for the first RC release.
class_alias('Cake\Error\Debugger', 'Cake\Utility\Debugger');
class_alias('Cake\Core\Configure\Engine\PhpConfig', 'Cake\Configure\Engine\PhpConfig');
class_alias('Cake\Core\Configure\Engine\IniConfig', 'Cake\Configure\Engine\IniConfig');
class_alias('Cake\Datasource\Exception\RecordNotFoundException', 'Cake\ORM\Exception\RecordNotFoundException');
class_alias('Cake\ORM\Exception\RecordNotFoundException', 'Cake\ORM\Error\RecordNotFoundException');
class_alias('Cake\Network\Exception\BadRequestException', 'Cake\Error\BadRequestException');
class_alias('Cake\Network\Exception\ForbiddenException', 'Cake\Error\ForbiddenException');
class_alias('Cake\Network\Exception\MethodNotAllowedException', 'Cake\Error\MethodNotAllowedException');
class_alias('Cake\Network\Exception\NotFoundException', 'Cake\Error\NotFoundException');
class_alias('Cake\Network\Exception\NotImplementedException', 'Cake\Error\NotImplementedException');
class_alias('Cake\Network\Exception\SocketException', 'Cake\Error\SocketException');
class_alias('Cake\Network\Exception\UnauthorizedException', 'Cake\Error\UnauthorizedException');
class_alias('Cake\Filesystem\File', 'Cake\Utility\File');
class_alias('Cake\Filesystem\Folder', 'Cake\Utility\Folder');
class_alias('Cake\I18n\Time', 'Cake\Utility\Time');
class_alias('Cake\I18n\Number', 'Cake\Utility\Number');

require CAKE . 'basics.php';
5 changes: 0 additions & 5 deletions src/Controller/Component/PaginatorComponent.php
Expand Up @@ -227,11 +227,6 @@ public function paginate($object, array $settings = [])
*/
protected function _extractFinder($options)
{
if (!isset($options['finder']) && isset($options['findType'])) {
trigger_error('You should use finder instead of findType', E_USER_DEPRECATED);
$options['finder'] = $options['findType'];
}

$type = !empty($options['finder']) ? $options['finder'] : 'all';
unset($options['finder'], $options['maxLimit']);

Expand Down
196 changes: 0 additions & 196 deletions src/Controller/Component/SessionComponent.php

This file was deleted.

33 changes: 0 additions & 33 deletions src/Controller/Controller.php
Expand Up @@ -316,23 +316,6 @@ public function components()
return $this->_components;
}

/**
* Alias for loadComponent() for backwards compatibility.
*
* @param string $name The name of the component to load.
* @param array $config The config for the component.
* @return \Cake\Controller\Component
* @deprecated 3.0.0 Use loadComponent() instead.
*/
public function addComponent($name, array $config = [])
{
trigger_error(
'addComponent() is deprecated, use loadComponent() instead.',
E_USER_DEPRECATED
);
return $this->loadComponent($name, $config);
}

/**
* Add a component to the controller's registry.
*
Expand Down Expand Up @@ -453,22 +436,6 @@ public function implementedEvents()
];
}

/**
* No-op for backwards compatibility.
*
* The code that used to live here is now in Controller::__construct().
*
* @deprecated 3.0.0 Will be removed in 3.0.0.
* @return void
*/
public function constructClasses()
{
trigger_error(
'Controller::constructClasses() is deprecated and will be removed in the first RC release',
E_USER_DEPRECATED
);
}

/**
* Loads the defined components using the Component factory.
*
Expand Down
11 changes: 0 additions & 11 deletions src/Core/ObjectRegistry.php
Expand Up @@ -180,17 +180,6 @@ abstract protected function _create($class, $alias, $config);
*/
public function loaded()
{
if (func_num_args() > 0) {
$class = get_class($this);
trigger_error(
sprintf(
"%s::loaded() doesn't take object name as argument any more. Use %s::has() instead.",
$class,
$class
),
E_USER_ERROR
);
}
return array_keys($this->_loaded);
}

Expand Down
13 changes: 0 additions & 13 deletions src/Database/Expression/Comparison.php
Expand Up @@ -71,19 +71,6 @@ public function __construct($field, $value, $type, $operator)
}
}

/**
* Sets the value
*
* @param mixed $value The value to compare
* @return void
* @deprecated 3.0.0 Will be removed in 3.0.0 stable. Use setValue() instead.
*/
public function value($value)
{
trigger_error('value() has been deprecated. Use setValue() instead.', E_USER_WARNING);
return $this->setValue($value);
}

/**
* Sets the value
*
Expand Down
9 changes: 0 additions & 9 deletions src/Database/Expression/FieldInterface.php
Expand Up @@ -23,15 +23,6 @@
interface FieldInterface
{

/**
* Sets the field name
*
* @param string $field The field to compare with.
* @return void
* @deprecated 3.0.0 Will be removed in 3.0.0 stable. Use setField() instead.
*/
public function field($field);

/**
* Sets the field name
*
Expand Down
13 changes: 0 additions & 13 deletions src/Database/Expression/FieldTrait.php
Expand Up @@ -32,19 +32,6 @@ trait FieldTrait
*/
protected $_field;

/**
* Sets the field name
*
* @param string $field The field to compare with.
* @return void
* @deprecated 3.0.0 Will be removed in 3.0.0 stable. Use setField() instead.
*/
public function field($field)
{
trigger_error('field() has been deprecated. Use setField() instead.', E_USER_WARNING);
$this->setField($field);
}

/**
* Sets the field name
*
Expand Down

0 comments on commit 6647e8f

Please sign in to comment.