composer-php

Multiple Composer Installs with (Independent) Modular Projects

不羁岁月 提交于 2020-01-01 19:39:30
问题 I am trying to find the best way to use composer for a modular structure. Let's say I have this framework tree: /cms /site/addons Let's say that addons are available for developers to add their projects with their composer.json installs. Like /site/addons/MyNewFeature/composer.json So the next question is the /vendor location. Should each addon have a /vendor directory and should I autoload them all within the main framework, which I think the performance of that would be too much and

Could not open input file composer.phar in Windows 7

江枫思渺然 提交于 2020-01-01 16:39:09
问题 I am trying to install an extension in Yii2, while I installing through command prompt using C:\wamp\www\project>php composer.phar require mdmsoft/yii2-admin "~1.0" I am getting an error like this: could not open input file composer.phar 回答1: Where did you install composer? You have to add the directory, for example: php C:\ProgramData\ComposerSetup\bin\composer.phar require ... If you add the directory to your windows path you can simply call composer require ... 回答2: Read here https:/

Laravel Class 'App\Http\Controllers\GuzzleHttp\Client' not found

六眼飞鱼酱① 提交于 2020-01-01 15:23:44
问题 I've installed the client and I did an update using composer dump autoload but I still end up with the same error. After installing via composer require guzzlehttp/guzzle:~6.0 in the projects directory. $client = new GuzzleHttp\Client(); Why isn' it working and why is it even referencing the wrong directory? 回答1: You're going to want to get acquainted with PHP namespaces. Most files in Laravel are namespaced. Calls to functions within a namespace start within that namespace, with two

How to create a library to be used by composer autoloading?

自作多情 提交于 2020-01-01 11:35:26
问题 I want to make this package to be autoloaded by Composer. This package is available on Packagist I realized I need to add something to composer.json and I need to have a autoload.php somewhere. The only class that should be autoloaded is the Webbot.php . Can someone give me the step by step breakdown to accomplish this? Google search results returned are instructions to autoload libraries. I need instructions on how to write autoloadable libraries. 回答1: First, you need to have your package

Symfony 3 composer, ext-dom and ext-xml missing [duplicate]

廉价感情. 提交于 2020-01-01 08:40:21
问题 This question already has answers here : PHPUnit working in IDE, but server says class not found (2 answers) Closed 2 years ago . I am running Linux Mint 18.1. My IDE is PhpStorm and I am trying to install PHPUnit trough the composer. I followed the installation steps at https://getcomposer.org/download/. Problem 1 - Installation request for phpunit/phpunit 6.4.x-dev -> satisfiable by phpunit/phpunit[6.4.x-dev]. - phpunit/phpunit 6.4.x-dev requires ext-dom * -> the requested PHP extension dom

laravel 4 installation problems

拜拜、爱过 提交于 2020-01-01 06:22:51
问题 i have been struggling with this for about 20 hours now and i cannot move forward. I am hopeless and tired from all that searching. Dont know where else should i try to find the solution. At the begining i should probably say that i am not a terminal/composer/git user. I am trying to install the laravel 4 framework. I have been googling a lot and found some tutorials, some of the even here on stackoverflow but noting really helped me. I have the basic github master zip package extracted at my

laravel 4 installation problems

拜拜、爱过 提交于 2020-01-01 06:21:54
问题 i have been struggling with this for about 20 hours now and i cannot move forward. I am hopeless and tired from all that searching. Dont know where else should i try to find the solution. At the begining i should probably say that i am not a terminal/composer/git user. I am trying to install the laravel 4 framework. I have been googling a lot and found some tutorials, some of the even here on stackoverflow but noting really helped me. I have the basic github master zip package extracted at my

Heroku doesn't recognize my Laravel app as PHP app, and does not do composer install

本小妞迷上赌 提交于 2020-01-01 05:16:10
问题 I'm trying to publish my Laravel app on Heroku. I have excluded the composer.lock file from .gitignore, and created a Procfile containing web: vendor/bin/heroku-php-apache2 public I created my app with heroku create myapp; git push heroku master; Then I get the following output: git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree push -v --tags heroku master:master Pushing to https://git.heroku.com/myapp.git POST git-receive-pack (1914 bytes) remote:

Is there a way to update automatically the AppKernel in symfony2?

你离开我真会死。 提交于 2020-01-01 03:45:18
问题 Maybe something similar to the generate:bundle command (which after generating the bundle prompts to update the AppKernel) or to Composer (which updates your autoload with the dependencies you install). I want to get a similar functionality to the generate:bundle, but instead of creating a new bundle I want to add a bundle I just downloaded without having to edit the AppKernel manually. 回答1: I couldn't find a way to EXTEND an existing command, so my thought goes to create a new console

How can I autoload a custom class in Laravel 5.1?

吃可爱长大的小学妹 提交于 2020-01-01 03:06:12
问题 I've created a library folder within the app folder to add my own classes. This is the content of the file app/library/helper.php : <?php namespace Library; class MyHelper { public function v($arr) { var_dump($arr); } } I added the namespace to composer.json : and then I ran $ composer dump-autoload but it does not seem to have any effects. The files vendor/composer/autoload_psr4.php vendor/composer/autoload_classmap.php did not change. If I try to create an instance of MyHelper , Laravel