zendframework 3 설치

PHP 2019. 2. 28. 23:36

대상 : OSX


1. composer 설치


# brew install composer (설치)


# brew upgrade composer (업데이트)


# brew remove composer (삭제)




2. zendframework 3 skeleton application 설치


웹서버로 사용할 디렉토리를 만든 후 리텍토리로 이동하여 명령어를 실행한다.



ELLORDNET-MPR:Zend ellord$ composer create-project -s dev zendframework/skeleton-application /Users/ellord/Dropbox/dev/Zend














ELLORDNET-MPR:Zend ellord$ composer create-project -s dev zendframework/skeleton-application /Users/ellord/Dropbox/dev/Zend

Installing zendframework/skeleton-application (dev-master 7581703d5979c090b74905c5c7f5e7f2c527c980)

  - Installing zendframework/skeleton-application (dev-master 7581703): Cloning 7581703d59 from cache

Created project in /Users/ellord/Dropbox/dev/Zend

Loading composer repositories with package information

Installing dependencies (including require-dev) from lock file

Package operations: 18 installs, 0 updates, 0 removals

  - Installing zendframework/zend-component-installer (0.7.0): Downloading (100%)         

  - Installing zendframework/zend-skeleton-installer (0.1.4): Downloading (100%)         

  - Installing zendframework/zend-stdlib (3.1.0): Downloading (100%)         

  - Installing zendframework/zend-config (2.6.0): Downloading (100%)         

  - Installing zendframework/zend-loader (2.5.1): Downloading (100%)         

  - Installing zendframework/zend-eventmanager (3.1.0): Downloading (100%)         

  - Installing zendframework/zend-view (2.8.1): Downloading (100%)         

  - Installing psr/container (1.0.0): Downloading (100%)         

  - Installing container-interop/container-interop (1.2.0): Downloading (100%)         

  - Installing zendframework/zend-servicemanager (3.3.0): Downloading (100%)         

  - Installing zendframework/zend-validator (2.8.2): Downloading (100%)         

  - Installing zendframework/zend-escaper (2.5.2): Downloading (100%)         

  - Installing zendframework/zend-uri (2.5.2): Downloading (100%)         

  - Installing zendframework/zend-http (2.6.0): Downloading (100%)         

  - Installing zendframework/zend-router (3.0.2): Downloading (100%)         

  - Installing zendframework/zend-modulemanager (2.7.2): Downloading (100%)         

  - Installing zendframework/zend-mvc (3.0.4): Downloading (100%)         

  - Installing zfcampus/zf-development-mode (3.1.0): Downloading (100%)         

zendframework/zend-config suggests installing zendframework/zend-filter (Zend\Filter component)

zendframework/zend-config suggests installing zendframework/zend-i18n (Zend\I18n component)

zendframework/zend-config suggests installing zendframework/zend-json (Zend\Json to use the Json reader or writer classes)

zendframework/zend-view suggests installing zendframework/zend-authentication (Zend\Authentication component)

zendframework/zend-view suggests installing zendframework/zend-feed (Zend\Feed component)

zendframework/zend-view suggests installing zendframework/zend-filter (Zend\Filter component)

zendframework/zend-view suggests installing zendframework/zend-i18n (Zend\I18n component)

zendframework/zend-view suggests installing zendframework/zend-json (Zend\Json component)

zendframework/zend-view suggests installing zendframework/zend-navigation (Zend\Navigation component)

zendframework/zend-view suggests installing zendframework/zend-paginator (Zend\Paginator component)

zendframework/zend-view suggests installing zendframework/zend-permissions-acl (Zend\Permissions\Acl component)

zendframework/zend-servicemanager suggests installing ocramius/proxy-manager (ProxyManager 1.* to handle lazy initialization of services)

zendframework/zend-validator suggests installing zendframework/zend-db (Zend\Db component)

zendframework/zend-validator suggests installing zendframework/zend-filter (Zend\Filter component, required by the Digits validator)

zendframework/zend-validator suggests installing zendframework/zend-i18n (Zend\I18n component to allow translation of validation error messages as well as to use the various Date validators)

zendframework/zend-validator suggests installing zendframework/zend-i18n-resources (Translations of validator messages)

zendframework/zend-validator suggests installing zendframework/zend-math (Zend\Math component)

zendframework/zend-validator suggests installing zendframework/zend-session (Zend\Session component)

zendframework/zend-router suggests installing zendframework/zend-i18n (^2.6, if defining translatable HTTP path segments)

zendframework/zend-modulemanager suggests installing zendframework/zend-console (Zend\Console component)

zendframework/zend-mvc suggests installing zendframework/zend-json ((^2.6.1 || ^3.0) To auto-deserialize JSON body content in AbstractRestfulController extensions, when json_decode is unavailable)

zendframework/zend-mvc suggests installing zendframework/zend-mvc-console (zend-mvc-console provides the ability to expose zend-mvc as a console application)

zendframework/zend-mvc suggests installing zendframework/zend-mvc-i18n (zend-mvc-i18n provides integration with zend-i18n, including a translation bridge and translatable route segments)

zendframework/zend-mvc suggests installing zendframework/zend-mvc-plugin-fileprg (To provide Post/Redirect/Get functionality around forms that container file uploads)

zendframework/zend-mvc suggests installing zendframework/zend-mvc-plugin-flashmessenger (To provide flash messaging capabilities between requests)

zendframework/zend-mvc suggests installing zendframework/zend-mvc-plugin-identity (To access the authenticated identity (per zend-authentication) in controllers)

zendframework/zend-mvc suggests installing zendframework/zend-mvc-plugin-prg (To provide Post/Redirect/Get functionality within controllers)

zendframework/zend-mvc suggests installing zendframework/zend-psr7bridge ((^0.2) To consume PSR-7 middleware within the MVC workflow)

zendframework/zend-mvc suggests installing zendframework/zend-servicemanager-di (zend-servicemanager-di provides utilities for integrating zend-di and zend-servicemanager in your zend-mvc application)

Generating autoload files


    Do you want a minimal install (no optional packages)? Y/n

n


    Would you like to install the developer toolbar? y/N

y

    Will install zendframework/zend-developer-tools (^1.1.0)

    When prompted to install as a module, select development.config.php.dist


    Would you like to install caching support? y/N

y

    Will install zendframework/zend-cache (^2.7.1)

    When prompted to install as a module, select application.config.php or modules.config.php


    Would you like to install database support (installs zend-db)? y/N

y

    Will install zendframework/zend-db (^2.8.1)

    When prompted to install as a module, select application.config.php or modules.config.php


    Would you like to install forms support? y/N

n


    Would you like to install JSON de/serialization support? y/N

y

    Will install zendframework/zend-json (^3.0)


    Would you like to install logging support? y/N

y

    Will install zendframework/zend-log (^2.9)

    When prompted to install as a module, select application.config.php or modules.config.php


    Would you like to install MVC-based console support? (We recommend migrating to zf-console, symfony/console, or Aura.CLI) y/N



    Would you like to install i18n support? y/N

y

    Will install zendframework/zend-mvc-i18n (^1.0)

    When prompted to install as a module, select application.config.php or modules.config.php


    Would you like to install the official MVC plugins, including PRG support, identity, and flash messages? y/N



    Would you like to use the PSR-7 middleware dispatcher? y/N



    Would you like to install sessions support? y/N

y

    Will install zendframework/zend-session (^2.7.1)

    When prompted to install as a module, select application.config.php or modules.config.php


    Would you like to install MVC testing support? y/N

y

    Will install zendframework/zend-test (^3.0.1)


    Would you like to install the zend-di integration for zend-servicemanager? y/N

n

Updating root package

    Running an update to install optional packages

Loading composer repositories with package information

Updating dependencies

Package operations: 41 installs, 0 updates, 0 removals

  - Installing zendframework/zend-json (3.1.0): Downloading (100%)         

  - Installing zendframework/zend-debug (2.6.0): Downloading (100%)         

  - Installing zendframework/zend-developer-tools (1.2.1): Downloading (100%)         

  - Installing zendframework/zend-cache (2.7.2): Downloading (100%)         

  - Installing zendframework/zend-db (2.10.0): Downloading (100%)         

  - Installing psr/log (1.1.0): Downloading (100%)         

  - Installing zendframework/zend-log (2.10.0): Downloading (100%)         

  - Installing zendframework/zend-i18n (2.9.0): Downloading (100%)         

  - Installing zendframework/zend-mvc-i18n (1.1.0): Downloading (100%)         

  - Installing zendframework/zend-session (2.8.5): Downloading (100%)         

  - Installing zendframework/zend-dom (2.7.1): Downloading (100%)         

  - Installing zendframework/zend-console (2.7.0): Downloading (100%)         

  - Installing sebastian/version (2.0.1): Downloading (100%)         

  - Installing sebastian/resource-operations (2.0.1): Downloading (100%)         

  - Installing sebastian/object-reflector (1.1.1): Downloading (100%)         

  - Installing sebastian/recursion-context (3.0.0): Downloading (100%)         

  - Installing sebastian/object-enumerator (3.0.3): Downloading (100%)         

  - Installing sebastian/global-state (2.0.0): Downloading (100%)         

  - Installing sebastian/exporter (3.1.0): Downloading (100%)         

  - Installing sebastian/environment (4.1.0): Downloading (100%)         

  - Installing sebastian/diff (3.0.2): Downloading (100%)         

  - Installing sebastian/comparator (3.0.2): Downloading (100%)         

  - Installing phpunit/php-timer (2.1.1): Downloading (100%)         

  - Installing phpunit/php-text-template (1.2.1): Downloading (100%)         

  - Installing phpunit/php-file-iterator (2.0.2): Downloading (100%)         

  - Installing theseer/tokenizer (1.1.0): Downloading (100%)         

  - Installing sebastian/code-unit-reverse-lookup (1.0.1): Downloading (100%)         

  - Installing phpunit/php-token-stream (3.0.1): Downloading (100%)         

  - Installing phpunit/php-code-coverage (6.1.4): Downloading (100%)         

  - Installing doctrine/instantiator (1.1.0): Downloading (100%)         

  - Installing symfony/polyfill-ctype (v1.10.0): Downloading (100%)         

  - Installing webmozart/assert (1.4.0): Downloading (100%)         

  - Installing phpdocumentor/reflection-common (1.0.1): Downloading (100%)         

  - Installing phpdocumentor/type-resolver (0.4.0): Downloading (100%)         

  - Installing phpdocumentor/reflection-docblock (4.3.0): Downloading (100%)         

  - Installing phpspec/prophecy (1.8.0): Downloading (100%)         

  - Installing phar-io/version (2.0.1): Downloading (100%)         

  - Installing phar-io/manifest (1.0.3): Downloading (100%)         

  - Installing myclabs/deep-copy (1.8.1): Downloading (100%)         

  - Installing phpunit/phpunit (7.5.6): Downloading (100%)         

  - Installing zendframework/zend-test (3.2.1): Downloading (100%)         

Writing lock file

Generating autoload files

    Updating composer.json

Updating application configuration...


  Please select which config file you wish to inject 'ZendDeveloperTools' into:

  [0] Do not inject

  [1] config/modules.config.php

  [2] config/development.config.php.dist

  Make your selection (default is 0):2


  Remember this option for other packages of the same type? (y/N)

Installing ZendDeveloperTools from package zendframework/zend-developer-tools


  Please select which config file you wish to inject 'Zend\Cache' into:

  [0] Do not inject

  [1] config/modules.config.php

  [2] config/development.config.php.dist

  Make your selection (default is 0):1


  Remember this option for other packages of the same type? (y/N)

Installing Zend\Cache from package zendframework/zend-cache


  Please select which config file you wish to inject 'Zend\Db' into:

  [0] Do not inject

  [1] config/modules.config.php

  [2] config/development.config.php.dist

  Make your selection (default is 0):1


  Remember this option for other packages of the same type? (y/N)

Installing Zend\Db from package zendframework/zend-db


  Please select which config file you wish to inject 'Zend\Log' into:

  [0] Do not inject

  [1] config/modules.config.php

  [2] config/development.config.php.dist

  Make your selection (default is 0):1


  Remember this option for other packages of the same type? (y/N)

Installing Zend\Log from package zendframework/zend-log


  Please select which config file you wish to inject 'Zend\Mvc\I18n' into:

  [0] Do not inject

  [1] config/modules.config.php

  [2] config/development.config.php.dist

  Make your selection (default is 0):1


  Remember this option for other packages of the same type? (y/N)

Installing Zend\Mvc\I18n from package zendframework/zend-mvc-i18n


  Please select which config file you wish to inject 'Zend\Session' into:

  [0] Do not inject

  [1] config/modules.config.php

  [2] config/development.config.php.dist

  Make your selection (default is 0):1


  Remember this option for other packages of the same type? (y/N)

Installing Zend\Session from package zendframework/zend-session

Removing zendframework/zend-skeleton-installer...

  - Removing zendframework/zend-skeleton-installer (0.1.4)

    Removed plugin zendframework/zend-skeleton-installer.

    Removing from composer.json

    Complete!

Do you want to remove the existing VCS (.git, .svn..) history? [Y,n]? y

> zf-development-mode enable

You are now in development mode.

ELLORDNET-MPR:Zend ellord$ 




3. 제대로 설치되었는지 콘솔에서 확인해 본다.


ELLORDNET-MPR:Zend ellord$ php -S 0.0.0.0:8080 -t public/ publc/index.php



ELLORDNET-MPR:Zend ellord$ php -S 0.0.0.0:8080 -t public/ publc/index.php

PHP 7.1.23 Development Server started at Thu Feb 28 23:19:00 2019

Listening on http://0.0.0.0:8080

Document root is /Users/ellord/Dropbox/dev/Zend/public

Press Ctrl-C to quit.

^CELLORDNET-MPR:Zend ellord$ 




4. 브라우저에서 띄워본다.







끝.


블로그 이미지

엘로드넷

,