Code Monkey home page Code Monkey logo

Comments (10)

Saeven avatar Saeven commented on June 14, 2024 1

I haven't dug deep, but would it be possible to wire things up, to make these adapters optional? Requiring only needed adapters would seem to make sense, perhaps listing them in "suggest" block, instead of forcing the kitchen sink.

On PHP8 right now, doctrine-module requires laminas-cache, laminas-cache requires various adapters that do not support PHP8 (in their composer.json).

from laminas-cache.

froschdesign avatar froschdesign commented on June 14, 2024 1

@Saeven

Requiring only needed adapters would seem to make sense, perhaps listing them in "suggest" block, instead of forcing the kitchen sink.

Please check the documentation on this topic. There will you find a solution for the current version 2.10 and higher, also how it works in version 3:

https://docs.laminas.dev/laminas-cache/installation/

from laminas-cache.

boesing avatar boesing commented on June 14, 2024

Just a side-note here.

I am pretty sure that there wont be support for PHP 8.0 on:

  • laminas-cache-storage-adapter-wincache
  • laminas-cache-storage-adapter-xcache
  • laminas-cache-storage-adapter-mongodb
  • laminas-cache-storage-adapter-apc

I am not that sure about:

  • laminas-cache-storage-adapter-zend-server
  • laminas-cache-storage-adapter-dba

from laminas-cache.

Saeven avatar Saeven commented on June 14, 2024

Thank you. I had tried including 3.0.x-dev, which is what motivated my question above. Under 3.0.x, the issue perdures:

    - laminas/laminas-cache 3.0.x-dev requires laminas/laminas-cache-storage-adapter-apc ^1.0 -> satisfiable by laminas/laminas-cache-storage-adapter-apc[1.0.0, 1.0.1, 1.0.x-dev, 1.1.x-dev].

I can appreciate that it could just be, that the work is not complete. I'll say thank you in this case. Will be good to avoid having to add all of these replace directives.

from laminas-cache.

boesing avatar boesing commented on June 14, 2024

v3.0 is still in development and thus you should not use it.
v2.11.0 was released with support for PHP 8.0 along with plenty of cache adapters which can be seen in the initial post.

from laminas-cache.

boesing avatar boesing commented on June 14, 2024

Closing this as v2 is mostly PHP 8.0 compatible.

  • Those adapters which can support PHP 8.0 do support PHP 8.0.
  • Those adapters which have no support for PHP 8.0 and wont ever have support for it, were abandoned
  • Only adapter which is still pending is laminas/laminas-cache-storage-adapter-memcached which can be tracked here laminas/laminas-cache-storage-adapter-memcached#2

from laminas-cache.

halfpastfouram avatar halfpastfouram commented on June 14, 2024

Mostly compatible, but not usable. Installing this library on PHP 8 will not work because of the underlying requirements.

Updating dependencies
 Your requirements could not be resolved to an installable set of packages.
 
   Problem 1
     - laminas/laminas-cache-storage-adapter-apc[1.0.0, ..., 1.0.1] require php ^5.6 || ^7.0 -> your php version (8.0.11) does not satisfy that requirement.
     - laminas/laminas-cache 2.13.0 requires laminas/laminas-cache-storage-adapter-apc ^1.0 -> satisfiable by laminas/laminas-cache-storage-adapter-apc[1.0.0, 1.0.1].
     - Root composer.json requires laminas/laminas-cache ^2.13.0 -> satisfiable by laminas/laminas-cache[2.13.0].

So should this issue not stay open until these dependencies are supporting PHP 8.0 or the dependencies are no longer required?

from laminas-cache.

froschdesign avatar froschdesign commented on June 14, 2024

@halfpastfouram

Installing this library on PHP 8 will not work because of the underlying requirements.

Everything is correct here. I think you missed the instructions for installation.

from laminas-cache.

plorenz-etes avatar plorenz-etes commented on June 14, 2024

The instruction worked for most of our projects.
But there was one project, which depended on multiple projects in which the replacement was done.

Adding replaces in the main project composer will throw the following error:

[root@ffc765ad176a html]# php -d memory_limit=8G composer.phar -W update
Loading composer repositories with package information
In Laminas\DependencyPlugin\DependencyRewriterV2::onPrePoolCreate
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - vendor/main-project is present at version dev-master and cannot be modified by Composer
    - Root composer.json requires vendor/sub-project-1 ^1.5 -> satisfiable by vendor/sub-project-1[v1.5.0].
    - vendor/sub-project-2[v1.4.0], vendor/sub-project-1[v1.5.0] cannot be installed as that would require removing vendor/main-project[dev-master]. They all replace laminas/laminas-cache-storage-adapter-apc and thus cannot coexist.
    - Root composer.json requires vendor/sub-project-2 ^1.4 -> satisfiable by vendor/sub-project-2[v1.4.0].

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

Without the replaces in the main project the following errors are thrown:

[root@ffc765ad176a html]# php -d memory_limit=8G composer.phar -W update
Loading composer repositories with package information
In Laminas\DependencyPlugin\DependencyRewriterV2::onPrePoolCreate
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires vendor/sub-project-1 ^1.5 -> satisfiable by vendor/sub-project-1[v1.5.0].
    - Only one of these can be installed: laminas/laminas-cache-storage-adapter-zend-server[1.0.0, 1.0.1], vendor/sub-project-2[v1.4.0], vendor/sub-project-1[v1.5.0]. [vendor/sub-project-2, vendor/sub-project-1] replace laminas/laminas-cache-storage-adapter-zend-server and thus cannot coexist with it.
    - Root composer.json requires vendor/sub-project-2 ^1.4 -> satisfiable by vendor/sub-project-2[v1.4.0].

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

Do you have any hints/ideas how we could circumnavigate this issue?
Would an "archived-projects" composer package which replaces all archived repos and require this in all the subprojects do the trick?
Are there any easier methods?

from laminas-cache.

boesing avatar boesing commented on June 14, 2024

@plorenz-etes I've created a dedicated "issue" for your question. Lets continue there.

from laminas-cache.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.