Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapt php versions #711

Merged
merged 4 commits into from
Jan 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"prefer-stable": true,
"minimum-stability": "dev",
"require": {
"php": "~8.3.0",
"php": "~8.3.0 || ~8.4.0",
"nesbot/carbon": "^2.65",
"pimcore/static-resolver-bundle": "2.x-dev",
"pimcore/generic-data-index-bundle": "2.x-dev",
Expand All @@ -35,7 +35,7 @@
"codeception/phpunit-wrapper": "^9",
"codeception/module-asserts": "^2",
"codeception/module-symfony": "^3.1.1",
"phpstan/phpstan": "1.10.5",
"phpstan/phpstan": "1.12.15",
"phpstan/phpstan-symfony": "^1.2.20",
"phpunit/phpunit": "10.2.7",
"nyholm/psr7": "^1",
Expand Down
4 changes: 2 additions & 2 deletions src/DataObject/Data/Adapter/BlockAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ private function processBlockData(
Concrete $element,
Block $fieldDefinition,
array $blockData,
FieldContextData $contextData = null
?FieldContextData $contextData = null
): array {
$resultBlockData = [];
foreach ($blockData as $rawBlockElement) {
Expand All @@ -143,7 +143,7 @@ private function processBlockElement(
Concrete $element,
Block $fieldDefinition,
array $rawBlockElement,
FieldContextData $contextData = null
?FieldContextData $contextData = null
): array {
$resultElement = [];
$blockElement = $rawBlockElement['data'] ?? null;
Expand Down
2 changes: 1 addition & 1 deletion src/Email/Repository/BlocklistRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public function addEntry(string $email): void

public function getListing(
CollectionParameters $parameters,
string $email = null,
?string $email = null,
): Listing {
$limit = $parameters->getPageSize();
$listing = new Listing();
Expand Down
2 changes: 1 addition & 1 deletion src/Email/Repository/BlocklistRepositoryInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function addEntry(string $email): void;

public function getListing(
CollectionParameters $parameters,
string $email = null,
?string $email = null,
): Listing;

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Email/Repository/EmailLogRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function __construct(

public function getListing(
CollectionParameters $parameters,
string $email = null,
?string $email = null,
): Listing {
$limit = $parameters->getPageSize();
$listing = new Listing();
Expand Down
2 changes: 1 addition & 1 deletion src/Email/Repository/EmailLogRepositoryInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ interface EmailLogRepositoryInterface
{
public function getListing(
CollectionParameters $parameters,
string $email = null,
?string $email = null,
): Listing;

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Email/Service/BlocklistService.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function addEntry(string $email): void

public function listEntries(
CollectionParameters $parameters,
string $email = null,
?string $email = null,
): Collection {
$list = [];
$listing = $this->blocklistRepository->getListing($parameters, $email);
Expand Down
2 changes: 1 addition & 1 deletion src/Email/Service/BlocklistServiceInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function addEntry(string $email): void;

public function listEntries(
CollectionParameters $parameters,
string $email = null,
?string $email = null,
): Collection;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#[Attribute(Attribute::TARGET_METHOD | Attribute::IS_REPEATABLE)]
final class TextFieldParameter extends QueryParameter
{
public function __construct(string $name, string $description, bool $required = false, string $example = null)
public function __construct(string $name, string $description, bool $required = false, ?string $example = null)
{
parent::__construct(
name: $name,
Expand Down
6 changes: 3 additions & 3 deletions src/Version/Hydrator/DataObjectVersionHydrator.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,7 @@ public function hydrate(

$hydratedDataObject = new DataObjectVersion(
$dataObject->getKey(),
$className,
$dataObject->getType(),
$published,
$dataObject->hasChildren(),
$dataObject->getFullPath(),
$dataObject->getIndex(),
Expand All @@ -60,7 +58,9 @@ public function hydrate(
$dataObject->getLocked(),
$dataObject->isLocked(),
$dataObject->getCreationDate(),
$dataObject->getModificationDate()
$dataObject->getModificationDate(),
$className,
$published
);

$this->dataService->setObjectDetailData($hydratedDataObject, $dataObject);
Expand Down
Loading