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: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/sdk/** linguist-generated
/entrypoint.php linguist-generated
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/sdk
/vendor
274 changes: 73 additions & 201 deletions LICENSE

Large diffs are not rendered by default.

54 changes: 52 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,52 @@
# symfony-cli-module
Symfony CLI module for Dagger
# Dagger Symfony CLI module

## Installation

``` bash
dagger install https://daggerverse.dev/mod/github.com/dagger-php/symfony-cli-module@main
```

## Direct usage

> Assuming your `source` code is locally here, then it will mount the whole path of `.` and then within that it will test the `.` directory within the current directory

### Run Symfony CLI commands

``` bash
dagger shell -c 'github.com/dagger-php/symfony-cli-module | symfony --cmd=help'
```

### Run Symfony CLI commands

``` bash
dagger shell -c 'github.com/dagger-php/symfony-cli-module | console --cmd=list'
```

### Run Symfony CLI commands

``` bash
dagger shell -c 'github.com/dagger-php/symfony-cli-module | console --cmd=list'
```

## Usage in your project

You can install the symfony-cli module, into your local project's dagger module, and then invoke it from inside the PHP source code

``` bash
dagger install https://daggerverse.dev/mod/github.com/dagger-php/symfony-cli-module@main
```

Add this code to your project, to begin calling the module from code. For example

``` php
<?php
#[DaggerFunction]
#[Doc('Run cache:clear on the current directory')]
// dagger call --source=. cache-clear
public function cacheClear(): Container
{
return dag()
->cacheClear()
}
```

28 changes: 28 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"name": "daggerverse/symfony-cli",
"description": "Dagger module for symfony-cli",
"version": "1.0.0",
"minimum-stability": "dev",
"license": "MIT",
"authors": [
{
"name": "Mathieu Santostefano",
"email": "msantostefano@proton.me"
}
],
"repositories": [
{
"type": "path",
"url": "./sdk"
}
],
"require": {
"php": "^8.3",
"dagger/dagger": "*@dev"
},
"autoload": {
"psr-4": {
"DaggerModule\\": "src/"
}
}
}
Loading