Symfony 4 composer: unable to install bundle - composer-php

I recently created a symfony bundle sources are here:
https://gitlab.com/nicolasbonnici/restapibundle
When I try to require it via composer on a Symfony 4.3 project (created from scratch or already existing) I got this error:
composer req nbo/rest-api-bundle
Using version ^1.1 for nbo/rest-api-bundle
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Restricting packages listed in "symfony/symfony" to "4.3.*"
Your requirements could not be resolved to an installable set of packages.
Problem 1
- don't install nbo/rest-api-bundle 1.1.0|remove __root__ dev-master
- don't install nbo/rest-api-bundle 1.1.1|remove __root__ dev-master
- don't install nbo/rest-api-bundle 1.1.2|remove __root__ dev-master
- Installation request for __root__ dev-master -> satisfiable by __root__[dev-master].
- Installation request for nbo/rest-api-bundle ^1.1 -> satisfiable by nbo/rest-api-bundle[1.1.0, 1.1.1, 1.1.2].
Installation failed, reverting ./composer.json to its original content.
Here's the project's composer.json (but still the same with a new project from scratch using SF 4.3):
{
"type": "project",
"license": "proprietary",
"require": {
"php": "^7.1.3",
"ext-ctype": "*",
"ext-iconv": "*",
"aws/aws-sdk-php": "^3.112",
"easycorp/easyadmin-bundle": "^2.3",
"friendsofsymfony/rest-bundle": "^2.5",
"intervention/image": "^2.5",
"lexik/jwt-authentication-bundle": "^2.6",
"nelmio/api-doc-bundle": "^3.4",
"nelmio/cors-bundle": "^1.5",
"sensio/framework-extra-bundle": "^5.4",
"stof/doctrine-extensions-bundle": "^1.3",
"symfony/cache": "4.3.*",
"symfony/console": "4.3.*",
"symfony/dotenv": "4.3.*",
"symfony/flex": "^1.3.1",
"symfony/form": "4.3.*",
"symfony/framework-bundle": "4.3.*",
"symfony/orm-pack": "^1.0",
"symfony/security-csrf": "4.3.*",
"symfony/serializer-pack": "^1.0",
"symfony/swiftmailer-bundle": "^3.2",
"symfony/templating": "4.3.*",
"symfony/twig-bundle": "4.3.*",
"symfony/validator": "4.3.*",
"symfony/yaml": "4.3.*"
},
"require-dev": {
"doctrine/doctrine-fixtures-bundle": "^3.2",
"fzaninotto/faker": "^1.8",
"symfony/maker-bundle": "^1.12",
"symfony/phpunit-bridge": "^4.3",
"symfony/profiler-pack": "^1.0",
"symfony/web-server-bundle": "4.3.*"
},
"config": {
"preferred-install": {
"*": "dist"
},
"sort-packages": true
},
"autoload": {
"psr-4": {
"App\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"App\\Tests\\": "tests/"
}
},
"replace": {
"paragonie/random_compat": "2.*",
"symfony/polyfill-ctype": "*",
"symfony/polyfill-iconv": "*",
"symfony/polyfill-php71": "*",
"symfony/polyfill-php70": "*",
"symfony/polyfill-php56": "*"
},
"scripts": {
"auto-scripts": {
"cache:clear": "symfony-cmd",
"assets:install %PUBLIC_DIR%": "symfony-cmd"
},
"post-install-cmd": [
"#auto-scripts"
],
"post-update-cmd": [
"#auto-scripts"
]
},
"conflict": {
"symfony/symfony": "*"
},
"extra": {
"symfony": {
"allow-contrib": false,
"require": "4.3.*"
}
}
}
Can someone help me with that?

Composer has a problem with "replace" section. The __root__ name refers to your project (it is a default name when "name" key is not specified).
Basically, you marked both your packages (your main project and rest-api-bundle) as replacements to symfony/polyfill-*. It's unclear to me why - probably by mistake.
You should remove "replace" section from both packages and then you're good to go.
{
"type": "project",
"license": "proprietary",
"require": {
"php": "^7.1.3",
"ext-ctype": "*",
"ext-iconv": "*",
"aws/aws-sdk-php": "^3.112",
"easycorp/easyadmin-bundle": "^2.3",
"friendsofsymfony/rest-bundle": "^2.5",
"intervention/image": "^2.5",
"lexik/jwt-authentication-bundle": "^2.6",
"nelmio/api-doc-bundle": "^3.4",
"nelmio/cors-bundle": "^1.5",
"sensio/framework-extra-bundle": "^5.4",
"stof/doctrine-extensions-bundle": "^1.3",
"symfony/cache": "4.3.*",
"symfony/console": "4.3.*",
"symfony/dotenv": "4.3.*",
"symfony/flex": "^1.3.1",
"symfony/form": "4.3.*",
"symfony/framework-bundle": "4.3.*",
"symfony/orm-pack": "^1.0",
"symfony/security-csrf": "4.3.*",
"symfony/serializer-pack": "^1.0",
"symfony/swiftmailer-bundle": "^3.2",
"symfony/templating": "4.3.*",
"symfony/twig-bundle": "4.3.*",
"symfony/validator": "4.3.*",
"symfony/yaml": "4.3.*"
},
"require-dev": {
"doctrine/doctrine-fixtures-bundle": "^3.2",
"fzaninotto/faker": "^1.8",
"symfony/maker-bundle": "^1.12",
"symfony/phpunit-bridge": "^4.3",
"symfony/profiler-pack": "^1.0",
"symfony/web-server-bundle": "4.3.*"
},
"config": {
"preferred-install": {
"*": "dist"
},
"sort-packages": true
},
"autoload": {
"psr-4": {
"App\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"App\\Tests\\": "tests/"
}
},
"scripts": {
"auto-scripts": {
"cache:clear": "symfony-cmd",
"assets:install %PUBLIC_DIR%": "symfony-cmd"
},
"post-install-cmd": [
"#auto-scripts"
],
"post-update-cmd": [
"#auto-scripts"
]
},
"conflict": {
"symfony/symfony": "*"
},
"extra": {
"symfony": {
"allow-contrib": false,
"require": "4.3.*"
}
}
}

Related

InvalidArgumentException: json_decode error: Syntax error

I'm upgrading from Laravel 6 to 7 and when I run phpunit I get this error in some tests
InvalidArgumentException: json_decode error: Syntax error
But if in the ReindexJob.php file I change the function
public function handle(): void
{
$this->channel->items()->searchable();
}
to
public function handle(): void
{
$this->channel->items();
}
I no longer have the error, but this line should not be changed.
My composer.json is here
"require": {
"php": "^7.2.5|^8.0",
"laravel/framework": "^7.29",
"dingo/api": "^3.0",
"laravel/socialite": "^4.2",
"socialiteproviders/slack": "^3.0",
"doctrine/dbal": "^2.5",
"pusher/pusher-php-server": "~3.0",
"nesbot/carbon": "^2.0",
"league/flysystem-aws-s3-v3": "^1.0",
"google/apiclient": "^2.10",
"laravel/tinker": "^2.5",
"jaspaul/eloquent-model-validation": "^2.0",
"soapbox/goodtalk-settings": "^2.0",
"symfony/var-dumper": "^5.0",
"fideloper/proxy": "^4.4",
"socialiteproviders/microsoft-graph": "^2.0",
"layershifter/tld-extract": "^1.2",
"spatie/laravel-query-builder": "^2.1",
"microsoft/microsoft-graph": "^1.1",
"soapbox/signed-requests": "^4.2",
"predis/predis": "^1.1",
"laravel/horizon": "^4.3",
"jaspaul/eloquent-sti": "^2.0",
"jshayes/fake-requests": "^4.1",
"laravel/cashier": "^10.0",
"soapbox/truncator": "^1.0",
"soapbox/idempotency": "^5.0",
"jshayes/laravel-datadogstatsd": "^2.0",
"algolia/scout-extended": "^1.18",
"segmentio/analytics-php": "^1.5",
"art4/json-api-client": "^0.10.0",
"soapbox/agenda-template-client": "^6.0",
"league/csv": "^9.7",
"vinkla/hashids": "^8.1",
"tymon/jwt-auth": "^1.0",
"socialiteproviders/microsoft-azure": "^3.0",
"joypixels/emoji-toolkit": "^6.0.1",
"h4cc/wkhtmltopdf-amd64": "0.12.x",
"barryvdh/laravel-snappy": "^0.4.7",
"league/mime-type-detection": "^1.4",
"laravel/slack-notification-channel": "^2.3",
"soapbox/laravel-rollout": "^3.0",
"fruitcake/laravel-cors": "^2.0",
"guzzlehttp/guzzle": "^6.3.1|^7.0.1",
"sentry/sentry-laravel": "^2.7"
},
"require-dev": {
"fzaninotto/faker": "~1.4",
"mockery/mockery": "1.0.*",
"phpunit/phpunit": "~8.0",
"symfony/css-selector": "^4.0",
"symfony/dom-crawler": "^4.0",
"squizlabs/php_codesniffer": "^2.6",
"friendsofphp/php-cs-fixer": "^2.1",
"brianium/paratest": "~3.0",
"filp/whoops": "~2.0",
"laravel/telescope": "^3.5",
"dms/phpunit-arraysubset-asserts": "^0.1.0"
},
"autoload": {
"classmap": [
"database"
],
"psr-4": {
"App\\": "app/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"scripts": {
"post-root-package-install": [
"php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"php artisan key:generate",
"php artisan jwt:generate"
],
"post-install-cmd": [
"Illuminate\\Foundation\\ComposerScripts::postInstall",
"./scripts/install-git-hooks"
],
"post-update-cmd": [
"Illuminate\\Foundation\\ComposerScripts::postUpdate"
],
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"#php artisan package:discover"
]
},
"config": {
"bin-dir": "vendor/bin",
"preferred-install": "dist"
},
"minimum-stability": "dev",
"prefer-stable": true,
"extra": {
"laravel": {
"dont-discover": [
"dingo/api"
]
}
}
Apparently everything is correct here.
And some files with the same test are passing, but it can't be, because they are practically identical.

Generate barcode image works local but not on the server (Symfony 4)

I want to generate barcodes in my application.
When I run the code locally
php bin/console server:run 0.0.0.0
on my Windows PC, it works like a charm, but when I push it to my Git repository and pull it on my Apache2 Server an test it there, I get black bars.
The composer.json files are the same and the PHP Version also (PHP 7.4.7)
I am working with Symfony 4 and picqer/php-barcode-generator (https://github.com/picqer/php-barcode-generator).
In the controller:
$barcodeList[$barcode->getId()]['img'] = base64_encode($generator->getBarcode(intval($barcode->getValue()), $generator::TYPE_EAN_13, 1, 25));
In the template:
<img src="data:image/png;base64,{{ barcode.img }}" >
Example of the result on my local PC:
data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgAAD//gA+Q1JFQVRPUjogZ2QtanBlZyB2MS4wICh1c2luZyBJSkcgSlBFRyB2OTApLCBkZWZhdWx0IHF1YWxpdHkK/9sAQwAIBgYHBgUIBwcHCQkICgwUDQwLCwwZEhMPFB0aHx4dGhwcICQuJyAiLCMcHCg3KSwwMTQ0NB8nOT04MjwuMzQy/9sAQwEJCQkMCwwYDQ0YMiEcITIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy/8AAEQgAGQBfAwEiAAIRAQMRAf/EAB8AAAEFAQEBAQEBAAAAAAAAAAABAgMEBQYHCAkKC//EALUQAAIBAwMCBAMFBQQEAAABfQECAwAEEQUSITFBBhNRYQcicRQygZGhCCNCscEVUtHwJDNicoIJChYXGBkaJSYnKCkqNDU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6g4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2drh4uPk5ebn6Onq8fLz9PX29/j5+v/EAB8BAAMBAQEBAQEBAQEAAAAAAAABAgMEBQYHCAkKC//EALURAAIBAgQEAwQHBQQEAAECdwABAgMRBAUhMQYSQVEHYXETIjKBCBRCkaGxwQkjM1LwFWJy0QoWJDThJfEXGBkaJicoKSo1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzdHV2d3h5eoKDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uLj5OXm5+jp6vLz9PX29/j5+v/aAAwDAQACEQMRAD8ATUf+TevEf/cK/wDSTT66DxD/AMgPwn/2UCT/ANLbquf1H/k3rxH/ANwr/wBJNProPEP/ACA/Cf8A2UCT/wBLbqgDgPGX/JFbb/sK6b/6aIa3/Fv/ACM/w6/7GvU//TktYHjL/kitt/2FdN/9NENb/i3/AJGf4df9jXqf/pyWgDoPBv8AyHLn/soGpf8ApFNXAeBP+Pvw1/2CrX/0/rXf+Df+Q5c/9lA1L/0imrgPAn/H34a/7BVr/wCn9aADw9/yHPFn/ZP4/wD0ita3/CX/ACM/xF/7GvTP/Tk1YHh7/kOeLP8Asn8f/pFa1v8AhL/kZ/iL/wBjXpn/AKcmoAwPBv8AyRW5/wCwrqX/AKaJqPGX/IDtv+yf6b/6Ww0eDf8Akitz/wBhXUv/AE0TUeMv+QHbf9k/03/0thoA373/AJp9/wByx/7eVgXn/JBdG/7BV/8A+nS0rfvf+aff9yx/7eVgXn/JBdG/7BV//wCnS0oA39R/5N68R/8AcK/9JNProPEP/ID8J/8AZQJP/S26rn9R/wCTevEf/cK/9JNProPEP/ID8J/9lAk/9LbqgDgPGX/JFbb/ALCum/8Apohrf8W/8jP8Ov8Asa9T/wDTktYHjL/kitt/2FdN/wDTRDW/4t/5Gf4df9jXqf8A6cloA6Dwb/yHLn/soGpf+kU1cB4E/wCPvw1/2CrX/wBP613/AIN/5Dlz/wBlA1L/ANIpq4DwJ/x9+Gv+wVa/+n9aADw9/wAhzxZ/2T+P/wBIrWt/wl/yM/xF/wCxr0z/ANOTVgeHv+Q54s/7J/H/AOkVrW/4S/5Gf4i/9jXpn/pyagDA8G/8kVuf+wrqX/pomo8Zf8gO2/7J/pv/AKWw0eDf+SK3P/YV1L/00TUeMv8AkB23/ZP9N/8AS2GgDfvf+aff9yx/7eVgXn/JBdG/7BV//wCnS0rfvf8Amn3/AHLH/t5WBef8kF0b/sFX/wD6dLSgD//Z
Result on my Apache Server:
data:image/png;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgICAgMCAgIDAwMDBAYEBAQEBAgGBgUGCQgKCgkICQkKDA8MCgsOCwkJDRENDg8QEBEQCgwSExIQEw8QEBD/wAALCAAZAF8BAREA/8QAFQABAQAAAAAAAAAAAAAAAAAAAAn/xAAUEAEAAAAAAAAAAAAAAAAAAAAA/9oACAEBAAA/AJVAAAAAAAAAAAAAAAA//9k=
composer.json
{
"type": "project",
"license": "proprietary",
"require": {
"php": "^7.1.3",
"ext-ctype": "*",
"ext-iconv": "*",
"doctrine/doctrine-bundle": "*",
"doctrine/doctrine-migrations-bundle": "^2.0",
"doctrine/orm": "*",
"dompdf/dompdf": "^0.8.3",
"endroid/qr-code-bundle": "^3.3",
"phpoffice/phpspreadsheet": "^1.11",
"picqer/php-barcode-generator": "^2.0",
"sensio/framework-extra-bundle": "^5.3",
"sensiolabs/security-checker": "^5.0",
"symfony/apache-pack": "^1.0",
"symfony/asset": "4.3.*",
"symfony/console": "4.3.*",
"symfony/dotenv": "4.3.*",
"symfony/flex": "^1.1",
"symfony/form": "4.3.*",
"symfony/framework-bundle": "4.3.*",
"symfony/maker-bundle": "^1.11",
"symfony/orm-pack": "^1.0",
"symfony/security-bundle": "4.3.*",
"symfony/serializer-pack": "^1.0",
"symfony/swiftmailer-bundle": "^3.2",
"symfony/twig-bundle": "4.3.*",
"symfony/validator": "4.3.*",
"symfony/web-server-bundle": "4.3.*",
"symfony/yaml": "4.3.*",
"twig/extensions": "^1.5"
},
"config": {
"preferred-install": {
"*": "dist"
},
"sort-packages": true
},
"autoload": {
"psr-4": {
"App\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"App\\Tests\\": "tests/"
}
},
"replace": {
"paragonie/random_compat": "2.*",
"symfony/polyfill-ctype": "*",
"symfony/polyfill-iconv": "*",
"symfony/polyfill-php71": "*",
"symfony/polyfill-php70": "*",
"symfony/polyfill-php56": "*"
},
"scripts": {
"auto-scripts": {
"cache:clear": "symfony-cmd",
"assets:install %PUBLIC_DIR%": "symfony-cmd",
"security-checker security:check": "script"
},
"post-install-cmd": [
"#auto-scripts"
],
"post-update-cmd": [
"#auto-scripts"
]
},
"conflict": {
"symfony/symfony": "*"
},
"extra": {
"symfony": {
"allow-contrib": false,
"require": "4.3.*"
}
},
"require-dev": {
"symfony/profiler-pack": "^1.0",
"symfony/console": "^4.3"
}
}

Error in messenger during composer update symfony

I am trying to update my symfony installation from 4.1.7 but I receive the following error in my console:
In MessenegerPass.php line 279: Invalid middleware: service
"allow_no_handler" not found.
Here is my composer.json
{
"type": "project",
"license": "proprietary",
"require": {
"php": "^7.1.3",
"ext-ctype": "*",
"ext-iconv": "*",
"msgphp/user": "^0.7.0",
"msgphp/user-bundle": "^0.7.0",
"oneup/uploader-bundle": "^2.1",
"sensio/framework-extra-bundle": "^5.2",
"symfony/apache-pack": "^1.0",
"symfony/asset": "4.2.*",
"symfony/console": "4.2.*",
"symfony/expression-language": "4.2.*",
"symfony/flex": "^1.6",
"symfony/form": "4.2.*",
"symfony/framework-bundle": "4.2.*",
"symfony/messenger": "4.2.*",
"symfony/monolog-bundle": "^3.5",
"symfony/orm-pack": "^1.0",
"symfony/process": "4.2.*",
"symfony/security-bundle": "4.2.*",
"symfony/serializer-pack": "*",
"symfony/swiftmailer-bundle": "^3.1",
"symfony/twig-bundle": "4.2.*",
"symfony/validator": "4.2.*",
"symfony/web-link": "4.2.*",
"symfony/yaml": "4.2.*"
},
"require-dev": {
"symfony/debug-pack": "*",
"symfony/dotenv": "4.2.*",
"symfony/maker-bundle": "^1.9",
"symfony/profiler-pack": "*",
"symfony/test-pack": "*",
"symfony/web-server-bundle": "4.2.*"
},
"config": {
"preferred-install": {
"*": "dist"
},
"sort-packages": true
},
"autoload": {
"psr-4": {
"App\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"App\\Tests\\": "tests/"
}
},
"replace": {
"paragonie/random_compat": "2.*",
"symfony/polyfill-ctype": "*",
"symfony/polyfill-iconv": "*",
"symfony/polyfill-php71": "*",
"symfony/polyfill-php70": "*",
"symfony/polyfill-php56": "*"
},
"scripts": {
"auto-scripts": {
"cache:clear": "symfony-cmd",
"assets:install %PUBLIC_DIR%": "symfony-cmd"
},
"post-install-cmd": [
"#auto-scripts"
],
"post-update-cmd": [
"#auto-scripts"
]
},
"conflict": {
"symfony/symfony": "*"
},
"extra": {
"symfony": {
"allow-contrib": false,
"require": "4.2.*"
}
},
"minimum-stability": "dev",
"prefer-stable": true
}
messsenger.yaml
# see
https://github.com/symfony/recipes/blob/master/symfony/messenger/4.1/config/packages/messenger.yaml
framework:
messenger:
transports:
# Uncomment the following line to enable a transport named "amqp"
# amqp: '%env(MESSENGER_TRANSPORT_DSN)%'
routing:
# Route your messages to the transports
# 'App\Message\YourMessage': amqp
default_bus: command_bus
buses:
command_bus:
middleware:
- msgphp.messenger.console_message_receiver
event_bus:
middleware:
- msgphp.messenger.console_message_receiver
- allow_no_handler
services:
msgphp.messenger.command_bus: '#command_bus'
msgphp.messenger.event_bus: '#event_bus'
I tried also deleting composer.lock but still I get the same results.
Any help would be appreciated.

Error requiring local pachage through composer

I have two symfony4 applications offer/management and offer/fetcher and for now, I want to use offer/management as the main project and offer/fetcher as a local dependency of offer/management. So I create separate directories:
offer-management with own composer.json
offer-fetcher with own composer.json
Here is a composer.json for offer/fetcher:
{
"name": "offer/fetcher",
"type": "project",
"version": "1.0.0",
"license": "proprietary",
"require": {
"php": "^7.1.3",
"ext-ctype": "*",
"ext-iconv": "*",
"nelmio/api-doc-bundle": "^3.3",
"symfony/console": "*",
"symfony/flex": "^1.1",
"symfony/framework-bundle": "*",
"symfony/messenger": "*",
"symfony/monolog-bundle": "^3.3",
"symfony/orm-pack": "^1.0",
"symfony/yaml": "*"
},
"require-dev": {
"symfony/test-pack": "^1.0",
"symfony/web-server-bundle": "*"
},
"config": {
"preferred-install": {
"*": "dist"
},
"sort-packages": true
},
"autoload": {
"psr-4": {
"AppOffersFetcher\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"AppOffersFetcher\\Tests\\": "tests/"
}
},
"replace": {
"paragonie/random_compat": "*",
"symfony/polyfill-ctype": "*",
"symfony/polyfill-iconv": "*",
"symfony/polyfill-php71": "*",
"symfony/polyfill-php70": "*",
"symfony/polyfill-php56": "*"
},
"scripts": {
"auto-scripts": {
"cache:clear": "symfony-cmd",
"assets:install %PUBLIC_DIR%": "symfony-cmd",
"security-checker security:check": "script"
},
"post-install-cmd": [
"#auto-scripts"
],
"post-update-cmd": [
"#auto-scripts"
]
},
"conflict": {
"symfony/symfony": "*"
},
"extra": {
"symfony": {
"allow-contrib": false,
"require": "4.1.*"
}
}
}
and here is a composer.json for offer/management:
{
"name": "offer/management",
"type": "project",
"license": "proprietary",
"repositories": [
{
"type": "path",
"url": "../offer-fetcher"
}
],
"require": {
"offer/fetcher": "^1.0",
"php": "^7.1.3",
"ext-ctype": "*",
"ext-iconv": "*",
"nelmio/api-doc-bundle": "^3.3",
"symfony/console": "*",
"symfony/flex": "^1.1",
"symfony/framework-bundle": "*",
"symfony/messenger": "*",
"symfony/monolog-bundle": "^3.3",
"symfony/orm-pack": "^1.0",
"symfony/yaml": "*"
},
"require-dev": {
"symfony/test-pack": "^1.0",
"symfony/web-server-bundle": "*"
},
"config": {
"preferred-install": {
"*": "dist"
},
"sort-packages": true
},
"autoload": {
"psr-4": {
"OfferManagement\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"OfferManagement\\Tests\\": "tests/"
}
},
"replace": {
"paragonie/random_compat": "*",
"symfony/polyfill-ctype": "*",
"symfony/polyfill-iconv": "*",
"symfony/polyfill-php71": "*",
"symfony/polyfill-php70": "*",
"symfony/polyfill-php56": "*"
},
"scripts": {
"auto-scripts": {
"cache:clear": "symfony-cmd",
"assets:install %PUBLIC_DIR%": "symfony-cmd",
"security-checker security:check": "script"
},
"post-install-cmd": [
"#auto-scripts"
],
"post-update-cmd": [
"#auto-scripts"
]
},
"conflict": {
"symfony/symfony": "*"
},
"extra": {
"symfony": {
"allow-contrib": false,
"require": "4.1.*"
}
}
}
and the error when I run composer install from offer-management is:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for offer/management dev-master -> satisfiable by offer/management[dev-master].
- don't install offer/fetcher 1.0.0|remove offer/management dev-master
- Installation request for offer/fetcher ^1.0 -> satisfiable by offer/fetcher[1.0.0].

Requirements could not be resolved personal repository

Anybody can help me solve this issue? I'm trying to add a dependency on a personal repository. I didn't have any issues with my other repositories, but I have issues with this one.
Here is the composer.json file of the personal repository :
{
"name": "bundle-name-1",
"type": "symfony-bundle",
"license": "proprietary",
"require": {
"php": "^7.1.3",
"ext-ctype": "*",
"ext-iconv": "*",
"symfony/console": "*",
"symfony/flex": "^1.1",
"symfony/framework-bundle": "*",
"symfony/monolog-bundle": "^3.3",
"symfony/yaml": "*"
},
"require-dev": {
"symfony/dotenv": "*",
"symfony/test-pack": "^1.0"
},
"config": {
"preferred-install": {
"*": "dist"
},
"sort-packages": true
},
...
"replace": {
"paragonie/random_compat": "2.*",
"symfony/polyfill-ctype": "*",
"symfony/polyfill-iconv": "*",
"symfony/polyfill-php71": "*",
"symfony/polyfill-php70": "*",
"symfony/polyfill-php56": "*"
},
...
"conflict": {
"symfony/symfony": "*"
},
"extra": {
"symfony": {
"allow-contrib": false,
"require": "4.1.*"
}
}
}
Here is the composer.json file of the main project :
{
"name": "bundle-name-2",
"type": "symfony-bundle",
"license": "proprietary",
"require": {
"php": "^7.1.3",
"ext-ctype": "*",
"ext-iconv": "*",
"symfony/console": "*",
"symfony/flex": "^1.1",
"symfony/framework-bundle": "*",
"symfony/monolog-bundle": "^3.3",
"symfony/yaml": "*",
"bundle-name-1": "~0.9.2"
},
"require-dev": {
"symfony/dotenv": "*",
"symfony/test-pack": "^1.0"
},
"config": {
"preferred-install": {
"*": "dist"
},
"sort-packages": true
},
"repositories": [
{"type": "vcs", "url": "ssh://git#stash.domainname.com:8999/core/bundlename1repository.git"}
],
...
"replace": {
"paragonie/random_compat": "2.*",
"symfony/polyfill-ctype": "*",
"symfony/polyfill-iconv": "*",
"symfony/polyfill-php71": "*",
"symfony/polyfill-php70": "*",
"symfony/polyfill-php56": "*"
},
...
"conflict": {
"symfony/symfony": "*"
},
"extra": {
"symfony": {
"allow-contrib": false,
"require": "4.1.*"
}
}
}
I've removed autoload and scripts for both.
The composer message is :
don't install bundle-name-1 v0.9.3|remove bundle-name-2 dev-master
Installation request for bundle-name-1 ~0.9.2 -> satisfiable by bundle-name-1[v0.9.2, v0.9.3].
The issue comes from the "replace" clause. It was added automatically when creating the symfony skeleton and my bundle wasn't replacing any of these.
Solution :
Remove the "replace" clause from the "composer.json".
Run "composer update"

Resources