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

[Runtime] Allow JSON for APP_RUNTIME_OPTIONS#45535

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

Closed
ro0NL wants to merge2 commits intosymfony:6.1fromro0NL:patch-1
Closed

[Runtime] Allow JSON for APP_RUNTIME_OPTIONS#45535

ro0NL wants to merge2 commits intosymfony:6.1fromro0NL:patch-1

Conversation

@ro0NL
Copy link
Contributor

@ro0NLro0NL commentedFeb 23, 2022
edited by nicolas-grekas
Loading

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

So we can exportAPP_RUNTIME_OPTIONS='{"disable_dotenv":true}' in prod

@nicolas-grekas
Copy link
Member

nicolas-grekas commentedFeb 24, 2022
edited
Loading

This is not a bugfix ;)
What about making SymfonyRuntime's constructor accept array|json-string instead?

@nicolas-grekasnicolas-grekas modified the milestones:5.4,6.1Feb 24, 2022
@nicolas-grekasnicolas-grekas changed the base branch from5.4 to6.1February 24, 2022 09:42
Copy link
Member

@nicolas-grekasnicolas-grekas left a comment

Choose a reason for hiding this comment

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

What about making SymfonyRuntime's constructor accept array|json-string instead?

Not a good idea as that would prevent merging with options generated by the plugin!

@ro0NL
Copy link
ContributorAuthor

ro0NL commentedFeb 24, 2022
edited
Loading

This is not a bugfix ;)

Are you saying APP_RUNTIME_OPTIONS is not a supported env var? but more like some internal global var?

IMHO it looks like an env var extension point ... thus should support string values actually. Thus a bugfix :)

Or how could i set an PHP array using env var?

We're not at 6.1 yet, so as a feature i will postpone this PR. And we patch the front controller manually for the time being (maybe forever), if that's the intended feature-usage currently.

@ro0NL
Copy link
ContributorAuthor

So, tbe bugfix would be

$ APP_RUNTIME_OPTIONS={} bin/console PHP Warning:  A non-numeric value encountered in vendor/autoload_runtime.php on line 23PHP Fatal error:  Uncaught Error: Unsupported operand types in vendor/autoload_runtime.php:23

@nicolas-grekas
Copy link
Member

more like some internal global var?

yes, that's been the intent so far, not reading from env.

@ro0NL
Copy link
ContributorAuthor

then, what about renaming it toSF_RUNTIME_OPTIONS for 6.1?

@nicolas-grekas
Copy link
Member

I don't see why, better not to me 🤷

@nicolas-grekas
Copy link
Member

Can you add a test case?

@ro0NL
Copy link
ContributorAuthor

I'll continue this with our php8/sf6 upgrade 👍

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@nicolas-grekasnicolas-grekasnicolas-grekas left review comments

Assignees

No one assigned

Projects

None yet

Milestone

6.1

Development

Successfully merging this pull request may close these issues.

3 participants

@ro0NL@nicolas-grekas@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp