Skip to content

Commit e41cdfd

Browse files
authored
Merge pull request #247 from techdivision/PAC-950
2 parents 371ec98 + e74e6cf commit e41cdfd

68 files changed

Lines changed: 408 additions & 377 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
# Version 18.1.0
2+
3+
## Features
4+
5+
### PHP 8.4 Compatibility
6+
7+
* Update dependencies
8+
* Add PHP 8.4 support
9+
* Replace abandoned `swiftmailer/swiftmailer` with `symfony/mailer`
10+
111
# Version 18.0.0
212

313
### PHP 8.1 Compatibility

composer.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,22 @@
44
"license": "MIT",
55
"require": {
66
"php": "^8.1",
7-
"psr/log": "^1.0.0|^2.0.0|^3.0.0",
8-
"psr/cache" : "^2.0.0|^3.0.0",
7+
"psr/log": "^1.0|^2.0|^3.0",
8+
"psr/cache" : "^2.0|^3.0",
99
"psr/container": "^1.1.2",
10-
"handcraftedinthealps/goodby-csv": "^1.4.2",
10+
"handcraftedinthealps/goodby-csv": "^1.4",
1111
"monolog/monolog": "^2.9|^3.7",
12-
"league/event": "^2.2.0",
12+
"league/event": "^2.2",
1313
"ramsey/uuid": "^4.2|^4.7",
14-
"swiftmailer/swiftmailer": "v6.3.0",
15-
"laminas/laminas-filter": "^2.31.0",
16-
"techdivision/import-dbal": "^2.0.0",
17-
"techdivision/import-dbal-collection": "^2.0.0",
18-
"techdivision/import-cache": "^2.0.0",
19-
"techdivision/import-cache-collection": "^2.0.0",
20-
"techdivision/import-serializer": "^2.0.0",
21-
"techdivision/import-serializer-csv": "^2.0.0",
22-
"techdivision/import-configuration": "^6.0.0.",
14+
"symfony/mailer": "^5.4|^6.4",
15+
"laminas/laminas-filter": "^2.31",
16+
"techdivision/import-dbal": "^2.0",
17+
"techdivision/import-dbal-collection": "^2.1",
18+
"techdivision/import-cache": "^2.0",
19+
"techdivision/import-cache-collection": "^2.0",
20+
"techdivision/import-serializer": "^2.1",
21+
"techdivision/import-serializer-csv": "^2.1",
22+
"techdivision/import-configuration": "^6.1",
2323
"ext-json": "*",
2424
"ext-zip": "*"
2525
},

src/Adapter/Goodby/Lexer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class Lexer implements LexerInterface
4343
*
4444
* @param \Goodby\CSV\Import\Standard\LexerConfig $config The lexer configuration
4545
*/
46-
public function __construct(LexerConfig $config = null)
46+
public function __construct(?LexerConfig $config = null)
4747
{
4848

4949
// query whether or not a configuration has been passed

src/Adapter/SerializerAwareAdapterInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public function explode($value = null, $delimiter = null);
4848
*
4949
* @return string|null The compatected value
5050
*/
51-
public function implode(array $value = null, $delimiter = null);
51+
public function implode(?array $value = null, $delimiter = null);
5252

5353
/**
5454
* Serializes the elements of the passed array.
@@ -57,7 +57,7 @@ public function implode(array $value = null, $delimiter = null);
5757
*
5858
* @return string The serialized array
5959
*/
60-
public function serialize(array $unserialized = null);
60+
public function serialize(?array $unserialized = null);
6161

6262
/**
6363
* Unserializes the elements of the passed string.

src/Adapter/SerializerTrait.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public function explode($value = null, $delimiter = null)
8080
*
8181
* @return string|null The compatected value
8282
*/
83-
public function implode(array $value = null, $delimiter = null)
83+
public function implode(?array $value = null, $delimiter = null)
8484
{
8585
return $this->getSerializer()->implode($value, $delimiter);
8686
}
@@ -93,7 +93,7 @@ public function implode(array $value = null, $delimiter = null)
9393
*
9494
* @return string The serialized array
9595
*/
96-
public function serialize(array $unserialized = null, $delimiter = null)
96+
public function serialize(?array $unserialized = null, $delimiter = null)
9797
{
9898
return $this->getSerializer()->serialize($unserialized, $delimiter);
9999
}

src/Callbacks/AbstractBooleanCallback.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ abstract class AbstractBooleanCallback extends AbstractCallback
5050
*
5151
* @return mixed The modified value
5252
*/
53-
public function handle(AttributeCodeAndValueAwareObserverInterface $observer = null)
53+
public function handle(?AttributeCodeAndValueAwareObserverInterface $observer = null)
5454
{
5555

5656
// set the observer
@@ -100,7 +100,7 @@ public function handle(AttributeCodeAndValueAwareObserverInterface $observer = n
100100
// return NULL, if NO value can be mapped to a boolean representation
101101
return;
102102
}
103-
103+
104104
// throw an exception if the attribute is not available
105105
throw new \Exception(
106106
$this->appendExceptionSuffix(

src/Callbacks/AbstractCallback.php

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

1515
namespace TechDivision\Import\Callbacks;
1616

17+
use Exception;
1718
use TechDivision\Import\Observers\ObserverInterface;
1819

1920
/**
@@ -108,14 +109,14 @@ protected function appendExceptionSuffix($message = null, $filename = null, $lin
108109
* line number and column name and use it for a detailed exception message.
109110
*
110111
* @param string $columnName The column name that should be resolved
111-
* @param \Exception $parent The exception we want to wrap
112+
* @param Exception|null $parent The exception we want to wrap
112113
* @param string $className The class name of the exception type we want to wrap the parent one
113114
*
114-
* @return \Exception the wrapped exception
115+
* @return Exception the wrapped exception
115116
*/
116117
protected function wrapException(
117118
$columnName,
118-
\Exception $parent = null,
119+
?Exception $parent = null,
119120
$className = '\TechDivision\Import\Exceptions\WrappedColumnException'
120121
) {
121122
return $this->getSubject()->wrapException($columnName, $parent, $className);
@@ -130,7 +131,7 @@ protected function isDebugMode()
130131
{
131132
return $this->getSubject()->isDebugMode();
132133
}
133-
134+
134135
/**
135136
* Queries whether or not strict mode is enabled or not, default is True.
136137
* Backward compatibility
@@ -181,7 +182,7 @@ protected function mergeAttributesRecursive(array $status)
181182
*
182183
* @return mixed|null The, almost formatted, value
183184
*/
184-
protected function getValue($name, $default = null, callable $callback = null)
185+
protected function getValue($name, $default = null, ?callable $callback = null)
185186
{
186187
return $this->getSubject()->getValue($name, $default, $callback);
187188
}
@@ -192,7 +193,7 @@ protected function getValue($name, $default = null, callable $callback = null)
192193
* @param string $storeViewCode The store view code to return the store ID for
193194
*
194195
* @return integer The ID of the store with the passed ID
195-
* @throws \Exception Is thrown, if the store with the actual code is not available
196+
* @throws Exception Is thrown, if the store with the actual code is not available
196197
*/
197198
protected function getStoreId($storeViewCode)
198199
{
@@ -206,7 +207,7 @@ protected function getStoreId($storeViewCode)
206207
* @param string|null $default The default store view code to use, if no store view code is set in the CSV file
207208
*
208209
* @return integer The ID of the actual store
209-
* @throws \Exception Is thrown, if the store with the actual code is not available
210+
* @throws Exception Is thrown, if the store with the actual code is not available
210211
*/
211212
protected function getRowStoreId($default = null)
212213
{

src/Callbacks/AbstractMultiselectCallback.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ abstract class AbstractMultiselectCallback extends AbstractEavAwareCallback
3838
*
3939
* @return mixed The modified value
4040
*/
41-
public function handle(AttributeCodeAndValueAwareObserverInterface $observer = null)
41+
public function handle(?AttributeCodeAndValueAwareObserverInterface $observer = null)
4242
{
4343

4444
// set the observer

src/Callbacks/AbstractSelectCallback.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ abstract class AbstractSelectCallback extends AbstractEavAwareCallback
3838
*
3939
* @return mixed The modified value
4040
*/
41-
public function handle(AttributeCodeAndValueAwareObserverInterface $observer = null)
41+
public function handle(?AttributeCodeAndValueAwareObserverInterface $observer = null)
4242
{
4343

4444
// set the observer
@@ -100,7 +100,7 @@ public function handle(AttributeCodeAndValueAwareObserverInterface $observer = n
100100
// return NULL, if the value can't be mapped to an option
101101
return;
102102
}
103-
103+
104104
// throw an exception if the attribute is NOT
105105
// available and we're in strict mode
106106
throw new \Exception(

src/Exceptions/InvalidDataException.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ class InvalidDataException extends \Exception
3434
*
3535
* @param string $message [optional] The Exception message to throw.
3636
* @param int $code [optional] The Exception code.
37-
* @param null|Throwable $previous [optional] The previous throwable used for the exception chaining.
37+
* @param Throwable|null $previous [optional] The previous throwable used for the exception chaining.
3838
*/
39-
public function __construct($message = "", $code = self::INVALID_DATA_CODE, Throwable $previous = null)
39+
public function __construct($message = "", $code = self::INVALID_DATA_CODE, ?Throwable $previous = null)
4040
{
4141
parent::__construct($message, $code, $previous);
4242
}

0 commit comments

Comments
 (0)