Update to Kirby 4.7.0

This commit is contained in:
Paul Nicoué 2025-04-21 18:57:21 +02:00
parent 02a9ab387c
commit ba25a9a198
509 changed files with 26604 additions and 14872 deletions

View file

@ -15,13 +15,13 @@
"test": "phpunit --testdox tests"
},
"require": {
"php": "^5.5.9 || ^7.0 || ^8.0",
"php": "^7.1 || ^8.0",
"psr/log": "^1.0.1 || ^2.0 || ^3.0"
},
"require-dev": {
"phpunit/phpunit": "^4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.3",
"mockery/mockery": "^0.9 || ^1.0",
"symfony/var-dumper": "^2.6 || ^3.0 || ^4.0 || ^5.0"
"phpunit/phpunit": "^7.5.20 || ^8.5.8 || ^9.3.3",
"mockery/mockery": "^1.0",
"symfony/var-dumper": "^4.0 || ^5.0"
},
"suggest": {
"symfony/var-dumper": "Pretty print complex values better with var-dumper available",

View file

@ -28,6 +28,7 @@ class PrettyPageHandler extends Handler
const EDITOR_ESPRESSO = "espresso";
const EDITOR_XDEBUG = "xdebug";
const EDITOR_NETBEANS = "netbeans";
const EDITOR_CURSOR = "cursor";
/**
* Search paths to be scanned for resources.
@ -122,6 +123,7 @@ class PrettyPageHandler extends Handler
"atom" => "atom://core/open/file?filename=%file&line=%line",
"espresso" => "x-espresso://open?filepath=%file&lines=%line",
"netbeans" => "netbeans://open/?f=%file:%line",
"cursor" => "cursor://file/%file:%line",
];
/**
@ -383,7 +385,7 @@ class PrettyPageHandler extends Handler
throw new InvalidArgumentException('Expecting callback argument to be callable');
}
$this->extraTables[$label] = function (\Whoops\Inspector\InspectorInterface $inspector = null) use ($callback) {
$this->extraTables[$label] = function (?\Whoops\Inspector\InspectorInterface $inspector = null) use ($callback) {
try {
$result = call_user_func($callback, $inspector);

View file

@ -558,3 +558,11 @@ pre.sf-dump {
.search-for-help li a svg path {
background-size: contain;
}
.line-numbers-rows span {
pointer-events: auto;
cursor: pointer;
}
.line-numbers-rows span:hover {
text-decoration: underline;
}

View file

@ -183,6 +183,30 @@ Zepto(function($) {
setActiveFramesTab($(this));
});
// Open editor from code block rows number
$(document).delegate('.line-numbers-rows > span', 'click', function(e) {
var linkTag = $(this).closest('.frame-code').find('.editor-link');
if (!linkTag) return;
var editorUrl = linkTag.attr('href');
var requiresAjax = linkTag.data('ajax');
var lineOffset = $(this).closest('[data-line-offset]').data('line-offset');
var lineNumber = lineOffset + $(this).index();
var realLine = $(this).closest('[data-line]').data('line');
if (!realLine) return;
var fileUrl = editorUrl.replace(
new RegExp('([:=])' + realLine),
'$1' + lineNumber
);
if (requiresAjax) {
$.get(fileUrl);
} else {
$('<a>').attr('href', fileUrl).trigger('click');
}
});
// Render late enough for highlightCurrentLine to be ready
renderCurrentCodeblock();
});

View file

@ -81,7 +81,7 @@ final class Run implements RunInterface
*/
private $frameFilters = [];
public function __construct(SystemFacade $system = null)
public function __construct(?SystemFacade $system = null)
{
$this->system = $system ?: new SystemFacade;
$this->inspectorFactory = new InspectorFactory();

View file

@ -233,7 +233,7 @@ class TemplateHelper
*
* @param string $template
*/
public function render($template, array $additionalVariables = null)
public function render($template, ?array $additionalVariables = null)
{
$variables = $this->getVariables();