Skip to content
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

BUGFIX: Always run composer from Flow root path #1837

Merged
merged 1 commit into from
Nov 6, 2019
Merged

BUGFIX: Always run composer from Flow root path #1837

merged 1 commit into from
Nov 6, 2019

Conversation

eWert-Online
Copy link
Contributor

@eWert-Online eWert-Online commented Oct 31, 2019

This bugfix ensures, that the composer require command always gets executed in the Flow root path (by calling composer require with the --working-direcory flag set to FLOW_PATH_ROOT .)

It also introduces the composer/composer package to the codebase to replace the exec command.

Fixes #1832
Fixes #1778

@kdambekalns
Copy link
Member

From the original PR description:

How to verify it

  1. run the kickstart:site command from any other direcory than the Flow root path
    (ex: ./test/flow kickstart:site Package.Name test)
  2. create a site-package with the web setup tool.

Note
I did close and reopen the pull request, because i branched off from master and not from 5.2
Sorry for the inconvenience

mficzel
mficzel previously requested changes Nov 4, 2019
Copy link
Member

@mficzel mficzel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this approach but i run into trouble when running
./flow package:create --package-key Foo.Baz

Result:

Class 'Composer\Console\Application' not found
  Type: Error
  File: Packages/Framework/Neos.Flow/Classes/Package/PackageManager.php
  Line: 394

I added the repo to the composer.json and ran composer update which lead to composer/composer be installed but some weird info messages are shown.

@mficzel mficzel dismissed their stale review November 4, 2019 10:12

Seems i had composer issues, will add a proper review now

Copy link
Member

@mficzel mficzel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this change and can confirm that it works. Should have been like this in the first place.

@kdambekalns can you verify that the composer/composer dependency is introduced in a way that works with the subsplits.

@kdambekalns
Copy link
Member

Will do…

@kdambekalns
Copy link
Member

From looking at it it seems perfect. The dependency is declared with neos/flow itself and the collection manifest has been updated. That should not interfere with anything split-related.

I just wonder why we ever had Flow depend on itself as a dev-dependency… 🤷‍♂️

@kitsunet
Copy link
Member

kitsunet commented Nov 4, 2019

This is great, but also shows that now Flow will depend on composer, I guess we should move package creation out of the package manager ASAP and into the flow/kickstarter so you can get rid of that and the composer requirement when you want to. Alas not related to this change which definitely brings things in the right direction.

@kdambekalns
Copy link
Member

shows that now Flow will depend on composer

Isn't that an opportunity? I am quite sure we have some dependency-order code that we could delegate, no?

@kitsunet
Copy link
Member

kitsunet commented Nov 6, 2019

Hahaha, good idea, will have to look into that and see if we could actually do that to order packages for settings and such.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants