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

Appearance settings

[SecurityBundle] allow auto_wire for SessionAuthenticationStrategy class #25571

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
Dec 22, 2017

Conversation

xavren
Copy link
Contributor

@xavren xavren commented Dec 21, 2017

Q A
Branch? 3.4 up to 4.0 for deprecation fixe
Bug fix? no
New feature? no
BC breaks? no
Deprecations? yes
Tests pass? yes
Fixed tickets
License MIT
Doc PR

@chalasr
Copy link
Member

chalasr commented Dec 21, 2017

What deprecation are you getting? Usually we merge this as a new feature on master.

@chalasr
Copy link
Member

chalasr commented Dec 21, 2017

Ah, I guess the service gets auto registered and corresponding notice triggered. But this can be disabled by setting the container.autowiring.strict_mode parameter to true (see symfony/symfony-docs#8561).
This should be rebased on master.

@chalasr chalasr added this to the 4.1 milestone Dec 21, 2017
@xavren
Copy link
Contributor Author

xavren commented Dec 21, 2017

I have this deprecated on sf 3.4.2

Autowiring services based on the types they implement is deprecated since Symfony 3.3 and won't be supported in version 4.0. You should rename (or alias) the "security.authentication.session_strategy" service to "Symfony\Component\Security\Http\Session\SessionAuthenticationStrategyInterface" instead.
Hide context    Hide trace
[▼
  "exception" => SilencedErrorContext {#2472 ▶}
]
{▼
  /srv/www/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php:304 {▶}
  /srv/www/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php:245 {▶}
}```

@xavren
Copy link
Contributor Author

xavren commented Dec 21, 2017

For information, i created my own LoginManager and i inject $sessionStrategy, but my manager cannot be autowired because of this service

@chalasr chalasr modified the milestones: 4.1, 3.4 Dec 22, 2017
@chalasr chalasr added Bug and removed Feature labels Dec 22, 2017
Copy link
Member

@chalasr chalasr left a comment

Choose a reason for hiding this comment

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

👍 for 3.4

@nicolas-grekas
Copy link
Member

Thank you @xavren.

@nicolas-grekas nicolas-grekas merged commit b36154e into symfony:3.4 Dec 22, 2017
nicolas-grekas added a commit that referenced this pull request Dec 22, 2017
…Strategy class (xavren)

This PR was merged into the 3.4 branch.

Discussion
----------

[SecurityBundle] allow auto_wire for SessionAuthenticationStrategy class

| Q             | A
| ------------- | ---
| Branch?       | 3.4 up to 4.0 for deprecation fixe
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

Commits
-------

b36154e allow auto_wire for SessionAuthenticationStrategy class
This was referenced Jan 5, 2018
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.

4 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.