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
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# Version 2.1.0

## Features

### PHP 8.4 Compatibility

* Add PHP 8.4 support

# Version 2.0.0

### PHP 8.1 Compatibility
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"require": {
"php": "^8.1",
"league/event": "~2.0",
"techdivision/import-dbal": "^2.0.0",
"techdivision/import-cache": "^2.0.0"
"techdivision/import-dbal": "^2.0",
"techdivision/import-cache": "^2.0"
},
"require-dev": {
"doctrine/dbal": "^4.0.4",
Expand Down
6 changes: 3 additions & 3 deletions src/Actions/AbstractAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ abstract class AbstractAction implements ActionInterface, ProcessorAwareActionIn
* @param string|null $primaryKeyMemberName The primary key member name
*/
public function __construct(
ProcessorInterface $createProcessor = null,
ProcessorInterface $updateProcessor = null,
ProcessorInterface $deleteProcessor = null,
?ProcessorInterface $createProcessor = null,
?ProcessorInterface $updateProcessor = null,
?ProcessorInterface $deleteProcessor = null,
$primaryKeyMemberName = null
) {

Expand Down
6 changes: 3 additions & 3 deletions src/Actions/GenericDynamicIdentifierAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ class GenericDynamicIdentifierAction extends GenericIdentifierAction
*/
public function __construct(
PrimaryKeyUtilInterface $primaryKeyUtil,
ProcessorInterface $createProcessor = null,
ProcessorInterface $updateProcessor = null,
ProcessorInterface $deleteProcessor = null
?ProcessorInterface $createProcessor = null,
?ProcessorInterface $updateProcessor = null,
?ProcessorInterface $deleteProcessor = null
) {

// pass the processor instances and the primary key name to the parent constructor
Expand Down
18 changes: 10 additions & 8 deletions src/Actions/Processors/AbstractBaseProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

namespace TechDivision\Import\Dbal\Collection\Actions\Processors;

use ArrayObject;
use TechDivision\Import\Dbal\Utils\EntityStatus;
use TechDivision\Import\Dbal\Connection\ConnectionInterface;
use TechDivision\Import\Dbal\Repositories\SqlStatementRepositoryInterface;
Expand Down Expand Up @@ -48,7 +49,7 @@ abstract class AbstractBaseProcessor extends AbstractProcessor
/**
* The array holding row data sanitizer.
*
* @var \ArrayObject
* @var ArrayObject
*/
protected $sanitizers;

Expand All @@ -62,21 +63,22 @@ abstract class AbstractBaseProcessor extends AbstractProcessor
/**
* Initialize the processor with the passed connection and utility class name, as well as optional sanitizers.
* .
*
* @param \TechDivision\Import\Dbal\Connection\ConnectionInterface $connection The connection instance
* @param \TechDivision\Import\Dbal\Repositories\SqlStatementRepositoryInterface $sqlStatementRepository The repository instance
* @param \ArrayObject $sanitizers The array with the sanitizer instances
* @param ArrayObject|null $sanitizers The array with the sanitizer instances
*/
public function __construct(
ConnectionInterface $connection,
SqlStatementRepositoryInterface $sqlStatementRepository,
\ArrayObject $sanitizers = null
?ArrayObject $sanitizers = null
) {

// pass the connection and the SQL statement repository to the parent class
parent::__construct($connection, $sqlStatementRepository);

// set the sanititzes, if available
$this->setSanitizers($sanitizers ?? new \ArrayObject());
$this->setSanitizers($sanitizers ?? new ArrayObject());
}

/**
Expand Down Expand Up @@ -125,21 +127,21 @@ protected function getPreparedStatement($name = null, $defaultName = null)
/**
* Gets sanitizers list.
*
* @return \ArrayObject The sanitizers
* @return ArrayObject The sanitizers
*/
public function getSanitizers(): \ArrayObject
public function getSanitizers(): ArrayObject
{
return $this->sanitizers;
}

/**
* Sets sanitizers list.
*
* @param \ArrayObject $sanitizers The sanitizers
* @param ArrayObject $sanitizers The sanitizers
*
* @return void
*/
public function setSanitizers(\ArrayObject $sanitizers): void
public function setSanitizers(ArrayObject $sanitizers): void
{
$this->sanitizers = $sanitizers;
}
Expand Down
5 changes: 3 additions & 2 deletions src/Actions/Processors/GenericProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,16 @@ class GenericProcessor extends AbstractBaseProcessor
/**
* Initialize the processor with the passed connection and utility class name, as well as optional sanitizers.
* .
*
* @param \TechDivision\Import\Dbal\Connection\ConnectionInterface $connection The connection instance
* @param \TechDivision\Import\Dbal\Repositories\SqlStatementRepositoryInterface $sqlStatementRepository The repository instance
* @param \ArrayObject $sanitizers The array with the sanitizer instances
* @param \ArrayObject|null $sanitizers The array with the sanitizer instances
* @param array $statementKeys The array with the statment keys
*/
public function __construct(
ConnectionInterface $connection,
SqlStatementRepositoryInterface $sqlStatementRepository,
\ArrayObject $sanitizers = null,
?\ArrayObject $sanitizers = null,
array $statementKeys = array()
) {

Expand Down
4 changes: 2 additions & 2 deletions src/Listeners/CacheUpdateListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ public function __construct(CacheAdapterInterface $cacheAdapter)
* Handle the event.
*
* @param \League\Event\EventInterface $event The event that triggered the listener
* @param \TechDivision\Import\Dbal\Actions\CachedActionInterface $action The action instance that triggered the event
* @param \TechDivision\Import\Dbal\Actions\CachedActionInterface|null $action The action instance that triggered the event
* @param array $row The row to be cached
*
* @return void
*/
public function handle(EventInterface $event, CachedActionInterface $action = null, array $row = array())
public function handle(EventInterface $event, ?CachedActionInterface $action = null, array $row = array())
{

// remove an existing product varchar attribute from the cache to allow reloading it
Expand Down
4 changes: 2 additions & 2 deletions src/Listeners/CacheUpdateSuccessListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@ public function __construct(CacheAdapterInterface $cacheAdapter)
* Handle the event.
*
* @param \League\Event\EventInterface $event The event that triggered the listener
* @param \TechDivision\Import\Dbal\Actions\CachedActionInterface $action The action instance that triggered the event
* @param \TechDivision\Import\Dbal\Actions\CachedActionInterface|null $action The action instance that triggered the event
* @param array $row The row to be cached
*
* @return void
*/
public function handle(EventInterface $event, CachedActionInterface $action = null, array $row = array())
public function handle(EventInterface $event, ?CachedActionInterface $action = null, array $row = array())
{

// remove an existing product varchar attribute from the cache to allow reloading it
Expand Down
Loading