composer-php

'vendor' is not recognized as an internal or external command I'm using windows 10. what should I do?

≡放荡痞女 提交于 2020-01-03 13:05:14
问题 I've recently installed laravel and have written some tests in /tests directory but when I use phpunit at cmd in the same folder that phpunit.xml exists, it says 'vendor' is not recognized as an internal or external command I'm using windows 10. what should I do? 回答1: This is linux based code.. $ vendor/bin/phpunit Try this for windows.. vendor\bin\phpunit 回答2: Please try this command for windows: php vendor/phpunit/phpunit/phpunit 回答3: Install dependencies via composer $ composer update Run

'vendor' is not recognized as an internal or external command I'm using windows 10. what should I do?

徘徊边缘 提交于 2020-01-03 13:05:06
问题 I've recently installed laravel and have written some tests in /tests directory but when I use phpunit at cmd in the same folder that phpunit.xml exists, it says 'vendor' is not recognized as an internal or external command I'm using windows 10. what should I do? 回答1: This is linux based code.. $ vendor/bin/phpunit Try this for windows.. vendor\bin\phpunit 回答2: Please try this command for windows: php vendor/phpunit/phpunit/phpunit 回答3: Install dependencies via composer $ composer update Run

Yii2: How can I add an JavaScript library via composer?

我与影子孤独终老i 提交于 2020-01-03 10:46:29
问题 I have setup a basic app according to this guide (Installing Yii). This is no problem. According to the guide I have also added fxp/composer-asset-plugin globally to composer.phar. Also no problem. Now I've got the requirement to work with q.js which is hosted* as npm package. But I don't know how to add it via composer. I know I could probably use a CDN instead or download and store it manually. But I prefer using composer. So what do I have to do to make this work? I have added this to my

how to fix error laravel 5.2 “failed to open stream: No such file or directory” without composer

蹲街弑〆低调 提交于 2020-01-03 06:34:59
问题 I've got this error in my laravel 5.2 project who hosted in debian linux Warning: require_once(/home/u706561288/public_html/sap/vendor/composer/autoload_real.php): failed to open stream: No such file or directory in /home/u706561288/public_html/sap/vendor/autoload.php on line 5 Fatal error: require_once(): Failed opening required '/home/u706561288/public_html/sap/vendor/composer/autoload_real.php' (include_path='.:/opt/alt/php70/usr/share/pear') in /home/u706561288/public_html/sap/vendor

composer self-update TransportException

眉间皱痕 提交于 2020-01-03 04:29:05
问题 I tried to update Composer via: composer self-update but it encounter the Composer\Downloader\TransportException here is what I've got from composer self-update --verbose and php -d "apc.enable_cli=0" composer.phar self-update --verbose Updating to version . Downloading: 100% [Composer\Downloader\TransportException] "https://getcomposer.org/composer.phar" appears broken, and returned an empty 200 response Exception trace: () at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src

Using Composer when multiple components are in the same vcs repo

余生长醉 提交于 2020-01-03 04:24:05
问题 I have a git repo that contains a few small and related libraries. Since the platform I am working with lacks proper dependency management, dealing with many git repos is a hassle, hence my team decided to put these into one git repo. I'm now working on having our software being installable via Composer. It is however not clear to me how to register each component in this git repo, as I'm not even sure it is possible to have more then one composer.json file per repo. Is this possible? And if

Composer - Mapping the src directory to the document root with the vendor folder outside

蓝咒 提交于 2020-01-03 03:28:30
问题 I have the following folder structure. src/ |- index.php test/ vendor/ composer.json composer.lock When i want to deploy my code, I realize that i have to map the src/ directory to document root since it contains the index.php file (which btw contains some Restler code) However, if i do that, how do i deal with the vendor/ folder that lies outside the document root? 回答1: vendor folder MUST be outside of the web root for better security When you include autoload.php or restler.php , it will

Laravel 4 - Composer Install fails every time, even though I'm using PHP 5.4

情到浓时终转凉″ 提交于 2020-01-03 03:11:13
问题 I'm running into issues installing Laravel 4... I am following the instructions posted here: http://badubizzle.blogspot.com/2013/01/setting-up-laravel-4-on-webfaction.html My host allows multiple versions of PHP to run at the same time, so running the command php will run php 5.2.17 on whatever you specify next. I know you need greater than php 5.3 to run Laravel 4, so I am using php 5.4 to do so. I can either specifically type php54 to run the command under php 5.4, or an alias can be made

PHP: How to get all classes when using autoloader

◇◆丶佛笑我妖孽 提交于 2020-01-02 06:33:29
问题 I'm using composer to generate autoloader: "autoload": { "psr-4": { "SomeNamespace\\": "src/SomeDir" } } I need to create instances of all classes that implement specific interface. It's fairly easy when not using autoloader, however get_declared_classes() is not playing well with autoloaders. It will list a class only after it was instantiated with autoloader. 回答1: If you don't keep track of which classes exist, autoloading won't help you. But the situation would be pretty much the same if

Composer hangs on “Resolving dependencies through SAT” on 4.2

你离开我真会死。 提交于 2020-01-02 01:05:12
问题 Things I've tried: Removing everything except for Laravel (version 4.2.*) - This completes but still hangs for around 5 minutes Updating composer Removing /vendor Doing clean Laravel 4.2 install (hangs around 3 minutes) Doing clean Laravel 5 install (doesn't hang at all) Turning off xdebug completely (doesn't seem to make a difference) With all my packages, I've seen composer complete but only when I left it running overnight. I can't deploy to forge at all because it times out! This only