Skip to content

Commit

Permalink
Merge branch '11.x' into vulnerabilities_ignore_list
Browse files Browse the repository at this point in the history
  • Loading branch information
bluvulture committed Oct 2, 2024
2 parents e1def14 + 9613a2e commit 21b4dcb
Show file tree
Hide file tree
Showing 16 changed files with 436 additions and 22 deletions.
4 changes: 2 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<!--
Before working on a contribution, you must determine on which branch you need to work:
- Bug fix: choose the latest maintenance branch `11.3`
- Bug fix: choose the latest maintenance branch `11.4`
- Feature/Improvement: choose `11.x`
> All bug fixes merged into the latest maintenance branch are also merged to the current dev branch (`11.x`) on a regular basis.
## Please make sure your PR complies with all of the following points:
- [ ] Read and accept our [contributing guidelines](/CONTRIBUTING.md) before you submit a PR.
- [ ] Features need to be proper documented in `doc/`
- [ ] Bugfixes need a short guide how to reproduce them -> target branch is the oldest supported maintenance branch, e.g. `11.3` (see Readme.md for the list of supported versions)
- [ ] Bugfixes need a short guide how to reproduce them -> target branch is the oldest supported maintenance branch, e.g. `11.4` (see Readme.md for the list of supported versions)
- [ ] Meet all coding standards (see PhpStan actions)
**Don't submit a PR if it doesn't comply, it'll be closed without a comment!**
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/composer-checks-outdated-monthly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
matrix:
include:
- { php-version: 8.3, branch: 11.x }
- { php-version: 8.3, branch: 11.3 }
- { php-version: 8.3, branch: 11.4 }
with:
php-version: ${{ matrix.php-version }}
branch: ${{ matrix.branch }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/composer-checks-outdated.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
matrix:
include:
- { php-version: 8.3, branch: 11.x }
- { php-version: 8.3, branch: 11.3 }
- { php-version: 8.3, branch: 11.4 }
with:
php-version: ${{ matrix.php-version }}
branch: ${{ matrix.branch }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/composer-checks-vulnerabilities.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ jobs:
strategy:
fail-fast: false
matrix:
include:
- { php-version: 8.3, branch: default }
- { php-version: 8.3, branch: 11.3 }
include:
- { php-version: 8.3, branch: 11.x }
- { php-version: 8.3, branch: 11.4 }
with:
php-version: ${{ matrix.php-version }}
branch: ${{ matrix.branch == 'default' && github.event.repository.default_branch || matrix.branch }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull-request-checklist.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
env:
MESSAGE: |
### Review Checklist
- [ ] Target branch (`11.3` for bug fixes, others `11.x`)
- [ ] Target branch (`11.4` for bug fixes, others `11.x`)
- [ ] Tests (if it's testable code, there should be a test for it - [get help](https://pimcore.com/docs/pimcore/current/Development_Documentation/Development_Tools_and_Details/Testing/Core_Tests.html))
- [ ] Docs (every functionality needs to be documented, [see here](https://github.com/pimcore/pimcore/tree/11.x/doc))
- [ ] [Migration](https://pimcore.com/docs/pimcore/current/Development_Documentation/Development_Tools_and_Details/Migrations.html) incl. `install.sql` (e.g. if the database schema changes, ...)
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/sync-changes-scheduled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ref: [{'base': '11.x', 'destination': '11.x'}, {'base': '11.3', 'destination': '11.3'}]
ref: [{'base': '11.x', 'destination': '11.x'}, {'base': '11.4', 'destination': '11.4'}]
with:
base_ref: ${{ matrix.ref.base }}
ref_name: ${{ matrix.ref.destination }}
Expand All @@ -20,4 +20,4 @@ jobs:
secrets:
SYNC_TOKEN: ${{ secrets.SYNC_TOKEN }}
GIT_NAME: ${{ secrets.GIT_NAME }}
GIT_EMAIL: ${{ secrets.GIT_EMAIL }}
GIT_EMAIL: ${{ secrets.GIT_EMAIL }}
15 changes: 8 additions & 7 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# License
Copyright (C) Pimcore GmbH

This software is available under two different licenses:
This software is available under two different licenses:
* GNU General Public License version 3 (GPLv3) as Pimcore Community Edition
* Pimcore Commercial License (PCL)

The default Pimcore license, without a valid Pimcore Commercial License agreement, is the Open-Source GPLv3 license.

## GNU General Public License version 3 (GPLv3)
If you decide to choose the GPLv3 license, you must comply with the following terms:
If you decide to choose the GPLv3 license, you must comply with the following terms:

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand All @@ -26,11 +26,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
## Pimcore Commercial License (PCL)
Alternatively, commercial and supported versions of the program - also known as
Commercial Distributions - must be used in accordance with the terms and conditions
contained in a separate written agreement between you and Pimcore GmbH.
contained in a separate written agreement between you and Pimcore GmbH.
For more information about the Pimcore Commercial License (PCL) please contact [email protected].


Please see also (files in this directory):
[Licensing FAQ - license-faq.md](license-faq.md)
[GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 - gpl-3.0.txt](gpl-3.0.txt)
[Libraries used by Pimcore including their own licenses - 3rd-party-licenses.md](3rd-party-licenses.md)

Please see also (files in this directory):
- [Licensing FAQ - license-faq.md](https://github.com/pimcore/pimcore/blob/master/license-faq.md)
- [GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 - gpl-3.0.txt](gpl-3.0.txt)
- [Libraries used by Pimcore including their own licenses - 3rd-party-licenses.md](3rd-party-licenses.md)
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ private function addApplicationLogNode(ArrayNodeDefinition $rootNode): void
->end()
->defaultFalse()
->end()
->integerNode('filter_priority')
->scalarNode('filter_priority')
->info('Filter threshold for email summary, choose one of: 7 (debug), 6 (info), 5 (notice), 4 (warning), 3 (error), 2 (critical), 1 (alert) ,0 (emerg)')
->defaultNull()
->end()
Expand Down
24 changes: 24 additions & 0 deletions bundles/SeoBundle/src/Model/Redirect.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
use Pimcore\Event\Traits\RecursionBlockingEventDispatchHelperTrait;
use Pimcore\Logger;
use Pimcore\Model\AbstractModel;
use Pimcore\Model\Document;
use Pimcore\Model\Exception\NotFoundException;
use Pimcore\Model\Site;
use Symfony\Component\HttpFoundation\Request;
Expand Down Expand Up @@ -136,11 +137,34 @@ public function getSource(): ?string
return $this->source;
}

/**
* Target as string, can be target path or document id
*/
public function getTarget(): ?string
{
return $this->target;
}

/**
* resolved target path with handling for document ids as `target`
* - tries to resolve the target as document by id and take its full path
* - if no document can be found the target is used as target path
* - ensures a slash at the beginning of the target string
*/
public function getTargetPath(): string
{
$redirectTarget = $this->target;
$targetDocumentPath = Document::getById($this->target)?->getFullPath();

$resolvedPath = ($targetDocumentPath ?? $redirectTarget) ?? '';

if (!str_starts_with($resolvedPath, '/')) {
return '/'.$resolvedPath;
}

return $resolvedPath;
}

public function setId(int $id): static
{
$this->id = $id;
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -134,13 +134,13 @@
"sabre/dav": "4.2.2",
"symfony/symfony": "*",
"thecodingmachine/safe": "<2.0",
"twig/twig": ">=3.9.0"
"twig/twig": ">=3.9.0 <3.14.0"
},
"require-dev": {
"codeception/codeception": "^5.0.3",
"codeception/module-symfony": "^3.1.0",
"ergebnis/phpstan-rules": "^2.0",
"phpstan/phpstan": "1.12.0",
"phpstan/phpstan": "1.12.5",
"phpstan/phpstan-symfony": "^1.3.5",
"phpunit/phpunit": "^9.3",
"gotenberg/gotenberg-php": "^1.1 || ^2.4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ bin/console pimcore:assets:remove-custom-setting disableImageFeatureAutoDetectio
### Rebuild classes, objectBricks, fieldCollections and customLayouts
Make sure you ran the following commands to rebuild the classes, objectBricks, fieldCollections and customLayouts:
```bash
bin/console doctrine:migration:exec 'Pimcore\Bundle\CoreBundle\Migrations\Version20230412105530'
bin/console doctrine:migration:exec 'Pimcore\Bundle\CoreBundle\Migrations\Version20240708083500'
```

### Additional Cleanups
Expand Down
5 changes: 5 additions & 0 deletions doc/23_Installation_and_Upgrade/09_Upgrade_Notes/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
#### [Twig Deferred Extension]
- Removed `rybakit/twig-deferred-extension` dependency and `Twig\DeferredExtension\DeferredExtension` service.
If you use deferred twig blocks, please add the dependency to your own `composer.json` and the service to your own `service.yaml`.
#### [Twig Extension Deprecations]
- `pimcore_cache` Twig extension is deprecated. Use `pimcorecache` twig tag instead.
- `pimcore_placeholder`, `pimcore_head_script`, `pimcore_head_style`
- `captureStart()` and `captureEnd()` methods are deprecated. Use native twig `set` tag instead. Take a look at the related docs of each twig extension for an example.

#### [Notification]
- Extending notifications for studio adding flag `isStudio` column and a `payload` column with according getters and setters.
Make sure to run the migration `bin/console doctrine:migrations:execute Pimcore\\Bundle\\CoreBundle\\Migrations\\Version20240813085200`.
Expand Down
2 changes: 1 addition & 1 deletion lib/Tool/Serialize.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ protected static function loopFilterCycles(mixed $element): mixed
$propCollection = get_object_vars($clone);

foreach ($propCollection as $name => $propValue) {
if (!str_starts_with($name, "\0")) {
if (!str_starts_with((string) $name, "\0")) {
$clone->$name = self::loopFilterCycles($propValue);
}
}
Expand Down
43 changes: 43 additions & 0 deletions tests/Support/TwigTester.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?php

declare(strict_types=1);

/**
* Pimcore
*
* This source file is available under two different licenses:
* - GNU General Public License version 3 (GPLv3)
* - Pimcore Commercial License (PCL)
* Full copyright and license information is available in
* LICENSE.md which is distributed with this source code.
*
* @copyright Copyright (c) Pimcore GmbH (http://www.pimcore.org)
* @license http://www.pimcore.org/license GPLv3 and PCL
*/

namespace Pimcore\Tests\Support;

/**
* Inherited Methods
*
* @method void wantTo($text)
* @method void wantToTest($text)
* @method void execute($callable)
* @method void expectTo($prediction)
* @method void expect($prediction)
* @method void amGoingTo($argumentation)
* @method void am($role)
* @method void lookForwardTo($achieveValue)
* @method void comment($description)
* @method void pause($vars = [])
*
* @SuppressWarnings(PHPMD)
*/
class TwigTester extends \Codeception\Actor
{
use _generated\TwigTesterActions;

/**
* Define custom actions here
*/
}
6 changes: 6 additions & 0 deletions tests/Twig.suite.dist.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
actor: TwigTester
modules:
enabled:
- \Pimcore\Tests\Support\Helper\Pimcore:
connect_db: true
- \Pimcore\Tests\Support\Helper\Unit
Loading

0 comments on commit 21b4dcb

Please sign in to comment.