From d003500e591237405d01aa4cfa06a9d71df5768a Mon Sep 17 00:00:00 2001 From: Marc Duiker Date: Tue, 8 Jul 2025 18:10:34 +0200 Subject: [PATCH 1/2] Update markdown files to be compatible with the latest Hugo Signed-off-by: Marc Duiker --- daprdocs/content/en/php-sdk-docs/_index.md | 2 +- .../en/php-sdk-docs/php-actors/_index.md | 14 +++++----- .../php-actors/php-actor-reference.md | 20 +++++++------- .../php-sdk-docs/php-app/php-unit-testing.md | 26 +++++++++---------- .../en/php-sdk-docs/php-pubsub/_index.md | 14 +++++----- .../en/php-sdk-docs/php-state/_index.md | 16 ++++++------ 6 files changed, 46 insertions(+), 46 deletions(-) diff --git a/daprdocs/content/en/php-sdk-docs/_index.md b/daprdocs/content/en/php-sdk-docs/_index.md index 053717af..845f5360 100644 --- a/daprdocs/content/en/php-sdk-docs/_index.md +++ b/daprdocs/content/en/php-sdk-docs/_index.md @@ -113,4 +113,4 @@ Congratulations, you've created your first Dapr service! I'm excited to see what ## More Information - [Packagist](https://packagist.org/packages/dapr/php-sdk) -- [Dapr SDK serialization]({{< ref sdk-serialization.md >}}) +- [Dapr SDK serialization]({{% ref sdk-serialization.md %}}) diff --git a/daprdocs/content/en/php-sdk-docs/php-actors/_index.md b/daprdocs/content/en/php-sdk-docs/php-actors/_index.md index df54335c..bb6d3cc3 100644 --- a/daprdocs/content/en/php-sdk-docs/php-actors/_index.md +++ b/daprdocs/content/en/php-sdk-docs/php-actors/_index.md @@ -8,7 +8,7 @@ no_list: true --- If you're new to the actor pattern, the best place to learn about the actor pattern is in -the [Actor Overview.]({{< ref actors-overview.md >}}) +the [Actor Overview.]({{% ref actors-overview.md %}}) In the PHP SDK, there are two sides to an actor, the Client, and the Actor (aka, the Runtime). As a client of an actor, you'll interact with a remote actor via the `ActorProxy` class. This class generates a proxy class on-the-fly using one @@ -109,9 +109,9 @@ class CountState extends \Dapr\Actors\ActorState { Dapr expects to know what actors a service may host at startup. You need to add it to the configuration: -{{< tabs "Production" "Development" >}} +{{< tabpane text=true >}} -{{% codetab %}} +{{% tab header="Production" %}} If you want to take advantage of pre-compiled dependency injection, you need to use a factory: @@ -137,8 +137,8 @@ $app = \Dapr\App::create( $app->start(); ``` -{{% /codetab %}} -{{% codetab %}} +{{% /tab %}} +{{% tab header="Development" %}} ```php $builde $app->start(); ``` -{{% /codetab %}} -{{< /tabs >}} +{{% /tab %}} +{{< /tabpane >}} diff --git a/daprdocs/content/en/php-sdk-docs/php-actors/php-actor-reference.md b/daprdocs/content/en/php-sdk-docs/php-actors/php-actor-reference.md index fda8e960..0253934e 100644 --- a/daprdocs/content/en/php-sdk-docs/php-actors/php-actor-reference.md +++ b/daprdocs/content/en/php-sdk-docs/php-actors/php-actor-reference.md @@ -22,21 +22,21 @@ weigh during development and in production. It can be set with `dapr.actors.proxy.generation` configuration key. -{{< tabs "GENERATED" "GENERATED_CACHED" "ONLY_EXISTING" "DYNAMIC" >}} -{{% codetab %}} +{{< tabpane text=true >}} +{{% tab header="GENERATED" %}} This is the default mode. In this mode, a class is generated and `eval`'d on every request. It's mostly for development and shouldn't be used in production. -{{% /codetab %}} -{{% codetab %}} +{{% /tab %}} +{{% tab header="GENERATED_CACHED" %}} This is the same as `ProxyModes::GENERATED` except the class is stored in a tmp file so it doesn't need to be regenerated on every request. It doesn't know when to update the cached class, so using it in development is discouraged but is offered for when manually generating the files isn't possible. -{{% /codetab %}} -{{% codetab %}} +{{% /tab %}} +{{% tab header="ONLY_EXISTING" %}} In this mode, an exception is thrown if the proxy class doesn't exist. This is useful for when you don't want to generate code in production. You'll have to make sure the class is generated and pre-/autoloaded. @@ -104,15 +104,15 @@ return [ ]; ``` -{{% /codetab %}} -{{% codetab %}} +{{% /tab %}} +{{% tab header="DYNAMIC" %}} In this mode, the proxy satisfies the interface contract, however, it does not actually implement the interface itself (meaning `instanceof` will be `false`). This mode takes advantage of a few quirks in PHP to work and exists for cases where code cannot be `eval`'d or generated. -{{% /codetab %}} -{{< /tabs >}} +{{% /tab %}} +{{< /tabpane >}} ### Requests diff --git a/daprdocs/content/en/php-sdk-docs/php-app/php-unit-testing.md b/daprdocs/content/en/php-sdk-docs/php-app/php-unit-testing.md index b0f9a5de..5da0028b 100644 --- a/daprdocs/content/en/php-sdk-docs/php-app/php-unit-testing.md +++ b/daprdocs/content/en/php-sdk-docs/php-app/php-unit-testing.md @@ -17,9 +17,9 @@ With actors, there are two things we're interested in while the actor is under t 1. The returned result based on an initial state 2. The resulting state based on the initial state -{{< tabs "integration test with TestClient" "unit test" >}} +{{< tabpane text=true >}} -{{% codetab %}} +{{% tab header="integration test with TestClient" %}} Here's an example test a very simple actor that updates its state and returns a specific value: @@ -112,8 +112,8 @@ class TheTest extends \PHPUnit\Framework\TestCase } ``` -{{% /codetab %}} -{{% codetab %}} +{{% /tab %}} +{{% tab header="unit test" %}} ```php }} +{{< /tabpane >}} ## Testing Transactions When building on transactions, you'll likely want to test how a failed transaction is handled. In order to do that, you need to inject failures and ensure the transaction matches what you expect. -{{< tabs "integration test with TestClient" "unit test" >}} +{{< tabpane text=true >}} -{{% codetab %}} +{{% tab header="integration test with TestClient" %}} ```php getClient(); - // create a response from {{< ref state_api >}} + // create a response from {{% ref state_api %}} $client->register_post('/state/statestore/bulk', code: 200, response_data: [ [ 'key' => 'value', @@ -247,8 +247,8 @@ class TheTest extends \PHPUnit\Framework\TestCase { } ``` -{{% /codetab %}} -{{% codetab %}} +{{% /tab %}} +{{% tab header="unit test" %}} ```php }} +{{< /tabpane >}} diff --git a/daprdocs/content/en/php-sdk-docs/php-pubsub/_index.md b/daprdocs/content/en/php-sdk-docs/php-pubsub/_index.md index dfb1f3a4..e4dc6612 100644 --- a/daprdocs/content/en/php-sdk-docs/php-pubsub/_index.md +++ b/daprdocs/content/en/php-sdk-docs/php-pubsub/_index.md @@ -17,16 +17,16 @@ $app->post('/publish', function(\Dapr\Client\DaprClient $daprClient) { }); ``` -For more information about publish/subscribe, check out [the howto]({{< ref howto-publish-subscribe.md >}}). +For more information about publish/subscribe, check out [the howto]({{% ref howto-publish-subscribe.md %}}). ## Data content type The PHP SDK allows setting the data content type either when constructing a custom cloud event, or when publishing raw data. -{{< tabs CloudEvent "Raw" >}} +{{< tabpane text=true >}} -{{% codetab %}} +{{% tab header="CloudEvent" %}} ```php data = $xml; $event->data_content_type = 'application/xml'; ``` -{{% /codetab %}} -{{% codetab %}} +{{% /tab %}} +{{% tab header="Raw" %}} ```php }} +{{< /tabpane >}} ## Receiving cloud events diff --git a/daprdocs/content/en/php-sdk-docs/php-state/_index.md b/daprdocs/content/en/php-sdk-docs/php-state/_index.md index fe55ed1b..193bd4dc 100644 --- a/daprdocs/content/en/php-sdk-docs/php-state/_index.md +++ b/daprdocs/content/en/php-sdk-docs/php-state/_index.md @@ -8,7 +8,7 @@ no_list: true --- Dapr offers a great modular approach to using state in your application. The best way to learn the basics is to visit -[the howto]({{< ref howto-get-save-state.md >}}). +[the howto]({{% ref howto-get-save-state.md %}}). ## Metadata @@ -26,7 +26,7 @@ $app->run( $app->run(fn(\Dapr\Client\DaprClient $daprClient) => $daprClient->saveState(storeName: 'statestore', key: 'key', value: 'value', metadata: ['port' => '112'])) ``` -This is an example of how you might pass the port metadata to [Cassandra]({{< ref setup-cassandra.md >}}). +This is an example of how you might pass the port metadata to [Cassandra]({{% ref setup-cassandra.md %}}). Every state operation allows passing metadata. @@ -58,9 +58,9 @@ the load on the state store at the expense of performance. The default is `10`. Hardcoded key names are useful, but why not make state objects more reusable? When committing a transaction or saving an object to state, you can pass a prefix that is applied to every key in the object. -{{< tabs "Transaction prefix" "StateManager prefix" >}} +{{< tabpane text=true >}} -{{% codetab %}} +{{% tab header="Transaction prefix" %}} ```php run(function (TransactionObject $object ) { }); ``` -{{% /codetab %}} -{{% codetab %}} +{{% /tab %}} +{{% tab header="StateManager prefix" %}} ```php run(function(\Dapr\State\StateManager $stateManager) { }); ``` -{{% /codetab %}} +{{% /tab %}} -{{< /tabs >}} +{{< /tabpane >}} From f1bca4ffc3a7504d62f77d85c1967a9c05b61d20 Mon Sep 17 00:00:00 2001 From: Marc Duiker Date: Tue, 8 Jul 2025 18:10:34 +0200 Subject: [PATCH 2/2] Update markdown files to be compatible with the latest Hugo Signed-off-by: Marc Duiker --- daprdocs/content/en/php-sdk-docs/_index.md | 2 +- .../en/php-sdk-docs/php-actors/_index.md | 14 +++++----- .../php-actors/php-actor-reference.md | 20 +++++++------- .../php-sdk-docs/php-app/php-unit-testing.md | 26 +++++++++---------- .../en/php-sdk-docs/php-pubsub/_index.md | 14 +++++----- .../en/php-sdk-docs/php-state/_index.md | 16 ++++++------ 6 files changed, 46 insertions(+), 46 deletions(-) diff --git a/daprdocs/content/en/php-sdk-docs/_index.md b/daprdocs/content/en/php-sdk-docs/_index.md index 053717af..845f5360 100644 --- a/daprdocs/content/en/php-sdk-docs/_index.md +++ b/daprdocs/content/en/php-sdk-docs/_index.md @@ -113,4 +113,4 @@ Congratulations, you've created your first Dapr service! I'm excited to see what ## More Information - [Packagist](https://packagist.org/packages/dapr/php-sdk) -- [Dapr SDK serialization]({{< ref sdk-serialization.md >}}) +- [Dapr SDK serialization]({{% ref sdk-serialization.md %}}) diff --git a/daprdocs/content/en/php-sdk-docs/php-actors/_index.md b/daprdocs/content/en/php-sdk-docs/php-actors/_index.md index df54335c..bb6d3cc3 100644 --- a/daprdocs/content/en/php-sdk-docs/php-actors/_index.md +++ b/daprdocs/content/en/php-sdk-docs/php-actors/_index.md @@ -8,7 +8,7 @@ no_list: true --- If you're new to the actor pattern, the best place to learn about the actor pattern is in -the [Actor Overview.]({{< ref actors-overview.md >}}) +the [Actor Overview.]({{% ref actors-overview.md %}}) In the PHP SDK, there are two sides to an actor, the Client, and the Actor (aka, the Runtime). As a client of an actor, you'll interact with a remote actor via the `ActorProxy` class. This class generates a proxy class on-the-fly using one @@ -109,9 +109,9 @@ class CountState extends \Dapr\Actors\ActorState { Dapr expects to know what actors a service may host at startup. You need to add it to the configuration: -{{< tabs "Production" "Development" >}} +{{< tabpane text=true >}} -{{% codetab %}} +{{% tab header="Production" %}} If you want to take advantage of pre-compiled dependency injection, you need to use a factory: @@ -137,8 +137,8 @@ $app = \Dapr\App::create( $app->start(); ``` -{{% /codetab %}} -{{% codetab %}} +{{% /tab %}} +{{% tab header="Development" %}} ```php $builde $app->start(); ``` -{{% /codetab %}} -{{< /tabs >}} +{{% /tab %}} +{{< /tabpane >}} diff --git a/daprdocs/content/en/php-sdk-docs/php-actors/php-actor-reference.md b/daprdocs/content/en/php-sdk-docs/php-actors/php-actor-reference.md index fda8e960..0253934e 100644 --- a/daprdocs/content/en/php-sdk-docs/php-actors/php-actor-reference.md +++ b/daprdocs/content/en/php-sdk-docs/php-actors/php-actor-reference.md @@ -22,21 +22,21 @@ weigh during development and in production. It can be set with `dapr.actors.proxy.generation` configuration key. -{{< tabs "GENERATED" "GENERATED_CACHED" "ONLY_EXISTING" "DYNAMIC" >}} -{{% codetab %}} +{{< tabpane text=true >}} +{{% tab header="GENERATED" %}} This is the default mode. In this mode, a class is generated and `eval`'d on every request. It's mostly for development and shouldn't be used in production. -{{% /codetab %}} -{{% codetab %}} +{{% /tab %}} +{{% tab header="GENERATED_CACHED" %}} This is the same as `ProxyModes::GENERATED` except the class is stored in a tmp file so it doesn't need to be regenerated on every request. It doesn't know when to update the cached class, so using it in development is discouraged but is offered for when manually generating the files isn't possible. -{{% /codetab %}} -{{% codetab %}} +{{% /tab %}} +{{% tab header="ONLY_EXISTING" %}} In this mode, an exception is thrown if the proxy class doesn't exist. This is useful for when you don't want to generate code in production. You'll have to make sure the class is generated and pre-/autoloaded. @@ -104,15 +104,15 @@ return [ ]; ``` -{{% /codetab %}} -{{% codetab %}} +{{% /tab %}} +{{% tab header="DYNAMIC" %}} In this mode, the proxy satisfies the interface contract, however, it does not actually implement the interface itself (meaning `instanceof` will be `false`). This mode takes advantage of a few quirks in PHP to work and exists for cases where code cannot be `eval`'d or generated. -{{% /codetab %}} -{{< /tabs >}} +{{% /tab %}} +{{< /tabpane >}} ### Requests diff --git a/daprdocs/content/en/php-sdk-docs/php-app/php-unit-testing.md b/daprdocs/content/en/php-sdk-docs/php-app/php-unit-testing.md index b0f9a5de..5da0028b 100644 --- a/daprdocs/content/en/php-sdk-docs/php-app/php-unit-testing.md +++ b/daprdocs/content/en/php-sdk-docs/php-app/php-unit-testing.md @@ -17,9 +17,9 @@ With actors, there are two things we're interested in while the actor is under t 1. The returned result based on an initial state 2. The resulting state based on the initial state -{{< tabs "integration test with TestClient" "unit test" >}} +{{< tabpane text=true >}} -{{% codetab %}} +{{% tab header="integration test with TestClient" %}} Here's an example test a very simple actor that updates its state and returns a specific value: @@ -112,8 +112,8 @@ class TheTest extends \PHPUnit\Framework\TestCase } ``` -{{% /codetab %}} -{{% codetab %}} +{{% /tab %}} +{{% tab header="unit test" %}} ```php }} +{{< /tabpane >}} ## Testing Transactions When building on transactions, you'll likely want to test how a failed transaction is handled. In order to do that, you need to inject failures and ensure the transaction matches what you expect. -{{< tabs "integration test with TestClient" "unit test" >}} +{{< tabpane text=true >}} -{{% codetab %}} +{{% tab header="integration test with TestClient" %}} ```php getClient(); - // create a response from {{< ref state_api >}} + // create a response from {{% ref state_api %}} $client->register_post('/state/statestore/bulk', code: 200, response_data: [ [ 'key' => 'value', @@ -247,8 +247,8 @@ class TheTest extends \PHPUnit\Framework\TestCase { } ``` -{{% /codetab %}} -{{% codetab %}} +{{% /tab %}} +{{% tab header="unit test" %}} ```php }} +{{< /tabpane >}} diff --git a/daprdocs/content/en/php-sdk-docs/php-pubsub/_index.md b/daprdocs/content/en/php-sdk-docs/php-pubsub/_index.md index dfb1f3a4..e4dc6612 100644 --- a/daprdocs/content/en/php-sdk-docs/php-pubsub/_index.md +++ b/daprdocs/content/en/php-sdk-docs/php-pubsub/_index.md @@ -17,16 +17,16 @@ $app->post('/publish', function(\Dapr\Client\DaprClient $daprClient) { }); ``` -For more information about publish/subscribe, check out [the howto]({{< ref howto-publish-subscribe.md >}}). +For more information about publish/subscribe, check out [the howto]({{% ref howto-publish-subscribe.md %}}). ## Data content type The PHP SDK allows setting the data content type either when constructing a custom cloud event, or when publishing raw data. -{{< tabs CloudEvent "Raw" >}} +{{< tabpane text=true >}} -{{% codetab %}} +{{% tab header="CloudEvent" %}} ```php data = $xml; $event->data_content_type = 'application/xml'; ``` -{{% /codetab %}} -{{% codetab %}} +{{% /tab %}} +{{% tab header="Raw" %}} ```php }} +{{< /tabpane >}} ## Receiving cloud events diff --git a/daprdocs/content/en/php-sdk-docs/php-state/_index.md b/daprdocs/content/en/php-sdk-docs/php-state/_index.md index fe55ed1b..193bd4dc 100644 --- a/daprdocs/content/en/php-sdk-docs/php-state/_index.md +++ b/daprdocs/content/en/php-sdk-docs/php-state/_index.md @@ -8,7 +8,7 @@ no_list: true --- Dapr offers a great modular approach to using state in your application. The best way to learn the basics is to visit -[the howto]({{< ref howto-get-save-state.md >}}). +[the howto]({{% ref howto-get-save-state.md %}}). ## Metadata @@ -26,7 +26,7 @@ $app->run( $app->run(fn(\Dapr\Client\DaprClient $daprClient) => $daprClient->saveState(storeName: 'statestore', key: 'key', value: 'value', metadata: ['port' => '112'])) ``` -This is an example of how you might pass the port metadata to [Cassandra]({{< ref setup-cassandra.md >}}). +This is an example of how you might pass the port metadata to [Cassandra]({{% ref setup-cassandra.md %}}). Every state operation allows passing metadata. @@ -58,9 +58,9 @@ the load on the state store at the expense of performance. The default is `10`. Hardcoded key names are useful, but why not make state objects more reusable? When committing a transaction or saving an object to state, you can pass a prefix that is applied to every key in the object. -{{< tabs "Transaction prefix" "StateManager prefix" >}} +{{< tabpane text=true >}} -{{% codetab %}} +{{% tab header="Transaction prefix" %}} ```php run(function (TransactionObject $object ) { }); ``` -{{% /codetab %}} -{{% codetab %}} +{{% /tab %}} +{{% tab header="StateManager prefix" %}} ```php run(function(\Dapr\State\StateManager $stateManager) { }); ``` -{{% /codetab %}} +{{% /tab %}} -{{< /tabs >}} +{{< /tabpane >}}