Skip to content

PHP8.4 support. PHP Deprecated: Implicitly marking parameter as nullable is deprecated, the explicit nullable type must be used instead #426

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
}
],
"require": {
"php": ">=5.2.4"
"php": ">=7.1"
},
"require-dev": {
"phpunit/phpunit": "~3.7|~4.0|~5.0",
Expand Down
2 changes: 1 addition & 1 deletion src/Mustache/Engine.php
Original file line number Diff line number Diff line change
Expand Up @@ -741,7 +741,7 @@ public function loadLambda($source, $delims = null)
*
* @return Mustache_Template
*/
private function loadSource($source, Mustache_Cache $cache = null)
private function loadSource($source, ?Mustache_Cache $cache = null)
{
$className = $this->getTemplateClassName($source);

Expand Down
2 changes: 1 addition & 1 deletion src/Mustache/Exception/SyntaxException.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class Mustache_Exception_SyntaxException extends LogicException implements Musta
* @param array $token
* @param Exception $previous
*/
public function __construct($msg, array $token, Exception $previous = null)
public function __construct($msg, array $token, ?Exception $previous = null)
{
$this->token = $token;
if (version_compare(PHP_VERSION, '5.3.0', '>=')) {
Expand Down
2 changes: 1 addition & 1 deletion src/Mustache/Exception/UnknownFilterException.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class Mustache_Exception_UnknownFilterException extends UnexpectedValueException
* @param string $filterName
* @param Exception $previous
*/
public function __construct($filterName, Exception $previous = null)
public function __construct($filterName, ?Exception $previous = null)
{
$this->filterName = $filterName;
$message = sprintf('Unknown filter: %s', $filterName);
Expand Down
2 changes: 1 addition & 1 deletion src/Mustache/Exception/UnknownHelperException.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class Mustache_Exception_UnknownHelperException extends InvalidArgumentException
* @param string $helperName
* @param Exception $previous
*/
public function __construct($helperName, Exception $previous = null)
public function __construct($helperName, ?Exception $previous = null)
{
$this->helperName = $helperName;
$message = sprintf('Unknown helper: %s', $helperName);
Expand Down
2 changes: 1 addition & 1 deletion src/Mustache/Exception/UnknownTemplateException.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class Mustache_Exception_UnknownTemplateException extends InvalidArgumentExcepti
* @param string $templateName
* @param Exception $previous
*/
public function __construct($templateName, Exception $previous = null)
public function __construct($templateName, ?Exception $previous = null)
{
$this->templateName = $templateName;
$message = sprintf('Unknown template: %s', $templateName);
Expand Down
2 changes: 1 addition & 1 deletion src/Mustache/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public function setPragmas(array $pragmas)
*
* @return array Mustache Token parse tree
*/
private function buildTree(array &$tokens, array $parent = null)
private function buildTree(array &$tokens, ?array $parent = null)
{
$nodes = array();

Expand Down