Browse Source

Remove deprecated code.

ADmad 4 years ago
parent
commit
30a4ad91f6

+ 0 - 10
src/Database/Driver.php

@@ -276,16 +276,6 @@ abstract class Driver implements DriverInterface
     /**
      * @inheritDoc
      */
-    public function supportsSavePoints(): bool
-    {
-        deprecationWarning('Feature support checks are now implemented by `supports()` with FEATURE_* constants.');
-
-        return $this->supports(static::FEATURE_SAVEPOINT);
-    }
-
-    /**
-     * @inheritDoc
-     */
     public function quote($value, $type = PDO::PARAM_STR): string
     {
         $this->connect();

+ 0 - 8
src/Database/DriverInterface.php

@@ -177,14 +177,6 @@ interface DriverInterface
     public function supportsDynamicConstraints(): bool;
 
     /**
-     * Returns whether this driver supports save points for nested transactions.
-     *
-     * @return bool True if save points are supported, false otherwise.
-     * @deprecated 4.3.0 Use `supports(DriverInterface::FEATURE_SAVEPOINT)` instead
-     */
-    public function supportsSavePoints(): bool;
-
-    /**
      * Returns a value in a safe representation to be used in a query string
      *
      * @param mixed $value The value to quote.

+ 0 - 7
src/View/Helper/FormHelper.php

@@ -2289,13 +2289,6 @@ class FormHelper extends Helper
             $options['id'] = $this->_domId($field);
         }
 
-        $disabledIndex = array_search('disabled', $options, true);
-        if (is_int($disabledIndex)) {
-            deprecationWarning('Using non-associative options is deprecated, use `\'disabled\' => true` instead.');
-            unset($options[$disabledIndex]);
-            $options['disabled'] = true;
-        }
-
         if (!isset($options['name'])) {
             $endsWithBrackets = '';
             if (substr($field, -2) === '[]') {

+ 0 - 26
tests/TestCase/View/Helper/FormHelperTest.php

@@ -2178,32 +2178,6 @@ class FormHelperTest extends TestCase
     }
 
     /**
-     * testFormSecuredAndDisabledNotAssoc method
-     *
-     * Test that when disabled is in a list based attribute array it works.
-     */
-    public function testFormSecuredAndDisabledNotAssoc(): void
-    {
-        $this->View->setRequest($this->View->getRequest()->withAttribute('formTokenData', []));
-        $this->Form->create();
-
-        $this->deprecated(function () {
-            $this->Form->select('Model.select', [1, 2], ['disabled']);
-            $this->Form->checkbox('Model.checkbox', ['disabled']);
-            $this->Form->text('Model.text', ['disabled']);
-            $this->Form->textarea('Model.textarea', ['disabled']);
-            $this->Form->password('Model.password', ['disabled']);
-            $this->Form->radio('Model.radio', [1, 2], ['disabled']);
-        });
-
-        $expected = [
-            'Model.radio' => '',
-        ];
-        $result = $this->Form->getFormProtector()->__debugInfo()['fields'];
-        $this->assertEquals($expected, $result);
-    }
-
-    /**
      * testFormSecuredAndDisabled method
      *
      * Test that forms with disabled inputs + secured forms leave off the inputs from the form