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

Skip to content

[Cache] make PhpMarshaller handle hard references #28188

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
Aug 19, 2018

Conversation

nicolas-grekas
Copy link
Member

@nicolas-grekas nicolas-grekas commented Aug 10, 2018

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

This PR makes the interface and behavior of PhpMarshaller cleaner and bullet-proof.
While a bug fix at this stage, I'd like to propose splitting it to a new VarExporter component all goes well.

@nicolas-grekas
Copy link
Member Author

PR is green and ready.
By making PhpMarshaller handle arbitrary PHP values, we also simplify the PHP-based adapters \o/.

*
* @internal
*/
public static function marshall($values, $objectsPool, &$refsPool, &$objectsCount, &$valuesAreStatic)
Copy link
Member

Choose a reason for hiding this comment

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

should we have typehints here ?

Copy link
Member Author

Choose a reason for hiding this comment

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

See above:

For performance this method is public and has no type-hints.

Since this method (and class) is internal, we can do it.

@stof
Copy link
Member

stof commented Aug 13, 2018

What is the goal of extracting the Marshaller class out of PhpMarshaller ? This makes review harder (as it is much harder to see which code was changed when moving it) and I don't see any usage out of PhpMarshaller

@nicolas-grekas
Copy link
Member Author

The goal is allowing extra performance by making the old "doMarshall" method public and type-hint-less (see my reply to your previous comment.)
About helping reviews, I agree, but this is not-released code so we should do all design changes now.

@nicolas-grekas nicolas-grekas force-pushed the var-exporter branch 2 times, most recently from c91729f to 69c5e8e Compare August 14, 2018 14:11
@nicolas-grekas nicolas-grekas merged commit bc5d208 into symfony:master Aug 19, 2018
nicolas-grekas added a commit that referenced this pull request Aug 19, 2018
…-grekas)

This PR was merged into the 4.2-dev branch.

Discussion
----------

[Cache] make PhpMarshaller handle hard references

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

This PR makes the interface and behavior of `PhpMarshaller` cleaner and bullet-proof.
While a bug fix at this stage, I'd like to propose splitting it to a new `VarExporter` component all goes well.

Commits
-------

bc5d208 [Cache] make PhpMarshaller handle hard references
@nicolas-grekas nicolas-grekas deleted the var-exporter branch August 19, 2018 16:16
@nicolas-grekas nicolas-grekas modified the milestones: next, 4.2 Nov 1, 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.

3 participants