zendframework/zend-expressive-skeleton
最新稳定版本:3.2.3
Composer 安装命令:
composer create-project zendframework/zend-expressive-skeleton
包简介
Zend expressive skeleton. Begin developing PSR-15 middleware applications in seconds!
README 文档
README
Repository abandoned 2019-12-31
This repository has moved to mezzio/mezzio-skeleton.
Begin developing PSR-15 middleware applications in seconds!
zend-expressive builds on zend-stratigility to provide a minimalist PSR-15 middleware framework for PHP with routing, DI container, optional templating, and optional error handling capabilities.
This installer will setup a skeleton application based on zend-expressive by choosing optional packages based on user input as demonstrated in the following screenshot:
The user selected packages are saved into composer.json so that everyone else
working on the project have the same packages installed. Configuration files and
templates are prepared for first use. The installer command is removed from
composer.json after setup succeeded, and all installer related files are
removed.
Getting Started
Start your new Expressive project with composer:
$ composer create-project zendframework/zend-expressive-skeleton <project-path>
After choosing and installing the packages you want, go to the
<project-path> and start PHP's built-in web server to verify installation:
$ composer run --timeout=0 serve
You can then browse to http://localhost:8080.
Linux users
On PHP versions prior to 7.1.14 and 7.2.2, this command might not work as expected due to a bug in PHP that only affects linux environments. In such scenarios, you will need to start the built-in web server yourself, using the following command:
$ php -S 0.0.0.0:8080 -t public/ public/index.php
Setting a timeout
Composer commands time out after 300 seconds (5 minutes). On Linux-based systems, the
php -Scommand thatcomposer servespawns continues running as a background process, but on other systems halts when the timeout occurs.As such, we recommend running the
servescript using a timeout. This can be done by usingcomposer runto execute theservescript, with a--timeoutoption. When set to0, as in the previous example, no timeout will be used, and it will run until you cancel the process (usually viaCtrl-C). Alternately, you can specify a finite timeout; as an example, the following will extend the timeout to a full day:$ composer run --timeout=86400 serve
Troubleshooting
If the installer fails during the composer create-project phase, please go
through the following list before opening a new issue. Most issues we have seen
so far can be solved by self-update and clear-cache.
- Be sure to work with the latest version of composer by running
composer self-update. - Try clearing Composer's cache by running
composer clear-cache.
If neither of the above help, you might face more serious issues:
- Info about the zlib_decode error.
- Info and solutions for composer degraded mode.
Application Development Mode Tool
This skeleton comes with zf-development-mode. It provides a composer script to allow you to enable and disable development mode.
To enable development mode
Note: Do NOT run development mode on your production server!
$ composer development-enable
Note: Enabling development mode will also clear your configuration cache, to allow safely updating dependencies and ensuring any new configuration is picked up by your application.
To disable development mode
$ composer development-disable
Development mode status
$ composer development-status
Configuration caching
By default, the skeleton will create a configuration cache in
data/config-cache.php. When in development mode, the configuration cache is
disabled, and switching in and out of development mode will remove the
configuration cache.
You may need to clear the configuration cache in production when deploying if you deploy to the same directory. You may do so using the following:
$ composer clear-config-cache
You may also change the location of the configuration cache itself by editing
the config/config.php file and changing the config_cache_path entry of the
local $cacheConfig variable.
Skeleton Development
This section applies only if you cloned this repo with git clone, not when you
installed expressive with composer create-project ....
If you want to run tests against the installer, you need to clone this repo and
setup all dependencies with composer. Make sure you prevent composer running
scripts with --no-scripts, otherwise it will remove the installer and all
tests.
$ composer update --no-scripts
$ composer test
Please note that the installer tests remove installed config files and templates before and after running the tests.
Before contributing read the contributing guide.
zendframework/zend-expressive-skeleton 适用场景与选型建议
zendframework/zend-expressive-skeleton 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 53.66k 次下载、GitHub Stars 达 151, 最近一次更新时间为 2015 年 10 月 09 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「ZendFramework」 「middleware」 「zf」 「Skeleton」 「psr」 「psr-7」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 zendframework/zend-expressive-skeleton 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 zendframework/zend-expressive-skeleton 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 zendframework/zend-expressive-skeleton 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Shoot aims to make providing data to your templates more manageable
Slim Framework 3 CSRF protection middleware utilities
A module manager for Zend Framework which can be used to create configs per domain.
Cloudflare Middleware For Guzzle
ZF2 module for Doctrine 1.x integration
Slim starter / Slim skeleton package to boost your development with Slim framework
统计信息
- 总下载量: 53.66k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 152
- 点击次数: 23
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2015-10-09
