Closed m4olivei closed 6 years ago
Thanks for that @m4olivei . Do you think if we add that type enforcing thing into our base code would be enough? You can send that piece of code as PR.
@everton-rosario Yeah totally, just making ConstantGetter more liberal like my override class would do it. Sure, I'll file a quick PR.
@everton-rosario I don't have time to dig in to a point where I could add a test, so I'll leave it there for now, feel free to add a test if you think it needs it.
Sounds good @m4olivei
Steps required to reproduce the problem
InvalidArgumentException: Method expects this value ----[
]---- to be one of the types ====[ ]==== in Facebook\InstantArticles\Validators\Type::throwException() (line 182 of /var/www/vendor/facebook/facebook-instant-articles-sdk-php/src/Facebook/InstantArticles/Validators/Type.php).<?php
namespace Drupal\ls_fb_instant_articles\Facebook\InstantArticles\Transformer\Getters;
use Facebook\InstantArticles\Transformer\Getters\ConstantGetter as FacebookConstantGetter; use Facebook\InstantArticles\Validators\Type;
/**
Extend the Facebook ConstantGetter to allow string and integer constants. */ class ConstantGetter extends FacebookConstantGetter {
/**
return $this; }
}