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

ext-ds support #472

Closed
enumag opened this issue Mar 16, 2021 · 4 comments · Fixed by #484
Closed

ext-ds support #472

enumag opened this issue Mar 16, 2021 · 4 comments · Fixed by #484

Comments

@enumag
Copy link
Contributor

enumag commented Mar 16, 2021

Instead of arrays I much prefer using specialized data structures from ext-ds extension:

Unfortunately Tracy dumper seems unable to show me the contents of the data structures which often leads to important info to be missing on the exception screen.

If I understand Tracy correctly then this should be possible using \Tracy\Dumper::$objectExporters.

@dg
Copy link
Member

dg commented Mar 16, 2021

Yes

@enumag
Copy link
Contributor Author

enumag commented Mar 16, 2021

Code snippet for myself, I'll try to work on it later.

\Tracy\Dumper::$objectExporters[\Ds\Vector::class] = function (\Ds\Vector $obj, Value $value, Describer $describer): void {
	foreach ($obj as $objectKey => $objectValue) {
		$describer->addPropertyTo($value, (string) $objectKey, $objectValue, Value::PROP_PRIVATE, null, \Ds\Vector::class);
	}
};

@enumag
Copy link
Contributor Author

enumag commented Mar 16, 2021

My related PR to Symfony (might need it for inspiration): symfony/symfony#30311

@dg
Copy link
Member

dg commented Mar 16, 2021

So send PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants