satis

composer 常用命令

北城以北 提交于 2020-11-13 03:00:27
php composer 常用操作总结 介绍 Composer 是 PHP 的 一个 项目级别的 依赖管理 工具。 安装 composer curl -sS https://getcomposer.org/installer | php # 或者 php -r "readfile('https://getcomposer.org/installer');" | php 总之,就是想办法 下载 https://getcomposer.org/installer 脚本,并用 PHP 运行它;以便在当前目录得到一个 composer.phar 文件。后续 composer 操作都是通过 php composer.phar(或简化为直接用 composer) 去运行。 如果你想更方便地全局使用,你也可以将其设为可执行(linux)或者写一个bat文件(windows)包装一下,并放置到系统目录。 windows 用户还有更简单的方式,直接下载: Composer-Setup.exe 进行全局安装。 创建 composer 包 只要你项目中已经有一个 composer.json 文件,那说明先帮你做好了创建工作。 否则请使用 php composer.phar init 命令,按交互引导创建。 如果你比较熟悉 composer.json 的格式说明,你也可以手动创建该文件。 配置依赖

「网易官方」极客战记(codecombat)攻略-沙漠-许愿井-wishing-well

时光怂恿深爱的人放手 提交于 2020-08-12 10:19:28
(点击图片进入关卡) 从许愿井中获得准确数目的金币。 简介 你需要刚好 104 金钱。 使用 sumCoinValues() 函数得到金币总价值。 如果不够,说 "Non satis" . 如果太多,说 "Nimis" . 如果的确是 104 金钱,那就开始收集。 提示: 看一下 sumCoinValues() 的代码,看看它怎么做到的! 默认代码 # 你需要104的金钱,不多也不少。 less = "Nimis" more = "Non satis" requiredGold = 104 # 此函数计算所有的硬币值的总和。 def sumCoinValues(coins): coinIndex = 0 totalValue = 0 # 遍历所有的金币。 while coinIndex < len(coins): totalValue += coins[coinIndex].value coinIndex += 1 return totalValue def collectAllCoins(): item = hero.findNearest(hero.findItems()) while item: hero.moveXY(item.pos.x, item.pos.y) item = hero.findNearest(hero.findItems()) while True:

Where to register autoload when the vendor is not managed with composer in Symfony 2.1?

孤人 提交于 2019-12-31 12:56:52
问题 I'm using symfony 2.1 and I want to add a library to vendors. The library do not exists in packagist. I can't manage it with composer. When I install bundles or others vendors through composer, it manage autoload for me. But where to register autoload when the vendor is not managed with composer? 回答1: You can add libraries to composer that are not in packagist. You must add them in the repositories array of your composer.json file. Here's how to load a github repository that has a composer

Composer is not reading my local Satis packages.json file

倖福魔咒の 提交于 2019-12-24 15:27:13
问题 I have setup my local SVN repo to hold all external repos ( company policy ), using Satis I've created the packages.json file. when I run composer update how do I tell it to use my custom packages.json file and pull from my local repo instead of externals? This is a blurb from the packages.json file on where my svn repos are: "source": { "type": "svn", "url": "http://blah/packagist/foo/bar", "reference": "/tags/2.3.0/@38" } but the url I would use to check this project out would be: http:/

file_get_contents: Unable to set local cert chain file

雨燕双飞 提交于 2019-12-24 08:37:38
问题 We're using composer to upgrade dependencies with Satis. After a recent server upgrade we were unable to do so. Narrowing down possible causes, we've discovered, that file_get_contents php function fails while trying to establish an ssl connection. We're using the following script to test our ssl: <?php $url = 'https://satis.work.com/packages.json'; $contextOptions = [ 'ssl' => [ 'verify_peer' => false, 'verify_peer_name' => false, 'local_cert' => '/home/work/.ssl/deployer.pem', ] ];

Satis http basic auth - pass credentials

℡╲_俬逩灬. 提交于 2019-12-13 12:18:23
问题 I have set up satis private composer packet manager. Satis is running on "packages.asc.company", I protected the site by apache2 http basic authentication and can open it in browser by entering http basic auth credentials. Now my question: How can I pass composer the credentials to access the satis site in the best and most secure manner when running e.g. "composer update"? Currently I registered only one user with a password in apache .htpasswd file and need to pass its credentials somewhere

Composer unsatisfied requirement

人走茶凉 提交于 2019-12-13 01:34:20
问题 In a composer setup I need vendor/package-A and vendor/package-B . Package B builds upon package A and has A defined as a requirement in its composer.json. Directly installing the base package A works fine. Other requirements are resolved from Packagist and the package itself is correctly pulled from the private repository. However, when installing only package B (which should then also pull in package A due to the requirement), I get the following error: Your requirements could not be

Satis, Bitbucket and SSH

混江龙づ霸主 提交于 2019-12-11 11:14:26
问题 I've setup a Satis repository on one of our remote servers allowing access to our private packages hosted on Bitbucket. I've created an SSH key pair on that server and added the public key to our Bitbucket user. Building Satis works just fine this way. Now, when I want to do a composer install on any remote server hosting an app, I don't have the right permissions unless I create a key pair on that server and also add its public key to Bitbucket. I don't want to do this for every project

Satis http basic auth - pass credentials

落花浮王杯 提交于 2019-12-04 16:49:26
I have set up satis private composer packet manager. Satis is running on "packages.asc.company", I protected the site by apache2 http basic authentication and can open it in browser by entering http basic auth credentials. Now my question: How can I pass composer the credentials to access the satis site in the best and most secure manner when running e.g. "composer update"? Currently I registered only one user with a password in apache .htpasswd file and need to pass its credentials somewhere to be able to connect from composer to satis. There are two cases where I need to connect from: 1)

Composer Not Generating Autoloads For Library

我的梦境 提交于 2019-12-04 00:16:19
问题 I've set up two projects, an 'init' and a library, which is required by the init. They both have PSR-0 autoloads set, but the autoload values from the library are not added to the vendor/composer/autoload_namespaces.php in the init project. Sample composer.json from the Library: { "name": "lxp/library", "description": "A test library", "autoload": { "psr-0": { "LXP\\Library": "src/" } } } Sample composer.json from the project that requires that library: { "name": "lxp/init", "name": "A test