composer-php

CSS/JS/Images from Bundle location will be always removed after composer.phar update

柔情痞子 提交于 2019-12-24 14:04:42
问题 I have a tiny problem that i don't understand. I have some Bundle project generated by Symfony command, and they create a generic bundle folder in web/bundle/mypersonalbundle. OK, but one of them always be empty when I do an update from composer.phar. And only One! Thanks for your help ! $ php composer.phar update Loading composer repositories with package information Updating dependencies (including require-dev) - Removing doctrine/cache (v1.2.0) - Installing doctrine/cache (v1.3.0) Loading

Composer: create-project with specific commit

陌路散爱 提交于 2019-12-24 13:32:00
问题 Is it possible to create a project of specific commit by its hash? Something like composer create-project composer/satis stais 004ef695d5 I know how to specify version by tag or branch, but I cannot figure out how to point it to exact commit. 回答1: composer create-project composer/satis stais dev-master#004ef695d5 来源: https://stackoverflow.com/questions/36600849/composer-create-project-with-specific-commit

Zend Framework 2 - Composer - Manual installation of custom library is removed at install/update

放肆的年华 提交于 2019-12-24 13:29:43
问题 I wrote an own library and included it manually in my composer/autoload_namespaces.php like I was told here. It works fine until I use the install or update command. Then this line is removed and I get an error when trying to use the lib. Any ideas how to prevent this? 回答1: The suggestions you got in the other thread were not very good ones. Composer rewrites the autoload file with information from composer.json and thus you should never edit the php file directly. What you should do is add

Class Slim not found when installing slim with composer

余生颓废 提交于 2019-12-24 12:50:24
问题 I followed the instruction on slim framework. Created a composer.json file in my directory { "require": { "slim/slim": "2.*" } } and run composer install file. I have the following directory structure now As described in the documentation at slim framework i created an index.php file and require the vendor/autoload.php But i am getting Class not found error. Thanks 回答1: Try using namespaces when instantiating classes ... like so new \Slim\Slim(); . 来源: https://stackoverflow.com/questions

Dokku deployed Silex can't find PdoServiceProvider

核能气质少年 提交于 2019-12-24 12:08:28
问题 I have a project done with Silex, and I was using herrera-io/silex-pdo as the PDO provider, but I faced random crashes with socket errors (I connect to the DB via socket), since that lib is abandoned, I changed to csanquer/pdo-service-provider , and it works just fine on my localhost server, but when I deploy to remote, I get the following error: PHP Fatal error: Class 'Csanquer\Silex\PdoServiceProvider\Provider\PdoServiceProvider' not found in /app/web/index.php on line 52 Here is the code

reload all packages using composer

自闭症网瘾萝莉.ら 提交于 2019-12-24 11:54:10
问题 Is it possible to reload all the packages installed using composer? I'm not sure if I made an accidental change to the source of on of the packages, and my app stopped working so I want to rule this out by reloading all the packages. 回答1: You can generally just wipe the vendor/ directory and then run composer install to get everything back from your last known state (stored in composer.lock). Some plugins/custom installers in some frameworks however drop packages outside the vendor dir, but

Is there any way to use Composer download packages without docs and testing things?

本秂侑毒 提交于 2019-12-24 11:53:12
问题 I know Gem can do that, and I really don't need the docs and testing things. Can Composer do that also? Thanks. 回答1: You need to use --prefer-dist . And if there is a dist version for your repository it will be downloaded. You also can use --no-dev flag to exclude libraries that listed in require-dev section of packages. These libraries maybe useful only for development. 来源: https://stackoverflow.com/questions/17100116/is-there-any-way-to-use-composer-download-packages-without-docs-and

chdir(): No such file or directory (errno 2)

扶醉桌前 提交于 2019-12-24 11:37:34
问题 I'm getting the above error when running composer install --working-dir=/path/to/directory In case you're wondering: I had a hard drive failure so I needed to re-install composer and well... everything. After installing composer, navigating to the directory with the composer.json file and running composer install would result in an error that composer couldn't find a composer.json file, hence the --working-dir flag. The project is a Laravel 4.2 project. We have everything in a git repo with

php `use` class in parent folder

孤街浪徒 提交于 2019-12-24 11:35:47
问题 I have installed Propel ORM with Composer but I cannot create a new model as the PHP script is not in the same directory as the PHP class. I have class Test inside Test.php and I want to use it from subfolder/index.php . Note that class Test then uses Base/Test from Base/Test.php , so using require() is not an option here as Base/Test just goes on to use even more classes generated by composer. Traditionally, I'm supposed to do the following: <?php use Test; ?> but since I have Test in the

composer dump-autoload not recognized command

自作多情 提交于 2019-12-24 11:35:41
问题 whenever I use composer dump-autoload with laravel I get this error Generating optimized autoload files Illuminate\Foundation\ComposerScripts::postAutoloadDump @php artisan package:discover 'C:\Program' is not recognized as an internal or external command, operable program or batch file. Script @php artisan package:discover handling the post-autoload-dump event returned with error code 1 I think it has something to do with "environment variables" so my paths C:\ProgramData\Oracle\Java