Skip to content

[DependencyInjection] Make auto-aliases private by default #42959

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

Merged
merged 1 commit into from
Sep 10, 2021

Conversation

nicolas-grekas
Copy link
Member

Q A
Branch? 5.4
Bug fix? no
New feature? no
Deprecations? yes
Tickets -
License MIT
Doc PR -

Replaces #41209

Before, this creates a public autoalias:

    app.lock:
        tags:
            - { name: auto_alias, format: "app.%database_type%_lock" }

After, this creates a public autoalias:

    app.lock:
        public: true
        tags:
            - { name: auto_alias, format: "app.%database_type%_lock" }

Omitting public: true will trigger a deprecation warning when the alias is accessed from $container->get(). In 6.0, the alias will be private by default if public: true is not set.

@carsonbot
Copy link

Hey!

I think @fancyweb has recently worked with this code. Maybe they can help review this?

Cheers!

Carsonbot

@nicolas-grekas
Copy link
Member Author

The remaining deprecation should be fixed by #42979

nicolas-grekas added a commit that referenced this pull request Sep 10, 2021
…deprecation (nicolas-grekas)

This PR was merged into the 5.3 branch.

Discussion
----------

[FrameworkBundle] fix session-related BC layer triggering deprecation

| Q             | A
| ------------- | ---
| Branch?       | 5.3
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

Needed to make ##42959 green.

Commits
-------

18ab810 [FrameworkBundle] fix session-related BC layer triggering deprecation
@nicolas-grekas nicolas-grekas merged commit f9c6958 into symfony:5.4 Sep 10, 2021
@nicolas-grekas nicolas-grekas deleted the private-auto-aliases branch September 10, 2021 13:54
This was referenced Nov 5, 2021
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