Skip to content

Commit

Permalink
Merge pull request #1 from macocci7/update_readme
Browse files Browse the repository at this point in the history
udpate README
  • Loading branch information
macocci7 authored Jun 2, 2024
2 parents 36f6fbd + bf252e3 commit 72048b3
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pull-requests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
- name: PHPStan
run: |
./vendor/bin/phpstan --version
./vendor/bin/phpstan analyze -c phpstan.neon
./vendor/bin/phpstan analyze -c phpstan.neon.dist
- name: Tests
run: |
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/update-changelog-call.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: update changelog

on:
release:
types: [released]

permissions: {}

jobs:
update:
permissions:
contents: write
uses: macocci7/file-selector-prompt/.github/workflows/update-changelog.yml@main
4 changes: 0 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
# Release Notes

## v0.1.0 (2024-06-21)

Initial release.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ $path = fileselector('Select a file to import.');
You may also include placeholder text, a default value, a required value, and an informational hint:

```php
fileselector(
$path = fileselector(
label: 'Select a file to import.',
placeholder: 'E.g. ./vendor/autoload.php',
default: '',
Expand All @@ -50,7 +50,7 @@ fileselector(
If you would like to perform additional validation logic, you may pass a closure to the validate argument:

```php
fileselector(
$path = fileselector(
label: 'Select a file to import.',
placeholder: 'E.g. ./vendor/autoload.php',
hint: 'Input the file path.',
Expand All @@ -63,7 +63,7 @@ fileselector(

Finally, if you would like to filter the files listed in the choices with the file extensions, you may pass an array to the `extensions` argument:
```php
fileselector(
$path = fileselector(
label: 'Select a file to import.',
placeholder: 'E.g. ./vendor/autoload.php',
hint: 'Input the file path.',
Expand All @@ -85,7 +85,7 @@ fileselector(
```php
use function Macocci7\FileSelectorPrompt\form;

form()
$responses = form()
->fileselector(
label: 'Select a file to import.',
placeholder: 'E.g. ./vendor/autoload.php',
Expand Down
4 changes: 3 additions & 1 deletion src/FormBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
use Closure;
use Illuminate\Support\Collection;
use Laravel\Prompts\Exceptions\FormRevertedException;
use Laravel\Prompts\Progress;
use Laravel\Prompts\Prompt;
use Macocci7\FileSelectorPrompt\FormStep;

use function Laravel\Prompts\text;
use function Laravel\Prompts\textarea;
Expand Down Expand Up @@ -33,7 +35,7 @@ class FormBuilder
/**
* Each step that should be executed.
*
* @var array<int, \Laravel\Prompts\FormStep>
* @var array<int, \Laravel\Prompts\FormStep|FormStep>
*/
protected array $steps = [];

Expand Down

0 comments on commit 72048b3

Please sign in to comment.