Spomky-Labs / pwa-bundle

PHP library for generating a full featured PWA manifest

Home Page:https://pwa.spomky-labs.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Warning message: Dto\ResourceCache" class is considered final.

tacman opened this issue · comments

Version(s) affected

1.2.x

Description

1x: The "SpomkyLabs\PwaBundle\Dto\ResourceCache" class is considered final. It may change without further notice as of its next major version. You should not extend it from "SpomkyLabs\PwaBundle\Dto\PageCache".
1x in AllRoutesTest::testRoutesDoNotReturnInternalError from App\Tests

How to reproduce

I saw this when running phpunit in an application that uses the bundle.

Possible Solution

remove final from Dto\ResourceCache"?

Additional Context

No response

Hi @tacman,

ResourceCache will replace PageCache That is final too. There is no reason to extend those classes are thay are used internaly and generated from the configuration (resource_cache).
You can safely ignore this warning as long as you do not extend it.

Right, but the deprecation messages are showing up in the logs. Since PageCache does extend ResourceCache, it shouldn't be marked as final, right?

[Application] May 10 15:20:10 |INFO | DEPREC User Deprecated: The "SpomkyLabs\PwaBundle\Dto\ResourceCache" class is considered final. It may change without further notice as of its next major version. You should not extend it from "SpomkyLabs\PwaBundle\Dto\PageCache".
[Application] May 10 15:20:10 |INFO | DEPREC User Deprecated: The "SpomkyLabs\PwaBu