175 Commits

Author SHA1 Message Date
Jannik Zschiesche
1a0b035caf Hide excluded services from container debug list 2022-12-14 15:35:54 +01:00
Fabien Potencier
3fc23b6325 feature #47311 [FrameworkBundle] Update ContainerDebugCommand to add parial search for tags (vshevelev, BOB41K1987)
This PR was squashed before being merged into the 6.2 branch.

Discussion
----------

[FrameworkBundle] Update ContainerDebugCommand to add parial search for tags

| Q             | A
| ------------- | ---
| Branch?       | 6.2
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       |
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/pull/17201

As of now, the `debug:container` command allows the use of partial search for the service name but doesn't allow the partial search for `tags`. It can be especially useful when using with `#[AutoconfigureTag]` attribute when the class FQN becomes a tag.
```
namespace App\SomeBundle\SomeService\Inerfaces;

use Symfony\Component\DependencyInjection\Attribute\AutoconfigureTag;

#[AutoconfigureTag]
interface SomeInterface{}
```

As of now, to find the services tagged with this interface we need to execute
`bin/console debug:container --tag=App\\SomeBundle\\SomeService\\Inerfaces\\SomeInterface`
which looks a bit overwhelming.

This PR allows to search simply by
`bin/console debug:container --tag=SomeInterface`
which is much simpler.

In case there are multiple tags containing the string, the command will allow choosing the one the user is looking for:
```
bin/console debug:container --tag=kernel

 Select one of the following tags to display its information:
  [0] kernel.event_listener
  [1] kernel.event_subscriber
  [2] kernel.reset
  [3] kernel.cache_warmer
  [4] kernel.locale_aware
  [5] kernel.fragment_renderer
  [6] kernel.cache_clearer
```

Commits
-------

b301d92686 [FrameworkBundle] Update ContainerDebugCommand to add parial search for tags
2022-08-29 08:42:19 +02:00
v.shevelev
57d107c0f4 [FrameworkBundle] Update ContainerDebugCommand to add parial search for tags 2022-08-29 08:42:14 +02:00
Fabien Potencier
57ef7d396c minor #47390 [CS] Remove @inheritdoc PHPDoc (lyrixx)
This PR was merged into the 6.2 branch.

Discussion
----------

[CS] Remove `@inheritdoc` PHPDoc

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

---

It looks like this PHP Doc is useless. IDEs are able to inherit the doc (at least VS Code
and PHP Storm). And tools like PHP Stan are able to too https://phpstan.org/r/74a2c008-ff2b-42c0-8edf-8da87c1a7b5f

I could have open an RFC before doing the PR, but it was easy :) So let's discuss here

Commits
-------

015d5015e3 [CS] Remove `@inheritdoc` PHPDoc
2022-08-26 07:51:22 +02:00
Antoine Lamirault
4cf2940719 Remove usage of empty function when possible 2022-08-26 07:47:51 +02:00
Grégoire Pineau
fb7ade8fab [CS] Remove @inheritdoc PHPDoc 2022-08-25 17:27:04 +02:00
Antoine Makdessi
2cbed120e8 [FrameworkBundle] Add service and alias deprecation message to debug:container <name> output 2022-07-21 09:34:30 +02:00
Nicolas Grekas
2f3f5384cd Bump minimum version of PHP to 8.1 2022-02-25 12:15:52 +01:00
Alexander M. Turek
7a215eb23c Merge branch '5.4' into 6.0
* 5.4: (27 commits)
  feat: add completion for DebugAutowiring search argument
  [Routing] Add support for aliasing routes
  [DependencyInjection] only allow `ReflectionNamedType` for `ServiceSubscriberTrait`
  Fix CS
  [Console] Open CompleteCommand for custom outputs
  [Intl] Update the ICU data to 70.1
  [Messenger] Add completion for failed messages commands.
  Fix tests
  Fixing missing full_stack variable that's needed by toolbar.html.twig
  [PropertyInfo] Bump phpstan/phpdoc-parser
  [Security] Backport type fixes
  [VarExporter] escape unicode chars involved in directionality
  [Framework] Add completion to debug:container
  [Messenger] Add completion to command messenger:consume
  [Intl] Update the ICU data to 70.1
  Fix more generic types
  Default access_decision_manager.strategy option with merge.
  Fix typos
  Update validators.ca.xlf
  Add missing Validator translations for Estonian
  ...

Signed-off-by: Alexander M. Turek <me@derrabus.de>
2021-11-04 18:14:40 +01:00
Jérôme TAMARELLE
4ac2f7fa0b [Framework] Add completion to debug:container 2021-11-03 14:42:39 +01:00
Robin Chalas
c1ad9bd96a Merge branch '5.4' into 6.0
* 5.4:
  [Security][WIP] Add authenticators info to the profiler
  [Translation] Use symfony default locale when pulling translations from providers
  added missing translations for Bosnian (bs)
  Add the missing greek translations for security core and validator component
  [HttpKernel] Fix return types in `EventDataCollector`
  Do not call substr_count() if ip is null to avoid deprecation warning in PHP 8.1
  [Security][Validator] Add missing translations for Slovenian (sl)
  [Messenger] Add worker metadata inside logs
  [Messenger] Log when worker should stop and when `SIGTERM` is received
  cs fix
  [Security][Validator] Add missing translations for Finnish (fi)
  [VarDumper] returns a 500 when dd() is executed
  chore(VarDumper): declare that dd() never returns
  [MonologBridge] Deprecate the Swiftmailer handler
  [Cache] Commit items implicitly only when deferred keys are requested
  [MonologBridge] Deprecates ResetLoggersWorkerSubscriber
  Fix "can not" spelling
  [HttpClient] fix missing kernel.reset tag on TraceableHttpClient services
  [Form] Fix ChoiceType Extension to effectively set and use the translator
  Added new CssColor constraint
2021-10-11 18:08:10 +02:00
Michael Voříšek
2e213a04c4 Fix "can not" spelling 2021-10-06 09:48:14 +02:00
Nicolas Grekas
54788c67a5 Use #[AsCommand] to describe commands 2021-09-30 17:28:07 +02:00
Nicolas Grekas
4a8f8840cc Merge branch '5.2' into 5.3
* 5.2:
  Leverage str_contains/str_starts_with
  Leverage str_ends_with
2021-07-21 14:40:44 +02:00
Nicolas Grekas
276a57b3c9 Merge branch '4.4' into 5.2
* 4.4:
  Leverage str_contains/str_starts_with
  Leverage str_ends_with
2021-07-21 14:38:00 +02:00
Alexander M. Turek
d6e4f596a5 Leverage str_contains/str_starts_with
Signed-off-by: Alexander M. Turek <me@derrabus.de>
2021-07-21 14:19:41 +02:00
Nyholm
0700ad9e52 [FrameworkBundle] Add argument KernelInterface to BuildDebugContainerTrait::getContainerBuilder() 2021-04-14 10:59:53 +02:00
Fabien Potencier
3f8b570669 Merge branch '5.2' into 5.x
* 5.2:
  Fix #36973: Command description consistency
  Render email once
2021-03-06 09:05:19 +01:00
Fabien Potencier
a26f088761 Merge branch '4.4' into 5.2
* 4.4:
  Fix #36973: Command description consistency
  Render email once
2021-03-06 08:59:01 +01:00
Dane Powell
1d7c9a5590 Fix #36973: Command description consistency 2021-03-05 09:58:50 -08:00
Nicolas Grekas
a2ab2c0854 [Console] enable describing commands in ways that make the list command lazy 2021-01-20 12:45:16 +01:00
Nicolas Grekas
1e1d4eb97c Merge branch '3.4' into 4.4
* 3.4:
  Enable "native_constant_invocation" CS rule
  Make AbstractPhpFileCacheWarmer public
2020-09-02 18:08:58 +02:00
Robin Chalas
012397dc61 [FrameworkBundle] Add file links to named controllers in debug:router 2020-04-01 17:47:21 +02:00
Noémi Salaün
c98322b2d5 [FrameworkBundle] add all formats support for debug:container --deprecations command 2020-03-13 13:34:21 +01:00
Amrouche Hamza
9e301dce46 [FrameworkBundle] add --deprecations on debug:container command 2020-03-12 18:25:48 +01:00
Nicolas Grekas
2e4d31dd0e Merge branch '4.4' into 5.0
* 4.4:
  [DoctrineBridge] [DX] Improve condition for exception text in ManagerRegistry to avoid confusion
  Fix testing with mongodb
  suggest a non-deprecated function replacement
  Minor Travis cosmetic patch
  [Cache] fix checking for igbinary availability
  [HttpKernel] Check if lock can be released
  Fixes a runtime error (Impossible to access an attribute ("value") on a double variable...) when accessing the cache panel (@see #35419)
  bumped Symfony version to 4.4.4
  updated VERSION for 4.4.3
  updated CHANGELOG for 4.4.3
  bumped Symfony version to 4.3.11
  updated VERSION for 4.3.10
  updated CHANGELOG for 4.3.10
  bumped Symfony version to 3.4.38
  updated VERSION for 3.4.37
  update CONTRIBUTORS for 3.4.37
  updated CHANGELOG for 3.4.37
  [FrameworkBundle] Add --show-arguments example to debug:container command help text
2020-01-23 12:07:12 +01:00
Jan Schädlich
2314a707a6 [FrameworkBundle] Add --show-arguments example to debug:container command help text 2020-01-20 13:24:26 +01:00
Nicolas Grekas
3c8e117536 Merge branch '4.4' into 5.0
* 4.4: (30 commits)
  [Security] Check UserInterface::getPassword is not null before calling needsRehash
  gracefully handle missing event dispatchers
  Fix TokenStorage::reset not called in stateless firewall
  [DotEnv] Remove `usePutEnv` property default value
  [HttpFoundation] get currently session.gc_maxlifetime if ttl doesnt exists
  Set up typo fix
  [DependencyInjection] Handle env var placeholders in CheckTypeDeclarationsPass
  [Cache] fix memory leak when using PhpArrayAdapter
  [Validator] Allow underscore character "_" in URL username and password
  [TwigBridge] Update bootstrap_4_layout.html.twig
  [FrameworkBundle][SodiumVault] Create secrets directory only when needed
  fix parsing negative octal numbers
  [SecurityBundle] Passwords are not encoded when algorithm set to \"true\"
  [DependencyInjection] Resolve expressions in CheckTypeDeclarationsPass
  [SecurityBundle] Properly escape regex in AddSessionDomainConstraintPass
  do not validate passwords when the hash is null
  [DI] fix resolving bindings for named TypedReference
  [Config] never try loading failed classes twice with ClassExistenceResource
  [Mailer] Fix SMTP Authentication when using STARTTLS
  [DI] Fix making the container path-independent when the app is in /app
  ...
2019-12-07 17:40:37 +01:00
Christian Flothmann
c71ab8d335 Merge branch '4.3' into 4.4
* 4.3:
  [DotEnv] Remove `usePutEnv` property default value
  Set up typo fix
  [Validator] Allow underscore character "_" in URL username and password
  [SecurityBundle] Passwords are not encoded when algorithm set to \"true\"
  do not validate passwords when the hash is null
  [DI] fix resolving bindings for named TypedReference
  [DI] Fix making the container path-independent when the app is in /app
  Allow copy instead of symlink for ./link script
  [FrameworkBundle] resolve service locators in `debug:*` commands
  bumped Symfony version to 4.3.10
  updated VERSION for 4.3.9
  updated CHANGELOG for 4.3.9
  bumped Symfony version to 3.4.37
  updated VERSION for 3.4.36
  update CONTRIBUTORS for 3.4.36
  updated CHANGELOG for 3.4.36
  Add test on ServerLogHandler
2019-12-06 14:32:19 +01:00
Christian Flothmann
7638af739d Merge branch '3.4' into 4.3
* 3.4:
  [Validator] Allow underscore character "_" in URL username and password
  [SecurityBundle] Passwords are not encoded when algorithm set to \"true\"
  do not validate passwords when the hash is null
  [DI] Fix making the container path-independent when the app is in /app
  Allow copy instead of symlink for ./link script
  [FrameworkBundle] resolve service locators in `debug:*` commands
  bumped Symfony version to 3.4.37
  updated VERSION for 3.4.36
  update CONTRIBUTORS for 3.4.36
  updated CHANGELOG for 3.4.36
2019-12-06 14:11:20 +01:00
Nicolas Grekas
bb09062dd1 [FrameworkBundle] resolve service locators in debug:* commands 2019-12-02 14:28:43 +01:00
Nicolas Grekas
7d593bae88 Merge branch '4.4'
* 4.4:
  [travis] Fix build-packages script
  Add types to constructors and private/final/internal methods (Batch III)
  [HttpClient] Async HTTPlug client
  [Messenger] Allow to configure the db index on Redis transport
  [HttpClient] bugfix exploding values of headers
  [VarDumper] Made all casters final
  [VarDumper] Added a support for casting Ramsey/Uuid
  Remove useless testCanCheckIfTerminalIsInteractive test case
  [Validator] Add the missing translations for the Thai (\"th\") locale
  [Routing] gracefully handle docref_root ini setting
  [Validator] Fix ValidValidator group cascading usage
2019-10-07 14:45:39 +02:00
Nicolas Grekas
ba09ebf656 minor #33770 Add types to constructors and private/final/internal methods (Batch III) (derrabus)
This PR was squashed before being merged into the 4.4 branch (closes #33770).

Discussion
----------

Add types to constructors and private/final/internal methods (Batch III)

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | #32179, #33228
| License       | MIT
| Doc PR        | N/A

Followup to #33709, this time with:
* Validator
* VarDumper
* Workflow
* Yaml
* all bridges
* all bundles

That should be the final batch. 😃

Commits
-------

6493902287 Add types to constructors and private/final/internal methods (Batch III)
2019-10-07 13:33:36 +02:00
Alexander M. Turek
4426ee3231 Add types to constructors and private/final/internal methods (Batch III) 2019-10-07 13:33:25 +02:00
Nicolas Grekas
e1d385e7fd Merge branch '4.4'
* 4.4: (24 commits)
  [Console] Command::execute() should always return int - deprecate returning null
  [FrameworkBundle] Fix wrong returned status code in ConfigDebugCommand
  [AnnotationCacheWarmer] add RedirectController to annotation cache
  [WebProfilerBundle] Try to display the most useful panel by default
  Add note about deprecating the XmlEncoder::TYPE_CASE_ATTRIBUTES constant in the upgrade guide
  fix merge
  [DI] add tests loading calls with returns-clone
  [DI] dont mandate a class on inline services with a factory
  Fixed Redis Sentinel usage when only one Sentinel specified
  [EventDispatcher] Added tests for aliased events.
  Sync Twig templateExists behaviors
  Fix the :only-of-type pseudo class selector
  Deprecate the XmlEncoder::TYPE_CASE_ATTRIBUTES constant
  [Mailer] Tweak some code
  [Serializer] Add CsvEncoder tests for PHP 7.4
  Copy phpunit.xsd to a predictable path
  [WebserverBundle] Remove duplicated deprecation message
  remove duplicated test
  [Security/Http] fix parsing X509 emailAddress
  [FrameworkBundle] conflict with VarDumper < 4.4
  ...
2019-10-02 17:00:37 +02:00
Jan Schädlich
38fc5d8a95 [Console] Command::execute() should always return int - deprecate returning null
- added deprecation message for non-int return value in Command::execute()
- fixed all core commands to return proper int values
- added proper return type-hint to Command::execute() method in all core Commands
2019-10-02 16:44:58 +02:00
Nicolas Grekas
100f6e948e Add return types to internal|final|private methods 2019-08-20 17:32:53 +02:00
Nicolas Grekas
86b09432ee Merge branch '4.2' into 4.3
* 4.2:
  fix tests
  [Validator] Added support for validation of giga values
  Fix Debug component tests
2019-07-19 10:33:28 +02:00
Nicolas Grekas
2cee0b373a Merge branch '3.4' into 4.2
* 3.4:
  fix tests
  [Validator] Added support for validation of giga values
  Fix Debug component tests
2019-07-19 10:33:10 +02:00
Christian Flothmann
5a5f785992 fix tests 2019-07-19 10:16:37 +02:00
Nicolas Grekas
03337bb92c Merge branch '4.4'
* 4.4:
  Properly handle optional tag attributes for !tagged_iterator
  [Mime] rename Headers::getAll() to all()
  [Mailer] Fix phpdoc for variadic methods
  [DI] Move non removing compiler passes to after removing passes
  [Process] Deprecate Process::inheritEnvironmentVariables()
  [HttpClient] fix debug output added to stderr at shutdown
2019-07-18 22:51:58 +02:00
Alex Pott
542c95cd48 [DI] Move non removing compiler passes to after removing passes 2019-07-18 19:01:22 +02:00
dFayet
73d51f2a88 Replace @return annotation by return type in final classes 2019-06-23 00:57:33 +02:00
Nicolas Grekas
0064e75afa [FrameworkBundle] remove deprecated code paths 2019-06-06 19:13:23 +02:00
Robin Chalas
d67d318907 [FrameworkBundle] Mention that the described service has been removed in debug:container 2019-05-17 16:46:37 +02:00
Grégoire Pineau
acd6b69607 [FrameworkBundle] Fixed issue when a parameter container a '%'
On my computer:
```
dump(get_cfg_var('xdebug.file_link_format'));
"subl://%f:%l"
```

When I ran `bin/console debug:config framework` I got this exception:

```

In ParameterBag.php line 100:

  [Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException]
  The parameter "templating.helper.code.file_link_format" has a
dependency on a non-existent parameter "f:".

Exception trace:
 () at
/home/gregoire/dev/github.com/lyrixx/symfony/src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBag.php:100
...
```

This issue was introduced
[here](https://github.com/symfony/symfony/pull/27684/files#diff-b3847149480405e1de881530b4c75ab5L212)
2019-05-10 11:48:49 +02:00
Nicolas Grekas
998810e8a7 Merge branch '4.2' into 4.3
* 4.2:
  [Routing] Fixed unexpected 404 NoConfigurationException
  [DI] Removes number of elements information in debug mode
  [Contracts] Simplify implementation declarations
  Update PR template for 4.3
  [Intl] Add FallbackTrait for data generation
  [Console] Commands with an alias should not be recognized as ambiguous
  clarify the possible class/interface of the cache
2019-05-09 11:33:12 +02:00
Nicolas Grekas
30f75e54cc Merge branch '3.4' into 4.2
* 3.4:
  [DI] Removes number of elements information in debug mode
  Update PR template for 4.3
  [Intl] Add FallbackTrait for data generation
  [Console] Commands with an alias should not be recognized as ambiguous
  clarify the possible class/interface of the cache
2019-05-09 11:19:46 +02:00
Jan Schädlich
d03d3dbc5e [DI] Removes number of elements information in debug mode 2019-05-09 10:35:56 +02:00
Fabien Potencier
13ff6929c0 Merge branch '4.2'
* 4.2:
  Revert "bug #30620 [FrameworkBundle][HttpFoundation] make session service resettable (dmaicher)"
  [Workflow] Fixed dumping when many transition with same name exist
  relax assertions in tests
  fix ConsoleFormatter - call to a member function format() on string
  Made `debug:container` and `debug:autowiring` ignore starting backslash in service id
  [Validator] Translate messages into Japanese
  Fix Thai translation in validators.th.xlf
  [FramworkBundle] mark any env vars found in the ide setting as used
2019-05-01 10:40:02 +02:00