Skip to content

Conversation

Nyholm
Copy link
Member

@Nyholm Nyholm commented Apr 19, 2021

I start with 5 documents to see how it feels.

Copy link
Member

@javiereguiluz javiereguiluz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new config builder looks much better to me than the old plain PHP arrays. Love it! Thanks Tobias.

@javiereguiluz javiereguiluz added this to the 5.3 milestone Apr 21, 2021
@javiereguiluz
Copy link
Member

It's merged! 🎉 I couldn't like this more 😍 It's so great! Thanks Tobias.

@javiereguiluz javiereguiluz merged commit 4fa5ab4 into symfony:5.x Apr 21, 2021
@Nyholm
Copy link
Member Author

Nyholm commented Apr 21, 2021

Thank you for merging

@Nyholm Nyholm deleted the config.builder branch April 21, 2021 07:39
nicolas-grekas added a commit to symfony/symfony that referenced this pull request Apr 21, 2021
This PR was squashed before being merged into the 5.3-dev branch.

Discussion
----------

[Config] Use plural name on array values

| Q             | A
| ------------- | ---
| Branch?       | 5.x
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       |
| License       | MIT
| Doc PR        | Related: symfony/symfony-docs#15264

If we have a PrototypedArrayNode and the prototype is does not have a key (`->useAttributeAsKey('name')`). Then we know for sure that the value should be an array.

See this example from `$framework->assets()`

```diff
    /**
+    * @param list<mixed>
     * @return $this
     */
-   public function baseUrl($value): self
+   public function baseUrls(array $value): self
    {
        $this->baseUrls = $value;

        return $this;
    }
```

Commits
-------

f564a7a [Config] Use plural name on array values
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants