Skip to content
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

Added missing "__call" to TraceableNormalizer #46509

Closed
wants to merge 20 commits into from
Closed

Added missing "__call" to TraceableNormalizer #46509

wants to merge 20 commits into from

Conversation

danielburger1337
Copy link
Contributor

Q A
Branch? 6.1
Bug fix? yes
New feature? no
Deprecations? no
Tickets symfony/maker-bundle#1252
License MIT
Doc PR none

Added missing __call method to the new TraceableNormalizer.
This method was forgotten and breaks custom normalizers that have public methods outside of the NormalizerInterface.

This approach is already being used for TreaceableAuthenticator, TraceableEventDispatcher, LoggingTranslator etc...

nicolas-grekas and others added 20 commits May 8, 2022 12:14
* 6.1:
  do not accept array input when a form is not multiple
  Update PR template
  [FrameworkBundle] fix tests
  Fix merge
  [Mime] Throw exception when body in Email attach method is not ok
  [VarDumper][VarExporter] Deal with DatePeriod->include_end_date on PHP 8.2
  [Cache] Throw when "redis_sentinel" is used with a non-Predis "class" option
  New bundle path convention when AbstractBundle is used
  fix merge
  Bootstrap 4 fieldset for row errors
  [Form] Fix same choice loader with different choice values
  [Filesystem] Safeguard (sym)link calls
  Fix dumping extension config without bundle
  [HttpClient] Honor "max_duration" when replacing requests with async decorators
  [FrameworkBundle] Simplify registration of #[AsRoutingConditionService]
  [HttpClient] Add missing HttpOptions::setMaxDuration()
  [HttpKernel] Fix missing null type in `ErrorListener::__construct()`
  [HttpFoundation] [Session] Overwrite invalid session id
* 6.1:
  Fix merge
  Fix merge
  [FrameworkBundle] fix tests
  [FrameworkBundle] fix wiring of annotations.cached_reader
  [SecurityBundle] Remove dead `class_exists` checks
  Fix BC break
  [DependencyInjection] Ignore unused bindings defined by attribute
  [ErrorHandler] update tentative types
* 6.1:
  [DoctrineBridge] Don't reinit managers when they are proxied as ghost objects
  Revert "bug #46125 [FrameworkBundle] Always add CacheCollectorPass (fancyweb)"
* 6.1:
  [ExpressionLanguage] Fix null-safe chaining
  [Console] Complete negatable options (Fish)
  [PropertyInfo] Fix resolution of partially docblock covered constructors
  [DependencyInjection] Fix "proxy" tag: resolve its parameters and pass it to child definitions
  Complete negatable options
…erve PHP references when using it (nicolas-grekas)

This PR was merged into the 6.2 branch.

Discussion
----------

[DependencyInjection] Add Hydrator::hydrate() and preserve PHP references when using it

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

To make it easy to hydrate already created objects (usually created without calling the constructor.)

 * Add `Hydrator::hydrate()`
 * Preserve PHP references also when using `Hydrator::hydrate()` or `Instantiator::instantiate()`
 * Add support for hydrating from native (array) casts

Commits
-------

e1a8502 [VarExporter] Add `Hydrator::hydrate()` and preserve PHP references when using it
* 6.1:
  [MonologBridge] Add Test for FirePHPHandler
  Fix typo
  ensure that the $response property is initialized before being read
  CS fix
  Bump Symfony version to 6.1.1
  Update VERSION for 6.1.0
  Update CHANGELOG for 6.1.0
  Bump Symfony version to 6.0.10
  Update VERSION for 6.0.9
  Update CHANGELOG for 6.0.9
  Bump Symfony version to 5.4.10
  Update VERSION for 5.4.9
  Update CHANGELOG for 5.4.9
  Bump Symfony version to 4.4.43
  Update VERSION for 4.4.42
  Update CONTRIBUTORS for 4.4.42
  Update CHANGELOG for 4.4.42
…-grekas)

This PR was merged into the 6.2 branch.

Discussion
----------

[DependencyInjection] Optimize dumped container

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

Commits
-------

9e32833 [DependencyInjection] Optimize dumped container
…ror pages (nicolas-grekas)

This PR was merged into the 6.2 branch.

Discussion
----------

[ErrorHandler][HttpKernel] Add favicon to welcome and error pages

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

Similar to symfony/recipes#1023, saves some spammy http requests when displaying those pages.

Commits
-------

af57714 [HttpKernel][ErrorHandler] Add favicon to welcome and error pages
…op and Sulu! (nicolas-grekas)

This PR was merged into the 6.2 branch.

Discussion
----------

Update backers of Symfony 6.2: thank you Les-Tilleuls.coop and Sulu!

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

Thank you Les-Tilleuls.coop and Sulu!

/cc `@dunglas` `@chalasr` `@GregoireHebert`
/cc `@chirimoya` `@alexander`-schranz

Note that there is a 3rd sponsor slot remaining for 6.2, and we're now looking for sponsors for 6.3.

Feel free to [reach me](https://symfony.com/support) to know more :)

Commits
-------

b229826 Update backers of Symfony 6.2: thank you Les-Tilleuls.coop and Sulu!
…ling it about excluded symbols (nicolas-grekas)

This PR was merged into the 6.2 branch.

Discussion
----------

[DependencyInjection] Optimize autowiring logic by telling it about excluded symbols

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

Replaces #46275

While inspecting the dumped container of the demo app, I noticed that it contains so-called "errored" services. They come e.g from entities that are used as type-hints on controllers. To compute those services, the autowiring logic currently loads all services looking for possible type-compatible candidates.

But here, we should know that those won't be found: they're excluded from being loaded.

Instead of completely ignoring excluded classes, this PR still registers them, but as abstract and with a special `container.excluded` tag.

This allows the rest of the compilation logic to skip+remove them, while allowing `AutowiringPass` to compute a better error message and way faster.

Here is the relevant part of a https://blackfire.io comparison:

![image](https://user-images.githubusercontent.com/243674/167118702-383a3cd5-a176-4e9f-9218-de48a84fcab3.png)

Commits
-------

739789f [DependencyInjection] Optimize autowiring logic by telling it about excluded symbols
…ds and pagination (HeahDude)

This PR was merged into the 6.2 branch.

Discussion
----------

[Routing] Add `Requirement::POSITIVE_INT` for common ids and pagination

| Q             | A
| ------------- | ---
| Branch?       | 6.1
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | Fix #45528
| License       | MIT
| Doc PR        | ~

I targeted 6.1 because it's not yet released, should I rebase onto 6.2?

ping `@fancyweb` :)

Commits
-------

bea54e6 [Routing] Add `Requirement::POSITIVE_INT` for common ids and pagination
@carsonbot
Copy link

Hey!

I see that this is your first PR. That is great! Welcome!

Symfony has a contribution guide which I suggest you to read.

In short:

  • Always add tests
  • Keep backward compatibility (see https://symfony.com/bc).
  • Bug fixes must be submitted against the lowest maintained branch where they apply (see https://symfony.com/releases)
  • Features and deprecations must be submitted against the 6.2 branch.

Review the GitHub status checks of your pull request and try to solve the reported issues. If some tests are failing, try to see if they are failing because of this change.

When two Symfony core team members approve this change, it will be merged and you will become an official Symfony contributor!
If this PR is merged in a lower version branch, it will be merged up to all maintained branches within a few days.

I am going to sit back now and wait for the reviews.

Cheers!

Carsonbot

@chalasr
Copy link
Member

chalasr commented May 30, 2022

Thanks for the PR. Please rebase against 6.1 (https://symfony.com/doc/current/contributing/code/pull_requests.html#rebase-your-pull-request)

@chalasr
Copy link
Member

chalasr commented May 30, 2022

@danielburger1337
Copy link
Contributor Author

@danielburger1337
Copy link
Contributor Author

Not gonna lie, I don't know how to fix this. I get tons of merge conflicts. I submitted a new PR.

@danielburger1337 danielburger1337 deleted the magic-__call-traceablenormalizer branch May 30, 2022 17:09
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.

None yet

10 participants