|
22 | 22 | use Config\Modules; |
23 | 23 |
|
24 | 24 | /** |
25 | | - * Filters |
26 | | - * |
27 | 25 | * @see \CodeIgniter\Filters\FiltersTest |
28 | 26 | */ |
29 | 27 | class Filters |
@@ -125,26 +123,6 @@ class Filters |
125 | 123 | protected array $filterClassInstances = []; |
126 | 124 |
|
127 | 125 | /** |
128 | | - * Any arguments to be passed to filters. |
129 | | - * |
130 | | - * @var array<string, list<string>|null> [name => params] |
131 | | - * |
132 | | - * @deprecated 4.6.0 No longer used. |
133 | | - */ |
134 | | - protected $arguments = []; |
135 | | - |
136 | | - /** |
137 | | - * Any arguments to be passed to filtersClass. |
138 | | - * |
139 | | - * @var array<class-string, list<string>|null> [classname => arguments] |
140 | | - * |
141 | | - * @deprecated 4.6.0 No longer used. |
142 | | - */ |
143 | | - protected $argumentsClass = []; |
144 | | - |
145 | | - /** |
146 | | - * Constructor. |
147 | | - * |
148 | 126 | * @param FiltersConfig $config |
149 | 127 | */ |
150 | 128 | public function __construct($config, RequestInterface $request, ResponseInterface $response, ?Modules $modules = null) |
@@ -501,8 +479,6 @@ public function reset(): self |
501 | 479 | { |
502 | 480 | $this->initialized = false; |
503 | 481 |
|
504 | | - $this->arguments = $this->argumentsClass = []; |
505 | | - |
506 | 482 | $this->filters = $this->filtersClass = [ |
507 | 483 | 'before' => [], |
508 | 484 | 'after' => [], |
@@ -644,18 +620,6 @@ public function enableFilters(array $filters, string $when = 'before') |
644 | 620 | return $this; |
645 | 621 | } |
646 | 622 |
|
647 | | - /** |
648 | | - * Returns the arguments for a specified key, or all. |
649 | | - * |
650 | | - * @return array<string, string>|string |
651 | | - * |
652 | | - * @deprecated 4.6.0 Already does not work. |
653 | | - */ |
654 | | - public function getArguments(?string $key = null) |
655 | | - { |
656 | | - return ((string) $key === '') ? $this->arguments : $this->arguments[$key]; |
657 | | - } |
658 | | - |
659 | 623 | // -------------------------------------------------------------------- |
660 | 624 | // Processors |
661 | 625 | // -------------------------------------------------------------------- |
@@ -732,27 +696,9 @@ protected function processMethods() |
732 | 696 |
|
733 | 697 | $method = $this->request->getMethod(); |
734 | 698 |
|
735 | | - $found = false; |
736 | | - |
737 | 699 | if (array_key_exists($method, $this->config->methods)) { |
738 | | - $found = true; |
739 | | - } |
740 | | - // Checks lowercase HTTP method for backward compatibility. |
741 | | - // @deprecated 4.5.0 |
742 | | - // @TODO remove this in the future. |
743 | | - elseif (array_key_exists(strtolower($method), $this->config->methods)) { |
744 | | - @trigger_error( |
745 | | - 'Setting lowercase HTTP method key "' . strtolower($method) . '" is deprecated.' |
746 | | - . ' Use uppercase HTTP method like "' . strtoupper($method) . '".', |
747 | | - E_USER_DEPRECATED, |
748 | | - ); |
749 | | - |
750 | | - $found = true; |
751 | | - $method = strtolower($method); |
752 | | - } |
753 | | - |
754 | | - if ($found) { |
755 | 700 | $oldFilterOrder = config(Feature::class)->oldFilterOrder ?? false; |
| 701 | + |
756 | 702 | if ($oldFilterOrder) { |
757 | 703 | $this->filters['before'] = array_merge($this->filters['before'], $this->config->methods[$method]); |
758 | 704 | } else { |
|
0 commit comments