composer-php

When composer connects to GitHub I receive a warning about a deprecation authentication method. What authentication configuration should I use?

白昼怎懂夜的黑 提交于 2020-06-08 07:09:53
问题 GitHub has started sending emails about deprecated authentication but I have not yet found a resource for detailing what composer's auth.json should look like under the new regime. My requirements are relatively simple - using composer to update a Symfony application in development and occasionally experimenting with other repos. With this, my original configuration (automatically built)... { "github-oauth": { "github.com": "(a string)" } } ... I receive this warning: ...your personal access

SHA384 is not supported by your openssl extension, could not verify the phar file integrity

不羁岁月 提交于 2020-06-07 09:36:47
问题 I get the error when i run composer self-update on Windows 10 Here is the full error message composer self-update Updating to version 1.8.4 (stable channel). Downloading (100%) [RuntimeException] SHA384 is not supported by your openssl extension, could not verify the phar file integrity I am running PHP 7.3.2 What could be the problem? 回答1: Remove Your older versions and install the latest version of Composer, Remove Your older version: sudo rm -f /usr/local/bin/composer Download the

How to launch scripts after installing a package via Composer?

一笑奈何 提交于 2020-05-24 03:55:26
问题 I use the command composer require otra/otra:dev-develop --no-update --no-cache && composer update --no-autoloader to install my own framework. I have put this section in my composer.json from my framework : "scripts": { "pre-install-cmd": "@composer config bin-dir bin/" } But Composer does not run it. Is this normal, does Composer consider this as a dependency and not the root package so it does not allow my script to run? If this is the case, how can I have the same behaviour? I want to :

Composer: Updating a Project Created with `create-project`

半世苍凉 提交于 2020-05-12 11:18:56
问题 Does composer provide a way to update the package a project was created with? i.e., if I create a new laravel project with the following composer create-project --prefer-dist laravel/laravel blog Composer will grab the latest version of the laravel/laravel package, unarchive it into the blog folder, and then run composer install from the blog folder. What I want/need to know is, does composer provide a way for me to update the laravel/laravel package that was downloaded to the blog folder? I

How to solve this error on live server for laravel?

ぐ巨炮叔叔 提交于 2020-05-09 04:55:45
问题 I have installed this package success locally composer require spatie/laravel-image-optimizer , but when I tried to install on the live server I got this errors no@zz607:/var/www/html$ composer require spatie/laravel-image- optimizer Using version ^1.4 for spatie/laravel-image-optimizer ./composer.json has been updated Loading composer repositories with package information Updating dependencies (including require-dev) mmap() failed: [12] Cannot allocate memory mmap() failed: [12] Cannot

How to solve this error on live server for laravel?

好久不见. 提交于 2020-05-09 04:55:36
问题 I have installed this package success locally composer require spatie/laravel-image-optimizer , but when I tried to install on the live server I got this errors no@zz607:/var/www/html$ composer require spatie/laravel-image- optimizer Using version ^1.4 for spatie/laravel-image-optimizer ./composer.json has been updated Loading composer repositories with package information Updating dependencies (including require-dev) mmap() failed: [12] Cannot allocate memory mmap() failed: [12] Cannot

Why should we use composer rather than using include_once or require_once?

假装没事ソ 提交于 2020-04-15 16:10:30
问题 I have searched many blogs and websites but I didn't find any perfect answer. whenever I use composer I have to include the autoload.php file and then for each class to autoload I have to use that class with the namespace.now I want to know what is the advantage of this composer where I can easily include the class file by include_once or require_once rather than using both autoload.php and the class file individually. when I use composer I have to write these code: include_once("vendor

Composer Autoload Multiple Files in Folder

∥☆過路亽.° 提交于 2020-04-08 08:46:44
问题 I'm using composer in my latest project and mapping my function like this "require": { ... }, "require-dev": { ... }, "autoload": { "psr-4": { ... }, "files": [ "src/function/test-function.php" ] } I imagine there will be a lot of files in a folder function, ex : real-function-1.php, real-function-2.php, etc. So, can composer call all the files in the folder function ? i lazy to use "files": [ "src/function/real-function-1.php", "src/function/real-function-2.php", .., "src/function/real

Composer/Laravel: How to add/update a specific package

♀尐吖头ヾ 提交于 2020-04-07 12:50:17
问题 How do you add/update a specific package using composer? I'm using the latest Laravel as well not sure if it matters but anything that can help to determine the answer. I have also tried the following from an old Stackoverflow post I had found, but it didn't work for me. It appended the package to composer.json and then proceeded to update everything anyways. Here is the link: How to update a single library with Composer? And here is the package I tried to add to my project: https://github

Composer/Laravel install package from existing files when external repository no longer exists

独自空忆成欢 提交于 2020-03-22 06:28:53
问题 I have the following problem: I have an old project which uses Laravel 4.2, PHP 5.5.9 and Composer. I'm trying to set it up on a different computer (With Laravel 4.2.2 and PHP 5.6) but one of the required packages has a dependency which is missing because whoever was managing that GitHub account decided to remove it. Thus, the required package can't be installed via Composer. Now, the old project has these packages downloaded and I can copy both of them manually. What I don't know, is how to