packagist

Composer autoload-dev does not work

£可爱£侵袭症+ 提交于 2019-12-12 10:55:43
问题 The file autoload_psr4.php not contains the namespace from "autoload-dev" section only from "autoload" section. When my composer.json reads "autoload": { "psr-4": { "Namespace\\": "src/" } }, "autoload-dev": { "prs-4": { "Namespace\\Tests\\": "tests/" } } And I run composer require vendor/namespace 1.0-dev My /vendor/composer/autoload_prs4.php file appears as // autoload_psr4.php @generated by Composer $vendorDir = dirname(dirname(__FILE__)); $baseDir = dirname($vendorDir); return array(

How To Submit A Project at packalyst

故事扮演 提交于 2019-12-10 15:50:00
问题 How To Submit A Project at packalyst? not packagist I cannot find any page I can submit. 回答1: It just pulls package names from Packagist that have a "laravel" tag. So submit your package to Packagist with the "laravel" tag, and it will then end up on Packagist. 来源: https://stackoverflow.com/questions/23868307/how-to-submit-a-project-at-packalyst

composer常用命令

纵饮孤独 提交于 2019-12-06 04:59:15
查看 composer config -g -l repo.packagist 配置文件 全局设置成国内的地址 composer config -g repo.packagist composer https://packagist.phpcomposer.com 以上属于 系统全局配置 composer的镜像,如果你只想 单独配置某个项目 ,进入到该目录的文件夹下,执行 composer config repo.packagist composer https://packagist.phpcomposer.com 来源: https://my.oschina.net/hongjiang/blog/3135790

The package is not available in a stable-enough version according to your minimum-stability setting

北战南征 提交于 2019-12-05 16:21:05
问题 I don't really understand how Composer works with the minimum-stability setting. I have two packages. Let's say, PackageA and PackageB . The composer.json file of PackageA looks like this: { "name": "vendor/packagea", "minimum-stability": "dev", "require": { "vendor/packageb": "dev" } } So PackageA requires PackageB . The json of PackageB looks like this: { "name": "vendor/packageb", "minimum-stability": "dev" } So both say minimum stability are dev . So I assume that when I do: composer

How to force a package to be installed?

风格不统一 提交于 2019-12-05 01:28:25
I'm trying to install the following package through composer : https://packagist.org/packages/cartalyst/sentry#dev-feature/laravel-5 When I do: composer require cartalyst/sentry dev-feature/laravel-5 I always receive this error: [InvalidArgumentException] Could not find package dev-feature/laravel-5 at any version for your minimum-stability (stable). Check the package spelling or your minimum-stability If I change minimum-stability to dev it will still complain. However, if I install dev-master and manually merge the files from dev-feature/laravel-5 into dev-master , it works fine. Hence why I

How to configure a composer package to be globally installed?

半腔热情 提交于 2019-12-04 20:06:40
问题 Update: I actually published this package so you can see the problem for yourself. Check it out here naomik/yamldump I'm trying to make a little CLI tool and package it up with composer. Below is an extremely simplified version of the program, but it's enough to demonstrate the problem I'm encountering. The project has one dependency, and one "binary" file composer.json { "name": "naomik/yamldump", "version": "0.2.0", "bin": [ "bin/yamldump" ], "require": { "symfony/yaml": "2.5.3" } } bin

composer爆错:zlib_decode():data error

百般思念 提交于 2019-12-04 07:04:57
解决办法:先用 composer diagnose 命令检测 然后 composer self-update 更新composer版本 最后执行 composer update 或者 composer install composer 切换阿里云镜像 用起来还快 composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/ 来源: oschina 链接: https://my.oschina.net/u/3911977/blog/3106312

The package is not available in a stable-enough version according to your minimum-stability setting

坚强是说给别人听的谎言 提交于 2019-12-04 00:17:31
I don't really understand how Composer works with the minimum-stability setting. I have two packages. Let's say, PackageA and PackageB . The composer.json file of PackageA looks like this: { "name": "vendor/packagea", "minimum-stability": "dev", "require": { "vendor/packageb": "dev" } } So PackageA requires PackageB . The json of PackageB looks like this: { "name": "vendor/packageb", "minimum-stability": "dev" } So both say minimum stability are dev . So I assume that when I do: composer create-project vendor/packagea But then it complains with the message: [InvalidArgumentException] Could not

How to configure a composer package to be globally installed?

醉酒当歌 提交于 2019-12-03 13:08:53
Update: I actually published this package so you can see the problem for yourself. Check it out here naomik/yamldump I'm trying to make a little CLI tool and package it up with composer. Below is an extremely simplified version of the program, but it's enough to demonstrate the problem I'm encountering. The project has one dependency, and one "binary" file composer.json { "name": "naomik/yamldump", "version": "0.2.0", "bin": [ "bin/yamldump" ], "require": { "symfony/yaml": "2.5.3" } } bin/yamldump #!/usr/bin/env php <?php // use Yaml namespace use Symfony\Component\Yaml as Yaml; // autoload

如何发布自己的 Composer 包

泄露秘密 提交于 2019-12-03 04:35:15
composer是php新时代的依赖管理利器,就像python的pip,nodejs的npm,javascript的bower等。你可以在自己的项目申明所依赖的外部库,composer可以帮你安装这些: composer解决如下问题 你有一个项目需要依赖若干个库 其中一个库依赖其他库 找出你需要的版本进行安装 php7 + Composer是phper的战略。下面我们来聊聊如何将自己的项目或者列库打包成composer,然后提供下载的具体过程。 注意,以下不会说明Composer是什么?怎么用?怎么安装等问题,不明白的请自行网上搜索资料~ 要准备的材料有 1. 注册 Github 账号( https://github.com ) 2. 注册 Packagist 账号( https://packagist.org ) 3. php代码(可以是项目或者类库等) 关于不清楚什么是 Github/Packagist的,请网上查阅,本教程不进行说明哦~ 开始搭建 1. 我们首先登录github网站,新建一个repository(仓库),如图: 然后创建自己仓库信息 这样我们就创建了一个仓库 2. 使用Git工具,将仓库clone到本地,用于文件管理,如图: git中,我们clone远程仓库地址,远程仓库地址在此处 https://github.com/wenhao26/win.git 命令: