Dagger
Search

php-sdk-dev

Toolchain to develop the Dagger PHP SDK (experimental)

Installation

dagger install github.com/sipsma/dagger/toolchains/php-sdk-dev@deb8691f38f37829fc0b8d952228bd9d6cebc429

Entrypoint

Return Type
PhpSdkDev !
Arguments
NameTypeDefault ValueDescription
workspaceDirDirectory -A directory with all the files needed to develop the SDK
sourcePathString !"sdk/php"The path of the SDK source in the workspace
doctumConfigPathString !"docs/doctum-config.php"The path of the doctum config in the workspace
Example
dagger -m github.com/sipsma/dagger/toolchains/php-sdk-dev@deb8691f38f37829fc0b8d952228bd9d6cebc429 call \
 --source-path string --doctum-config-path string
func (m *MyModule) Example(sourcePath string, doctumConfigPath string) *dagger.PhpSdkDev  {
	return dag.
			Phpsdkdev(sourcePath, doctumConfigPath)
}
@function
def example(sourcepath: str, doctumconfigpath: str) -> dagger.PhpSdkDev:
	return (
		dag.php_sdk_dev(sourcepath, doctumconfigpath)
	)
@func()
example(sourcePath: string, doctumConfigPath: string): PhpSdkDev {
	return dag
		.phpSdkDev(sourcePath, doctumConfigPath)
}

Types

PhpSdkDev 🔗

api() 🔗

Regenerate the PHP SDK API

Return Type
Changeset !
Example
dagger -m github.com/sipsma/dagger/toolchains/php-sdk-dev@deb8691f38f37829fc0b8d952228bd9d6cebc429 call \
 --source-path string --doctum-config-path string api
func (m *MyModule) Example(sourcePath string, doctumConfigPath string) *dagger.Changeset  {
	return dag.
			Phpsdkdev(sourcePath, doctumConfigPath).
			Api()
}
@function
def example(sourcepath: str, doctumconfigpath: str) -> dagger.Changeset:
	return (
		dag.php_sdk_dev(sourcepath, doctumconfigpath)
		.api()
	)
@func()
example(sourcePath: string, doctumConfigPath: string): Changeset {
	return dag
		.phpSdkDev(sourcePath, doctumConfigPath)
		.api()
}

baseContainer() 🔗

Return Type
Container !
Example
dagger -m github.com/sipsma/dagger/toolchains/php-sdk-dev@deb8691f38f37829fc0b8d952228bd9d6cebc429 call \
 --source-path string --doctum-config-path string base-container
func (m *MyModule) Example(sourcePath string, doctumConfigPath string) *dagger.Container  {
	return dag.
			Phpsdkdev(sourcePath, doctumConfigPath).
			Basecontainer()
}
@function
def example(sourcepath: str, doctumconfigpath: str) -> dagger.Container:
	return (
		dag.php_sdk_dev(sourcepath, doctumconfigpath)
		.basecontainer()
	)
@func()
example(sourcePath: string, doctumConfigPath: string): Container {
	return dag
		.phpSdkDev(sourcePath, doctumConfigPath)
		.baseContainer()
}

bump() 🔗

Bump the PHP SDK’s Engine dependency

Return Type
Changeset !
Arguments
NameTypeDefault ValueDescription
versionString !-No description provided
Example
dagger -m github.com/sipsma/dagger/toolchains/php-sdk-dev@deb8691f38f37829fc0b8d952228bd9d6cebc429 call \
 --source-path string --doctum-config-path string bump --version string
func (m *MyModule) Example(sourcePath string, doctumConfigPath string, version string) *dagger.Changeset  {
	return dag.
			Phpsdkdev(sourcePath, doctumConfigPath).
			Bump(version)
}
@function
def example(sourcepath: str, doctumconfigpath: str, version: str) -> dagger.Changeset:
	return (
		dag.php_sdk_dev(sourcepath, doctumconfigpath)
		.bump(version)
	)
@func()
example(sourcePath: string, doctumConfigPath: string, version: string): Changeset {
	return dag
		.phpSdkDev(sourcePath, doctumConfigPath)
		.bump(version)
}

changes() 🔗

Return Type
Changeset !
Example
dagger -m github.com/sipsma/dagger/toolchains/php-sdk-dev@deb8691f38f37829fc0b8d952228bd9d6cebc429 call \
 --source-path string --doctum-config-path string changes
func (m *MyModule) Example(sourcePath string, doctumConfigPath string) *dagger.Changeset  {
	return dag.
			Phpsdkdev(sourcePath, doctumConfigPath).
			Changes()
}
@function
def example(sourcepath: str, doctumconfigpath: str) -> dagger.Changeset:
	return (
		dag.php_sdk_dev(sourcepath, doctumconfigpath)
		.changes()
	)
@func()
example(sourcePath: string, doctumConfigPath: string): Changeset {
	return dag
		.phpSdkDev(sourcePath, doctumConfigPath)
		.changes()
}

devContainer() 🔗

Returns the PHP SDK workspace mounted in a dev container, and working directory set to the SDK source

Return Type
Container !
Arguments
NameTypeDefault ValueDescription
runInstallBoolean !"false"

Run composer install before returning the container

Example
dagger -m github.com/sipsma/dagger/toolchains/php-sdk-dev@deb8691f38f37829fc0b8d952228bd9d6cebc429 call \
 --source-path string --doctum-config-path string dev-container --run-install boolean
func (m *MyModule) Example(sourcePath string, doctumConfigPath string, runInstall bool) *dagger.Container  {
	return dag.
			Phpsdkdev(sourcePath, doctumConfigPath).
			Devcontainer(runInstall)
}
@function
def example(sourcepath: str, doctumconfigpath: str, runinstall: bool) -> dagger.Container:
	return (
		dag.php_sdk_dev(sourcepath, doctumconfigpath)
		.devcontainer(runinstall)
	)
@func()
example(sourcePath: string, doctumConfigPath: string, runInstall: boolean): Container {
	return dag
		.phpSdkDev(sourcePath, doctumConfigPath)
		.devContainer(runInstall)
}

doctumConfig() 🔗

DoctumConfig returns the doctum configuration file

Return Type
File !
Example
dagger -m github.com/sipsma/dagger/toolchains/php-sdk-dev@deb8691f38f37829fc0b8d952228bd9d6cebc429 call \
 --source-path string --doctum-config-path string doctum-config
func (m *MyModule) Example(sourcePath string, doctumConfigPath string) *dagger.File  {
	return dag.
			Phpsdkdev(sourcePath, doctumConfigPath).
			Doctumconfig()
}
@function
def example(sourcepath: str, doctumconfigpath: str) -> dagger.File:
	return (
		dag.php_sdk_dev(sourcepath, doctumconfigpath)
		.doctumconfig()
	)
@func()
example(sourcePath: string, doctumConfigPath: string): File {
	return dag
		.phpSdkDev(sourcePath, doctumConfigPath)
		.doctumConfig()
}

phpCodeSniffer() 🔗

Lint the PHP code with PHP CodeSniffer (https://github.com/squizlabs/PHP_CodeSniffer)

Return Type
Void !
Example
dagger -m github.com/sipsma/dagger/toolchains/php-sdk-dev@deb8691f38f37829fc0b8d952228bd9d6cebc429 call \
 --source-path string --doctum-config-path string php-code-sniffer
func (m *MyModule) Example(ctx context.Context, sourcePath string, doctumConfigPath string)   {
	return dag.
			Phpsdkdev(sourcePath, doctumConfigPath).
			Phpcodesniffer(ctx)
}
@function
async def example(sourcepath: str, doctumconfigpath: str) -> None:
	return await (
		dag.php_sdk_dev(sourcepath, doctumconfigpath)
		.phpcodesniffer()
	)
@func()
async example(sourcePath: string, doctumConfigPath: string): Promise<void> {
	return dag
		.phpSdkDev(sourcePath, doctumConfigPath)
		.phpCodeSniffer()
}

phpStan() 🔗

Analyze the PHP code with PHPStan (https://phpstan.org)

Return Type
Void !
Example
dagger -m github.com/sipsma/dagger/toolchains/php-sdk-dev@deb8691f38f37829fc0b8d952228bd9d6cebc429 call \
 --source-path string --doctum-config-path string php-stan
func (m *MyModule) Example(ctx context.Context, sourcePath string, doctumConfigPath string)   {
	return dag.
			Phpsdkdev(sourcePath, doctumConfigPath).
			Phpstan(ctx)
}
@function
async def example(sourcepath: str, doctumconfigpath: str) -> None:
	return await (
		dag.php_sdk_dev(sourcepath, doctumconfigpath)
		.phpstan()
	)
@func()
async example(sourcePath: string, doctumConfigPath: string): Promise<void> {
	return dag
		.phpSdkDev(sourcePath, doctumConfigPath)
		.phpStan()
}

release() 🔗

Publish the PHP SDK

Return Type
Void !
Arguments
NameTypeDefault ValueDescription
sourceRepoGitRepository -

The source git repository to release

sourceTagString !-

The source git tag to release

destString "https://github.com/dagger/dagger-php-sdk.git"No description provided
githubTokenSecret -No description provided
Example
echo 'Custom types are not supported in shell examples'
func (m *MyModule) Example(ctx context.Context, sourcePath string, doctumConfigPath string, sourceTag string)   {
	return dag.
			Phpsdkdev(sourcePath, doctumConfigPath).
			Release(ctxsourceTag)
}
@function
async def example(sourcepath: str, doctumconfigpath: str, sourcetag: str) -> None:
	return await (
		dag.php_sdk_dev(sourcepath, doctumconfigpath)
		.release(sourcetag)
	)
@func()
async example(sourcePath: string, doctumConfigPath: string, sourceTag: string): Promise<void> {
	return dag
		.phpSdkDev(sourcePath, doctumConfigPath)
		.release(sourceTag)
}

releaseDryRun() 🔗

Test the publishing process

Return Type
Void !
Arguments
NameTypeDefault ValueDescription
sourceRepoGitRepository -

Source git repository to fake-release

sourceTagString !"HEAD"

Source git tag to fake-release

destRemoteString !"https://github.com/dagger/dagger-php-sdk.git"

Target git remote to fake-release to

Example
echo 'Custom types are not supported in shell examples'
func (m *MyModule) Example(ctx context.Context, sourcePath string, doctumConfigPath string, sourceTag string, destRemote string)   {
	return dag.
			Phpsdkdev(sourcePath, doctumConfigPath).
			Releasedryrun(ctxsourceTag, destRemote)
}
@function
async def example(sourcepath: str, doctumconfigpath: str, sourcetag: str, destremote: str) -> None:
	return await (
		dag.php_sdk_dev(sourcepath, doctumconfigpath)
		.releasedryrun(sourcetag, destremote)
	)
@func()
async example(sourcePath: string, doctumConfigPath: string, sourceTag: string, destRemote: string): Promise<void> {
	return dag
		.phpSdkDev(sourcePath, doctumConfigPath)
		.releaseDryRun(sourceTag, destRemote)
}

source() 🔗

Source returns the source directory for the PHP SDK

Return Type
Directory !
Example
dagger -m github.com/sipsma/dagger/toolchains/php-sdk-dev@deb8691f38f37829fc0b8d952228bd9d6cebc429 call \
 --source-path string --doctum-config-path string source
func (m *MyModule) Example(sourcePath string, doctumConfigPath string) *dagger.Directory  {
	return dag.
			Phpsdkdev(sourcePath, doctumConfigPath).
			Source()
}
@function
def example(sourcepath: str, doctumconfigpath: str) -> dagger.Directory:
	return (
		dag.php_sdk_dev(sourcepath, doctumconfigpath)
		.source()
	)
@func()
example(sourcePath: string, doctumConfigPath: string): Directory {
	return dag
		.phpSdkDev(sourcePath, doctumConfigPath)
		.source()
}

test() 🔗

Test the PHP SDK with PHPUnit (https://phpunit.de/)

Return Type
Void !
Example
dagger -m github.com/sipsma/dagger/toolchains/php-sdk-dev@deb8691f38f37829fc0b8d952228bd9d6cebc429 call \
 --source-path string --doctum-config-path string test
func (m *MyModule) Example(ctx context.Context, sourcePath string, doctumConfigPath string)   {
	return dag.
			Phpsdkdev(sourcePath, doctumConfigPath).
			Test(ctx)
}
@function
async def example(sourcepath: str, doctumconfigpath: str) -> None:
	return await (
		dag.php_sdk_dev(sourcepath, doctumconfigpath)
		.test()
	)
@func()
async example(sourcePath: string, doctumConfigPath: string): Promise<void> {
	return dag
		.phpSdkDev(sourcePath, doctumConfigPath)
		.test()
}

versionFromTag() 🔗

Get v1.2.3 from sdk/php/v1.2.3

Return Type
String !
Arguments
NameTypeDefault ValueDescription
tagString !-No description provided
Example
dagger -m github.com/sipsma/dagger/toolchains/php-sdk-dev@deb8691f38f37829fc0b8d952228bd9d6cebc429 call \
 --source-path string --doctum-config-path string version-from-tag --tag string
func (m *MyModule) Example(ctx context.Context, sourcePath string, doctumConfigPath string, tag string) string  {
	return dag.
			Phpsdkdev(sourcePath, doctumConfigPath).
			Versionfromtag(ctx, tag)
}
@function
async def example(sourcepath: str, doctumconfigpath: str, tag: str) -> str:
	return await (
		dag.php_sdk_dev(sourcepath, doctumconfigpath)
		.versionfromtag(tag)
	)
@func()
async example(sourcePath: string, doctumConfigPath: string, tag: string): Promise<string> {
	return dag
		.phpSdkDev(sourcePath, doctumConfigPath)
		.versionFromTag(tag)
}

withGeneratedClient() 🔗

Return Type
PhpSdkDev !
Example
dagger -m github.com/sipsma/dagger/toolchains/php-sdk-dev@deb8691f38f37829fc0b8d952228bd9d6cebc429 call \
 --source-path string --doctum-config-path string with-generated-client
func (m *MyModule) Example(sourcePath string, doctumConfigPath string) *dagger.PhpSdkDev  {
	return dag.
			Phpsdkdev(sourcePath, doctumConfigPath).
			Withgeneratedclient()
}
@function
def example(sourcepath: str, doctumconfigpath: str) -> dagger.PhpSdkDev:
	return (
		dag.php_sdk_dev(sourcepath, doctumconfigpath)
		.withgeneratedclient()
	)
@func()
example(sourcePath: string, doctumConfigPath: string): PhpSdkDev {
	return dag
		.phpSdkDev(sourcePath, doctumConfigPath)
		.withGeneratedClient()
}

withGeneratedDocs() 🔗

Generate reference docs from the generated client NOTE: it’s the caller’s responsibility to ensure the generated client is up-to-date (see WithGeneratedClient)

Return Type
PhpSdkDev !
Example
dagger -m github.com/sipsma/dagger/toolchains/php-sdk-dev@deb8691f38f37829fc0b8d952228bd9d6cebc429 call \
 --source-path string --doctum-config-path string with-generated-docs
func (m *MyModule) Example(sourcePath string, doctumConfigPath string) *dagger.PhpSdkDev  {
	return dag.
			Phpsdkdev(sourcePath, doctumConfigPath).
			Withgenerateddocs()
}
@function
def example(sourcepath: str, doctumconfigpath: str) -> dagger.PhpSdkDev:
	return (
		dag.php_sdk_dev(sourcepath, doctumconfigpath)
		.withgenerateddocs()
	)
@func()
example(sourcePath: string, doctumConfigPath: string): PhpSdkDev {
	return dag
		.phpSdkDev(sourcePath, doctumConfigPath)
		.withGeneratedDocs()
}