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

[FrameworkBundle] Add ability to override name of the config directory#42218

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
ivanstan wants to merge2 commits intosymfony:5.4fromivanstan:5.4

Conversation

@ivanstan
Copy link

@ivanstanivanstan commentedJul 21, 2021
edited
Loading

QA
Branch?5.4
Bug fix?no
New feature?yes
Deprecations?no
TicketsFix #...
LicenseMIT
Doc PRsymfony/symfony-docs#...

For way too long Symfony is following Linux directory structure for all of its directories except for config, if we don't plan to change/config to/etc at least we can avoid hard-coding it and allow overriding of the methodgetConfigDir in Kernel.php

@carsonbot
Copy link

Hey!

To help keep things organized, we don't allow "Draft" pull requests. Could you please click the "ready for review" button or close this PR and open a new one when you are done?

Note that a pull request does not have to be "perfect" or "ready for merge" when you first open it. We just want it to be ready for a first review.

Cheers!

Carsonbot

@ivanstanivanstan marked this pull request as ready for reviewJuly 21, 2021 12:20
@carsonbot
Copy link

Hey!

I see that this is your first PR. That is great! Welcome!

Symfony has acontribution guide which I suggest you to read.

In short:

  • Always add tests
  • Keep backward compatibility (seehttps://symfony.com/bc).
  • Bug fixes must be submitted against the lowest maintained branch where they apply (seehttps://symfony.com/releases)
  • Features and deprecations must be submitted against the 5.4 branch.

Review the GitHub status checks of your pull request and try to solve the reported issues. If some tests are failing, try to see if they are failing because of this change.

When two Symfony core team members approve this change, it will be merged and you will become an official Symfony contributor!
If this PR is merged in a lower version branch, it will be merged up to all maintained branches within a few days.

I am going to sit back now and wait for the reviews.

Cheers!

Carsonbot

@sstok
Copy link
Contributor

Please use a descriptive title.

FYI. This will require an update to Flex-plugin as well as recipes expect this convention.

Nyholm reacted with thumbs up emoji

@ivanstanivanstan changed the titleUpdate MicroKernelTrait.phpAdd ability to override name of the config directoryJul 21, 2021
@stof
Copy link
Member

FYI. This will require an update to Flex-plugin as well as recipes expect this convention.

If we don't change the default, I don't think it will impact Flex (other parts of Flex already assume you use the standard symfony structure rather than a customized one)

@ivanstan
Copy link
Author

FYI. This will require an update to Flex-plugin as well as recipes expect this convention.

If we don't change the default, I don't think it will impact Flex (other parts of Flex already assume you use the standard symfony structure rather than a customized one)

I think preferred approach would be to first implement a function that returns a config directory path without changing the default, with a possibility for a user to override it on his own responsibility. This will give some time to the flex and recipe developers to start relying on this function before decision is made if actually the directory name is gonna change.

@Tobion
Copy link
Contributor

Tobion commentedJul 21, 2021
edited
Loading

@sstok probably means it somewhat requires an update of the recipes, e.g.https://github.com/symfony/recipes/blob/master/symfony/framework-bundle/5.4/src/Kernel.php to make use of the config dir method.

I'm also 👎 as there are is not enough demand for such a change. People who really want to diverge from documentation and flex support etc, can just overwrite the relevant kernel methods themselves.

@Nyholm
Copy link
Member

Hm.. I agree with@Tobion that it is not a great demad for this.

However, this patch is super small and Im not sure we have any other hard coded path like this.

This will (or SHOULD) obviously only be used by super advanced that have really good reasons by doing so. Just "I want to follow Unix standards" is not really a strong argument.

So, Yes, (almost) nobody should use this. But Im fine with this small patch anyways.

@ivanstan, may I ask you if you have a good reason for using/etc instead? What part of your work/application would be simpler if you could use/etc

@ivanstan
Copy link
Author

ivanstan commentedJul 22, 2021
edited
Loading

@Nyholm To be honest its just my OCD. Other than the fact that all other directories are configurable.

@Nyholm
Copy link
Member

Hehe. I’ve been there. But I guess that is something you need to fight though or override registerContainerConfiguration() and registerBundles() yourself.

I’m leaning towards closing this. I’ll wait an opinion from some other maintainer.

@nicolas-grekasnicolas-grekas added this to the5.4 milestoneJul 22, 2021
@ivanstan
Copy link
Author

@Nyholm Yes, I have those methods overridden in most of my projects :)

Copy link
Member

@nicolas-grekasnicolas-grekas left a comment
edited
Loading

Choose a reason for hiding this comment

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

I would be +0 if the method were private.

ro0NL reacted with thumbs up emoji
@ro0NL
Copy link
Contributor

Copy link
Member

@ycerutoyceruto left a comment

Choose a reason for hiding this comment

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

I'm also not sure if it will be worth it, from what I've read in other comments, and becauseconfig/ dir matches package standards (https://github.com/php-pds/skeleton).

If we do it for apps, why don't we do the same for bundles?

I'm -1 so far.

$kernelDefinition->addTag('routing.route_loader');

$container->addObjectResource($this);
$container->fileExists($this->getProjectDir().'/config/bundles.php');
Copy link
Member

Choose a reason for hiding this comment

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

There are other occurrences inFrameworkBundle/DependencyInjection/FrameworkExtension.php (<project_dir>/config/validator and<project_dir>/config/serializer ).

Also, we are hardcoding it here:

->scalarNode('vault_directory')->defaultValue('%kernel.project_dir%/config/secrets/%kernel.runtime_environment%')->cannotBeEmpty()->end()

@carsonbotcarsonbot changed the titleAdd ability to override name of the config directory[FrameworkBundle] Add ability to override name of the config directoryAug 1, 2021
@fabpot
Copy link
Member

Done as part of#42991. Thank you.

@fabpotfabpot closed thisOct 29, 2021
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

@ycerutoycerutoyceruto left review comments

Assignees

No one assigned

Projects

None yet

Milestone

5.4

Development

Successfully merging this pull request may close these issues.

11 participants

@ivanstan@carsonbot@sstok@stof@Tobion@Nyholm@ro0NL@fabpot@nicolas-grekas@yceruto@OskarStark

[8]ページ先頭

©2009-2025 Movatter.jp