RWOverdijk / AssetManager

AssetManager written for zf2. Managing assets for zend framework 2
BSD 2-Clause "Simplified" License
211 stars 83 forks source link

AssetManager is not installable with new skeleton application #192

Closed RalfEggert closed 7 years ago

RalfEggert commented 8 years ago

First I install the new skeleton application and choose the minimal install with no optional packages:

$ composer create-project "zendframework/skeleton-application:dev-develop" zend-project

Then I want to install the AssetManager:

$ composer require rwoverdijk/assetmanager

I get the following messages:

Using version ^1.6 for rwoverdijk/assetmanager
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for rwoverdijk/assetmanager ^1.6 -> satisfiable by rwoverdijk/assetmanager[1.6.0].
    - rwoverdijk/assetmanager 1.6.0 requires zendframework/zend-mvc 2.* -> satisfiable by zendframework/zend-mvc[2.0.3, 2.0.4, 2.0.5, 2.0.6, 2.0.7, 2.0.8, 2.1.0, 2.1.1, 2.1.2, 2.1.3, 2.1.4, 2.1.5, 2.1.6, 2.2.0, 2.2.0rc1, 2.2.0rc2, 2.2.0rc3, 2.2.1, 2.2.10, 2.2.2, 2.2.3, 2.2.4, 2.2.5, 2.2.6, 2.2.7, 2.2.8, 2.2.9, 2.3.0, 2.3.1, 2.3.2, 2.3.3, 2.3.4, 2.3.5, 2.3.6, 2.3.7, 2.3.8, 2.3.9, 2.4.0, 2.4.0rc1, 2.4.0rc2, 2.4.0rc3, 2.4.0rc4, 2.4.0rc5, 2.4.0rc6, 2.4.0rc7, 2.4.1, 2.4.10, 2.4.2, 2.4.3, 2.4.4, 2.4.5, 2.4.6, 2.4.7, 2.4.8, 2.4.9, 2.5.0, 2.5.1, 2.5.2, 2.5.3, 2.6.0, 2.6.1, 2.6.2, 2.6.3, 2.7.0, 2.7.1, 2.7.2, 2.7.3, 2.7.4, 2.7.5, 2.7.6, 2.7.7, 2.7.8] but these conflict with your requirements or minimum-stability.

Installation failed, reverting ./composer.json to its original content.
RWOverdijk commented 8 years ago

I'm not sure why this is happening. If you figure it out I'd love to know. Otherwise please wait until I have some time to look at this :)

RalfEggert commented 8 years ago

My first gues would be the require section of the composer.json:

"require": {
        "php": ">=5.3.3",
        "zendframework/zend-modulemanager": "2.*",
        "zendframework/zend-stdlib": "2.*",
        "zendframework/zend-servicemanager": "2.*",
        "zendframework/zend-loader": "2.*",
        "zendframework/zend-eventmanager": "2.*",
        "zendframework/zend-mvc": "2.*",
        "kriswallsmith/assetic": "~1.2.1"
    },

The new skeleton uses:

"require": {
        "php": "^5.6 || ^7.0",
        "zendframework/zend-component-installer": "^1.0 || ^0.2 || ^1.0.0-dev@dev",
        "zendframework/zend-mvc": "^3.0"
    },

I have no idea how to solve it but maybe using the || for alternative versions might help.

Ocramius commented 8 years ago

Well, clearly incompat with zendframework/zend-mvc:3.0. Needs upgrading, which may require changes (mostly factories-related)

bmerigan commented 8 years ago

You've got a conflict with version numbers in your composer.json files. Maybe you're specifying a particular version of a package, but one of the packages is specifying a different version.

Also ZF2 2.5 drops support for PHP 5.3 Could that be your issue?

mbn18 commented 8 years ago

Just upgraded my Apigility project using composer. The interesting output is:

Updating dependencies (including require-dev)

  • Removing symfony/process (v2.8.8)
  • Removing rwoverdijk/assetmanager (1.6.0)
  • Removing kriswallsmith/assetic (v1.2.1)

It broke the system displaying the error:

Fatal error: Uncaught Zend\ModuleManager\Exception\RuntimeException: Module (AssetManager) could not be initialized. in /srv/httpd/apigility/vendor/zendframework/zend-modulemanager/src/ModuleManager.php on line 203

This fixed the issue: ./composer.phar require "rwoverdijk/assetmanager"

Seems like composer setup problem.

wshafer commented 8 years ago

@mbn18 - Apigility removed the AssetManager from it's list of dependencies in the last update. But that doesn't remove the AssetManager from your list of installed modules, hence the error. With that said, I believe the AssetManager is still being used and added to the list of "suggested" packages for Apigility. So installing this manually was probably the right solution.

wshafer commented 7 years ago

@RWOverdijk - Looks like this issue can also be closed now thanks to: https://github.com/RWOverdijk/AssetManager/pull/193/files

RWOverdijk commented 7 years ago

Ah cool :) Always happy to close tickets!