Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Config] Use better typehint in PHP Configuration#44166

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
nicolas-grekas merged 1 commit intosymfony:6.2fromjderusse:config-scalar
Oct 24, 2022

Conversation

jderusse
Copy link
Member

@jderussejderusse commentedNov 20, 2021
edited
Loading

QA
Branch?6.2
Bug fix?no
New feature?yes
Deprecations?no
Tickets-
LicenseMIT
Doc PR-

This PR now followup#46328 to replace the genericmixed type-hint by type inferred from normalizations (ie, if a config useifString, when now that the normalization works only for string, thesemixed can safely be replaced bystring)

Jeroeny reacted with thumbs up emoji
@carsonbotcarsonbot added this to the6.0 milestoneNov 20, 2021
@carsonbotcarsonbot changed the titleAllow scalar configuration in PHP Configuration[Config] Allow scalar configuration in PHP ConfigurationNov 20, 2021
@jderussejderusse modified the milestones:6.0,6.1Nov 20, 2021
@jderussejderusseforce-pushed theconfig-scalar branch 2 times, most recently frome4fe334 to5b38780CompareNovember 20, 2021 23:57
@ro0NL

This comment was marked as outdated.

@jderusse

This comment was marked as outdated.

@jderussejderusse changed the base branch from6.0 to6.1December 2, 2021 17:22
nicolas-grekas added a commit that referenced this pull requestMay 17, 2022
…jderusse, HypeMC)This PR was merged into the 5.4 branch.Discussion----------[Config] Allow scalar configuration in PHP Configuration| Q             | A| ------------- | ---| Branch?       | 5.4| Bug fix?      | yes| New feature?  | no| Deprecations? | no| Tickets       |Fixsymfony/monolog-bundle#417 (comment)| License       | MIT| Doc PR        | -Fixes passing scalar values to array nodes that have a `beforeNormalization` hook, eg:```phpreturn static function (MonologConfig $config): void {    $config->handler('console')        // ...        ->processPsr3Messages()            ->enabled(true)    ;};```can be shortened thanks to a [`beforeNormalization` hook](https://github.com/symfony/monolog-bundle/blob/a41bbcdc1105603b6d73a7d9a43a3788f8e0fb7d/DependencyInjection/Configuration.php#L453):```phpreturn static function (MonologConfig $config): void {    $config->handler('console')        // ...        ->processPsr3Messages(true)    ;};```I've used some of the code from#44166 by `@jderusse`. Since his PR is a feature it can't go on 5.4, but it still helped a lot.Commits-------2d81a3a [Config] Allow scalar configuration in PHP Configuration1c176e1 [Config] Allow scalar configuration in PHP Configuration
@nicolas-grekas
Copy link
Member

Rebase needed, in case there is anything left after#46328

@fabpotfabpot modified the milestones:6.1,6.2May 20, 2022
@nicolas-grekas
Copy link
Member

Friendly ping@jderusse
/cc@HypeMC

Is this PR still needed after#46328?

@HypeMC
Copy link
Member

@nicolas-grekas This PR provides some additional features that#46328 doesn't have, eg allowed type hints on generated methods:

Currentlymixed is used in these situations:

My PR only covers using scalars with thebeforeNormalization hook.

@nicolas-grekas
Copy link
Member

Would you be able to take over the PR@HypeMC? I feel like@jderusse would appreciate :)

@jderusse

This comment was marked as outdated.

@HypeMC

This comment was marked as outdated.

@jderusse

This comment was marked as outdated.

@jderussejderusse changed the title[Config] Allow scalar configuration in PHP Configuration[Config] Use better typehint in PHP ConfigurationOct 23, 2022
@jderusse
Copy link
MemberAuthor

PR rebased and duplicated logic with#46328 removed

Copy link
Member

@chalasrchalasr left a comment

Choose a reason for hiding this comment

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

Missing CHANGELOG entry. 👍 to ship this in 6.2

@nicolas-grekas
Copy link
Member

Thank you@jderusse.

@nicolas-grekasnicolas-grekas merged commit8321162 intosymfony:6.2Oct 24, 2022
@jderussejderusse deleted the config-scalar branchOctober 24, 2022 07:26
@fabpotfabpot mentioned this pull requestOct 24, 2022
@alexndlm
Copy link
Contributor

@jderusse

Before in\Symfony\Config\Framework\HttpClient\ScopedClientConfig\RetryFailedConfig::httpCode was:

publicfunction httpCode(string$code,mixed$value = []):\Symfony\Config\Framework\HttpClient\ScopedClientConfig\RetryFailed\HttpCodeConfig|static

Now it generates:

publicfunction httpCode(string$code,array$value = []):\Symfony\Config\Framework\HttpClient\ScopedClientConfig\RetryFailed\HttpCodeConfig|static

Is this a bug in the config generator or in the HttpClient?

alexndlm pushed a commit to alexndlm/symfony that referenced this pull requestSep 4, 2023
alexndlm pushed a commit to alexndlm/symfony that referenced this pull requestSep 4, 2023
alexndlm pushed a commit to alexndlm/symfony that referenced this pull requestNov 11, 2023
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

@chalasrchalasrchalasr requested changes

Assignees
No one assigned
Projects
None yet
Milestone
6.2
Development

Successfully merging this pull request may close these issues.

8 participants
@jderusse@ro0NL@nicolas-grekas@HypeMC@alexndlm@chalasr@fabpot@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp