joomla/application
Joomla Framework Application package providing AbstractApplication base classes for building apps. Includes lifecycle initialise hook, input/config handling, execute flow with doExecute(), response headers/body helpers, and PSR-3 LoggerAwareInterface support for integrating logging.
The following changes were made to the Application package between v1 and v2.
All Framework packages now require PHP 7.2 or newer.
In order to support PSR-7 responses there is a single break in backwards incompatibility. The \Joomla\Application\AbstractWebApplication::getBody() method does not have a toBody parameter.
The package internals use the Laminas Diactoros package for building the Response object. If you wish to use another PSR-7 compatible library you will need to extend the setHeader, getHeaders, clearHeaders, setBody, prependBody, and appendBody methods.
The method \Joomla\Application\AbstractWebApplication::checkToken has been changed to validate a token in addition to checking if it is present in the request. Additionally, the homepage redirect on an invalid token has been removed.
The \Joomla\Application\AbstractCliApplication and all Joomla\Application\Cli namespace classes have been removed. The new joomla/console package should be used going forward.
There is a new \Joomla\Application\WebApplication class available which serves as a minimal but functional web application class. This class extends \Joomla\Application\AbstractWebApplication and implements \Joomla\Application\SessionAwareWebApplicationInterface and therefore makes all application features available out-of-the-box.
$input property moved to web application classesThe $input property of \Joomla\Application\AbstractApplication has been moved to \Joomla\Application\AbstractWebApplication and is no longer required to create a minimal application. With the introduction of the joomla/console package, which does not use the joomla/input package to read the console input, it is no longer practical to require all application classes support this input API.
Additionally, direct access to the property has been deprecated. To access the input, you should use the \Joomla\Application\AbstractWebApplication::getInput() method. Direct read access to the property will be removed in 3.0.
As sessions are not a mandatory function of web applications, session related functionality has been moved to a new \Joomla\Application\SessionAwareWebApplicationInterface extending \Joomla\Application\WebApplicationInterface. \Joomla\Application\SessionAwareWebApplicationTrait is provided to simplify implementing this interface in your application.
Interfaces have been created for the application classes with the following structure:
\Joomla\Application\ApplicationInterface defines the base requirements for all applications\Joomla\Application\ConfigurationAwareApplicationInterface defines an application which is aware of a configuration object\Joomla\Application\WebApplicationInterface defines a web application handling HTTP requests and serving HTTP responses\Joomla\Application\SessionAwareWebApplicationInterface defines a web application which requires session supportHow can I help you explore Laravel packages today?