Spomky-Labs / pwa-bundle

PHP library for generating a full featured PWA manifest
https://pwa.spomky-labs.com
MIT License
28 stars 1 forks source link

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

Open tacman opened 1 month ago

tacman commented 1 month ago

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

Spomky commented 1 month ago

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.

tacman commented 1 week ago

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