Skip to content

Commit

Permalink
fix: implicity nullable parameter deprecations (#207)
Browse files Browse the repository at this point in the history
  • Loading branch information
Korbeil authored Nov 25, 2024
2 parents f2b2552 + 35b4f76 commit 9c2f3a2
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Fixed
- [GH#207](https://github.com/jolicode/automapper/pull/207) Fix implicity nullable parameter deprecations

## [9.2.0] - 2024-11-19
### Added
Expand Down
2 changes: 1 addition & 1 deletion src/Extractor/FromSourceMappingExtractor.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public function getTypes(string $source, SourcePropertyMetadata $sourceProperty,
return $types;
}

private function transformType(string $target, Type $type = null): ?Type
private function transformType(string $target, ?Type $type = null): ?Type
{
if (null === $type) {
return null;
Expand Down
4 changes: 2 additions & 2 deletions src/Metadata/MetadataFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -326,8 +326,8 @@ public static function create(
MetadataRegistry $metadataRegistry,
ClassDiscriminatorResolver $classDiscriminatorResolver,
array $transformerFactories = [],
ClassMetadataFactory $classMetadataFactory = null,
AdvancedNameConverterInterface $nameConverter = null,
?ClassMetadataFactory $classMetadataFactory = null,
?AdvancedNameConverterInterface $nameConverter = null,
ExpressionLanguage $expressionLanguage = new ExpressionLanguage(),
EventDispatcherInterface $eventDispatcher = new EventDispatcher(),
): self {
Expand Down
2 changes: 1 addition & 1 deletion src/php-parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function create_scalar_int(int $value, array $attributes = []): Scalar\Int_|Scal
*
* @internal
*/
function create_expr_array_item(Expr $value, Expr $key = null, bool $byRef = false, array $attributes = [], bool $unpack = false): Node\ArrayItem|Expr\ArrayItem
function create_expr_array_item(Expr $value, ?Expr $key = null, bool $byRef = false, array $attributes = [], bool $unpack = false): Node\ArrayItem|Expr\ArrayItem
{
$class = class_exists(Node\ArrayItem::class) ? Node\ArrayItem::class : Expr\ArrayItem::class;

Expand Down

0 comments on commit 9c2f3a2

Please sign in to comment.