Closed bds-viktoras closed 4 years ago
Thank you for bringing this up! Unfortunately, I didn‘t get around creating a new major bundle release in time. I‘ll create a new release of the SDK that removes the deprecation warnings again and let you know once it’s done.
I just released 1.5.0 of the bundle, please let me know if this fixes the issue for you.
Unfortunately not. The reason is that bundle's usage suggest $this->get('firebase')
(aliased version), which instantiates \Kreait\Firebase class through ProjectFactory::create()
.
The following problems then happen:
\Kreait\Firebase
is deprecated since version 4.33. Obviously all the methods inside of this class are deprecated as well;ProjectFactory::create()
calls $factory->create()
, which is deprecated as well;Ah, I assumed that removing the „trigger_errors“ calls would be enough... unfortunately the only solution at this point in time would be to fix the SDK version to 4.32.0 in your root composer JSON until I can find the time to update the bundle :/.
An alternative would be to define the services manually in your project (without the bundle)...
Sorry for the inconvenience!
How do you get the deprecation warnings? I'm using the bundle in https://github.com/jeromegamez/firebase-php-examples and I don't get them.
Sorry, I should have been more specific: I meant "soft deprecations" (IDE and code tools warnings) as opposed to "hard deprecations" (actual errors being triggered).
In any case, right now the dependencies that allows to use this bundle without deprecations are:
"kreait/firebase-php": "4.32",
"kreait/firebase-bundle": "1.3",
Ah, now I get it, thanks for clearing it up! I will extend the bundle so that it follows the recommendations of the SDK, but I, unfortunately, don't know yet when I will find the time.
That being said - even if the methods are deprecated, you can still use them (but I know that you know that 😅). As for the code tools, could perhaps https://symfony.com/doc/current/components/phpunit_bridge.html#direct-and-indirect-deprecations help? I'm not super-familiar with that, but I think this could be used to ignore those deprecations.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
A sample usage as per readme, for example,
$container->get('firebase')
triggers deprecations, as the main bundle got a lot of deprecations since version 4.33.