pomm-project / pomm-symfony-bridge

Pomm2 shared elements for profiler between Silex and Symfony.
8 stars 17 forks source link

Extractors return null with non Pomm classes #39

Closed rdavaillaud closed 6 years ago

rdavaillaud commented 6 years ago

When the extractors are loaded in the Symfony PropertyInfoExtractor, they failed with an exception on non Pomm classes (like with a POPO class). The PropertyInfoExtractor doesn't expect an exception, just a null return value, to try another extractor.

This PR add the null return when the classes doesn't have a Model counterpart.

~This PR also fix a Type problem for Boolean with the Type extractor.~

sanpii commented 6 years ago

Thank you :smiley:

Can you add a test to prevent regression? The pull request should be done in https://github.com/pomm-project/pomm-bundle

This PR also fix a Type problem for Boolean with the Type extractor.

Can you make another a pull request for another fix?

rdavaillaud commented 6 years ago

The pull request should be done in https://github.com/pomm-project/pomm-bundle

Well, I can't, pomm-bundle doesn't have the property extractor, does it?

Can you add a test to prevent regression?

Why not, there is no test in this bundle.

Can you make another a pull request for another fix?

Ok ok, I will. :smiley:

sanpii commented 6 years ago

Well, I can't, pomm-bundle doesn't have the property extractor, does it?

No, but it has an app to test the bundle (including the bridge): https://github.com/pomm-project/pomm-bundle/blob/master/tests/src/AppBundle/Controller/IndexController.php#L140

rdavaillaud commented 6 years ago

Ok, got it!