Composer install cannot resolve dependencies for ZF2 project anymore - zend-framework

Since Zend has been constantly publishing ZF3 versions of its core packages, I have problems getting my old ZF2 application to work.
If I run composer install with a valid composer.lock in place I get the follwing warnings with most ZF dependencies:
- Installing zendframework/zend-stdlib (2.7.7)
Downloading: 100%
Failed to download zendframework/zend-stdlib from dist: The checksum verification of the file failed (downloaded from https://packages.zendframework.com/composer/zendframework-zend-stdlib-2.7.7-19d9a4.zip)
Now trying to download from source
- Installing zendframework/zend-stdlib (2.7.7)
Cloning baa65aec7bc75260254b5f03447f0c16360f9e59
Since I’ve got a lot of dependencies like that, install/cloning takes forever and never finishes, cause my VM runs out of memory.
Now I tried to either run composer update or delete composer.lock and run composer install again. I even tried removing the packages.zendframework.com repo from composer.json, since Zend says, its not needed anymore.
However, due to the new ZF3 version, I get unresolvable requirements.
Example:
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
- jhuet/zdt-logger-module dev-master requires zendframework/zend-developer-tools ^1.1.0 -> satisfiable by zendframework/zend-developer-tools[1.2.x-dev, 1.1.x-dev].
- Can only install one of: zendframework/zend-developer-tools[dev-master, 1.2.x-dev].
- Conclusion: don't install zendframework/zend-servicemanager 2.7.7
- Conclusion: don't install zendframework/zend-servicemanager 3.1.1
- Conclusion: don't install zendframework/zend-servicemanager 3.1.0
- Installation request for zendframework/zend-developer-tools dev-master -> satisfiable by zendframework/zend-developer-tools[dev-master].
- Conclusion: don't install zendframework/zend-servicemanager 2.7.6|install zendframework/zend-servicemanager 3.1.0
- Installation request for zfcampus/zf-apigility-admin ~1.0 -> satisfiable by zfcampus/zf-apigility-admin[1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.0.5, 1.1.0, 1.1.1, 1.1.2, 1.2.0, 1.2.1, 1.2.2, 1.3.0, 1.3.1, 1.3.2, 1.3.3, 1.4.0, 1.4.1, 1.4.2, 1.4.3, 1.5.0, 1.5.1, 1.5.2, 1.5.3, 1.5.4, 1.5.5, 1.5.6, 1.5.7].
- Installation request for jhuet/zdt-logger-module dev-master -> satisfiable by jhuet/zdt-logger-module[dev-master].
- Installation request for zf-commons/zfc-rbac ~2.0 -> satisfiable by zf-commons/zfc-rbac[2.0.0, 2.1.0, 2.1.1, 2.1.2, 2.2.0, 2.3.0, 2.3.1, 2.4.0, 2.4.1, 2.4.2, v2.5.0, v2.5.1, v2.5.2, v2.5.3, v2.5.4, v2.5.5, v2.5.6].
- jhuet/zdt-logger-module dev-master requires zendframework/zend-servicemanager 3.* -> satisfiable by zendframework/zend-servicemanager[3.0.0, 3.0.1, 3.0.2, 3.0.3, 3.1.0, 3.1.1].
- Can only install one of: zendframework/zend-servicemanager[3.0.0, 2.7.5].
- Can only install one of: zendframework/zend-servicemanager[3.0.1, 2.7.5].
- Can only install one of: zendframework/zend-servicemanager[3.0.2, 2.7.5].
- zendframework/zend-developer-tools 1.1.x-dev requires zendframework/zend-servicemanager ^2.7.5 || ^3.0.3 -> satisfiable by zendframework/zend-servicemanager[2.7.5, 2.7.6, 2.7.7, 3.0.3, 3.1.0, 3.1.1].
- Conclusion: don't install zendframework/zend-servicemanager 3.0.3
The consequences: I’m not able to get my ZF2 app into working condition anymore. How can I fix this?
This is my composer.json:
{
"name": "myapp",
"description": "My app",
"version": "1.5.0",
"require": {
"php": "~7.0",
"ext-intl": ">=1.1.0",
"ext-mbstring": "*",
"zendframework/zendframework": "~2.5",
"zf-commons/zfc-user": "~1.0",
"zf-commons/zfc-rbac": "~2.0",
"zendframework/zendoauth": "~2.0",
"zfcampus/zf-apigility": "~1.0",
"zfcampus/zf-development-mode": "~2.0",
"aws/aws-sdk-php-zf2": "~2.0",
"goalio/goalio-forgotpassword": "~1.0",
"maglnet/magl-markdown": "~1.4",
"ocramius/proxy-manager": "~1.0"
},
"require-dev": {
"zfcampus/zf-apigility-admin": "~1.0",
"zfcampus/zf-apigility-documentation": "~1.0",
"zendframework/zend-developer-tools": "dev-master",
"jhuet/zdt-logger-module": "dev-master",
"bjyoungblood/bjy-profiler": "dev-master"
}
}
I hope, this is solvable somehow without a lot of manual work.

These are issues you may always run into when you require something like dev-master. The best practice would be to stick to semantic version numbers and if a package maintainer follows the semantic versioning you shouldn't run into requiring packages with breaking changes.
In your case you rely on a dev-master version of "jhuet/zdt-logger-module". This one is recently updated to support ZF3. If you remove "jhuet/zdt-logger-module": "dev-master",, it seems to work for me.
To keep that package you need this: "jhuet/zdt-logger-module": "^0.3". This makes sure it doesn't load the newer 1.0.0 package that requires ZF3.

Related

jwt is not installing and give me this error any solution for it?

└─$ composer require tymon/jwt-auth
Using version ^0.5.12 for tymon/jwt-auth
./composer.json has been updated
Running composer update tymon/jwt-auth
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires tymon/jwt-auth ^0.5.12 -> satisfiable by tymon/jwt-auth[0.5.12].
- tymon/jwt-auth 0.5.12 requires illuminate/support ~5.0 -> found illuminate/support[v5.0.0, ..., 5.8.x-dev] but these were not loaded, likely because it conflicts with another require.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.

backpack-for-laravel Error install backpack for Laravel 5.3

When i try install and i have this error:
# composer require backpack/base
Using version ^0.7.3 for backpack/base
./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 backpack/base ^0.7.3 -> satisfiable by backpack/base[0.7.3].
- backpack/base 0.7.3 requires laravel/framework 5.3.* -> satisfiable by laravel/framework[5.3.x-dev, v5.3.0, v5.3.0-RC1, v5.3.1, v5.3.10, v5.3.11, v5.3.12, v5.3.13, v5.3.14, v5.3.15, v5.3.16, v5.3.17, v5.3.18, v5.3.19, v5.3.2, v5.3.3, v5.3.4, v5.3.5, v5.3.6, v5.3.7, v5.3.8, v5.3.9] but these conflict with your requirements or minimum-stability.
Installation failed, reverting ./composer.json to its original content.
How fix that?
You're probably running a Laravel 5.2 app. If so, you have two options:
1) Upgrade from Laravel 5.2 to Laravel 5.3, then try again, it will most definitely work. The Laravel upgrade takes about about 1 hour for a medium-sized project, but you'll have all the benefits of using the latest and greatest (both Laravel and Backpack).
2) Install Backpack for Laravel 5.2, but please be aware you're running an old Backpack version and you won't be receiving any updates or new features.
My recommendation, of course, is option #1. In the end, you'll still need to update Laravel, then update Backpack, so it's best to just do it now.

karma-browserify fails with bundle() no longer accepts options arguments

When I run my karma unit tests I get the following error:
karma start karma.conf.js
Fatal error: bundle() no longer accepts option arguments
Move all option arguments to the browserify() constructor.
I am running using the following versions:
karma 0.12.21
karma-browserify 0.2.1
browserify 5.9.3
The issue is that the karma-browserify version 0.2.1 - currently the latest version - is not compatible with the 5.0.0 release of browserify on Jul 22, 2014.
The package.json in karma-browserify does not prevent the 5.0.0 or greater version of browserify to be installed on an npm install, so when you install a new project or update your browserify version you will get this error.
until karma-browserify is updated you can force your project to use the most recent 4.X version of browserify - which is compatible with karma-browserify - version 4.2.3 via adding the following line to package.json:
"browserify" : "^4.0.0"
then running:
npm update browserify

RubyMine error of No Rails Found in the SDK

I updated to Ruby 2.0 and Rails 4.0 and RubyMine stopped working.
If I do my Rails commands through command line tool, they work just fine but if I want to run my project through RubyMine (the latest version) I get error 134 and No Rails Founds in the SDK error.
So I am sure it is not a big deal and it is just some minor setting that needs to be updated in the IDE but can't figure it out yet. And not sure what kind of details do I need to provide so here is Tools -> Show Gem Environment info from the IDE:
RUBYGEMS VERSION: 2.0.3
RUBY VERSION: 2.0.0 (2013-07-05 patchlevel 251) [x86_64-darwin12.4.0]
INSTALLATION DIRECTORY: /Users/Jony/.rvm/gems/ruby-2.0.0-head
RUBY EXECUTABLE: /Users/Jony/.rvm/rubies/ruby-2.0.0-head/bin/ruby
EXECUTABLE DIRECTORY: /Users/Jony/.rvm/gems/ruby-2.0.0-head/bin
RUBYGEMS PLATFORMS:
ruby
x86_64-darwin-12
GEM PATHS:
/Users/Jony/.rvm/gems/ruby-2.0.0-head
/Users/Jony/.rvm/gems/ruby-2.0.0-head#global
GEM CONFIGURATION:
:update_sources => true
:verbose => true
:backtrace => false
:bulk_threshold => 1000
REMOTE SOURCES:
https://rubygems.org/
----------------------
IDE: JetBrains RubyMine 5.4.3.2.1, build #RM-129.861
OS: Mac OS X 10.8.4[x86_64]
Java: 1.6.0_51-b11-456-11M4508
RubyMine SDK Environment:
Sdk: RVM: ruby-2.0.0-head
Sdk Version: ver.2.0.0p251 p251
Ruby Interpreter: /Users/Jony/.rvm/rubies/ruby-2.0.0-head/bin/ruby
RVM Sdk: yes, gemset:[default]
RVM Home: /Users/Jony/.rvm
Sdk Language Level: 1.9
Sdk Load Path:
~/.rvm/rubies/ruby-2.0.0-head/lib/ruby/site_ruby/2.0.0
~/.rvm/rubies/ruby-2.0.0-head/lib/ruby/site_ruby/2.0.0/x86_64-darwin12.4.0
~/.rvm/rubies/ruby-2.0.0-head/lib/ruby/site_ruby
~/.rvm/rubies/ruby-2.0.0-head/lib/ruby/vendor_ruby/2.0.0
~/.rvm/rubies/ruby-2.0.0-head/lib/ruby/vendor_ruby/2.0.0/x86_64-darwin12.4.0
~/.rvm/rubies/ruby-2.0.0-head/lib/ruby/vendor_ruby
~/.rvm/rubies/ruby-2.0.0-head/lib/ruby/2.0.0
~/.rvm/rubies/ruby-2.0.0-head/lib/ruby/2.0.0/x86_64-darwin12.4.0
/Applications/RubyMine.app/rubystubs20
Sdk Gem paths:
~/.rvm/gems/ruby-2.0.0-head/bundler/gems
~/.rvm/gems/ruby-2.0.0-head/gems
~/.rvm/gems/ruby-2.0.0-head#global/gems
Gems used for 'untitled4':
sprockets-rails (2.0.0)
~/.rvm/gems/ruby-2.0.0-head/gems/sprockets-rails-2.0.0
activerecord (4.0.0)
~/.rvm/gems/ruby-2.0.0-head/gems/activerecord-4.0.0
rack-test (0.6.2)
~/.rvm/gems/ruby-2.0.0-head/gems/rack-test-0.6.2
activesupport (4.0.0)
~/.rvm/gems/ruby-2.0.0-head/gems/activesupport-4.0.0
coffee-script-source (1.6.3)
~/.rvm/gems/ruby-2.0.0-head/gems/coffee-script-source-1.6.3
turbolinks (1.2.0)
~/.rvm/gems/ruby-2.0.0-head/gems/turbolinks-1.2.0
bundler (1.3.5)
~/.rvm/gems/ruby-2.0.0-head#global/gems/bundler-1.3.5
activemodel (4.0.0)
~/.rvm/gems/ruby-2.0.0-head/gems/activemodel-4.0.0
mail (2.5.4)
~/.rvm/gems/ruby-2.0.0-head/gems/mail-2.5.4
rack (1.5.2)
~/.rvm/gems/ruby-2.0.0-head/gems/rack-1.5.2
json (1.8.0)
~/.rvm/gems/ruby-2.0.0-head/gems/json-1.8.0
minitest (4.7.5)
~/.rvm/gems/ruby-2.0.0-head/gems/minitest-4.7.5
tzinfo (0.3.37)
~/.rvm/gems/ruby-2.0.0-head/gems/tzinfo-0.3.37
sass-rails (4.0.0)
~/.rvm/gems/ruby-2.0.0-head/gems/sass-rails-4.0.0
actionmailer (4.0.0)
~/.rvm/gems/ruby-2.0.0-head/gems/actionmailer-4.0.0
hike (1.2.3)
~/.rvm/gems/ruby-2.0.0-head/gems/hike-1.2.3
coffee-script (2.2.0)
~/.rvm/gems/ruby-2.0.0-head/gems/coffee-script-2.2.0
activerecord-deprecated_finders (1.0.3)
~/.rvm/gems/ruby-2.0.0-head/gems/activerecord-deprecated_finders-1.0.3
thread_safe (0.1.0)
~/.rvm/gems/ruby-2.0.0-head/gems/thread_safe-0.1.0
sqlite3 (1.3.7)
~/.rvm/gems/ruby-2.0.0-head/gems/sqlite3-1.3.7
sdoc (0.3.20)
~/.rvm/gems/ruby-2.0.0-head/gems/sdoc-0.3.20
actionpack (4.0.0)
~/.rvm/gems/ruby-2.0.0-head/gems/actionpack-4.0.0
tilt (1.4.1)
~/.rvm/gems/ruby-2.0.0-head/gems/tilt-1.4.1
jquery-rails (3.0.2)
~/.rvm/gems/ruby-2.0.0-head/gems/jquery-rails-3.0.2
mime-types (1.23)
~/.rvm/gems/ruby-2.0.0-head/gems/mime-types-1.23
railties (4.0.0)
~/.rvm/gems/ruby-2.0.0-head/gems/railties-4.0.0
sprockets (2.10.0)
~/.rvm/gems/ruby-2.0.0-head/gems/sprockets-2.10.0
arel (4.0.0)
~/.rvm/gems/ruby-2.0.0-head/gems/arel-4.0.0
polyglot (0.3.3)
~/.rvm/gems/ruby-2.0.0-head/gems/polyglot-0.3.3
thor (0.18.1)
~/.rvm/gems/ruby-2.0.0-head/gems/thor-0.18.1
rdoc (3.12.2)
~/.rvm/gems/ruby-2.0.0-head/gems/rdoc-3.12.2
rake (10.1.0)
~/.rvm/gems/ruby-2.0.0-head#global/gems/rake-10.1.0
coffee-rails (4.0.0)
~/.rvm/gems/ruby-2.0.0-head/gems/coffee-rails-4.0.0
i18n (0.6.4)
~/.rvm/gems/ruby-2.0.0-head/gems/i18n-0.6.4
multi_json (1.7.7)
~/.rvm/gems/ruby-2.0.0-head/gems/multi_json-1.7.7
sass (3.2.9)
~/.rvm/gems/ruby-2.0.0-head/gems/sass-3.2.9
rails (4.0.0)
~/.rvm/gems/ruby-2.0.0-head/gems/rails-4.0.0
execjs (1.4.0)
~/.rvm/gems/ruby-2.0.0-head/gems/execjs-1.4.0
treetop (1.4.14)
~/.rvm/gems/ruby-2.0.0-head/gems/treetop-1.4.14
atomic (1.1.10)
~/.rvm/gems/ruby-2.0.0-head/gems/atomic-1.1.10
erubis (2.7.0)
~/.rvm/gems/ruby-2.0.0-head/gems/erubis-2.7.0
uglifier (2.1.1)
~/.rvm/gems/ruby-2.0.0-head/gems/uglifier-2.1.1
jbuilder (1.4.2)
~/.rvm/gems/ruby-2.0.0-head/gems/jbuilder-1.4.2
builder (3.1.4)
~/.rvm/gems/ruby-2.0.0-head/gems/builder-3.1.4
And also a screen shot of my SDK settings just in case:
I solved this issue of No Rails SDK found by following.
Step 1.
Figure out Ruby version and bundle version of your project.
Step 2.
Add correct Ruby SDK and GEMs from preferences in Rubymine.
Preferences > Languages & Framework > Ruby SDK and Gems > [Select your RVM version] > [Select correct gem version of bundle] > Apply
I solved this problem by deleting the project from RubyMine's history (close project and then hit the x for the project on the left side) and deleting the .idea directory of my project. After I opened the project in RubyMine again, it worked.
I solved this by installed another Ruby version ,and it installed in Global file
/user/share/rvm/rubies/ruby-2.5.1
The first time I installed the latest Ruby version in my local rvm file, all gem files didn't add in Rubymine which only contains some base ruby files.
~/.rvm/rubies/ruby-2.6.3
I don't know why is that,but I don't think I need to know the reason, at least now.
If the answer by #atul_vaibhai doesn't work.
Close any open terminals and your project and open your project
Uninstall any new versions of ruby than the one that your application requires.
rvm remove <other versions>
If this solves your problem, then you need to figure out how to parallely keep another version without affecting any other application. You must be doing something wrong in configuring the application.
Had the same error message without updating anything.
Invalidating the Cache / Restart worked for me.

new Capistrano version 2.6.0 deploy error: `sync' is not implemented by Capistrano::Deploy::SCM::None (rsync with remote cache)

I'm using Capistrano along with the capistrano_rsync_with_remote_cache gem when deploying applications.
The problem occourred after upgrading the deploy server with new software:
capistrano 2.5.10 -> 2.6.0
capistrano_rsync_with_remote_cache 2.3.6 -> 2.4.0
ruby 1.8.6 -> 1.8.7
ruby-gems 1.3.5 -> 1.3.7
the error message:
http://pastebin.com/bD3azxFZ
The top most error:
/var/lib/gems/1.8/gems/capistrano-2.6.0/lib/capistrano/recipes/deploy/scm/base.rb:94:in sync': sync' is not implemented by Capistrano::Deploy::SCM::None (NotImplementedError) from
/var/lib/gems/1.8/gems/capistrano_rsync_with_remote_cache-2.4.0/lib/capistrano/recipes/deploy/strategy/rsync_with_remote_cache.rb:110:in
The line from the file rsync_with_remote_cache.rb:110:
source.sync(revision, local_cache_path)
However this is the same line used in the previous version (2.3.6) of capistrano_rsync_with_remote_cache where the NotImplementedError isn't pressent.
The deploy.rb file used with both versions
http://pastebin.com/EbPkCxyN
what should I change in order to make it deploy again with the newer version?
Sync only works when an SCM is set. You have set :scm, :none in your deploy.rb. Change it accordingly to your SCM. set :scm, :git or the like…
Just had the same error here and got it fixed and thought more people might run into this - and apparently do.