Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Updates should follow the [Keep a CHANGELOG](http://keepachangelog.com/) princip
## [Unreleased][unreleased]
### Changed
* update minimum PHP to version 8.2 (currently still supported version) + update league/fractal library [BC]
* change Inject from PHPDoc format to native PHP attribute

## 3.2.0

Expand Down
21 changes: 11 additions & 10 deletions src/Presenters/ApiPresenter.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use Nette\Application\IPresenter;
use Nette\Application\IResponse;
use Nette\Application\Request;
use Nette\DI\Attributes\Inject;
use Nette\DI\Container;
use Nette\Http\Response;
use Throwable;
Expand All @@ -27,20 +28,20 @@ final class ApiPresenter implements IPresenter

private const HTTP_PORT = 80;

/** @var ApiDecider @inject */
public $apiDecider;
#[Inject]
public ApiDecider $apiDecider;

/** @var Response @inject */
public $response;
#[Inject]
public Response $response;

/** @var Container @inject */
public $context;
#[Inject]
public Container $context;

/** @var ConfiguratorInterface @inject */
public $outputConfigurator;
#[Inject]
public ConfiguratorInterface $outputConfigurator;

/** @var ErrorHandlerInterface @inject */
public $errorHandler;
#[Inject]
public ErrorHandlerInterface $errorHandler;

/**
* CORS header settings
Expand Down