Skip to content

Commit

Permalink
Update packages (just nette/application this time) to support PHP 8.2 (
Browse files Browse the repository at this point in the history
…#50)

 - nette/application updated from v3.1.7 to v3.1.8 patch
See changes:
nette/application@v3.1.7...v3.1.8
Release notes: https://github.com/nette/application/releases/tag/v3.1.8
  • Loading branch information
spaze committed Nov 28, 2022
2 parents cc2e4d9 + 5736335 commit a92292d
Show file tree
Hide file tree
Showing 13 changed files with 48 additions and 35 deletions.
14 changes: 7 additions & 7 deletions site/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions site/vendor/composer/installed.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions site/vendor/composer/installed.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
'name' => 'spaze/michalspacek.cz',
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'reference' => 'ab75b2ce90bdf62b88ef57188ab5e99eae216fd4',
'reference' => 'cc2e4d9739e77c6f337e526b16a1f9bcd16b1beb',
'type' => 'project',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
Expand Down Expand Up @@ -68,9 +68,9 @@
'dev_requirement' => false,
),
'nette/application' => array(
'pretty_version' => 'v3.1.7',
'version' => '3.1.7.0',
'reference' => 'a831a22c8291638624b39a673d40935c854371e3',
'pretty_version' => 'v3.1.8',
'version' => '3.1.8.0',
'reference' => '84cca12ef6869ffd8cd783d2ada765b9d5460e8e',
'type' => 'library',
'install_path' => __DIR__ . '/../nette/application',
'aliases' => array(),
Expand Down Expand Up @@ -429,7 +429,7 @@
'spaze/michalspacek.cz' => array(
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'reference' => 'ab75b2ce90bdf62b88ef57188ab5e99eae216fd4',
'reference' => 'cc2e4d9739e77c6f337e526b16a1f9bcd16b1beb',
'type' => 'project',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
Expand Down
2 changes: 1 addition & 1 deletion site/vendor/nette/application/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"nette/forms": "^3.0",
"nette/robot-loader": "^3.2",
"nette/security": "^3.0",
"latte/latte": "^2.10.2 || ^3.0.1",
"latte/latte": "^2.10.2 || ^3.0.3",
"tracy/tracy": "^2.6",
"mockery/mockery": "^1.0",
"phpstan/phpstan-nette": "^0.12"
Expand Down
9 changes: 9 additions & 0 deletions site/vendor/nette/application/ncs.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0"?>
<ruleset name="Custom" namespace="Nette">
<rule ref="$presets/php72.xml"/>

<rule ref="Squiz.Commenting.FunctionComment.ExtraParamComment">
<exclude-pattern>./src/Application/UI/Control.php</exclude-pattern>
<exclude-pattern>./src/Application/UI/Presenter.php</exclude-pattern>
</rule>
</ruleset>
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,12 @@ public function saveState(array &$params): void
* Returns component param.
* @return mixed
*/
final public function getParameter(string $name, $default = null)
final public function getParameter(string $name)
{
return $this->params[$name] ?? $default;
if (func_num_args() > 1) {
$default = func_get_arg(1);
}
return $this->params[$name] ?? $default ?? null;
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ protected function checkTemplateClass(string $class): ?string

/**
* Descendant can override this method to customize template compile-time filters.
* @deprecated
*/
public function templatePrepareFilters(Template $template): void
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -780,7 +780,8 @@ protected function createRequest(
string $destination,
array $args,
string $mode
): ?string {
): ?string
{
// note: createRequest supposes that saveState(), run() & tryCall() behaviour is final

$this->lastCreatedRequest = $this->lastCreatedRequestFlag = null;
Expand Down Expand Up @@ -1034,7 +1035,8 @@ public static function argsToParams(
array &$args,
array $supplemental = [],
?array &$missing = null
): void {
): void
{
$i = 0;
$rm = new \ReflectionMethod($class, $method);
foreach ($rm->getParameters() as $param) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,8 @@ private function findPresenters(): array
public static function initializeBlueScreenPanel(
Tracy\BlueScreen $blueScreen,
Nette\Application\Application $application
): void {
): void
{
$blueScreen->addPanel(function (?\Throwable $e) use ($application, $blueScreen): ?array {
$dumper = $blueScreen->getDumper();
return $e ? null : [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
* @method bool isLinkCurrent(string $destination = null, ...$args)
* @method bool isModuleCurrent(string $module)
*/
#[\AllowDynamicProperties]
final class DefaultTemplate extends Template
{
/** @var Nette\Application\UI\Presenter */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,10 @@ public static function printClass(Latte\Runtime\Template $template, ?string $par
$class->addTrait(Nette\SmartObject::class);
}

$blueprint->addProperties($class, $params, true);
$blueprint->addProperties($class, $params);
$blueprint->addFunctions($class, $funcs);

$end = $blueprint->printCanvas();
$blueprint->printHeader('Native types');
$blueprint->printCode((string) $namespace);

$blueprint->addProperties($class, $params, false);

$blueprint->printHeader('phpDoc types');
$blueprint->printCode((string) $namespace);
echo $end;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@ private function setupLatte2(
?UI\Control $control,
?UI\Presenter $presenter,
Template $template
): void {
): void
{
if ($latte->onCompile instanceof \Traversable) {
$latte->onCompile = iterator_to_array($latte->onCompile);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ private function analyse(
?string $path = null,
int $level = -1,
int $flag = 0
): void {
): void
{
if ($router instanceof Routing\RouteList) {
if ($httpRequest) {
try {
Expand Down

0 comments on commit a92292d

Please sign in to comment.