Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/10.6' into 11.x
Browse files Browse the repository at this point in the history
# Conflicts:
#	composer.json
#	lib/Tool/Authentication.php
  • Loading branch information
brusch committed Feb 17, 2023
2 parents ef034d6 + 39e2026 commit c4d6cf4
Show file tree
Hide file tree
Showing 8 changed files with 52 additions and 15 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/monthly-recurring-issues.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Monthly Recurring Issues
on:
workflow_dispatch:
schedule:
- cron: 0 4 1 * *

jobs:
monthly_recurring_issues:
name: Monthly Recurring Issues
runs-on: ubuntu-latest
steps:

- name: Get current month
run: echo "MONTH=$(date '+%B')" >> $GITHUB_ENV

- name: PhpStan Version Upgrade
uses: imjohnbo/issue-bot@v3
with:
labels: "Task"
title: PhpStan Version Upgrade ${{ env.MONTH }}
body: |-
Please check for a newer PhpStan version.
Create a PR with the latest version and fix all occurring issues :-)
project-v2-path: orgs/pimcore/projects/10
token: ${{ secrets.ISSUE_CREATION_TOKEN }}
Original file line number Diff line number Diff line change
Expand Up @@ -2333,7 +2333,7 @@ public function importZipFilesAction(Request $request): JsonResponse
for ($i = $offset; $i < ($offset + $limit); $i++) {
$path = $zip->getNameIndex($i);

if (str_starts_with($path, '__MACOSX/')) {
if (str_starts_with($path, '__MACOSX/') || $path === 'Thumbs.db') {
continue;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The E-Commerce Framework provides a two level Assortment Tenant system for the P
One system can have multiple tenants (heavy- and light-weight). But too many tenants can have bad effects on the performance
of saving products, since all *Product Indices* need to be updated on every save.

By default the system always uses one heavy-weight tenant (= `DefaultMysql`), but the default tenant can be disabled.
By default the system always uses one heavy-weight tenant (which is `DefaultMysql`), but the default tenant can be disabled.


## Assortment Tenants
Expand All @@ -40,7 +40,7 @@ attributes. Depending on the *Product Index* implementation, additional configur

- **Declare the service:**
You need to declare the service as well so the class can be used. On your service configuration or for instance at the top of the ecommerce configuration file:
```
```yaml
services:
MyBundle\Service\MySubtenantConfig:
calls:
Expand Down Expand Up @@ -146,7 +146,7 @@ In order to populate the additional mapping data, also following methods have to
*
* @return mixed $subTenantData
*/
public function prepareSubTenantEntries(IIndexable $object, $subObjectId = null);
public function prepareSubTenantEntries(IndexableInterface $object, $subObjectId = null);

/**
* populates index for tenant relations based on given data
Expand Down Expand Up @@ -176,7 +176,7 @@ In order to populate the additional mapping data, the following method has to be
*
* @return array $subTenantData
*/
public function prepareSubTenantEntries(IIndexable $object, $subObjectId = null);
public function prepareSubTenantEntries(IndexableInterface $object, $subObjectId = null);

```

Expand Down
4 changes: 2 additions & 2 deletions bundles/WebToPrintBundle/src/Processor/HeadlessChrome.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ public function getPdfFromString(string $html, array $params = [], bool $returnF
$converter = new Converter($input, $output);
if ($this->nodePath) {
$converter->setNodePath($this->nodePath);
} else {
$converter->setNodePath(Console::getExecutable('node'));
} elseif ($nodePath = Console::getExecutable('node')) {
$converter->setNodePath($nodePath);
}
$converter->setOptions($params);

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
"codeception/codeception": "^5.0.3",
"codeception/module-symfony": "^3.1.0",
"codeception/phpunit-wrapper": "^9",
"phpstan/phpstan": "^1.9.11",
"phpstan/phpstan": "1.9.17",
"phpstan/phpstan-symfony": "^1.2.20",
"phpunit/phpunit": "^9.3",
"spiritix/php-chrome-html2pdf": "^1.6",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ pimcore:
- [Sites] Default Site Id has been updated from `default` to `0`. Please update configs using default site id accordingly.
- [Asset] Deprecated VR Preview. For details please see [#14111](https://github.com/pimcore/pimcore/issues/14111).
- [Authentication] The method `Pimcore\Tool\Authentication::authenticateHttpBasic()` has been deprecated and will be removed in Pimcore 11.
- [Authentication] The method `Pimcore\Tool\Authentication::authenticatePlaintext()` has been deprecated and will be removed in Pimcore 11.

## 10.5.13
- [Web2Print] Print document twig expressions are now executed in a sandbox with restrictive security policies (just like Sending mails and Dataobject Text Layouts introduced in 10.5.9).
Expand Down
9 changes: 9 additions & 0 deletions lib/Tool/Authentication.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,17 @@

class Authentication
{
/**
* @deprecated
*/
public static function authenticatePlaintext(string $username, string $password): ?User
{
trigger_deprecation(
'pimcore/pimcore',
'10.6',
sprintf('%s is deprecated and will be removed in Pimcore 11', __METHOD__),
);

/** @var User $user */
$user = User::getByName($username);

Expand Down
16 changes: 9 additions & 7 deletions models/DataObject/Objectbrick/Definition.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,13 +125,15 @@ private function checkTablenames(): void
}
}

$tablesLen = array_map('strlen', $tables);
array_multisort($tablesLen, $tables);
$longestTablename = end($tables);

$length = strlen($longestTablename);
if ($length > 64) {
throw new \Exception('table name ' . $longestTablename . ' would be too long. Max length is 64. Current length would be ' . $length . '.');
if ($tables) {
$tablesLen = array_map('strlen', $tables);
array_multisort($tablesLen, $tables);
$longestTablename = end($tables);

$length = strlen($longestTablename);
if ($length > 64) {
throw new \Exception('table name ' . $longestTablename . ' would be too long. Max length is 64. Current length would be ' . $length . '.');
}
}
}

Expand Down

0 comments on commit c4d6cf4

Please sign in to comment.