Skip to content

Commit

Permalink
User expression language to complex functions (#2)
Browse files Browse the repository at this point in the history
* User expresion language to complex functions
  • Loading branch information
plozmun authored Jan 24, 2022
1 parent 1f46d43 commit 15818ab
Show file tree
Hide file tree
Showing 5 changed files with 441 additions and 12 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,27 +19,31 @@ jobs:
- php-version: '7.2'
composer-flags: '--prefer-dist --no-interaction'
tools: 'composer:v2'
dependency-versions: 'lowest'
phpstan: true
lint-container: true
env:
SYMFONY_DEPRECATIONS_HELPER: disabled
- php-version: '7.3'
composer-flags: '--prefer-dist --no-interaction'
tools: 'composer:v2'
dependency-versions: 'lowest'
phpstan: true
lint-container: true
env:
SYMFONY_DEPRECATIONS_HELPER: disabled
- php-version: '7.4'
composer-flags: '--prefer-dist --no-interaction'
tools: 'composer:v2'
dependency-versions: 'lowest'
phpstan: true
lint-container: true
env:
SYMFONY_DEPRECATIONS_HELPER: disabled
- php-version: '8.0'
composer-flags: '--prefer-dist --no-interaction'
tools: 'composer:v2'
dependency-versions: 'highest'
phpstan: true
lint-container: true
env:
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ default:
## Usage
Add your PHP Faker function between braces: Ej: `{{firsName}}`
Add your PHP Faker function between braces:
Ej: `{{firsName}}` or complex functions `{{dateTimeInInterval('-5 years', '-1 years').format('Y-m-d')}}`

[Faker PHP Documentation](https://fakerphp.github.io/)

Expand All @@ -42,7 +44,7 @@ Feature: Create a Book
"lastName": "{{lastName}}"
},
"title": "{{sentence}}",
"createdAt": "{{year}}-{{month}}-{{dayOfMonth}}
"createdAt": "{{dateTimeInInterval('-5 years', '-1 years').format('Y-m-d')}}
}
"""
And the response status code should be 200
Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"require": {
"php": "^7.2| ^8.0",
"behat/behat": "^3.10",
"fakerphp/faker": "^1.17"
"fakerphp/faker": "^1.17",
"symfony/expression-language": "^4.4|^5.4|^6.0"
},
"autoload": {
"psr-4": {
Expand Down
Loading

0 comments on commit 15818ab

Please sign in to comment.