Skip to content

Commit

Permalink
Merge branch 'bugfix'
Browse files Browse the repository at this point in the history
# Conflicts:
#	composer.json
  • Loading branch information
gharlan committed Jan 11, 2023
2 parents 6d07c33 + 6091dd9 commit 84cf74a
Show file tree
Hide file tree
Showing 15 changed files with 167 additions and 81 deletions.
27 changes: 14 additions & 13 deletions .tools/bin/update-all
Expand Up @@ -95,19 +95,20 @@ find redaxo/src/addons/phpmailer/vendor -name "*.md" ! -name "LICENSE.md" -type

printf "\nUpdate root composer.json and vendor/\n"
.tools/bin/update-root-composer
composer require --dev --ansi --fixed \
friendsofredaxo/linter \
phpstan/extension-installer \
phpstan/phpstan \
phpstan/phpstan-deprecation-rules \
phpstan/phpstan-phpunit \
phpstan/phpstan-symfony \
psalm/plugin-phpunit \
psalm/plugin-symfony \
rector/rector \
redaxo/php-cs-fixer-config \
redaxo/psalm-plugin \
vimeo/psalm
# https://github.com/composer/composer/issues/11247
# composer require --dev --ansi --fixed \
# friendsofredaxo/linter \
# phpstan/extension-installer \
# phpstan/phpstan \
# phpstan/phpstan-deprecation-rules \
# phpstan/phpstan-phpunit \
# phpstan/phpstan-symfony \
# psalm/plugin-phpunit \
# psalm/plugin-symfony \
# rector/rector \
# redaxo/php-cs-fixer-config \
# redaxo/psalm-plugin \
# vimeo/psalm
composer update --ansi

printf "\nUpdate redaxo/src/core/assets/jquery.min.js\n"
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Expand Up @@ -12,10 +12,10 @@
},
"require-dev": {
"friendsofphp/php-cs-fixer": "3.4.0",
"friendsofredaxo/linter": "1.3.0",
"friendsofredaxo/linter": "1.4.0",
"jetbrains/phpstorm-attributes": "^1.0",
"phpstan/extension-installer": "1.2.0",
"phpstan/phpstan": "1.9.6",
"phpstan/phpstan": "1.9.9",
"phpstan/phpstan-deprecation-rules": "1.1.1",
"phpstan/phpstan-phpunit": "1.3.3",
"phpstan/phpstan-symfony": "1.2.19",
Expand Down Expand Up @@ -55,7 +55,7 @@
"symfony/yaml": "v5.4.17",
"voku/anti-xss": "4.1.39",
"voku/portable-ascii": "2.0.1",
"voku/portable-utf8": "6.0.11"
"voku/portable-utf8": "6.0.12"
},
"autoload": {
"classmap": [
Expand Down
4 changes: 2 additions & 2 deletions redaxo/src/addons/be_style/plugins/customizer/boot.php
Expand Up @@ -120,7 +120,7 @@
if ($config['codemirror']) {
// JsProperty CodeMirror-Theme
rex_view::setJsProperty('customizer_codemirror_defaulttheme', $config['codemirror_theme']);
rex_view::setJsProperty('customizer_codemirror_defaultdarktheme', $config['codemirror_darktheme']);
rex_view::setJsProperty('customizer_codemirror_defaultdarktheme', $config['codemirror_darktheme'] ?? 'dracula');
// JsProperty CodeMirror-Selectors
$selectors = 'textarea.rex-code, textarea.rex-js-code, textarea.codemirror';
if (isset($config['codemirror-selectors']) && '' != $config['codemirror-selectors']) {
Expand All @@ -132,7 +132,7 @@
rex_view::setJsProperty('customizer_codemirror_autoresize', $config['codemirror-autoresize']);
}
// JsProperty Codemirror-Options
rex_view::setJsProperty('customizer_codemirror_options', str_replace(["\n", "\r"], '', trim($config['codemirror-options'])));
rex_view::setJsProperty('customizer_codemirror_options', str_replace(["\n", "\r"], '', trim($config['codemirror-options'] ?? '')));
// JsProperty JS/CSS-Buster
$mtimejs = filemtime($plugin->getAssetsUrl('vendor/codemirror/codemirror.min.js'));
$mtimecss = filemtime($plugin->getAssetsUrl('vendor/codemirror/codemirror.min.css'));
Expand Down
2 changes: 1 addition & 1 deletion redaxo/src/addons/install/lib/archive.php
Expand Up @@ -41,7 +41,7 @@ public static function extract(string $archive, string $dir, string $basename =
return false;
}

if (!is_dir($tempdir . '/' . $basename) || !rename($tempdir . '/' . $basename, $dir)) {
if (!is_dir($tempdir.DIRECTORY_SEPARATOR.$basename) || !rename($tempdir.DIRECTORY_SEPARATOR.$basename, $dir.DIRECTORY_SEPARATOR)) {
return false;
}

Expand Down
4 changes: 3 additions & 1 deletion redaxo/src/addons/install/lib/package/package_update.php
Expand Up @@ -97,7 +97,9 @@ public function doAction()
foreach ($this->addon->getRegisteredPlugins() as $plugin) {
$pluginPath = $temppath . '/plugins/' . $plugin->getName();
if (!is_dir($pluginPath)) {
rex_dir::copy($plugin->getPath(), $pluginPath);
if (is_dir($plugin->getPath())) {
rex_dir::copy($plugin->getPath(), $pluginPath);
}
} elseif ($plugin->isInstalled() && is_dir($pluginPath . '/assets')) {
rex_dir::copy($pluginPath . '/assets', $plugin->getAssetsPath());
}
Expand Down
2 changes: 1 addition & 1 deletion redaxo/src/addons/install/package.yml
@@ -1,5 +1,5 @@
package: install
version: '2.10.0'
version: '2.10.1-dev'
author: Gregor Harlan
supportpage: https://github.com/redaxo/redaxo

Expand Down
2 changes: 1 addition & 1 deletion redaxo/src/addons/metainfo/lib/handler/handler.php
Expand Up @@ -51,7 +51,7 @@ public function renderMetaFields(rex_sql $sqlFields, array $epParams)

$note = null;
if (isset($attrArray['note'])) {
$note = $attrArray['note'];
$note = rex_i18n::translate($attrArray['note']);
unset($attrArray['note']);
}

Expand Down
2 changes: 1 addition & 1 deletion redaxo/src/core/.phpstorm.meta.php
Expand Up @@ -73,7 +73,7 @@
expectedArguments(\rex_sql_column::setExtra(), 0, argumentsSet('column_extra'));
expectedReturnValues(\rex_sql_column::getExtra(), argumentsSet('column_extra'));

registerArgumentsSet('foreign_key_on_clause', \rex_sql_foreign_key::CASCADE, \rex_sql_foreign_key::RESTRICT, \rex_sql_foreign_key::SET_NULL);
registerArgumentsSet('foreign_key_on_clause', \rex_sql_foreign_key::CASCADE, \rex_sql_foreign_key::RESTRICT, \rex_sql_foreign_key::NO_ACTION, \rex_sql_foreign_key::SET_NULL);
expectedArguments(\rex_sql_foreign_key::__construct(), 3, argumentsSet('foreign_key_on_clause'));
expectedArguments(\rex_sql_foreign_key::__construct(), 4, argumentsSet('foreign_key_on_clause'));
expectedArguments(\rex_sql_foreign_key::setOnUpdate(), 0, argumentsSet('foreign_key_on_clause'));
Expand Down
14 changes: 7 additions & 7 deletions redaxo/src/core/composer.lock

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

17 changes: 9 additions & 8 deletions redaxo/src/core/lib/sql/foreign_key.php
Expand Up @@ -10,6 +10,7 @@
class rex_sql_foreign_key
{
public const RESTRICT = 'RESTRICT';
public const NO_ACTION = 'NO ACTION';
public const CASCADE = 'CASCADE';
public const SET_NULL = 'SET NULL';

Expand All @@ -22,10 +23,10 @@ class rex_sql_foreign_key
/** @var array<string, string> */
private $columns;

/** @var self::RESTRICT|self::CASCADE|self::SET_NULL */
/** @var self::RESTRICT|self::NO_ACTION|self::CASCADE|self::SET_NULL */
private $onUpdate;

/** @var self::RESTRICT|self::CASCADE|self::SET_NULL */
/** @var self::RESTRICT|self::NO_ACTION|self::CASCADE|self::SET_NULL */
private $onDelete;

/** @var bool */
Expand All @@ -35,8 +36,8 @@ class rex_sql_foreign_key
* @param string $name
* @param string $table
* @param array<string, string> $columns Mapping of locale column to column in foreign table
* @param self::RESTRICT|self::CASCADE|self::SET_NULL $onUpdate
* @param self::RESTRICT|self::CASCADE|self::SET_NULL $onDelete
* @param self::RESTRICT|self::NO_ACTION|self::CASCADE|self::SET_NULL $onUpdate
* @param self::RESTRICT|self::NO_ACTION|self::CASCADE|self::SET_NULL $onDelete
*/
public function __construct($name, $table, array $columns, $onUpdate = self::RESTRICT, $onDelete = self::RESTRICT)
{
Expand Down Expand Up @@ -128,7 +129,7 @@ public function getColumns()
}

/**
* @param self::RESTRICT|self::CASCADE|self::SET_NULL $onUpdate
* @param self::RESTRICT|self::NO_ACTION|self::CASCADE|self::SET_NULL $onUpdate
*
* @return $this
*/
Expand All @@ -140,15 +141,15 @@ public function setOnUpdate($onUpdate)
}

/**
* @return self::RESTRICT|self::CASCADE|self::SET_NULL
* @return self::RESTRICT|self::NO_ACTION|self::CASCADE|self::SET_NULL
*/
public function getOnUpdate()
{
return $this->onUpdate;
}

/**
* @param self::RESTRICT|self::CASCADE|self::SET_NULL $onDelete
* @param self::RESTRICT|self::NO_ACTION|self::CASCADE|self::SET_NULL $onDelete
*
* @return $this
*/
Expand All @@ -160,7 +161,7 @@ public function setOnDelete($onDelete)
}

/**
* @return self::RESTRICT|self::CASCADE|self::SET_NULL
* @return self::RESTRICT|self::NO_ACTION|self::CASCADE|self::SET_NULL
*/
public function getOnDelete()
{
Expand Down
1 change: 1 addition & 0 deletions redaxo/src/core/lib/sql/schema_dumper.php
Expand Up @@ -131,6 +131,7 @@ private function getForeignKey(rex_sql_foreign_key $foreignKey)

static $options = [
rex_sql_foreign_key::RESTRICT => 'rex_sql_foreign_key::RESTRICT',
rex_sql_foreign_key::NO_ACTION => 'rex_sql_foreign_key::NO_ACTION',
rex_sql_foreign_key::CASCADE => 'rex_sql_foreign_key::CASCADE',
rex_sql_foreign_key::SET_NULL => 'rex_sql_foreign_key::SET_NULL',
];
Expand Down
16 changes: 8 additions & 8 deletions redaxo/src/core/vendor/composer/installed.json
Expand Up @@ -1412,17 +1412,17 @@
},
{
"name": "voku/portable-utf8",
"version": "6.0.11",
"version_normalized": "6.0.11.0",
"version": "6.0.12",
"version_normalized": "6.0.12.0",
"source": {
"type": "git",
"url": "https://github.com/voku/portable-utf8.git",
"reference": "a768656da0b8e42d236b325a4ebfc56ad6d0e111"
"reference": "db0583727bb17666bbd2ba238c85babb973fd165"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/voku/portable-utf8/zipball/a768656da0b8e42d236b325a4ebfc56ad6d0e111",
"reference": "a768656da0b8e42d236b325a4ebfc56ad6d0e111",
"url": "https://api.github.com/repos/voku/portable-utf8/zipball/db0583727bb17666bbd2ba238c85babb973fd165",
"reference": "db0583727bb17666bbd2ba238c85babb973fd165",
"shasum": ""
},
"require": {
Expand All @@ -1435,7 +1435,7 @@
"voku/portable-ascii": "~2.0.0"
},
"require-dev": {
"phpstan/phpstan": "1.8.*@dev",
"phpstan/phpstan": "1.9.*@dev",
"phpstan/phpstan-strict-rules": "1.4.*@dev",
"phpunit/phpunit": "~6.0 || ~7.0 || ~9.0",
"thecodingmachine/phpstan-strict-rules": "1.0.*@dev",
Expand All @@ -1449,7 +1449,7 @@
"ext-json": "Use JSON for string detection",
"ext-mbstring": "Use Mbstring for best performance"
},
"time": "2022-12-16T00:56:34+00:00",
"time": "2023-01-11T12:26:16+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
Expand Down Expand Up @@ -1490,7 +1490,7 @@
],
"support": {
"issues": "https://github.com/voku/portable-utf8/issues",
"source": "https://github.com/voku/portable-utf8/tree/6.0.11"
"source": "https://github.com/voku/portable-utf8/tree/6.0.12"
},
"funding": [
{
Expand Down
10 changes: 5 additions & 5 deletions redaxo/src/core/vendor/composer/installed.php
Expand Up @@ -3,7 +3,7 @@
'name' => '__root__',
'pretty_version' => 'dev-main',
'version' => 'dev-main',
'reference' => 'e733fd2790898521dfd47e850aff11779c29bd61',
'reference' => '9a7774dd9b04ab7bca2db1a30d37422a5a61635f',
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
Expand All @@ -13,7 +13,7 @@
'__root__' => array(
'pretty_version' => 'dev-main',
'version' => 'dev-main',
'reference' => 'e733fd2790898521dfd47e850aff11779c29bd61',
'reference' => '9a7774dd9b04ab7bca2db1a30d37422a5a61635f',
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
Expand Down Expand Up @@ -239,9 +239,9 @@
'dev_requirement' => false,
),
'voku/portable-utf8' => array(
'pretty_version' => '6.0.11',
'version' => '6.0.11.0',
'reference' => 'a768656da0b8e42d236b325a4ebfc56ad6d0e111',
'pretty_version' => '6.0.12',
'version' => '6.0.12.0',
'reference' => 'db0583727bb17666bbd2ba238c85babb973fd165',
'type' => 'library',
'install_path' => __DIR__ . '/../voku/portable-utf8',
'aliases' => array(),
Expand Down
2 changes: 1 addition & 1 deletion redaxo/src/core/vendor/voku/portable-utf8/composer.json
Expand Up @@ -37,7 +37,7 @@
},
"require-dev": {
"phpunit/phpunit": "~6.0 || ~7.0 || ~9.0",
"phpstan/phpstan": "1.8.*@dev",
"phpstan/phpstan": "1.9.*@dev",
"phpstan/phpstan-strict-rules": "1.4.*@dev",
"thecodingmachine/phpstan-strict-rules": "1.0.*@dev",
"voku/phpstan-rules": "3.1.*@dev"
Expand Down

0 comments on commit 84cf74a

Please sign in to comment.