Download the PHP package temporal-php/support without Composer

On this page you can find all versions of the php package temporal-php/support. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package support

Temporal PHP Support

Enhance your development experience with Temporal


The package includes attributes, helpers, factories, interfaces, interceptors, etc. to enhance the developer experience when using the Temporal PHP SDK.

Installation

To install the package in your PHP application, add it as a dev dependency to your project using Composer:

PHP Latest Version on Packagist Total Downloads

Usage

Factories

The package provides factories to create Activity and Worker stubs in a more convenient way. With these factories, there is less code because all nested options are moved to the parameters of one method.

Use the \Temporal\Support\Factory\ActivityStub factory to create an Activity stub:

Use the \Temporal\Support\Factory\WorkflowStub factory to create a Workflow stub in a client scope:

Or create a Child Workflow stub in a workflow scope:

Attributes

Attributes can be used on Workflow or Activity definitions to set default stub options.

[!NOTE] Attributes will work only if you use the Activity and Worker factories from this package.

[!WARNING] Use attributes on the definitions that you use in factories. So, if you separate interfaces and implementation, apply attributes to the interfaces.

VirtualPromise interface

Every time we use yield in a Workflow to wait for an action to complete, a Promise is actually yielded. At this point, the IDE and static analyzer usually get lost in type definitions, and we experience difficulties and inconveniences because of this. However, if the Promise interface had the @yield annotation, we could explain to the IDE what type of value we expect to be sent back into the generator from the coroutine. Since ReactPHP isn't yet planning to add the @yield annotation to their promises (Temporal PHP uses ReactPHP promises), we suggest using our solution for typing - VirtualPromise.

[!WARNING] don't implement the VirtualPromise interface yourself, use it only as a type hint.

[!NOTE] PHPStorm and Psalm can handle the @yield annotation, but PHPStan can't yet (issue).

Contributing

We believe in the power of community-driven development. Here's how you can contribute:


All versions of support with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
temporal/sdk Version ^2.8
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package temporal-php/support contains the following files

Loading the files please wait ....