laminas / laminas-mvc-skeleton

Skeleton application for creating laminas-mvc based projects.
https://docs.laminas.dev/mvc/
BSD 3-Clause "New" or "Revised" License
172 stars 66 forks source link

Support php 8.1 #46

Closed sdykae closed 2 years ago

sdykae commented 2 years ago

Feature Request

Support php 8.1.1

Q A
New Feature yes
RFC yes/no
BC Break yes/no

Summary

Koen1999 commented 2 years ago

This change implies that the skeleton should deliver laminas-cache ^3, but since this new version, the cache adapters are no longer directly required. Do we want to supply a cache adapter as default? If so, which? Asking for all possible cache adapters is rather tedious.

  Problem 1
    - Root composer.json requires laminas/laminas-cache ^3.0.0 -> satisfiable by laminas/laminas-cache[3.0.0, ..., 3.1.2].
    - laminas/laminas-cache[3.0.0, ..., 3.1.2] require laminas/laminas-cache-storage-implementation 1.0 -> could not be found in any version, but the following packages provide it:
      - doctrine/doctrine-module Laminas Module that provides Doctrine basic functionality required for ORM and ODM modules
      - laminas/laminas-cache-storage-adapter-filesystem Laminas cache adapter for filesystem
      - laminas/laminas-cache-storage-adapter-memory Laminas cache adapter for memory
      - laminas/laminas-cache-storage-adapter-redis Laminas cache adapter for redis
      - laminas/laminas-cache-storage-adapter-memcached Laminas cache adapter for memcached
      - laminas/laminas-cache-storage-adapter-blackhole Laminas cache adapter for blackhole
      - laminas/laminas-cache-storage-adapter-apcu Laminas cache adapter for apcu
      - laminas/laminas-cache-storage-adapter-ext-mongodb Laminas cache adapter for ext-mongodb
      - laminas/laminas-cache-storage-adapter-session Laminas cache adapter for session
      - laminas/laminas-cache-storage-adapter-zend-server Laminas cache adapter for zend-server
      - laminas/laminas-cache-storage-adapter-memcache Laminas cache adapter for memcache
      - laminas/laminas-cache-storage-adapter-apc Laminas cache adapter
      - laminas/laminas-cache-storage-adapter-dba Laminas cache adapter for dba
      - laminas/laminas-cache-storage-adapter-mongodb Laminas cache adapter for mongodb
      - laminas/laminas-cache-storage-adapter-wincache Laminas cache adapter for wincache
      - laminas/laminas-cache-storage-adapter-xcache Laminas cache adapter for xcache
      - cytec/laminas-cache-predis Redis adapter for Laminas Framework 3 with tagging support
      Consider requiring one of these to satisfy the laminas/laminas-cache-storage-implementation requirement.requirement.
    - Root composer.json requires laminas/laminas-mvc-form ^1.1.0 -> satisfiable by laminas/laminas-mvc-form[1.1.0, 1.2.0].
Ocramius commented 2 years ago

IMO just laminas-cache-storage-adapter-blackhole would suffice, but needs guidance on how to install another one :thinking:

@boesing what are your thoughts on this?

boesing commented 2 years ago

Well, tough one. We could add all currently known cache adapters to the Q&A section in composer.extra so the user will be asked which adapter he wants to install. A direct dependency on laminas-cache actually makes no sense as it won't work as a standalone component anymore.

Maybe adopting some cascading question tree would suffice. like:

Q: "Do you want to use caching?" A: "yes" Q: "Awesome! What cache backend do you want to use ... ?" (<- not sure about this, this should just be an example) A: "uhm, well, filesystem would be great"

But this would mean additional refactoring here. Maybe removing cache from the skeleton might work to avoid having a major refactoring here while re-adding the cache question in a dedicated feature later on.


Hm, laminas-cache was already removed by @samsonasik a few months back (I guess exactly due to this problem) so merging this up to 2.0.x might already solve the issue: https://github.com/laminas/laminas-mvc-skeleton/pull/45

Ocramius commented 2 years ago

It seems like this is the last issue in the "PHP 8.1 support" project: https://github.com/orgs/laminas/projects/16#card-76295065