composer-php

How to initialise a Symfony Console project using Composer in a way that constrains it to stick to the Long Term Release version?

和自甴很熟 提交于 2019-12-24 00:15:03
问题 My goal is to run a Composer's require command to initialise a Symfony Console project. When running composer's require command, I believe it is possible to restrict the required package to specific a version. I am considering using this to stick to the Long Term Release version of Symfony which will be supported for longer. According to the Symfony Release Process the current LTS version is 3.4 . According to Composer's require command documentation and Composer's version constraints

Class 'SEOstats\SEOstats' not found when calling SEOStats instances in laravel 5.3

南笙酒味 提交于 2019-12-23 20:00:31
问题 I am trying to use SEOstats php package in laravel, I've installed it using composer and then in my controller I have used it like below : use SEOstats\Services as SEOstats; class ReportageController extends Controller { public function store(Request $request) { $url = 'http://www.google.com/'; // Create a new SEOstats instance. $seostats = new \SEOstats\SEOstats; // Bind the URL to the current SEOstats instance. if ($seostats->setUrl($url)) { dd( SEOstats\Alexa::getGlobalRank()); } } } The

Composer - Forked Laravel 4.2 not installing

与世无争的帅哥 提交于 2019-12-23 19:20:33
问题 I have cloned the Laravel 4.2 branch from Github and pushed it to a private GitLab server. I've created a new branch from 4.2 with the name dev-bugfix and added a comment in 1 file to see if composer would install my fork and not the official Laravel. My steps: Cloned Laravel 4.2 branch from Github Pushed the repo to a private GitLab server In an existing Laravel application, removed composer.lock, ran composer dump-autoload and removed the entire vendor folder Edited composer.json to include

WordPress plugin + Composer?

喜你入骨 提交于 2019-12-23 17:25:10
问题 I'm making WordPress plugin that is using a few third party libraries. Is it common practice to use Composer for WordPress plugin? If it's okay to use it, then I assume that I should provide all Composer files along with my plugin, because I don't want to make people manually run composer install . Another question is, is it safe to use Composer's autoloading? I configured it to autoload my own classes and the libraries are of course autoloaded as well. That's convenient. Is using Composer

Composer in Symfony2 creates the same assets twice (jquery, jqueryui)

守給你的承諾、 提交于 2019-12-23 17:03:39
问题 I added jquery and jqueryui to composer.json: "require": { ... "components/jquery": "1.11.*@dev", "components/jqueryui": "1.10.4" } and composer is downloading both libraries and puts them into vendor/components but also into components/, so I've got two copies of these libs. How can I rid off components/ directory? 回答1: You can specify the component's output-directory with the component-dir directive in your composer.json's config` section. example: { "require": { "components/jquery": "~1.10

Composer in Symfony2 creates the same assets twice (jquery, jqueryui)

你说的曾经没有我的故事 提交于 2019-12-23 16:57:16
问题 I added jquery and jqueryui to composer.json: "require": { ... "components/jquery": "1.11.*@dev", "components/jqueryui": "1.10.4" } and composer is downloading both libraries and puts them into vendor/components but also into components/, so I've got two copies of these libs. How can I rid off components/ directory? 回答1: You can specify the component's output-directory with the component-dir directive in your composer.json's config` section. example: { "require": { "components/jquery": "~1.10

OSX - Composer - lib-openssl requirements

岁酱吖の 提交于 2019-12-23 16:56:43
问题 Since the last XCode Update to version 7.3.1 i run into problems with composer and openssl on OSX. It worked before update. I try to update packages via composer update. The package "ricardoper/twitteroauth" requires lib-openssl: "*" . The following error is thrown while running composer update: ricardoper/twitteroauth v2.1.5 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

PHP trying to send mail securely - cannot find the PHPMailer class

泪湿孤枕 提交于 2019-12-23 15:57:53
问题 I started off with the following: composer require phpmailer/phpmailer Followed by placing require once require_once "../vendor/autoload.php"; Then $mail = new PHPMailer; That's where PHP has a fatal error: Fatal error: Class 'PHPMailer' not found The following is my code: use PHPMailer\PHPMailer\PHPMailer; use PHPMailer\PHPMailer\Exception; # require php mailer require_once "../vendor/autoload.php"; //PHPMailer Object $mail = new PHPMailer; $mail->isSMTP(); $mail->SMTPDebug = 3; $mail-

Can I override a composer.json dependency to remove it?

送分小仙女□ 提交于 2019-12-23 15:53:08
问题 I know it's possible to override a composer dependency using: "some/module": "1.0.0 as 2.0.0", But is it possible to entirely remove a dependency that one of my dependencies requires? The issue is that I am requiring "cwp/cwp-recipe-basic": "1.1.0", which can be found here. That package is simply another list of dependencies, however I do not want one of those dependencies. Is there any way of telling composer to ignore that one dependency? E.g. "cwp/cwp-recipe-basic": "1.1.0", "silverstripe

How to require two versions of the same package?

╄→гoц情女王★ 提交于 2019-12-23 15:26:06
问题 in my project i need to use two versions of twitter bootstrap (v2.x and v3.x) 2 for the backend and 3 for the frontend. is it somehow possible to require both and tell composer to install them in different directoreies? something like that: { "name": "acme/hello-world", "require": { "twitter/bootstrap": "2.3.*", "twitter/bootstrap": "3.0.* as 'twitter/bootstrap3'" } } 回答1: You can't require two version, your application should only use one version of a package. 回答2: If you want you can