Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use fixtures for complex parameters #11

Closed
davidhoelzel opened this issue Mar 11, 2024 · 0 comments · Fixed by #17
Closed

Use fixtures for complex parameters #11

davidhoelzel opened this issue Mar 11, 2024 · 0 comments · Fixed by #17
Assignees

Comments

@davidhoelzel
Copy link
Member

As parameters used in templates might be anything and we do not know the type of the parameters when parsing the templates, we need a possibility to use complex objects as template parameters.

Suggestion: use fixtures from nemlio/alice. Using these, we could simply use fixtures in the parameter documention.
E.g.
name: componentName title: title description: description parameters: user: App\Entity\User username: bob roles: ['ROLE_USER', 'ROLE_ADMIN'] ...

In the compiler pass where all configurations are parsed and merged, the fixtures could be created and then used as fully working parameters.

@davidhoelzel davidhoelzel self-assigned this Mar 21, 2024
davidhoelzel added a commit that referenced this issue Mar 26, 2024
@davidhoelzel davidhoelzel linked a pull request Apr 3, 2024 that will close this issue
davidhoelzel added a commit that referenced this issue Apr 4, 2024
- added cs-fixer rule for strict types
davidhoelzel added a commit that referenced this issue Apr 4, 2024
bschultz added a commit that referenced this issue Apr 4, 2024
* #11 use nelmio/alice for data-faking

* #11 cs-fixer

* #11 implemented generators for providing template data

* Update docs/ComponentConfiguration.md

Co-authored-by: Benjamin Schultz <[email protected]>

* Update tests/Unit/Component/ComponentItemFactoryTest.php

Co-authored-by: Benjamin Schultz <[email protected]>

* Breakpoint configuration (#18)

* add breakpoint config

* add disclaimer

- added forgotten documentation for breakpoints

* Fix typo

* Optimize function calls

[EA] '$item->$method()' would make more sense here (it's also faster).

* Fix route prefix

Regarding best practices, the bundle routes must be prefixed with the bundle alias.

* Cleanup and optimize code

Add strict types and return types where it was missing.

* merge update

* add class usages

* #11 code review changes

- added cs-fixer rule for strict types

* #11 code review changes

---------

Co-authored-by: Benjamin Schultz <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant