CodeIgniter v4.5 API

Deprecated

Table of Contents

system/API/ResponseTrait.php
system/Autoloader/Autoloader.php
system/Cache/Handlers/BaseHandler.php
system/CLI/BaseCommand.php
system/CLI/CLI.php
system/CLI/GeneratorTrait.php
system/CodeIgniter.php
system/Config/BaseService.php
system/Config/Services.php
system/Cookie/CloneableCookieInterface.php
system/Cookie/Cookie.php
system/Cookie/CookieStore.php
system/Database/BaseBuilder.php
system/Database/BaseConnection.php
system/Database/Forge.php
system/Database/OCI8/Forge.php
system/Database/Seeder.php
system/Database/SQLSRV/Connection.php
system/Database/SQLSRV/Forge.php
system/Debug/Exceptions.php
system/Debug/Toolbar/Collectors/BaseCollector.php
system/Entity/Entity.php
system/Exceptions/DownloadException.php
system/Exceptions/FrameworkException.php
system/Filters/Filters.php
system/Helpers/text_helper.php
system/HTTP/Exceptions/HTTPException.php
system/HTTP/IncomingRequest.php
system/HTTP/Message.php
system/HTTP/OutgoingRequest.php
system/HTTP/Request.php
system/HTTP/RequestTrait.php
system/HTTP/Response.php
system/HTTP/ResponseInterface.php
system/HTTP/SiteURI.php
system/HTTP/URI.php
system/I18n/TimeLegacy.php
system/I18n/TimeTrait.php
system/Log/Logger.php
system/Router/AutoRouter.php
system/Router/Exceptions/RedirectException.php
system/Router/RouteCollection.php
system/Router/Router.php
system/Security/Exceptions/SecurityException.php
system/Security/Security.php
system/Session/Exceptions/SessionException.php
system/Session/Session.php
system/Test/Mock/MockCodeIgniter.php
system/Test/TestLogger.php
system/View/View.php

ResponseTrait.php

Line Element Reason
234 ResponseTrait::failValidationError()

Use failValidationErrors instead

Autoloader.php

Line Element Reason
337 Autoloader::sanitizeFilename()

No longer used. See https://github.com/codeigniter4/CodeIgniter4/issues/7055

453 Autoloader::discoverComposerNamespaces()

No longer used.

BaseHandler.php

Line Element Reason
35 BaseHandler::RESERVED_CHARACTERS

in favor of the Cache config

BaseCommand.php

Line Element Reason
205 BaseCommand::getPad()

Use setPad() instead.

CLI.php

Line Element Reason
539 CLI::isWindows()

Use is_windows() instead

43 CLI::$readline_support

Should be protected, and no longer used.

53 CLI::$wait_msg

Should be protected.

GeneratorTrait.php

Line Element Reason
110 GeneratorTrait::execute()

use generateClass() instead

CodeIgniter.php

Line Element Reason
207 CodeIgniter::resolvePlatformExtensions()

Moved to system/bootstrap.php.

235 CodeIgniter::initializeKint()

Moved to Autoloader.

252 CodeIgniter::autoloadKint()

Moved to Autoloader.

277 CodeIgniter::configureKint()

Moved to Autoloader.

451 CodeIgniter::handleRequest()

$returnResponse is deprecated.

567 CodeIgniter::detectEnvironment()

No longer used. Moved to index.php and spark.

585 CodeIgniter::bootstrapEnvironment()

Moved to system/bootstrap.php.

692 CodeIgniter::forceSecureAccess()

No longer used. Moved to ForceHTTPS filter.

711 CodeIgniter::displayCache()

PageCache required filter is used. No longer used.

711 CodeIgniter::displayCache()

The parameter $config is deprecated. No longer used.

734 CodeIgniter::cache()

Moved to ResponseCache::setTtl(). No longer used.

747 CodeIgniter::cachePage()

No longer used.

777 CodeIgniter::generateCacheName()

No longer used.

797 CodeIgniter::displayPerformanceMetrics()

PerformanceMetrics required filter is used. No longer used.

856 CodeIgniter::determinePath()

No longer used.

997 CodeIgniter::gatherOutput()

$cacheConfig is deprecated.

1121 CodeIgniter::callExit()

No longer Used. Moved to index.php.

138 CodeIgniter::$cacheTTL

Moved to ResponseCache::$ttl. No longer used.

159 CodeIgniter::$returnResponse

No longer used.

BaseService.php

Line Element Reason
184 BaseService::$services

No longer used.

Services.php

Line Element Reason
521 Services::request()

The parameter $config and $getShared are deprecated.

CloneableCookieInterface.php

Line Element Reason
68 CloneableCookieInterface::withNeverExpiring()

See https://github.com/codeigniter4/CodeIgniter4/pull/6413

Cookie.php

Line Element Reason
471 Cookie::withNeverExpiring()

See https://github.com/codeigniter4/CodeIgniter4/pull/6413

CookieStore.php

Line Element Reason
167 CookieStore::dispatch()

Response should dispatch cookies.

243 CookieStore::setRawCookie()
255 CookieStore::setCookie()

BaseBuilder.php

Line Element Reason
2267 BaseBuilder::setInsertBatch()
2718 BaseBuilder::setUpdateBatch()
3547 BaseBuilder::cleanClone()

BaseConnection.php

Line Element Reason
189 BaseConnection::$strictOn

Will move to MySQLi\Connection.

Forge.php

Line Element Reason
595 Forge::_createTable()

$ifNotExists is no longer used, and will be removed.

118 Forge::$createTableIfStr

This is no longer used.

Forge.php

Line Element Reason
44 Forge::$createTableIfStr

This is no longer used.

Seeder.php

Line Element Reason
74 Seeder::$faker

Connection.php

Line Element Reason
502 Connection::getError()

Use error() instead.

Forge.php

Line Element Reason
104 Forge::$createTableIfStr

This is no longer used.

Exceptions.php

Line Element Reason
263 Exceptions::determineView()

No longer used. Moved to ExceptionHandler.

299 Exceptions::render()

No longer used. Moved to BaseExceptionHandler.

341 Exceptions::collectVars()

No longer used. Moved to BaseExceptionHandler.

376 Exceptions::maskSensitiveData()

No longer used. Moved to BaseExceptionHandler.

392 Exceptions::maskData()

No longer used. Moved to BaseExceptionHandler.

480 Exceptions::cleanPath()

Use dedicated clean_path() function.

497 Exceptions::describeMemory()

No longer used. Moved to BaseExceptionHandler.

517 Exceptions::highlightFile()

No longer used. Moved to BaseExceptionHandler.

45 Exceptions::$ob_level

No longer used. Moved to BaseExceptionHandler.

55 Exceptions::$viewPath

No longer used. Moved to BaseExceptionHandler.

BaseCollector.php

Line Element Reason
183 BaseCollector::cleanPath()

Use the dedicated clean_path() function.

Entity.php

Line Element Reason
323 Entity::setAttributes()

Use injectRawData() instead.

DownloadException.php

Line Element Reason
54 DownloadException::forCannotSetCache()

Since v4.5.6

FrameworkException.php

Line Element Reason
65 FrameworkException::forMissingExtension()

No longer used.

Filters.php

Line Element Reason
136 Filters::discoverFilters()

Use Registrar instead.

text_helper.php

Line Element Reason
547 random_string()

The type 'basic', 'md5', and 'sha1' are deprecated. They are not cryptographically secure.

HTTPException.php

Line Element Reason
229 HTTPException::forInvalidSameSiteSetting()

Use CookieException::forInvalidSameSite() instead.

IncomingRequest.php

Line Element Reason
212 IncomingRequest::detectURI()

No longer used.

223 IncomingRequest::detectPath()

Moved to SiteURIFactory.

246 IncomingRequest::parseRequestURI()

Moved to SiteURIFactory.

306 IncomingRequest::parseQueryString()

Moved to SiteURIFactory.

424 IncomingRequest::setPath()

This method will be private. The parameter $config is deprecated. No longer used.

Message.php

Line Element Reason
74 Message::getHeaders()

Use Message::headers() to make room for PSR-7

91 Message::getHeader()

Use Message::header() to make room for PSR-7

OutgoingRequest.php

Line Element Reason
87 OutgoingRequest::setMethod()

Use withMethod() instead for immutability

Request.php

Line Element Reason
54 Request::setMethod()

Use withMethod() instead for immutability

RequestTrait.php

Line Element Reason
218 RequestTrait::getEnv()

This method does not work from the beginning. Use env().

44 RequestTrait::$ipAddress

Will become private in a future release

Response.php

Line Element Reason
153 Response::__construct()

The param $config is no longer used.

217 Response::getReason()

Use getReasonPhrase()

ResponseInterface.php

Line Element Reason
146 ResponseInterface::getReason()

Use getReasonPhrase()

SiteURI.php

Line Element Reason
226 SiteURI::setBaseURL()
234 SiteURI::setURI()
318 SiteURI::refreshPath()

This method will be private.

75 SiteURI::$segments

This property will be private.

URI.php

Line Element Reason
271 URI::setSilent()

Method not in PSR-7

302 URI::setURI()

This method will be private.

651 URI::changeSchemeAndPath()

This method will be deleted.

715 URI::setScheme()

Use withScheme() instead.

834 URI::setBaseURL()

Use SiteURI instead.

846 URI::getBaseURL()

Use SiteURI instead.

862 URI::refreshPath()

This method will be private.

46 URI::$uriString

Not used.

53 URI::$baseURL

Use SiteURI instead.

TimeLegacy.php

Line Element Reason
45 TimeLegacy

Use Time instead.

TimeTrait.php

Line Element Reason
303 TimeTrait::instance()

Use createFromInstance() instead

Logger.php

Line Element Reason
424 Logger::cleanFileNames()

Use dedicated clean_path() function.

AutoRouter.php

Line Element Reason
171 AutoRouter::setTranslateURIDashes()

This method should be removed.

245 AutoRouter::setDirectory()

This method should be removed.

RedirectException.php

Line Element Reason
24 RedirectException

Use \CodeIgniter\HTTP\Exceptions\RedirectException instead

RouteCollection.php

Line Element Reason
1258 RouteCollection::localizeRoute()

Unused.

1312 RouteCollection::fillRouteParams()

Unused. Now uses buildReverseRoute().

Router.php

Line Element Reason
357 Router::setTranslateURIDashes()

This method should be removed.

577 Router::validateRequest()

this function name does not properly describe its behavior so it has been deprecated

591 Router::scanControllers()

Not used. Moved to AutoRouter class.

639 Router::setDirectory()

This method should be removed.

657 Router::isValidSegment()

Moved to AutoRouter class.

701 Router::setDefaultController()

This was an unnecessary method, so it is no longer used.

SecurityException.php

Line Element Reason
80 SecurityException::forInvalidSameSite()

Use CookieException::forInvalidSameSite() instead.

Security.php

Line Element Reason
53 Security::$csrfProtection

Use $this->config->csrfProtection.

62 Security::$tokenRandomize

Use $this->config->tokenRandomize.

82 Security::$tokenName

Use $this->config->tokenName.

93 Security::$headerName

Use $this->config->headerName.

122 Security::$expires

Use $this->config->expires.

133 Security::$regenerate

Use $this->config->regenerate.

144 Security::$redirect

Use $this->config->redirect.

161 Security::$samesite

Config\Cookie $samesite property is used.

SessionException.php

Line Element Reason
50 SessionException::forInvalidSameSiteSetting()

Session.php

Line Element Reason
271 Session::stop()

Use destroy() instead.

50 Session::$sessionDriverName

Use $this->config->driver.

59 Session::$sessionCookieName

Use $this->config->cookieName.

69 Session::$sessionExpiration

Use $this->config->expiration.

87 Session::$sessionSavePath

Use $this->config->savePath.

99 Session::$sessionMatchIP

Use $this->config->matchIP.

108 Session::$sessionTimeToUpdate

Use $this->config->timeToUpdate.

119 Session::$sessionRegenerateDestroy

Use $this->config->regenerateDestroy.

136 Session::$cookieDomain

No longer used.

146 Session::$cookiePath

No longer used.

155 Session::$cookieSecure

No longer used.

165 Session::$cookieSameSite

No longer used.

MockCodeIgniter.php

Line Element Reason
27 MockCodeIgniter::callExit()

No longer Used. Moved to index.php.

TestLogger.php

Line Element Reason
105 TestLogger::cleanup()

No longer needed as underlying protected method is also deprecated.

View.php

Line Element Reason
135 View::$currentSection

Search results