-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error during bin require with Symfony Flex #39
Comments
no that should work, maybe try with |
I suppose there is nothing useful, I'm running Mac
|
@bamarni there may be a regression with the new Composer version... |
Having the same issue wunder@code-2017-VirtualBox:~/PhpstormProjects/symfony-flex-backend2$ php --version
PHP 7.1.15-0ubuntu0.17.10.1 (cli) (built: Mar 14 2018 22:30:42) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.1.15-0ubuntu0.17.10.1, Copyright (c) 1999-2018, by Zend Technologies
wunder@code-2017-VirtualBox:~/PhpstormProjects/symfony-flex-backend2$ composer --version
Composer version 1.6.4 2018-04-13 12:04:24
wunder@code-2017-VirtualBox:~/PhpstormProjects/symfony-flex-backend2$ composer bin -vvv phpmetrics require phpmetrics/phpmetrics
Reading ./composer.json
Loading config file ./composer.json
Checked CA file /etc/ssl/certs/ca-certificates.crt: valid
Failed to initialize global composer: Composer could not find the config file: /home/wunder/.composer/composer.json
To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section
Reading /home/wunder/PhpstormProjects/symfony-flex-backend2/vendor/composer/installed.json
Loading plugin Bamarni\Composer\Bin\Plugin
Loading plugin Muglug\PackageVersions\Installer
Loading plugin PackageVersions\Installer
Loading plugin Symfony\Flex\Flex
Composer >=1.7 not found, downloads will happen in sequence
Changed current directory to vendor-bin/phpmetrics
Changed CWD to /home/wunder/PhpstormProjects/symfony-flex-backend2/vendor-bin/phpmetrics
Composer could not find a composer.json file in /home/wunder/PhpstormProjects/symfony-flex-backend2/vendor-bin/phpmetrics
To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section
wunder@code-2017-VirtualBox:~/PhpstormProjects/symfony-flex-backend2$ |
If I recall correctly we are checking for this at one point to silence the
message. It is possible that the message changed with a Composer update.
If someone could check it it would be awesome , the plugin is very small so
it shouldn’t be too hard.
However before digging into this, please check you are using the latest
versions of Composer and of the plugin!
…On Thu 26 Apr 2018 at 17:54, Tarmo Leppänen ***@***.***> wrote:
Having the same issue
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#39 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AE76gXDG2gitBlD7LBsVk8nprSEUQFOgks5tsfuygaJpZM4TWTOj>
.
|
Did some testing with this, and command
Will fail with that same error. And then if I add
And that will continue and continue if I add |
??? |
Hmm, thats weird I don't have that file at all anymore, I did use |
Just added that file
|
can you try by disabling some plugins? |
Tried without any plugins other than this one and without
And then after adding that
results are
For some reason it's chaging directory twice on that case... |
That's so weird... Did you try to debug it? Everything is in https://github.com/bamarni/composer-bin-plugin/blob/master/src/BinCommand.php. I really can't reproduce it on OSX |
@theofidry could you try that with my repo https://github.com/tarlepp/symfony-flex-backend ? |
I can reproduce it there. So I suspect it has something to do with Flex... |
Confirmed that this won't work with Flex. Below commands that I run: wunder@code-2017-VirtualBox:~/PhpstormProjects$ composer create-project symfony/website-skeleton my-project
Installing symfony/website-skeleton (v4.0.7)
- Installing symfony/website-skeleton (v4.0.7): Downloading (100%)
Created project in my-project
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 90 installs, 0 updates, 0 removals
- Installing ocramius/package-versions (1.3.0): Loading from cache
- Installing symfony/flex (v1.0.80): Loading from cache
Prefetching 11 packages 🎶
- Downloading (100%)
- Installing doctrine/lexer (v1.0.1): Loading from cache
- Installing doctrine/inflector (v1.3.0): Loading from cache
- Installing doctrine/collections (v1.5.0): Loading from cache
- Installing doctrine/cache (v1.7.1): Loading from cache
- Installing doctrine/annotations (v1.6.0): Loading from cache
- Installing doctrine/common (v2.8.1): Loading from cache
- Installing symfony/polyfill-mbstring (v1.8.0): Loading from cache
- Installing symfony/http-foundation (v4.0.9): Loading from cache
- Installing symfony/yaml (v4.0.9): Loading from cache
- Installing symfony/webpack-encore-pack (v1.0.2): Loading from cache
- Installing psr/link (1.0.0): Loading from cache
- Installing fig/link-util (1.0.0): Loading from cache
- Installing symfony/web-link (v4.0.9): Loading from cache
- Installing symfony/translation (v4.0.9): Loading from cache
- Installing symfony/validator (v4.0.9): Loading from cache
- Installing twig/twig (v2.4.8): Loading from cache
- Installing symfony/twig-bridge (v4.0.9): Loading from cache
- Installing symfony/http-kernel (v4.0.9): Loading from cache
- Installing symfony/event-dispatcher (v4.0.9): Loading from cache
- Installing psr/log (1.0.2): Loading from cache
- Installing symfony/debug (v4.0.9): Loading from cache
- Installing symfony/filesystem (v4.0.9): Loading from cache
- Installing symfony/config (v4.0.9): Loading from cache
- Installing symfony/twig-bundle (v4.0.9): Loading from cache
- Installing psr/container (1.0.0): Loading from cache
- Installing symfony/dependency-injection (v4.0.9): Loading from cache
- Installing egulias/email-validator (2.1.4): Loading from cache
- Installing swiftmailer/swiftmailer (v6.0.2): Loading from cache
- Installing symfony/swiftmailer-bundle (v3.2.2): Loading from cache
- Installing symfony/serializer (v4.0.9): Loading from cache
- Installing symfony/inflector (v4.0.9): Loading from cache
- Installing symfony/property-info (v4.0.9): Loading from cache
- Installing symfony/property-access (v4.0.9): Loading from cache
- Installing psr/simple-cache (1.0.1): Loading from cache
- Installing psr/cache (1.0.1): Loading from cache
- Installing symfony/cache (v4.0.9): Loading from cache
- Installing webmozart/assert (1.3.0): Loading from cache
- Installing phpdocumentor/reflection-common (1.0.1): Loading from cache
- Installing phpdocumentor/type-resolver (0.4.0): Loading from cache
- Installing phpdocumentor/reflection-docblock (4.3.0): Loading from cache
- Installing symfony/serializer-pack (v1.0.1): Loading from cache
- Installing symfony/security (v4.0.9): Loading from cache
- Installing symfony/security-bundle (v4.0.9): Loading from cache
- Installing symfony/process (v4.0.9): Loading from cache
- Installing symfony/routing (v4.0.9): Loading from cache
- Installing symfony/finder (v4.0.9): Loading from cache
- Installing symfony/framework-bundle (v4.0.9): Loading from cache
- Installing symfony/console (v4.0.9): Loading from cache
- Installing zendframework/zend-eventmanager (3.2.1): Loading from cache
- Installing zendframework/zend-code (3.3.0): Loading from cache
- Installing ocramius/proxy-manager (2.1.1): Loading from cache
- Installing doctrine/dbal (v2.7.1): Loading from cache
- Installing doctrine/migrations (v1.6.2): Loading from cache
- Installing symfony/doctrine-bridge (v4.0.9): Loading from cache
- Installing doctrine/doctrine-cache-bundle (1.3.3): Loading from cache
- Installing jdorn/sql-formatter (v1.2.17): Loading from cache
- Installing doctrine/doctrine-bundle (1.9.1): Loading from cache
- Installing doctrine/doctrine-migrations-bundle (v1.3.1): Loading from cache
- Installing doctrine/instantiator (1.1.0): Loading from cache
- Installing doctrine/orm (v2.6.1): Loading from cache
- Installing symfony/orm-pack (v1.0.5): Loading from cache
- Installing monolog/monolog (1.23.0): Loading from cache
- Installing symfony/monolog-bridge (v4.0.9): Loading from cache
- Installing symfony/monolog-bundle (v3.2.0): Loading from cache
- Installing symfony/options-resolver (v4.0.9): Loading from cache
- Installing symfony/intl (v4.0.9): Loading from cache
- Installing symfony/polyfill-intl-icu (v1.8.0): Loading from cache
- Installing symfony/form (v4.0.9): Loading from cache
- Installing symfony/expression-language (v4.0.9): Loading from cache
- Installing symfony/asset (v4.0.9): Loading from cache
- Installing sensio/framework-extra-bundle (v5.1.6): Loading from cache
- Installing symfony/dom-crawler (v4.0.9): Loading from cache
- Installing symfony/browser-kit (v4.0.9): Loading from cache
- Installing symfony/css-selector (v4.0.9): Loading from cache
- Installing symfony/polyfill-php72 (v1.8.0): Loading from cache
- Installing symfony/var-dumper (v4.0.9): Loading from cache
- Installing symfony/web-profiler-bundle (v4.0.9): Loading from cache
- Installing symfony/stopwatch (v4.0.9): Loading from cache
- Installing symfony/profiler-pack (v1.0.3): Loading from cache
- Installing easycorp/easy-log-handler (v1.0.4): Loading from cache
- Installing symfony/debug-bundle (v4.0.9): Loading from cache
- Installing symfony/debug-pack (v1.0.5): Loading from cache
- Installing symfony/dotenv (v4.0.9): Loading from cache
- Installing nikic/php-parser (v4.0.1): Loading from cache
- Installing symfony/maker-bundle (v1.4.4): Loading from cache
- Installing symfony/phpunit-bridge (v4.0.9): Loading from cache
- Installing symfony/web-server-bundle (v4.0.9): Loading from cache
Writing lock file
Generating autoload files
ocramius/package-versions: Generating version class...
ocramius/package-versions: ...done generating version class
Symfony operations: 21 recipes (2cea6566c9b773486b487b4e6161276e)
- Configuring symfony/flex (>=1.0): From github.com/symfony/recipes:master
- Configuring symfony/framework-bundle (>=3.3): From github.com/symfony/recipes:master
- Configuring doctrine/annotations (>=1.0): From github.com/symfony/recipes:master
- Configuring symfony/webpack-encore-pack (>=1.0): From github.com/symfony/recipes:master
- Configuring symfony/translation (>=3.3): From github.com/symfony/recipes:master
- Configuring symfony/twig-bundle (>=3.3): From github.com/symfony/recipes:master
- Configuring symfony/swiftmailer-bundle (>=2.5): From github.com/symfony/recipes:master
- Configuring symfony/security-bundle (>=3.3): From github.com/symfony/recipes:master
- Configuring symfony/routing (>=4.0): From github.com/symfony/recipes:master
- Configuring symfony/console (>=3.3): From github.com/symfony/recipes:master
- Configuring doctrine/doctrine-cache-bundle (>=1.3.3): From auto-generated recipe
- Configuring doctrine/doctrine-bundle (>=1.6): From github.com/symfony/recipes:master
- Configuring doctrine/doctrine-migrations-bundle (>=1.2): From github.com/symfony/recipes:master
- Configuring symfony/monolog-bundle (>=3.1): From github.com/symfony/recipes:master
- Configuring sensio/framework-extra-bundle (>=4.0): From github.com/symfony/recipes:master
- Configuring symfony/web-profiler-bundle (>=3.3): From github.com/symfony/recipes:master
- Configuring easycorp/easy-log-handler (>=1.0): From github.com/symfony/recipes:master
- Configuring symfony/debug-bundle (>=3.3): From github.com/symfony/recipes:master
- Configuring symfony/maker-bundle (>=1.0): From github.com/symfony/recipes:master
- Configuring symfony/phpunit-bridge (>=3.3): From github.com/symfony/recipes:master
- Configuring symfony/web-server-bundle (>=3.3): From github.com/symfony/recipes:master
Executing script cache:clear [OK]
Executing script assets:install --symlink --relative public [OK]
Some files may have been created or updated to configure your new packages.
Please review, edit and commit them: these files are yours.
What's next?
* Run your application:
1. Change to the project directory
2. Execute the php -S 127.0.0.1:8000 -t public command;
3. Browse to the http://localhost:8000/ URL.
Quit the server with CTRL-C.
Run composer require server --dev for a better web server.
* Read the documentation at https://symfony.com/doc
Database Configuration
* Modify your DATABASE_URL config in .env
* Configure the driver (mysql) and
server_version (5.7) in config/packages/doctrine.yaml
How to test?
* Write test cases in the tests/ folder
* Run php bin/phpunit
wunder@code-2017-VirtualBox:~/PhpstormProjects$
wunder@code-2017-VirtualBox:~/PhpstormProjects$ cd my-project
wunder@code-2017-VirtualBox:~/PhpstormProjects/my-project$ composer require --dev bamarni/composer-bin-plugin
Using version ^1.2 for bamarni/composer-bin-plugin
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
- Installing bamarni/composer-bin-plugin (v1.2.0): Loading from cache
Writing lock file
Generating autoload files
ocramius/package-versions: Generating version class...
ocramius/package-versions: ...done generating version class
Executing script cache:clear [OK]
Executing script assets:install --symlink --relative public [OK]
wunder@code-2017-VirtualBox:~/PhpstormProjects/my-project$ composer bin phpmetrics require phpmetrics/phpmetrics
Changed current directory to vendor-bin/phpmetrics
Composer could not find a composer.json file in /home/wunder/PhpstormProjects/my-project/vendor-bin/phpmetrics
To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section
wunder@code-2017-VirtualBox:~/PhpstormProjects/my-project$ |
Could someone try with #42? |
While adding a bin requirement I got an error like this:
Am I doing something wrong?
Documentation doesn't say anything I need to do except require composer plugin.
The text was updated successfully, but these errors were encountered: