diff --git a/.github/workflows/publish-packagist.yml b/.github/workflows/publish-packagist.yml index b299f7f..c632370 100644 --- a/.github/workflows/publish-packagist.yml +++ b/.github/workflows/publish-packagist.yml @@ -2,6 +2,9 @@ name: Publish Packagist on: workflow_dispatch: + release: + types: [published] + jobs: publish: name: publish diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 4336a6c..85b7578 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "3.15.0" + ".": "3.15.1" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 27548de..ea1fdd4 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 8 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase%2Fstagehand-5d0052068f044366d6d31570d9712922c9a80fdd6f9995af815e9afc075507ef.yml -openapi_spec_hash: c0cb787da075d8cd2d938c05b36b5efa -config_hash: 4252fc025e947bc0fd6b2abd91a0cc8e +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase%2Fstagehand-6fd391f729eb05dc7b6168adff89e6198bc545ebd4ff737494d72288870e0977.yml +openapi_spec_hash: ee16862542659f47acc8dcd5669c7623 +config_hash: 7386d24e2f03a3b2a89b3f6881446348 diff --git a/CHANGELOG.md b/CHANGELOG.md index bed625a..946a17b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # Changelog +## 3.15.1 (2026-02-20) + +Full Changelog: [v3.15.0...v3.15.1](https://github.com/browserbase/stagehand-php/compare/v3.15.0...v3.15.1) + +### Chores + +* **internal:** remove mock server code ([084d88e](https://github.com/browserbase/stagehand-php/commit/084d88e9049da3fc2acca9f2077cb37eb5dacd8a)) +* **release:** add packagist trigger on published release ([61d3be2](https://github.com/browserbase/stagehand-php/commit/61d3be273bc999a751fc060e338edd784c30136e)) +* update mock server docs ([3a5e75e](https://github.com/browserbase/stagehand-php/commit/3a5e75efcd92d87945e5f4970c5deef392e6f98a)) + ## 3.15.0 (2026-02-18) Full Changelog: [v3.14.0...v3.15.0](https://github.com/browserbase/stagehand-php/compare/v3.14.0...v3.15.0) diff --git a/README.md b/README.md index f6147b6..d62b538 100644 --- a/README.md +++ b/README.md @@ -80,7 +80,7 @@ The REST API documentation can be found on [docs.stagehand.dev](https://docs.sta ``` -composer require "browserbase/stagehand 3.15.0" +composer require "browserbase/stagehand 3.15.1" ``` diff --git a/scripts/mock b/scripts/mock deleted file mode 100755 index 0b28f6e..0000000 --- a/scripts/mock +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/env bash - -set -e - -cd "$(dirname "$0")/.." - -if [[ -n "$1" && "$1" != '--'* ]]; then - URL="$1" - shift -else - URL="$(grep 'openapi_spec_url' .stats.yml | cut -d' ' -f2)" -fi - -# Check if the URL is empty -if [ -z "$URL" ]; then - echo "Error: No OpenAPI spec path/url provided or found in .stats.yml" - exit 1 -fi - -echo "==> Starting mock server with URL ${URL}" - -# Run prism mock on the given spec -if [ "$1" == "--daemon" ]; then - npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock "$URL" &> .prism.log & - - # Wait for server to come online - echo -n "Waiting for server" - while ! grep -q "✖ fatal\|Prism is listening" ".prism.log" ; do - echo -n "." - sleep 0.1 - done - - if grep -q "✖ fatal" ".prism.log"; then - cat .prism.log - exit 1 - fi - - echo -else - npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock "$URL" -fi diff --git a/scripts/test b/scripts/test index 4b777e0..63df137 100755 --- a/scripts/test +++ b/scripts/test @@ -4,52 +4,6 @@ set -e cd "$(dirname "$0")/.." -RED='\033[0;31m' -GREEN='\033[0;32m' -YELLOW='\033[0;33m' -NC='\033[0m' # No Color -function prism_is_running() { - curl --silent "http://localhost:4010" >/dev/null 2>&1 -} - -kill_server_on_port() { - pids=$(lsof -t -i tcp:"$1" || echo "") - if [ "$pids" != "" ]; then - kill "$pids" - echo "Stopped $pids." - fi -} - -function is_overriding_api_base_url() { - [ -n "$TEST_API_BASE_URL" ] -} - -if ! is_overriding_api_base_url && ! prism_is_running ; then - # When we exit this script, make sure to kill the background mock server process - trap 'kill_server_on_port 4010' EXIT - - # Start the dev server - ./scripts/mock --daemon -fi - -if is_overriding_api_base_url ; then - echo -e "${GREEN}✔ Running tests against ${TEST_API_BASE_URL}${NC}" - echo -elif ! prism_is_running ; then - echo -e "${RED}ERROR:${NC} The test suite will not run without a mock Prism server" - echo -e "running against your OpenAPI spec." - echo - echo -e "To run the server, pass in the path or url of your OpenAPI" - echo -e "spec to the prism command:" - echo - echo -e " \$ ${YELLOW}npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock path/to/your.openapi.yml${NC}" - echo - - exit 1 -else - echo -e "${GREEN}✔ Mock prism server is running with your OpenAPI spec${NC}" - echo -fi exec -- ./vendor/bin/pest --colors=always diff --git a/src/Version.php b/src/Version.php index e076d54..eb5d29e 100644 --- a/src/Version.php +++ b/src/Version.php @@ -5,5 +5,5 @@ namespace Stagehand; // x-release-please-start-version -const VERSION = '3.15.0'; +const VERSION = '3.15.1'; // x-release-please-end diff --git a/tests/Services/SessionsTest.php b/tests/Services/SessionsTest.php index ab14125..14abf28 100644 --- a/tests/Services/SessionsTest.php +++ b/tests/Services/SessionsTest.php @@ -44,7 +44,7 @@ protected function setUp(): void public function testAct(): void { if (UnsupportedMockTests::$skip) { - $this->markTestSkipped('Prism tests are disabled'); + $this->markTestSkipped('Mock server tests are disabled'); } $result = $this->client->sessions->act( @@ -60,7 +60,7 @@ public function testAct(): void public function testActWithOptionalParams(): void { if (UnsupportedMockTests::$skip) { - $this->markTestSkipped('Prism tests are disabled'); + $this->markTestSkipped('Mock server tests are disabled'); } $result = $this->client->sessions->act( @@ -88,7 +88,7 @@ public function testActWithOptionalParams(): void public function testEnd(): void { if (UnsupportedMockTests::$skip) { - $this->markTestSkipped('Prism tests are disabled'); + $this->markTestSkipped('Mock server tests are disabled'); } $result = $this->client->sessions->end( @@ -103,7 +103,7 @@ public function testEnd(): void public function testExecute(): void { if (UnsupportedMockTests::$skip) { - $this->markTestSkipped('Prism tests are disabled'); + $this->markTestSkipped('Mock server tests are disabled'); } $result = $this->client->sessions->execute( @@ -122,7 +122,7 @@ public function testExecute(): void public function testExecuteWithOptionalParams(): void { if (UnsupportedMockTests::$skip) { - $this->markTestSkipped('Prism tests are disabled'); + $this->markTestSkipped('Mock server tests are disabled'); } $result = $this->client->sessions->execute( @@ -163,7 +163,7 @@ public function testExecuteWithOptionalParams(): void public function testExtract(): void { if (UnsupportedMockTests::$skip) { - $this->markTestSkipped('Prism tests are disabled'); + $this->markTestSkipped('Mock server tests are disabled'); } $result = $this->client->sessions->extract( @@ -178,7 +178,7 @@ public function testExtract(): void public function testNavigate(): void { if (UnsupportedMockTests::$skip) { - $this->markTestSkipped('Prism tests are disabled'); + $this->markTestSkipped('Mock server tests are disabled'); } $result = $this->client->sessions->navigate( @@ -194,7 +194,7 @@ public function testNavigate(): void public function testNavigateWithOptionalParams(): void { if (UnsupportedMockTests::$skip) { - $this->markTestSkipped('Prism tests are disabled'); + $this->markTestSkipped('Mock server tests are disabled'); } $result = $this->client->sessions->navigate( @@ -216,7 +216,7 @@ public function testNavigateWithOptionalParams(): void public function testObserve(): void { if (UnsupportedMockTests::$skip) { - $this->markTestSkipped('Prism tests are disabled'); + $this->markTestSkipped('Mock server tests are disabled'); } $result = $this->client->sessions->observe( @@ -231,7 +231,7 @@ public function testObserve(): void public function testReplay(): void { if (UnsupportedMockTests::$skip) { - $this->markTestSkipped('Prism tests are disabled'); + $this->markTestSkipped('Mock server tests are disabled'); } $result = $this->client->sessions->replay( @@ -246,7 +246,7 @@ public function testReplay(): void public function testStart(): void { if (UnsupportedMockTests::$skip) { - $this->markTestSkipped('Prism tests are disabled'); + $this->markTestSkipped('Mock server tests are disabled'); } $result = $this->client->sessions->start(modelName: 'openai/gpt-4o'); @@ -259,7 +259,7 @@ public function testStart(): void public function testStartWithOptionalParams(): void { if (UnsupportedMockTests::$skip) { - $this->markTestSkipped('Prism tests are disabled'); + $this->markTestSkipped('Mock server tests are disabled'); } $result = $this->client->sessions->start(