Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[3.0.2] Regression on security.encoder_factory #17864

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

Closed
havvg opened this issue Feb 20, 2016 · 5 comments
Closed

[3.0.2] Regression on security.encoder_factory #17864

havvg opened this issue Feb 20, 2016 · 5 comments

Comments

@havvg
Copy link
Contributor

havvg commented Feb 20, 2016

It seems there is a regression in v3.0.2 when you require a password encoder using a factorised service.

    user.password_encoder:
        class: Symfony\Component\Security\Core\Encoder\PasswordEncoderInterface
        factory: ['@security.encoder_factory', 'getEncoder']
        arguments:
            - 'Application\Security\User'

    user.factory:
        class: Application\Domain\User\Model\UserFactory
        arguments:
            - '@user.password_encoder'
 $ behat -o /dev/null && composer up symfony/symfony && behat -o /dev/null
Loading composer repositories with package information
Updating dependencies (including require-dev)
  - Updating symfony/symfony (v3.0.1 => v3.0.2)
    Checking out 18c3d4f356931a5b6a4afb0cc679a2c58931c795

Writing lock file
Generating autoload files
Changelogs summary:

 - symfony/symfony updated from v3.0.1 to v3.0.2
   See changes: https://github.com/symfony/symfony/compare/v3.0.1...v3.0.2
   Release notes: https://github.com/symfony/symfony/releases/tag/v3.0.2

> Incenteev\ParameterHandler\ScriptHandler::buildParameters
Updating the "app/config/environments/parameters.yml" file
> Application\Composer\BootstrapHandler::ensureDirectoriesExist
Ensuring the var directory exists.
> Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache

 // Clearing the cache for the dev environment with debug true


 [OK] Cache for the "dev" environment (debug=true) was successfully cleared.


> Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installAssets

 Trying to install assets as relative symbolic links.

 --- ----------------- ------------------
      Bundle            Method / Error
 --- ----------------- ------------------
  ✔   FrameworkBundle   relative symlink
 --- ----------------- ------------------


 [OK] All assets were successfully installed.


  [Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException]
  You have requested a non-existent service "security.encoder_factory.generic". Did you mean this: "security.encoder_factory"?


behat [-s|--suite SUITE] [-f|--format FORMAT] [-o|--out OUT] [--format-settings FORMAT-SETTINGS] [--init] [--lang LANG] [--name NAME] [--tags TAGS] [--role ROLE] [--story-syntax] [-d|--definitions DEFINITIONS] [--append-snippets] [--no-snippets] [--strict] [--order ORDER] [--rerun] [--stop-on-failure] [--dry-run] [--] [<paths>]
@xabbuh
Copy link
Member

xabbuh commented Feb 20, 2016

Can you provide some steps that are necessary to reproduce your issue on a naked Standard Edition without the need of setting up Behat?

@xabbuh
Copy link
Member

xabbuh commented Feb 20, 2016

@havvg Just noticed your referenced fork.

Status: Reviewed

@xabbuh
Copy link
Member

xabbuh commented Feb 20, 2016

This also affects Symfony 2.7 and 2.8 (it looks like this issue was introduced by #17554).

@xabbuh
Copy link
Member

xabbuh commented Feb 20, 2016

see #17866 for the fix

@xabbuh
Copy link
Member

xabbuh commented Feb 20, 2016

#17867 fixes this for the 2.3 branch

fabpot added a commit that referenced this issue Feb 23, 2016
…abbuh)

This PR was merged into the 2.3 branch.

Discussion
----------

[DependencyInjection] replace alias in factory services

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #17864
| License       | MIT
| Doc PR        |

Commits
-------

56f8798 replace alias in factory services
fabpot added a commit that referenced this issue Feb 23, 2016
This PR was merged into the 2.7 branch.

Discussion
----------

[DependencyInjection] replace alias in factories

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #17864
| License       | MIT
| Doc PR        |

Commits
-------

b43b79b [DependencyInjection] replace alias in factories
@fabpot fabpot closed this as completed Feb 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants