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
4 changes: 2 additions & 2 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ jobs:
strategy:
matrix:
os: [ ubuntu-latest, windows-latest ]
php: [ '8.0', '8.1', '8.2', '8.3', '8.4' ]
php: [ '8.2', '8.3', '8.4' ]

runs-on: ${{matrix.os}}

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- uses: shivammathur/setup-php@v2
with:
php-version: ${{matrix.php}}
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"optimize-autoloader": true
},
"require": {
"php": "^8.0",
"php": "^8.2",
"ext-json": "*",
"packaged/config": "~1.5",
"packaged/context": "^1.11",
Expand Down
4 changes: 2 additions & 2 deletions src/Cache/EphemeralCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public static function instance(): self
*
* @return mixed
*/
public function retrieve($key, callable $producer, int $ttl = null)
public function retrieve($key, callable $producer, ?int $ttl = null)
{
if(!$this->has($key))
{
Expand All @@ -39,7 +39,7 @@ public function has($key)
return isset($this->_cache[$key]) && ($this->_cache[$key]['t'] === null || $this->_cache[$key]['t'] >= time());
}

public function set($key, $value, int $ttl = null)
public function set($key, $value, ?int $ttl = null)
{
$this->_cache[$key] = ['v' => $value, 't' => time() + $ttl];
return $this;
Expand Down
2 changes: 1 addition & 1 deletion src/Console/Events/ConsoleEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ abstract class ConsoleEvent extends ContextEvent
{
private $_console;

public static function i(Context $ctx, Console $console = null)
public static function i(Context $ctx, ?Console $console = null)
{
$event = parent::i($ctx);
$event->_console = $console;
Expand Down
2 changes: 1 addition & 1 deletion src/Console/Events/ConsolePrepareEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class ConsolePrepareEvent extends ConsoleEvent
private $_output;

public static function i(
Context $ctx, Console $console = null, InputInterface $input = null, OutputInterface $output = null
Context $ctx, ?Console $console = null, ?InputInterface $input = null, ?OutputInterface $output = null
)
{
$event = parent::i($ctx, $console);
Expand Down
2 changes: 1 addition & 1 deletion src/Context/Events/ConsoleLaunchedEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class ConsoleLaunchedEvent extends AbstractEvent
private $_input;
private $_output;

public function __construct(InputInterface $input = null, OutputInterface $output = null)
public function __construct(?InputInterface $input = null, ?OutputInterface $output = null)
{
parent::__construct();
$this->_input = $input;
Expand Down
8 changes: 4 additions & 4 deletions src/Cubex.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class Cubex extends DependencyInjector implements LoggerAwareInterface
*/
private $_hasShutdown;

public function __construct($projectRoot, ClassLoader $loader = null, $global = true)
public function __construct($projectRoot, ?ClassLoader $loader = null, $global = true)
{
$this->_projectRoot = $projectRoot;
$this->_eventChannel = new Channel('cubex');
Expand All @@ -72,7 +72,7 @@ public function __construct($projectRoot, ClassLoader $loader = null, $global =
}
}

public static function withCustomContext(string $ctxClass, $projectRoot, ClassLoader $loader = null, $global = true)
public static function withCustomContext(string $ctxClass, $projectRoot, ?ClassLoader $loader = null, $global = true)
{
$c = new static($projectRoot, $loader, $global);
$c->_contextClass = $ctxClass;
Expand Down Expand Up @@ -213,7 +213,7 @@ public static function fromContext(Context $ctx, $fallbackToGlobal = true)
* @return int
* @throws Exception
*/
public function cli(InputInterface $input = null, OutputInterface $output = null)
public function cli(?InputInterface $input = null, ?OutputInterface $output = null)
{
$input = $input ?? new ArgvInput();
$output = $output ?? new ConsoleOutput();
Expand Down Expand Up @@ -422,7 +422,7 @@ protected function _getSystemEnvironment()
* @return bool true if shutdown has processed, false if shutdown has already been called.
* @throws Exception
*/
public function shutdown(bool $throwExceptions = null)
public function shutdown(?bool $throwExceptions = null)
{
if(!$this->_hasShutdown)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Events/Handle/HandlerEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ abstract class HandlerEvent extends ContextEvent
{
private $_handler;

public static function i(Context $context, Handler $handler = null)
public static function i(Context $context, ?Handler $handler = null)
{
$event = parent::i($context);
$event->_handler = $handler;
Expand Down
2 changes: 1 addition & 1 deletion src/Events/Handle/ResponseEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ abstract class ResponseEvent extends HandlerEvent
{
private $_response;

public static function i(Context $context, Handler $handler = null, Response $response = null)
public static function i(Context $context, ?Handler $handler = null, ?Response $response = null)
{
$event = parent::i($context, $handler);
$event->_response = $response;
Expand Down
2 changes: 1 addition & 1 deletion src/ViewModel/TemplatedViewModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ protected function _attemptTemplateExtensions()
return array_filter(array_merge($this->_variants, ['phtml']));
}

public function createView(string $overrideViewClass = null): ?View
public function createView(?string $overrideViewClass = null): ?View
{
if($overrideViewClass === null && empty($this->_defaultView))
{
Expand Down
2 changes: 1 addition & 1 deletion src/ViewModel/ViewModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function setView(string $viewClass)
return $this;
}

public function createView(string $overrideViewClass = null): ?View
public function createView(?string $overrideViewClass = null): ?View
{
if($overrideViewClass === null && !empty($this->_defaultView))
{
Expand Down