Closed emarref closed 4 years ago
Fixes #106
Relevant deprecation was introduced here https://github.com/symfony/http-foundation/commit/a58963c804eb8de3f08ba3418c4146cff9042e2a
Why isn't this merged? The pipline only fails because other deprecation which is fixed in https://github.com/suncat2000/MobileDetectBundle/pull/133
Creating a
new Cookie()
in SF4.2 triggers a deprecation notice, causing test suites to fail. The deprecation notice relates to the default value of two of the cookie constructor arguments. The notice suggests using theCookie::create()
method, but this is not available in Symfony versions older than 4.2. The alternative is to explicitly set values for all constructor arguments. This allows compatibility with older versions of Symfony while also supporting the newer versions in future.This pull request introduces those arguments and sets them explicitly, maintaining current behaviour with no backwards-breaking changes.