composer-php

How can I reference external data providers in phpunit?

左心房为你撑大大i 提交于 2019-12-22 10:37:01
问题 I am trying to run some tests using a common data provider in PHPUnit. See below test: namespace AppBundle\Tests\Controller; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; use AppBundle\Tests\DataProvider\XmlDataProvider; class DefaultControllerTest extends WebTestCase { /** * @dataProvider XmlDataProvider::xmlProvider * @covers ReceiveController::receiveAction() * @param string */ public function testReceive($xml) { $client = static::createClient([], ['HTTP_HOST' => 'mt.host']);

How to install composer on godaddy shared hosting?

天涯浪子 提交于 2019-12-22 10:27:07
问题 I'm trying to install composer and I'm getting an error , What I did , Downloaded composer wget https://getcomposer.org/installer php installer --check All settings correct for using Composer php installer The error I got , The "https://getcomposer.org/versions" file could not be downloaded: Failed to enable crypto failed to open stream: operation failed The download failed repeatedly, aborting. I tried google but no luck 回答1: I know this question is quite old, but I've been looking for an

Modify files in /vendor directory and commit changes to composer.lock?

怎甘沉沦 提交于 2019-12-22 08:55:39
问题 I had to modify a vendor package ( avatarguru/mustache-l5 ), which was not compatible with the latest version of Laravel 5 (dev) framework. But now when I do composer status in the project's root directory, it shows No local changes . I also tried to modify some other packages - same thing... How do I commit that changes to composer.lock, so that other developers will not have to fix same packages again? 回答1: You should fork the package, create a custom repo with your changes - then include

Symfony2 crash after composer update

ぃ、小莉子 提交于 2019-12-22 08:12:46
问题 I encounter a problem since I have update my vendors on Symfony2 installation. This is content of my composer.json : { "name": "symfony/framework-standard-edition", "license": "MIT", "type": "project", "description": "The \"Symfony Standard Edition\" distribution", "autoload": { "psr-0": { "": "src/" } }, "require": { "php": ">=5.4", "symfony/symfony": ">=2.4", "doctrine/orm": "~2.2,>=2.2.3", "doctrine/doctrine-bundle": ">=1.2", "twig/extensions": ">=1.0", "symfony/assetic-bundle": ">=2.3",

Using Composer locally then uploading files through FTP

孤人 提交于 2019-12-22 08:02:04
问题 Bit of a strange set up but have come across a project where Composer has been used in a local environment to get a project started. The original developer did not have ssh access to the production server therefore he used Composer locally and uploaded the 'vendor' directory from his desktop to the server using FTP. I now need to add the PHPMailer package so have done the following locally on my Mac: cd Desktop/ composer require phpmailer/phpmailer This has created the following structure on

Why is there 2 APP Key in Laravel? .env and config/app.php

こ雲淡風輕ζ 提交于 2019-12-22 06:29:59
问题 I installed Laravel 5 via composer and after the installation the App Key was generated automatically. I went to .env file and I could see the APP_KEY there. However, I also noticed that there is another APP_KEY inside config/app.php like this: 'key' => env('APP_KEY', 'SomeRandomString'), 'cipher' => 'AES-256-CBC', My newbie questions are: 1) Why is there App keys in 2 different locations? 2) When App Key was generated, why didnt it update the config/app.php file as well? 3) Do I need to

Can't load a Non-Laravel Composer package

孤街浪徒 提交于 2019-12-22 05:22:36
问题 It's the first time that I try to load a Composer package that doesn't use a Laravel service provider or a facade. I am trying to install this package: https://github.com/mollie/mollie-api-php I have followed the steps to install the package with Composer. At the top of my controller I added: require_once base_path('vendor/Mollie/API/Client.php'); I get the following error: main(): Failed opening required '../vendor/Mollie/API/Client.php' (include_path='.:/Applications/MAMP/bin/php/php7.0.0

the requested linked library openssl has the wrong version installed

喜夏-厌秋 提交于 2019-12-22 04:44:06
问题 I recently ran composer update and this is the error I get: namshi/jose 5.0.2 requires lib-openssl * -> the requested linked library openssl has the wrong version installed or is missing from your system, make sure to have the extension providing it . I am using MAMP. How may I get this fixed ? I tried upgrading the openssl version on my mac as some stack overflow answers said , but no luck which openssl shows /usr/local/bin/openssl openssl version shows OpenSSL 1.0.2h 3 May 2016 回答1: The

Laravel 5.1 Package Development - loading packages dependencies in development

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-22 04:43:33
问题 Hi I'm trying to develop a package in Laravel 5.1. Thanks to help here I have the basics set up. My current problem is how to load dependencies for the package while I'm developing it. In the packages composer.json I have added dependencies and have these installed now in a vendor folder within my packages development folder. This is not the frameworks root vendor folder. Here's my require section of the packages composer.json : "require": { "illuminate/support": "~5.1", "php" : ">=5.3.0",

Unable to run composer install

喜夏-厌秋 提交于 2019-12-22 04:09:13
问题 I'm trying to run composer install in my project but I have the following error [Composer\Downloader\TransportException] The "http://packagist.org/p/provider-2013$43e3f41fbe30a46245103451248f688a727f076a6e90636d19a69a156c17a416.json" file could not be downloaded (HTTP/1.1 400 Received invalid request from Client) I have tried to run composer self-update and have this error [Composer\Downloader\TransportException] The "https://getcomposer.org/version" file could not be downloaded: Failed to