nextcloud / cms_pico

🗃 Integrate Pico CMS and let your users manage their own websites
https://apps.nextcloud.com/apps/cms_pico
GNU Affero General Public License v3.0
137 stars 43 forks source link

Incompatible declaration of OCA\CMSPico\Http\PicoAssetResponse::cacheFor #197

Closed Bockeman closed 2 years ago

Bockeman commented 2 years ago

I moved to Nextcloud 22.2.6 and all of the photos on CMSPico pages disappeared.

in settings/admin/logging

  Error PHP Declaration of
  OCA\CMSPico\Http\PicoAssetResponse::cacheFor(int $cacheSeconds, bool $public = false):
  OCA\CMSPico\Http\PicoAssetResponse must be compatible with
  OCP\AppFramework\Http\Response::cacheFor(int $cacheSeconds, bool $public = false, bool $immutable = false) at
  .../apps/cms_pico/lib/Http/PicoAssetResponse.php#105

On a pure hunch, I edited .../apps/cms_pico/lib/Http/PicoAssetResponse.php at line 105:

    /* public function cacheFor(int $cacheSeconds, bool $public = false): self */
    public function cacheFor(int $cacheSeconds, bool $public = false, bool $immutable = false): self

All the photos are now present.

Please could you ensure that the correct fix (as I am unaware of the consequences of my patch) is included in a future release.

PhrozenByte commented 2 years ago

This is a out-of-line BC-breaking change (i.e. a bug) in Nextcloud, see https://github.com/nextcloud/server/pull/31141#discussion_r819101652 and #195

Fixed in 0df01413c82e3a697dbec1e29f089d304b2c1fc6 anyway. Please try the latest v1.0.18.

Bockeman commented 2 years ago

@PhrozenByte Thanks. Fixed for me in v1.0.18