File tree Expand file tree Collapse file tree 3 files changed +22
-3
lines changed
Expand file tree Collapse file tree 3 files changed +22
-3
lines changed Original file line number Diff line number Diff line change 11# Changelog
22
3+ ## 8.0.6 (2024-01-17)
4+
5+ * Fixed optional nullable parameters with another case
6+
37## 8.0.5 (2024-01-14)
48
59* Restrict deprecated support for methods and functions without a return type to user-defined methods and functions
Original file line number Diff line number Diff line change @@ -80,8 +80,7 @@ private function isNonOptionalNullable(ReflectionParameter $parameter): bool
8080 $ type = $ parameter ->getType ();
8181 return $ type instanceof ReflectionNamedType
8282 && 'mixed ' !== $ type ->getName ()
83- && !$ parameter ->isOptional ()
84- && $ parameter ->allowsNull ();
83+ && ($ parameter ->isOptional () || $ parameter ->allowsNull ());
8584 }
8685
8786 private function defaultValue (ReflectionParameter $ parameter ): string
Original file line number Diff line number Diff line change 1010 */
1111namespace bovigo \callmap ;
1212
13+ use PDOStatement ;
1314use PHPUnit \Framework \Attributes \Group ;
1415use PHPUnit \Framework \Attributes \RequiresPhpExtension ;
1516use PHPUnit \Framework \Attributes \Test ;
2223 * @since 8.0.4
2324 */
2425#[Group('bug_nonoptional_nullable ' )]
25- #[RequiresPhpExtension('xsl ' )]
2626class NonOptionalNullableTest extends TestCase
2727{
2828 /**
2929 * XSLTProcessor::setProfiling(?string $filename) has
3030 * a non-optional nullable parameter.
3131 */
3232 #[Test]
33+ #[Group('xsl ' )]
34+ #[RequiresPhpExtension('xsl ' )]
3335 public function canCreateClassProxy (): void
3436 {
3537 assertInstanceOf (
3638 ClassProxy::class,
3739 NewInstance::of (XSLTProcessor::class)
3840 );
3941 }
42+
43+ /**
44+ * @since 8.0.6
45+ */
46+ #[Test]
47+ #[Group('pdo ' )]
48+ #[RequiresPhpExtension('pdo ' )]
49+ public function canCreatePdoStatementProxy (): void
50+ {
51+ assertInstanceOf (
52+ ClassProxy::class,
53+ NewInstance::of (PDOStatement::class)
54+ );
55+ }
4056}
You can’t perform that action at this time.
0 commit comments