Skip to content
Open
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
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "3.16.0"
".": "3.16.1"
}
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## 3.16.1 (2026-03-03)

Full Changelog: [v3.16.0...v3.16.1](https://github.com/browserbase/stagehand-php/compare/v3.16.0...v3.16.1)

### Chores

* **internal:** codegen related update ([20b3106](https://github.com/browserbase/stagehand-php/commit/20b3106f3919092115a690e43bb4641dccd91aad))
* **internal:** upgrade phpunit ([b09b7ff](https://github.com/browserbase/stagehand-php/commit/b09b7ffb3644b16039aa400ed430deeb993e18ce))

## 3.16.0 (2026-02-25)

Full Changelog: [v3.15.0...v3.16.0](https://github.com/browserbase/stagehand-php/compare/v3.15.0...v3.16.0)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ The REST API documentation can be found on [docs.stagehand.dev](https://docs.sta
<!-- x-release-please-start-version -->

```
composer require "browserbase/stagehand 3.16.0"
composer require "browserbase/stagehand 3.16.1"
```

<!-- x-release-please-end -->
Expand Down
120 changes: 66 additions & 54 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 31 additions & 0 deletions src/Core/Conversion.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,37 @@ private static function tryConvert(Converter|ConverterSource|string $target, mix

return $value;

case 'DateTimeInterface':
case 'DateTimeImmutable':
if (is_string($value)) {
try {
++$state->maybe;

return new \DateTimeImmutable($value);
} catch (\Exception) {
--$state->maybe;
}
}

++$state->no;

return $value;

case 'DateTime':
if (is_string($value)) {
try {
++$state->maybe;

return new \DateTime($value);
} catch (\Exception) {
--$state->maybe;
}
}

++$state->no;

return $value;

default:
++$state->no;

Expand Down
2 changes: 1 addition & 1 deletion src/Version.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
namespace Stagehand;

// x-release-please-start-version
const VERSION = '3.16.0';
const VERSION = '3.16.1';
// x-release-please-end