前提・実現したいこと
zendframework初心者です。
他の方がphp7.1、zendframework2.49で作成したものを、
php7.3、zendframework2.5に置き換えようとしています。
PHP7の上で Zend Framework 2.5 を動かす
こちらを参考に2.5をインストールし、スケルトンを動かして表示するところまでは出来ました。
そのスケルトンフォルダにver2.49で作成されたプロジェクトファイルをせっせと移したのですが、以下のエラーが出ています。
発生している問題・エラーメッセージ
Fatal error: Uncaught Zend\ServiceManager\Exception\ServiceNotFoundException: Unable to resolve service "Router" to a factory; are you certain you provided it during configuration? in /var/www/ZendSkeletonApplication/vendor/zendframework/zend-servicemanager/src/ServiceManager.php on line 687
試したこと
modules.config.phpを確認してみましたが、以下の通りZend\Routerはロードされていました。
php
1<?php 2/** 3 * @link http://github.com/zendframework/ZendSkeletonApplication for the canonical source repository 4 * @copyright Copyright (c) 2005-2016 Zend Technologies USA Inc. (http://www.zend.com) 5 * @license http://framework.zend.com/license/new-bsd New BSD License 6 */ 7 8/** 9 * List of enabled modules for this application. 10 * 11 * This should be an array of module namespaces used in the application. 12 */ 13return [ 14 'Zend\ServiceManager\Di', 15 'Zend\Serializer', 16 'Zend\Paginator', 17 'Zend\Navigation', 18 'Zend\Mvc\I18n', 19 'Zend\Mvc\Console', 20 'Zend\Mail', 21 'Zend\Db', 22 'Zend\Cache', 23 'Zend\Mvc\Plugin\FilePrg', 24 'Zend\Mvc\Plugin\FlashMessenger', 25 'Zend\Mvc\Plugin\Identity', 26 'Zend\Mvc\Plugin\Prg', 27 'Zend\Session', 28 'Zend\Form', 29 'Zend\InputFilter', 30 'Zend\Filter', 31 'Zend\Hydrator', 32 'Zend\I18n', 33 'Zend\Router', 34 'Zend\Validator', 35 'Application', 36];
何が原因なのかすら検討がつきません…。
そもそもの問題ですが、2.49から2.5への移行方法としては正しいのでしょうか…?
わからないことだらけで大変恐縮ですが、何卒よろしくお願いいたします。
補足情報(FW/ツールのバージョンなど)
CentOS7
PHP 7.3.7
zendframework2.5
追記
すみません、今気づいたのですが、上記サイトの方法でインストールすると、2.5というより最新バージョンが入るんですね。確認したところ2.5ではなく3.03が入っていました。
https://framework.zend.com/downloads/archives
こちらに2.4までのアーカイブはありますが、2.5以降はcomposerでのインストールしかできないとのことなので、現在入手は不可能なのでしょうか??
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。