Skip to content

Commit 6826073

Browse files
authored
Merge pull request #7 from techdivision/PAC-950
2 parents bb2a64f + 8ac7644 commit 6826073

File tree

8 files changed

+33
-22
lines changed

8 files changed

+33
-22
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
# Version 2.1.0
2+
3+
## Features
4+
5+
### PHP 8.4 Compatibility
6+
7+
* Add PHP 8.4 support
8+
19
# Version 2.0.0
210

311
### PHP 8.1 Compatibility

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
"require": {
88
"php": "^8.1",
99
"league/event": "~2.0",
10-
"techdivision/import-dbal": "^2.0.0",
11-
"techdivision/import-cache": "^2.0.0"
10+
"techdivision/import-dbal": "^2.0",
11+
"techdivision/import-cache": "^2.0"
1212
},
1313
"require-dev": {
1414
"doctrine/dbal": "^4.0.4",

src/Actions/AbstractAction.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,9 @@ abstract class AbstractAction implements ActionInterface, ProcessorAwareActionIn
6969
* @param string|null $primaryKeyMemberName The primary key member name
7070
*/
7171
public function __construct(
72-
ProcessorInterface $createProcessor = null,
73-
ProcessorInterface $updateProcessor = null,
74-
ProcessorInterface $deleteProcessor = null,
72+
?ProcessorInterface $createProcessor = null,
73+
?ProcessorInterface $updateProcessor = null,
74+
?ProcessorInterface $deleteProcessor = null,
7575
$primaryKeyMemberName = null
7676
) {
7777

src/Actions/GenericDynamicIdentifierAction.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ class GenericDynamicIdentifierAction extends GenericIdentifierAction
4040
*/
4141
public function __construct(
4242
PrimaryKeyUtilInterface $primaryKeyUtil,
43-
ProcessorInterface $createProcessor = null,
44-
ProcessorInterface $updateProcessor = null,
45-
ProcessorInterface $deleteProcessor = null
43+
?ProcessorInterface $createProcessor = null,
44+
?ProcessorInterface $updateProcessor = null,
45+
?ProcessorInterface $deleteProcessor = null
4646
) {
4747

4848
// pass the processor instances and the primary key name to the parent constructor

src/Actions/Processors/AbstractBaseProcessor.php

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

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

17+
use ArrayObject;
1718
use TechDivision\Import\Dbal\Utils\EntityStatus;
1819
use TechDivision\Import\Dbal\Connection\ConnectionInterface;
1920
use TechDivision\Import\Dbal\Repositories\SqlStatementRepositoryInterface;
@@ -48,7 +49,7 @@ abstract class AbstractBaseProcessor extends AbstractProcessor
4849
/**
4950
* The array holding row data sanitizer.
5051
*
51-
* @var \ArrayObject
52+
* @var ArrayObject
5253
*/
5354
protected $sanitizers;
5455

@@ -62,21 +63,22 @@ abstract class AbstractBaseProcessor extends AbstractProcessor
6263
/**
6364
* Initialize the processor with the passed connection and utility class name, as well as optional sanitizers.
6465
* .
66+
*
6567
* @param \TechDivision\Import\Dbal\Connection\ConnectionInterface $connection The connection instance
6668
* @param \TechDivision\Import\Dbal\Repositories\SqlStatementRepositoryInterface $sqlStatementRepository The repository instance
67-
* @param \ArrayObject $sanitizers The array with the sanitizer instances
69+
* @param ArrayObject|null $sanitizers The array with the sanitizer instances
6870
*/
6971
public function __construct(
7072
ConnectionInterface $connection,
7173
SqlStatementRepositoryInterface $sqlStatementRepository,
72-
\ArrayObject $sanitizers = null
74+
?ArrayObject $sanitizers = null
7375
) {
7476

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

7880
// set the sanititzes, if available
79-
$this->setSanitizers($sanitizers ?? new \ArrayObject());
81+
$this->setSanitizers($sanitizers ?? new ArrayObject());
8082
}
8183

8284
/**
@@ -125,21 +127,21 @@ protected function getPreparedStatement($name = null, $defaultName = null)
125127
/**
126128
* Gets sanitizers list.
127129
*
128-
* @return \ArrayObject The sanitizers
130+
* @return ArrayObject The sanitizers
129131
*/
130-
public function getSanitizers(): \ArrayObject
132+
public function getSanitizers(): ArrayObject
131133
{
132134
return $this->sanitizers;
133135
}
134136

135137
/**
136138
* Sets sanitizers list.
137139
*
138-
* @param \ArrayObject $sanitizers The sanitizers
140+
* @param ArrayObject $sanitizers The sanitizers
139141
*
140142
* @return void
141143
*/
142-
public function setSanitizers(\ArrayObject $sanitizers): void
144+
public function setSanitizers(ArrayObject $sanitizers): void
143145
{
144146
$this->sanitizers = $sanitizers;
145147
}

src/Actions/Processors/GenericProcessor.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,16 @@ class GenericProcessor extends AbstractBaseProcessor
4040
/**
4141
* Initialize the processor with the passed connection and utility class name, as well as optional sanitizers.
4242
* .
43+
*
4344
* @param \TechDivision\Import\Dbal\Connection\ConnectionInterface $connection The connection instance
4445
* @param \TechDivision\Import\Dbal\Repositories\SqlStatementRepositoryInterface $sqlStatementRepository The repository instance
45-
* @param \ArrayObject $sanitizers The array with the sanitizer instances
46+
* @param \ArrayObject|null $sanitizers The array with the sanitizer instances
4647
* @param array $statementKeys The array with the statment keys
4748
*/
4849
public function __construct(
4950
ConnectionInterface $connection,
5051
SqlStatementRepositoryInterface $sqlStatementRepository,
51-
\ArrayObject $sanitizers = null,
52+
?\ArrayObject $sanitizers = null,
5253
array $statementKeys = array()
5354
) {
5455

src/Listeners/CacheUpdateListener.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,12 @@ public function __construct(CacheAdapterInterface $cacheAdapter)
5252
* Handle the event.
5353
*
5454
* @param \League\Event\EventInterface $event The event that triggered the listener
55-
* @param \TechDivision\Import\Dbal\Actions\CachedActionInterface $action The action instance that triggered the event
55+
* @param \TechDivision\Import\Dbal\Actions\CachedActionInterface|null $action The action instance that triggered the event
5656
* @param array $row The row to be cached
5757
*
5858
* @return void
5959
*/
60-
public function handle(EventInterface $event, CachedActionInterface $action = null, array $row = array())
60+
public function handle(EventInterface $event, ?CachedActionInterface $action = null, array $row = array())
6161
{
6262

6363
// remove an existing product varchar attribute from the cache to allow reloading it

src/Listeners/CacheUpdateSuccessListener.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,12 @@ public function __construct(CacheAdapterInterface $cacheAdapter)
5353
* Handle the event.
5454
*
5555
* @param \League\Event\EventInterface $event The event that triggered the listener
56-
* @param \TechDivision\Import\Dbal\Actions\CachedActionInterface $action The action instance that triggered the event
56+
* @param \TechDivision\Import\Dbal\Actions\CachedActionInterface|null $action The action instance that triggered the event
5757
* @param array $row The row to be cached
5858
*
5959
* @return void
6060
*/
61-
public function handle(EventInterface $event, CachedActionInterface $action = null, array $row = array())
61+
public function handle(EventInterface $event, ?CachedActionInterface $action = null, array $row = array())
6262
{
6363

6464
// remove an existing product varchar attribute from the cache to allow reloading it

0 commit comments

Comments
 (0)