mink-goutte-driver. Can't install fabpot/goutte on Symfony 2.0 - symfony

I am using composer with Symfony 2.0.15 and migrating to latest Behat 2.4. This is in my composer.json:
"require-dev": {
"behat/behat": "2.4#stable",
"behat/mink-extension": "*",
"behat/symfony2-extension": "*",
"behat/mink-browserkit-driver": "*",
"behat/mink-goutte-driver": "dev-master",
"behat/common-contexts": "*",
"kriswallsmith/buzz": ">=0.5.0"
}
I run: php composer.phar update --dev
And there is an error:
Your requirements could not be solved to an installable set of packages.
Problem 1
- Installation request for behat/mink-goutte-driver dev-master -> satisfiable by behat/mink-goutte-driver dev-master.
- don't install fabpot/goutte 1.0.x-dev|install fabpot/goutte dev-master
- behat/mink-goutte-driver dev-master requires fabpot/goutte 1.0.* -> satisfiable by fabpot/goutte 1.0.x-dev.
- Conclusion: remove symfony/symfony v2.0.15
- fabpot/goutte dev-master requires symfony/dom-crawler 2.1.* -> satisfiable by symfony/symfony 2.1.x-dev, symfony/dom-crawler v2.1.0-BETA1, symfony/dom-crawler 2.1.x-dev, symfony/symfony v2.1.0-BETA1.
- Can only install one of: symfony/symfony v2.0.15, symfony/symfony 2.1.x-dev.
- Can only install one of: symfony/symfony v2.1.0-BETA1, symfony/symfony v2.0.15.
- don't install symfony/symfony v2.0.15|don't install symfony/dom-crawler v2.1.0-BETA1
- don't install symfony/dom-crawler 2.1.x-dev|don't install symfony/symfony v2.0.15
- Installation request for symfony/symfony == 2.0.15.0 -> satisfiable by symfony/symfony v2.0.15.
If I understand the error correctly, it is because fabpot/goutte package is dependent on Symfony 2.1 packages and not available for Symfony 2.0. Correct me, if I am wrong.
Here is my behat.yml:
default:
formatter:
parameters:
paths: false
context:
class: 'Site\PublicBundle\Features\Context\FeatureContext'
parameters:
base_url: 'http://test-anton.site.com'
extensions:
Behat\Symfony2Extension\Extension:
mink_driver: true
bundle: 'PublicBundle'
kernel:
env: test
debug: true
Behat\MinkExtension\Extension:
default_session: symfony2
base_url: 'http://test-anton.site.com'
And this is sample of my failing scenario:
Scenario: User can view homepage
When I go to "/"
Then the response code should be 200
"When I go to" - is a MinkContext step, but "Then the response code should be 200" - is a step from Behat\CommonContexts\WebApiContext. When I use only steps from MinkContext - "Then the response status code should be 200" it works just fine.
The final answer is that Behat\CommonContexts\WebApiContext is not compatible with Behat 2.4.

Might be a stupid question but do you use goutte? I went through a similar update recently and mink-browserkit-driver was all I needed.
I'm not sure why goutte has a dependency on 2.1 and it might be risky to use it with 2.0. If you really need it try defining a custom repository for goutte in your composer.json (and lie about requirements on Symfony).
Update
Notice that error message says "Call to a member function getUri()". It relates to getCurrentUri():
public function getCurrentUrl()
{
return $this->client->getRequest()->getUri();
}
It means that client is there but getRequest() returns null. That suggests request was not made yet.
Did you make a request before accessing its URL?
Installing Goutte won't solve your issue (you don't need it at all).

Related

Composer update probleme on cpanel for symfony

I have a problem for a symfony app when I try to install dependencies with composer :
Your requirements could not be resolved to an installable set of packages.
Problem 1
- symfony/framework-bundle[v6.0.0, ..., v6.0.12] require composer-runtime-api >=2.1 -> found composer-runtime-api[2.0.0] but it does not match the constraint.
- Root composer.json requires symfony/framework-bundle 6.0.* -> satisfiable by symfony/framework-bundle[v6.0.0, ..., v6.0.12].
Composer version I have on cpanel : 2.0.8
I didn't upgrade composer to the last version.
symfony/framework-bundle[v6.0.0, ..., v6.0.12] require composer-runtime-api >=2.1 -> found composer-runtime-api[2.0.0] but it does not match the constraint.
That line basically tells you that Symfony in v6 requires any Composer version equal or above 2.1, and you are currently using Composer v2.0. Please update Composer itself, for example by using composer self-update

How to install HWIOAuthBundle in Symfony4.3?

If i try install this bundle like it described in docs with command
composer require hwi/oauth-bundle php-http/guzzle6-adapter
php-http/httplug-bundle
i have this error:
Problem 1
- Installation request for hwi/oauth-bundle ^0.6.3 -> satisfiable by hwi/oauth-bundle[0.6.3].
- Installation request for php-http/httplug-bundle ^1.16 -> satisfiable by php-http/httplug-bundle[1.16.0].
- php-http/httplug-bundle 1.16.0 requires php-http/client-implementation ^1.0 -> satisfiable by php-http/guzzle6-adapter[v2.0.0, v2.0.1].
- php-http/guzzle6-adapter v2.0.0 requires php-http/httplug ^2.0 -> satisfiable by php-http/httplug[v2.0.0].
- php-http/guzzle6-adapter v2.0.1 requires php-http/httplug ^2.0 -> satisfiable by php-http/httplug[v2.0.0].
- Conclusion: don't install php-http/httplug v2.0.0
if i try to install this packages one by one i have similar output:
Problem 1
- Installation request for hwi/oauth-bundle ^0.6.3 -> satisfiable by hwi/oauth-bundle[0.6.3].
- hwi/oauth-bundle 0.6.3 requires php-http/client-implementation ^1.0 -> no matching package found.
Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting
see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
- It's a private package and you forgot to add a custom repository to find it
Is that bundle works with Symfony4.3 ?
\=\=\=\=\=\=\=\=\=\=\=\=\\\\===\
Installed successfully with commands:
composer require php-http/guzzle6-adapter=^1.1
composer requirehwi/oauth-bundle php-http/httplug-bundle
as #Taher Ben sassi pointed.
My config.
in security.yaml:
firewalls:
main:
anonymous: ~
oauth:
resource_owners:
facebook: "/login/check-facebook"
google: "/login/check-google"
my_custom_provider: "/login/check-custom"
my_github: "/login/check-github"
login_path: /login
use_forward: false
failure_path: /login
provider: users
oauth_user_provider:
service: my.oauth_aware.user_provider.service
in services.yaml
my.oauth_aware.user_provider.service:
class: HWI\Bundle\OAuthBundle\Security\Core\User\FOSUBUserProvider
arguments:
- '#fos_user.user_manager'
- ['pass properties as array']
HWIOAuthBundle
1.0 with support for Symfony: ^3.4 & ^4.2.
Step 1 :
composer require php-http/guzzle6-adapter=^1.1
Step 2 :
composer require hwi/oauth-bundle php-http/httplug-bundle
composer.json
[...]
"require": {
[...]
"hwi/oauth-bundle": "^0.6.3",
"php-http/guzzle6-adapter": "^1.1",
"php-http/httplug-bundle": "^1.13",
[...]
}
[...]
UPDATE.
Mention in GH
Set hwi_oauth in service
hwi_oauth:
firewall_name: secured_area

composer install -n --ignore-platform-reqs not ignoring PHP extension

we have circle build that runs composer install -n --ignore-platform-reqs --no-dev but this is not ignoring the platform requirements anymore.
This is what i see in the circle log. The --ignore-platform-reqs is clearly not working. Any ideas why please?
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for drupal/core 8.6.13 -> satisfiable by drupal/core[8.6.13].
- drupal/core 8.6.13 requires ext-pdo * -> the requested PHP extension pdo is missing from your system.
Problem 2
- typo3/phar-stream-wrapper v2.1.0 requires ext-fileinfo * -> the requested PHP extension fileinfo is missing from your system.
- typo3/phar-stream-wrapper v2.1.0 requires ext-fileinfo * -> the requested PHP extension fileinfo is missing from your system.
- Installation request for typo3/phar-stream-wrapper v2.1.0 -> satisfiable by typo3/phar-stream-wrapper[v2.1.0].
Instead of using --ignore-platform-reqs or provide hack it is better to mimic your environment using platform setting - it gives you more control about platform requirements and it is more intuitive than provide (your package does not really provide ext-fileinfo):
"config": {
"platform": {
"php": "7.2.14",
"ext-fileinfo": "1.0.5",
"ext-pdo": "7.2.14",
"ext-session": "7.2.14",
"ext-iconv": "7.2.14",
"ext-zip": "1.15.4"
}
},
Actual versions of extensions you may find by calling this command on production environment (although you could probably put anything for extensions version - it is quite uncommon to use anything except * as a constraint for PHP extensions):
composer show -p
I am going to answer my own question just in case somebody stumbles here. Adding a provide with the list of extension in my composer.json file resolved the issue for me. This --ignore-platform-reqs had no effect.
"provide": {
"ext-fileinfo": "*",
"ext-pdo": "*",
"ext-session": "*",
"ext-iconv": "*",
"ext-zip": "*"
}

Can not update google/cloud-firestore [composer]

Now, I am using google/cloud-firestore ^0.8.1 and I want to update this library to latest version (0.14.0).
My composer.json now looks like:
"require": {
"grpc/grpc": "^1.10",
"google/protobuf": "^3.5",
"google/gax": "^0.31.3",
"google/cloud-firestore": "^0.8.1",
"firebase/php-jwt": "^5.0",
}
When I try to update firestore library with php composer.phar require google/cloud-firestore
, I got:
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for google/cloud-firestore ^0.14.0 -> satisfiable by google/cloud-firestore[v0.14.0].
- google/cloud-firestore v0.14.0 requires google/gax ^0.37 -> satisfiable by google/gax[0.37.0] but these conflict with your requirements or minimum-stability.
Installation failed, reverting ./composer.json to its original content.
After that, I tried with php composer.phar require google/gax and got:
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- google/cloud-firestore v0.8.1 requires google/gax ^0.31.1 -> satisfiable by google/gax[0.31.x-dev].
- google/cloud-firestore v0.8.1 requires google/gax ^0.31.1 -> satisfiable by google/gax[0.31.x-dev].
- google/cloud-firestore v0.8.1 requires google/gax ^0.31.1 -> satisfiable by google/gax[0.31.x-dev].
- Can only install one of: google/gax[0.37.0, 0.31.x-dev].
- Installation request for google/gax ^0.37 -> satisfiable by google/gax[0.37.0].
- Installation request for google/cloud-firestore ^0.8.1 -> satisfiable by google/cloud-firestore[v0.8.1].
Installation failed, reverting ./composer.json to its original content.
I added "minimum-stability": "dev" to composer.json but that didn't resolve problem.
How to properly update these libraries and fix dependencies between them?
The semantic versioning operator (^) behaves slightly different with pre-1.0 releases (see https://getcomposer.org/doc/articles/versions.md#caret-version-range-):
For pre-1.0 versions it also acts with safety in mind and treats ^0.3 as ?>=0.3.0 <0.4.0.
This means that you will have to update both packages like this:
composer require google/cloud-firestore:^0.14 google/gax:^0.37
With #xabbuh help, I find out solution.
There wasn't problem just in semantic versioning operator (^) but in packages I wanted to update.
I needed to install/update all packages that are needed for updating firestore on version 0.14. I called composer require google/cloud-firestore:^0.14 and after that composer require google/gax:^0.37 and after that tried with reverse order, but there were similar error messages.
When I included all packages needed into require command for updating firestore package it passed well.
So, here are working command:
composer require google/cloud-firestore:^0.14 google/gax:^0.37 google/auth:^1.3 google/grpc-gcp:^0.1.0 grpc/grpc:^1.13.0 google/cloud-core:^1.23

Symfony 4 error installing sensio/generator-bundle for sonata admin bundle

I'm starting with version 4 of sonata. 3 works great but with the 4th version lot of things changes.
After a while I found here how to install it but it return me the next error.
Problem 1
- sensio/generator-bundle v3.1.7 requires symfony/framework-bundle ~2.7|~3.0 -> satisfiable by symfony/framework-bundle[2.7.x-dev, 2.8.x-dev, 3.0.x-dev, 3.1.x-dev, 3.2.x-dev, 3.3.x-dev, 3.4.x-dev, v3.4.0, v3.4.1, v3.4.10, v3.4.11, v3.4.12, v3.4.13, v3.4.14, v3.4.2, v3.4.3, v3.4.4, v3.4.5, v3.4.6, v3.4.7, v3.4.8, v3.4.9] but these conflict with your requirements or minimum-stability.
- sensio/generator-bundle v3.1.6 requires symfony/framework-bundle ~2.7|~3.0 -> satisfiable by symfony/framework-bundle[2.7.x-dev, 2.8.x-dev, 3.0.x-dev, 3.1.x-dev, 3.2.x-dev, 3.3.x-dev, 3.4.x-dev, v3.4.0, v3.4.1, v3.4.10, v3.4.11, v3.4.12, v3.4.13, v3.4.14, v3.4.2, v3.4.3, v3.4.4, v3.4.5, v3.4.6, v3.4.7, v3.4.8, v3.4.9] but these conflict with your requirements or minimum-stability.
- sensio/generator-bundle v3.1.5 requires symfony/framework-bundle ~2.7|~3.0 -> satisfiable by symfony/framework-bundle[2.7.x-dev, 2.8.x-dev, 3.0.x-dev, 3.1.x-dev, 3.2.x-dev, 3.3.x-dev, 3.4.x-dev, v3.4.0, v3.4.1, v3.4.10, v3.4.11, v3.4.12, v3.4.13, v3.4.14, v3.4.2, v3.4.3, v3.4.4, v3.4.5, v3.4.6, v3.4.7, v3.4.8, v3.4.9] but these conflict with your requirements or minimum-stability.
- sensio/generator-bundle v3.1.4 requires symfony/framework-bundle ~2.7|~3.0 -> satisfiable by symfony/framework-bundle[2.7.x-dev, 2.8.x-dev, 3.0.x-dev, 3.1.x-dev, 3.2.x-dev, 3.3.x-dev, 3.4.x-dev, v3.4.0, v3.4.1, v3.4.10, v3.4.11, v3.4.12, v3.4.13, v3.4.14, v3.4.2, v3.4.3, v3.4.4, v3.4.5, v3.4.6, v3.4.7, v3.4.8, v3.4.9] but these conflict with your requirements or minimum-stability.
- sensio/generator-bundle v3.1.3 requires symfony/framework-bundle ~2.7|~3.0 -> satisfiable by symfony/framework-bundle[2.7.x-dev, 2.8.x-dev, 3.0.x-dev, 3.1.x-dev, 3.2.x-dev, 3.3.x-dev, 3.4.x-dev, v3.4.0, v3.4.1, v3.4.10, v3.4.11, v3.4.12, v3.4.13, v3.4.14, v3.4.2, v3.4.3, v3.4.4, v3.4.5, v3.4.6, v3.4.7, v3.4.8, v3.4.9] but these conflict with your requirements or minimum-stability.
- sensio/generator-bundle v3.1.2 requires symfony/framework-bundle ~2.7|~3.0 -> satisfiable by symfony/framework-bundle[2.7.x-dev, 2.8.x-dev, 3.0.x-dev, 3.1.x-dev, 3.2.x-dev, 3.3.x-dev, 3.4.x-dev, v3.4.0, v3.4.1, v3.4.10, v3.4.11, v3.4.12, v3.4.13, v3.4.14, v3.4.2, v3.4.3, v3.4.4, v3.4.5, v3.4.6, v3.4.7, v3.4.8, v3.4.9] but these conflict with your requirements or minimum-stability.
- sensio/generator-bundle v3.1.1 requires symfony/framework-bundle ~2.7|~3.0 -> satisfiable by symfony/framework-bundle[2.7.x-dev, 2.8.x-dev, 3.0.x-dev, 3.1.x-dev, 3.2.x-dev, 3.3.x-dev, 3.4.x-dev, v3.4.0, v3.4.1, v3.4.10, v3.4.11, v3.4.12, v3.4.13, v3.4.14, v3.4.2, v3.4.3, v3.4.4, v3.4.5, v3.4.6, v3.4.7, v3.4.8, v3.4.9] but these conflict with your requirements or minimum-stability.
- sensio/generator-bundle 3.1.0 requires symfony/framework-bundle ~2.7|~3.0 -> satisfiable by symfony/framework-bundle[2.7.x-dev, 2.8.x-dev, 3.0.x-dev, 3.1.x-dev, 3.2.x-dev, 3.3.x-dev, 3.4.x-dev, v3.4.0, v3.4.1, v3.4.10, v3.4.11, v3.4.12, v3.4.13, v3.4.14, v3.4.2, v3.4.3, v3.4.4, v3.4.5, v3.4.6, v3.4.7, v3.4.8, v3.4.9] but these conflict with your requirements or minimum-stability.
- Installation request for sensio/generator-bundle ^3.1 -> satisfiable by sensio/generator-bundle[3.1.0, v3.1.1, v3.1.2, v3.1.3, v3.1.4, v3.1.5, v3.1.6, v3.1.7].
I tried to force the version 4 and it return me this
Your requirements could not be resolved to an installable set of packages.
Problem 1
- The requested package sensio/generator-bundle ^4.0 exists as sensio/generator-bundle[2.0.x-dev, 2.1.x-dev, 2.2.x-dev, 2.4.x-dev, 2.5.x-dev, 3.1.0, dev-master, 3.1.x-dev, v2.0.17, v2.0.18, v2.0.19, v2.0.20, v2.0.22, v2.0.23, v2.1.0, v2.1.0-RC2, v2.1.10, v2.1.11, v2.1.3, v2.1.4, v2.1.5, v2.1.7, v2.1.8, v2.1.9, v2.2.0, v2.2.0-BETA1, v2.2.0-BETA2, v2.2.0-RC1, v2.2.0-RC2, v2.2.0-RC3, v2.2.1, v2.2.2, v2.2.3, v2.2.4, v2.2.5, v2.2.6, v2.3.0, v2.3.0-BETA1, v2.3.0-BETA2, v2.3.0-RC1, v2.3.1, v2.3.2, v2.3.3, v2.3.4, v2.3.5, v2.4.0, v2.4.1, v2.4.2, v2.4.3, v2.4.4, v2.4.5, v2.5.0, v2.5.1, v2.5.2, v2.5.3, v3.0.0, v3.0.1, v3.0.10, v3.0.11, v3.0.2, v3.0.3, v3.0.4, v3.0.5, v3.0.6, v3.0.7, v3.0.8, v3.0.9, v3.1.1, v3.1.2, v3.1.3, v3.1.4, v3.1.5, v3.1.6, v3.1.7] but these are rejected by your constraint.
This is the info of all bundles
$ php composer.phar show
behat/transliterator v1.2.0 String transliterator
cocur/slugify v3.1 Converts a string into a slug.
doctrine/annotations v1.6.0 Docblock Annotations Parser
doctrine/cache v1.7.1 Caching library offering an object-oriented API for many cache backends
doctrine/collections v1.5.0 Collections Abstraction library
doctrine/common v2.9.0 Common Library for Doctrine projects
doctrine/dbal v2.8.0 Database Abstraction Layer
doctrine/doctrine-bundle 1.9.1 Symfony DoctrineBundle
doctrine/doctrine-cache-bundle 1.3.3 Symfony Bundle for Doctrine Cache
doctrine/doctrine-migrations-bundle v1.3.1 Symfony DoctrineMigrationsBundle
doctrine/event-manager v1.0.0 Doctrine Event Manager component
doctrine/inflector v1.3.0 Common String Manipulations with regard to casing and singular/plural rules.
doctrine/instantiator 1.1.0 A small, lightweight utility to instantiate objects in PHP without invoking their constructors
doctrine/lexer v1.0.1 Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.
doctrine/migrations v1.8.1 Database Schema migrations using Doctrine DBAL
doctrine/orm v2.6.2 Object-Relational-Mapper for PHP
doctrine/persistence v1.0.0 Doctrine Persistence abstractions.
doctrine/reflection v1.0.0 Doctrine Reflection component
easycorp/easy-log-handler v1.0.7 A handler for Monolog that optimizes log messages to be processed by humans instead of software. Improve you...
egulias/email-validator 2.1.4 A library for validating emails against several RFCs
fig/link-util 1.0.0 Common utility implementations for HTTP links
gedmo/doctrine-extensions v2.4.36 Doctrine2 behavioral extensions
jdorn/sql-formatter v1.2.17 a PHP SQL highlighting library
knplabs/knp-menu 2.3.0 An object oriented menu library
knplabs/knp-menu-bundle v2.2.1 This bundle provides an integration of the KnpMenu library
monolog/monolog 1.23.0 Sends your logs to files, sockets, inboxes, databases and various web services
nikic/php-parser v4.0.3 A PHP parser written in PHP
ocramius/package-versions 1.3.0 Composer plugin that provides efficient querying for installed package versions (no runtime IO)
ocramius/proxy-manager 2.1.1 A library providing utilities to generate, instantiate and generally operate with Object Proxies
phpdocumentor/reflection-common 1.0.1 Common reflection classes used by phpdocumentor to reflect the code structure
phpdocumentor/reflection-docblock 4.3.0 With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve infor...
phpdocumentor/type-resolver 0.4.0
psr/cache 1.0.1 Common interface for caching libraries
psr/container 1.0.0 Common Container Interface (PHP FIG PSR-11)
psr/link 1.0.0 Common interfaces for HTTP links
psr/log 1.0.2 Common interface for logging libraries
psr/simple-cache 1.0.1 Common interfaces for simple caching
sensio/framework-extra-bundle v5.2.0 This bundle provides a way to configure your controllers with annotations
sonata-project/admin-bundle 3.37.0 The missing Symfony Admin Generator
sonata-project/block-bundle 3.12.1 Symfony SonataBlockBundle
sonata-project/cache 2.0.1 Cache library
sonata-project/core-bundle 3.11.2 Symfony SonataCoreBundle
sonata-project/datagrid-bundle 2.3.1 Symfony SonataDatagridBundle
sonata-project/doctrine-orm-admin-bundle 3.6.1 Symfony Sonata / Integrate Doctrine ORM into the SonataAdminBundle
sonata-project/exporter 1.9.1 Lightweight Exporter library
stof/doctrine-extensions-bundle v1.3.0 Integration of the gedmo/doctrine-extensions with Symfony2
swiftmailer/swiftmailer v6.1.2 Swiftmailer, free feature-rich PHP mailer
symfony/asset v4.1.3 Symfony Asset Component
symfony/browser-kit v4.1.3 Symfony BrowserKit Component
symfony/cache v4.1.3 Symfony Cache component with PSR-6, PSR-16, and tags
symfony/class-loader v3.4.14 Symfony ClassLoader Component
symfony/config v4.1.3 Symfony Config Component
symfony/console v4.1.3 Symfony Console Component
symfony/css-selector v4.1.3 Symfony CssSelector Component
symfony/debug v4.1.3 Symfony Debug Component
symfony/debug-bundle v4.1.3 Symfony DebugBundle
symfony/debug-pack v1.0.5 A debug pack for Symfony projects
symfony/dependency-injection v4.1.3 Symfony DependencyInjection Component
symfony/doctrine-bridge v4.1.3 Symfony Doctrine Bridge
symfony/dom-crawler v4.1.3 Symfony DomCrawler Component
symfony/dotenv v4.1.3 Registers environment variables from a .env file
symfony/event-dispatcher v4.1.3 Symfony EventDispatcher Component
symfony/expression-language v4.1.3 Symfony ExpressionLanguage Component
symfony/filesystem v4.1.3 Symfony Filesystem Component
symfony/finder v4.1.3 Symfony Finder Component
symfony/flex v1.0.89 Composer plugin for Symfony
symfony/form v4.1.3 Symfony Form Component
symfony/framework-bundle v4.1.3 Symfony FrameworkBundle
symfony/http-foundation v4.1.3 Symfony HttpFoundation Component
symfony/http-kernel v4.1.3 Symfony HttpKernel Component
symfony/inflector v4.1.3 Symfony Inflector Component
symfony/intl v4.1.3 A PHP replacement layer for the C intl extension that includes additional data from the ICU library.
symfony/lts dev-master Enforces Long Term Supported versions of Symfony components
symfony/maker-bundle v1.6.0 Symfony Maker helps you create empty commands, controllers, form classes, tests and more so you can forget a...
symfony/monolog-bridge v4.1.3 Symfony Monolog Bridge
symfony/monolog-bundle v3.3.0 Symfony MonologBundle
symfony/options-resolver v4.1.3 Symfony OptionsResolver Component
symfony/orm-pack v1.0.5 A pack for the Doctrine ORM
symfony/phpunit-bridge v4.1.3 Symfony PHPUnit Bridge
symfony/polyfill-ctype v1.9.0 Symfony polyfill for ctype functions
symfony/polyfill-intl-icu v1.9.0 Symfony polyfill for intl's ICU-related data and classes
symfony/polyfill-mbstring v1.9.0 Symfony polyfill for the Mbstring extension
symfony/polyfill-php72 v1.9.0 Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions
symfony/process v4.1.3 Symfony Process Component
symfony/profiler-pack v1.0.3 A pack for the Symfony web profiler
symfony/property-access v4.1.3 Symfony PropertyAccess Component
symfony/property-info v4.1.3 Symfony Property Info Component
symfony/routing v4.1.3 Symfony Routing Component
symfony/security v4.1.3 Symfony Security Component
symfony/security-acl v3.0.1 Symfony Security Component - ACL (Access Control List)
symfony/security-bundle v4.1.3 Symfony SecurityBundle
symfony/serializer v4.1.3 Symfony Serializer Component
symfony/serializer-pack v1.0.1 A pack for the Symfony serializer
symfony/stopwatch v4.1.3 Symfony Stopwatch Component
symfony/swiftmailer-bundle v3.2.2 Symfony SwiftmailerBundle
symfony/templating v4.1.3 Symfony Templating Component
symfony/test-pack v1.0.2 A pack for functional testing within a Symfony app
symfony/translation v4.1.3 Symfony Translation Component
symfony/twig-bridge v4.1.3 Symfony Twig Bridge
symfony/twig-bundle v4.1.3 Symfony TwigBundle
symfony/validator v4.1.3 Symfony Validator Component
symfony/var-dumper v4.1.3 Symfony mechanism for exploring and dumping PHP variables
symfony/web-link v4.1.3 Symfony WebLink Component
symfony/web-profiler-bundle v4.1.3 Symfony WebProfilerBundle
symfony/web-server-bundle v4.1.3 Symfony WebServerBundle
symfony/yaml v4.1.3 Symfony Yaml Component
twig/extensions v1.5.2 Common additional features for Twig that do not directly belong in core
twig/twig v2.5.0 Twig, the flexible, fast, and secure template language for PHP
webmozart/assert 1.3.0 Assertions to validate method input/output with nice error messages.
zendframework/zend-code 3.3.0 provides facilities to generate arbitrary code using an object oriented interface
zendframework/zend-eventmanager 3.2.1 Trigger and listen to events within a PHP application
EDIT
Here is the composer.json
{
"type": "project",
"license": "proprietary",
"require": {
"php": "^7.1.3",
"ext-iconv": "*",
"sensio/framework-extra-bundle": "^5.1",
"sonata-project/admin-bundle": "^3.37",
"sonata-project/doctrine-orm-admin-bundle": "^3.6",
"stof/doctrine-extensions-bundle": "^1.3",
"symfony/asset": "^4.1",
"symfony/console": "^4.1",
"symfony/expression-language": "^4.1",
"symfony/flex": "^1.0",
"symfony/form": "^4.1",
"symfony/framework-bundle": "^4.1",
"symfony/lts": "^4#dev",
"symfony/monolog-bundle": "^3.1",
"symfony/orm-pack": "^1.0",
"symfony/process": "^4.1",
"symfony/security-bundle": "^4.1",
"symfony/serializer-pack": "*",
"symfony/swiftmailer-bundle": "^3.1",
"symfony/twig-bundle": "^4.1",
"symfony/validator": "^4.1",
"symfony/web-link": "^4.1",
"symfony/web-server-bundle": "^4.1",
"symfony/yaml": "^4.1"
},
"require-dev": {
"symfony/debug-pack": "*",
"symfony/dotenv": "^4.1",
"symfony/maker-bundle": "^1.6",
"symfony/profiler-pack": "*",
"symfony/test-pack": "^1.0"
},
"config": {
"preferred-install": {
"*": "dist"
},
"sort-packages": true
},
"autoload": {
"psr-4": {
"App\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"App\\Tests\\": "tests/"
}
},
"replace": {
"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
}
}
}
Problem here is very simple: if you require version 3.1 of the generator bundle (or in general every 3.x version) you must have symfony 3 as this bundle will not be compatible with sf4. So your first try will not result in a success.
If you try to require the version 4 of this bundle you get the error as there's not tagged version with 4 tag.
As a matter of fact, this bundle is replaced with MakerBundle that you can use with symfony 4 projects
Delete composer.lock
Delete composer cache
Clear vendor folder
Then
composer update
I successfully did composer update with your composer.json for empty Symfony 4.1 project

Resources