Skip to content
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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php: ['8.3']
php: ['8.4']
deps: ['stable']

steps:
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog
## Unreleased
### Add
- Add support for Magento v2.4.9
- Add support for PHP 8.4

### Update
- Update WebComponents library to version 5.1.7
- Add template to suggest element
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
}
],
"require": {
"php": "~8.1.0||~8.2.0||~8.3.0",
"php": "~8.1.0||~8.2.0||~8.3.0||~8.4.0",
"omikron/factfinder-communication-sdk": "^0.9.9",
"magento/framework": "^103.0.7",
"magento/module-catalog": "^104.0.7",
Expand All @@ -25,7 +25,7 @@
"require-dev": {
"pdepend/pdepend": "^2.16",
"phpmd/phpmd" : "^2.15",
"phpunit/phpunit": "~9.5.0",
"phpunit/phpunit": "^9.6",
"magento/magento-coding-standard": "*",
"friendsofphp/php-cs-fixer": "^3.58"
},
Expand Down
2 changes: 1 addition & 1 deletion src/Console/Command/Export.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ protected function configure(): void
/**
* {@inheritdoc}
*/
protected function execute(InputInterface $input, OutputInterface $output)
protected function execute(InputInterface $input, OutputInterface $output): int
{
$this->state->setAreaCode('frontend');
$storeIds = $this->getStoreIds((int) $input->getOption('store'));
Expand Down
2 changes: 1 addition & 1 deletion src/Exception/ExportPreviewValidationException.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

class ExportPreviewValidationException extends \Exception
{
public function __construct($message = '', $code = 0, Throwable $previous = null)
public function __construct($message = '', $code = 0, ?Throwable $previous = null)
{
parent::__construct(sprintf('Product will not be exported. Reason: %s', $message), $code, $previous);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Exception/ResponseException.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

class ResponseException extends \RuntimeException
{
public function __construct(string $message = '', int $code = 0, \Throwable $previous = null) // phpcs:ignore
public function __construct(string $message = '', int $code = 0, ?\Throwable $previous = null) // phpcs:ignore
{
parent::__construct($message ?: 'Response body was empty', $code, $previous);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ public function __construct(
ScopeConfigInterface $config,
TypeListInterface $cacheTypeList,
WriterInterface $configWriter,
AbstractResource $resource = null,
AbstractDb $resourceCollection = null,
?AbstractResource $resource = null,
?AbstractDb $resourceCollection = null,
array $data = []
) {
parent::__construct($context, $registry, $config, $cacheTypeList, $resource, $resourceCollection, $data);
Expand Down
2 changes: 1 addition & 1 deletion src/Model/Api/CredentialsFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public function __construct(ObjectManagerInterface $objectManager, AuthConfig $a
$this->authConfig = $authConfig;
}

public function create(array $authData = null)
public function create(?array $authData = null)
{
return $this->objectManager->create(Credentials::class, $authData ??
[
Expand Down
2 changes: 1 addition & 1 deletion src/Model/Config/CmsConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function __construct(ScopeConfigInterface $scopeConfig)
$this->scopeConfig = $scopeConfig;
}

public function getCmsBlacklist(int $scopeCode = null): array
public function getCmsBlacklist(?int $scopeCode = null): array
{
$pages = (string) $this->scopeConfig->getValue(self::PATH_DISABLE_CMS_PAGES, 'store', $scopeCode);
return array_filter(explode(',', $pages));
Expand Down
6 changes: 3 additions & 3 deletions src/Model/Config/CommunicationConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function __construct(ScopeConfigInterface $scopeConfig, UrlInterface $url
$this->urlBuilder = $urlBuilder;
}

public function getChannel(int $scopeId = null): string
public function getChannel(?int $scopeId = null): string
{
return (string) $this->scopeConfig->getValue(self::PATH_CHANNEL, ScopeInterface::SCOPE_STORES, $scopeId);
}
Expand All @@ -41,12 +41,12 @@ public function getAddress(): string
return (string) $this->scopeConfig->getValue(self::PATH_ADDRESS, ScopeInterface::SCOPE_STORES);
}

public function isChannelEnabled(int $scopeId = null): bool
public function isChannelEnabled(?int $scopeId = null): bool
{
return $this->scopeConfig->isSetFlag(self::PATH_IS_ENABLED, ScopeInterface::SCOPE_STORES, $scopeId);
}

public function isPushImportEnabled(int $scopeId = null): bool
public function isPushImportEnabled(?int $scopeId = null): bool
{
return $this->scopeConfig->isSetFlag(self::PATH_DATA_TRANSFER_IMPORT, ScopeInterface::SCOPE_STORES, $scopeId);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Model/Config/ExportConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function getSingleFields(?int $storeId = null): array
return $this->getAttributeCodes($storeId, fn (array $row): bool => !$row['multi']);
}

public function getPushImportDataTypes(int $scopeId = null): array
public function getPushImportDataTypes(?int $scopeId = null): array
{
$configPath = 'factfinder/data_transfer/ff_push_import_type';
$dataTypes = (string) $this->scopeConfig->getValue($configPath, ScopeInterface::SCOPE_STORES, $scopeId);
Expand Down
6 changes: 3 additions & 3 deletions src/Model/FieldRoles.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public function __construct(
) {
}

public function getFieldRoles(int $scopeId = null): array
public function getFieldRoles(?int $scopeId = null): array
{
try {
$config = $this->scopeConfig->getValue(self::PATH_PRODUCT_FIELD_ROLE, Scope::SCOPE_STORES, $scopeId);
Expand All @@ -32,12 +32,12 @@ public function getFieldRoles(int $scopeId = null): array
}
}

public function getFieldRole(string $roleName, int $scopeId = null): string
public function getFieldRole(string $roleName, ?int $scopeId = null): string
{
return (string) ($this->getFieldRoles($scopeId)[$roleName] ?? '');
}

public function saveFieldRoles(array $fieldRoles, int $scopeId = null): bool
public function saveFieldRoles(array $fieldRoles, ?int $scopeId = null): bool
{
try {
$roles = (string) $this->serializer->serialize($fieldRoles);
Expand Down
Loading