diff --git a/.github/workflows/monthly-recurring-issues.yml b/.github/workflows/monthly-recurring-issues.yml new file mode 100644 index 00000000000..d6e9bc44871 --- /dev/null +++ b/.github/workflows/monthly-recurring-issues.yml @@ -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 }} diff --git a/bundles/AdminBundle/src/Controller/Admin/Asset/AssetController.php b/bundles/AdminBundle/src/Controller/Admin/Asset/AssetController.php index 0bec690753e..54359f6dd23 100644 --- a/bundles/AdminBundle/src/Controller/Admin/Asset/AssetController.php +++ b/bundles/AdminBundle/src/Controller/Admin/Asset/AssetController.php @@ -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; } diff --git a/bundles/EcommerceFrameworkBundle/doc/05_Index_Service/01_Product_Index_Configuration/03_Assortment_Tenant_Configuration.md b/bundles/EcommerceFrameworkBundle/doc/05_Index_Service/01_Product_Index_Configuration/03_Assortment_Tenant_Configuration.md index 530f769ebfc..616f02a92a5 100644 --- a/bundles/EcommerceFrameworkBundle/doc/05_Index_Service/01_Product_Index_Configuration/03_Assortment_Tenant_Configuration.md +++ b/bundles/EcommerceFrameworkBundle/doc/05_Index_Service/01_Product_Index_Configuration/03_Assortment_Tenant_Configuration.md @@ -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 @@ -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: @@ -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 @@ -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); ``` diff --git a/bundles/WebToPrintBundle/src/Processor/HeadlessChrome.php b/bundles/WebToPrintBundle/src/Processor/HeadlessChrome.php index 87dfd996843..39a26d191d6 100644 --- a/bundles/WebToPrintBundle/src/Processor/HeadlessChrome.php +++ b/bundles/WebToPrintBundle/src/Processor/HeadlessChrome.php @@ -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); diff --git a/composer.json b/composer.json index b421e8c47cb..45db291ee03 100644 --- a/composer.json +++ b/composer.json @@ -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", diff --git a/doc/Development_Documentation/23_Installation_and_Upgrade/09_Upgrade_Notes/README.md b/doc/Development_Documentation/23_Installation_and_Upgrade/09_Upgrade_Notes/README.md index ecf23f2190f..ac74acfff9f 100644 --- a/doc/Development_Documentation/23_Installation_and_Upgrade/09_Upgrade_Notes/README.md +++ b/doc/Development_Documentation/23_Installation_and_Upgrade/09_Upgrade_Notes/README.md @@ -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). diff --git a/lib/Tool/Authentication.php b/lib/Tool/Authentication.php index 3fe1cf1fe9b..03f87158374 100644 --- a/lib/Tool/Authentication.php +++ b/lib/Tool/Authentication.php @@ -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); diff --git a/models/DataObject/Objectbrick/Definition.php b/models/DataObject/Objectbrick/Definition.php index 29d3f552bc4..012e053f438 100644 --- a/models/DataObject/Objectbrick/Definition.php +++ b/models/DataObject/Objectbrick/Definition.php @@ -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 . '.'); + } } }