Closed jrbasso closed 4 years ago
Please merge as we also need to override the defaultCache
method to inject Laravel caching system instead of using the default one
why isn't it merged yet ?
Hi all, Thank you for the PR. I understand that this feature is really asked and it lacks to you. But I can't accepted it as it because we don't want our customers be able to change cookies names. For other things ok. So if you remove the late static binding on cookies and fix conflicts I will be able to merge it. Otherwise someone in the team will do the PR as soon as we get a chance to work on it. Thank you
@Raph22 Out of curiosity, why not allowing changing the cookie names?
We rely in it for several things. Especially for the Prismic toolbar and the preview feature.
Thanks a lot @jrbasso !
Released as 5.1.1
Using late static binding allows the developers to extend the original Api class and make some customizations.
With this change, developers can rename the cookie by simply doing like this:
It can also add some logs or manipulation on top of the original class:
These 2 things are not possible currently because the
Api::get()
has the returning forcing to use thePrismic\Api
class. The only alternative would be doing what theApi::get
does on the developer side, which is not great and Prismic's updates could break developer's apps.