symfonycorp / connect

The SymfonyConnect official API SDK
https://connect.symfony.com/
MIT License
90 stars 40 forks source link

Fix more deprecations #116

Closed javiereguiluz closed 2 years ago

javiereguiluz commented 2 years ago

This is the last series of deprecations that I found in this package when upgrading an app to Symfony 5.4:

Since symfony/security-bundle 5.4: Method "Symfony\Bundle\SecurityBundle\DependencyInjection\SecurityExtension::addSecurityListenerFactory()" is deprecated, use "addAuthenticatorFactory()" instead.

Method "Symfony\Component\EventDispatcher\EventSubscriberInterface::getSubscribedEvents()" might add "array" as a native return type declaration in the future. Do the same in implementation "SymfonyCorp\Connect\Security\EventListener\LoginSuccessEventListener" now to avoid errors or add an explicit @return annotation to suppress this message.

Return type of SymfonyCorp\Connect\Api\Entity\AbstractEntity::offsetExists($index) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

Return type of SymfonyCorp\Connect\Api\Entity\AbstractEntity::offsetGet($index) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

Return type of SymfonyCorp\Connect\Api\Entity\AbstractEntity::offsetSet($index, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

Return type of SymfonyCorp\Connect\Api\Entity\AbstractEntity::offsetUnset($index) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

SymfonyCorp\Connect\Api\Entity\User implements the Serializable interface, which is deprecated. Implement serialize() and unserialize() instead (or in addition, if support for old PHP versions is necessary)

fabpot commented 2 years ago

That beaks support for PHP 7.2 a,d 7.4. We might want to bump the min PHP version here?

fabpot commented 2 years ago

You should also update the Travis config to remove PHP 7.x from the test matrix.

javiereguiluz commented 2 years ago

This is now ready for the final review. Thanks!

javiereguiluz commented 2 years ago

If possible, please let's review this so we can merge and tag it (it's needed to update some applications to Symfony 6.x). Thanks!

nicolas-grekas commented 2 years ago

I force-pushed after squashing + adding one commit of mine.

javiereguiluz commented 2 years ago

Let's try to merge this and tag it as 8.0 the version bump will ensure that no existing app breaks because of these changes. Thanks!

nicolas-grekas commented 2 years ago

tagged v8.0.0