Skip to content

Bug in debug:container search #25107

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
Vinorcola opened this issue Nov 22, 2017 · 2 comments
Closed

Bug in debug:container search #25107

Vinorcola opened this issue Nov 22, 2017 · 2 comments

Comments

@Vinorcola
Copy link

Vinorcola commented Nov 22, 2017

Q A
Bug report? yes
Feature request? no
BC Break report? no
RFC? no
Symfony version 3.4.0-RC1

The search mode is buggy for FQCN service IDs: it doesn't detect the letters following the "\" it seems.

Example:

I have registered a service "Repository\Main\CustomerRepository"

php bin/console deb:cont cus

Select one of the following services to display its information:
  [0] security.authentication.custom_success_handler
  [1] security.authentication.custom_failure_handler

php bin/console deb:cont ust

 Select one of the following services to display its information:
  [0] Repository\Main\CustomerRepository
  [1] AppBundle\Main\Security\CustomerManagementVoter
  [2] AppBundle\Main\Model\CustomerManagementModel
  [3] security.authentication.trust_resolver
  [4] security.authentication.custom_success_handler
  [5] security.authentication.custom_failure_handler
  [6] instanceof.Symfony\Component\Security\Core\Authorization\Voter\VoterInterface.0.AppBundle\Main\Security\CustomerManagementVoter
  [7] abstract.instanceof.AppBundle\Main\Security\CustomerManagementVoter
@Vinorcola
Copy link
Author

Vinorcola commented Nov 23, 2017

Note, that this is not an uppercase problem.

You can run the following commands and still have the same result:

php bin/console deb:cont CUS

Select one of the following services to display its information:
  [0] security.authentication.custom_success_handler
  [1] security.authentication.custom_failure_handler

php bin/console deb:cont UST

 Select one of the following services to display its information:
  [0] Repository\Main\CustomerRepository
  [1] AppBundle\Main\Security\CustomerManagementVoter
  [2] AppBundle\Main\Model\CustomerManagementModel
  [3] security.authentication.trust_resolver
  [4] security.authentication.custom_success_handler
  [5] security.authentication.custom_failure_handler
  [6] instanceof.Symfony\Component\Security\Core\Authorization\Voter\VoterInterface.0.AppBundle\Main\Security\CustomerManagementVoter
  [7] abstract.instanceof.AppBundle\Main\Security\CustomerManagementVoter

The problem is with character following the \. I guess an escape problem (\C considered an one character)?

fabpot added a commit that referenced this issue Nov 23, 2017
…adzki)

This PR was merged into the 3.3 branch.

Discussion
----------

Make debug:container search command case-insensitive

| Q             | A
| ------------- | ---
| Branch?       | 3.2
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Fixed tickets | #25107
| License       | MIT
| Doc PR        |

This bug fixes the #25107 - starts from 3.2 services may be written with uppercase (e.g. FQCN) and search fails to match those services.

Commits
-------

c429c33 Make search in debug:container command case-insensitive
@fabpot fabpot closed this as completed Nov 23, 2017
@xabbuh
Copy link
Member

xabbuh commented Nov 24, 2017

@Vinorcola Works for me:

$ bin/console debug:container Cus

 Select one of the following services to display its information [App\Repository\CustomRepository]:
  [0] App\Repository\CustomRepository
 > 0


Information for Service "App\Repository\CustomRepository"
=========================================================

 ---------------- --------------------------------- 
  Option           Value                            
 ---------------- --------------------------------- 
  Service ID       App\Repository\CustomRepository  
  Class            App\Repository\CustomRepository  
  Tags             -                                
  Public           no                               
  Synthetic        no                               
  Lazy             no                               
  Shared           yes                              
  Abstract         no                               
  Autowired        yes                              
  Autoconfigured   yes                              
 ---------------- ---------------------------------

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

4 participants