V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
yyy123456
V2EX  ›  问与答

我的 composer 常用轮子

  •  
  •   yyy123456 · 2017-07-04 14:15:47 +08:00 · 1830 次点击
    这是一个创建于 2505 天前的主题,其中的信息可能已经有所发展或是发生改变。

    composer linux 安装

    cd /usr/local/bin
    curl -s http://getcomposer.org/installer | php
    chmod a+x composer.phar
    alias composer='/usr/local/bin/composer.phar'
    

    如果想要中国镜像

    composer config -g repo.packagist composer https://packagist.phpcomposer.com

    今天时间是:2017-07

    1.图像处理 "imagine/imagine"

    进入 imagine/imagine 官网

    2.数据库 db 类 doctrine

    官网: http://docs.doctrine-project....

    3.php 模板 twig

    v2.4.3 需要 php7,如没有,则 v1.34.3 官网: https://twig.sensiolabs.org/d...

    4.日志类 monolog

    5.消息队列处理 php-resque

    6.html 美化兼防 xss ezyang/htmlpurifier

    官网: http://htmlpurifier.org/

    7.发邮件 phpmailer/phpmailer

    得自己有帐号。v6 得要 php5.5,如没有,则 v 5.2.23

    8.excel 处理,maatwebsite/excel 要 php5.5

    9.常用的登录用图形验证码

    "gregwar/captcha":"1.1.2"

    10.http 客户端:rmccue/requests

    其实主要就是为了 post

    11.大杀器,路由框架 slim

    网上查找了很多,这个是很棒的一个,特点,体积小,只有核心功能,想要多可以有中间件等等。这是一个类似 yii,laravel 的框架,但是只有很精简的功能,加载当然也超快。另外实现了 PSR-7 官网: https://www.slimframework.com...

    composer.json 如下:

    {
        "require": {
            "imagine/imagine":"0.7.1",
            "doctrine/dbal":"2.5.12",
            "twig/twig":"2.4.3",
            "monolog/monolog":"1.22.1",
            "chrisboulton/php-resque":"1.2.x",
            "ezyang/htmlpurifier":"4.9.3",
            "phpmailer/phpmailer":"6.0.0rc5",
            "maatwebsite/excel":"2.1.17",
            "gregwar/captcha":"1.1.2",
            "rmccue/requests":"1.7.0",
            "slim/slim":"3.8.1"
        }
    }
    
    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   3173 人在线   最高记录 6547   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 00:28 · PVG 08:28 · LAX 17:28 · JFK 20:28
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.