-
Notifications
You must be signed in to change notification settings - Fork 46
Use Puli discovery #34
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
.puli/ | ||
build/ | ||
vendor/ | ||
composer.lock | ||
phpspec.yml | ||
phpunit.xml | ||
puli.json | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you not commit the puli.json file by intention? Just like composer.json, this file should usually be committed and distributed with the package.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I generally agree, but this package is supposed to be installed in other packages or an application. There are no bindings or binding types in this package, so only the "lock" functionality would be generated into the json file, which IMO doesn't make sense here, but would make sense in the application.
Why is the package list generated in the json file in the first place? I though the json file is some kind of configuration and I expect it doesn't contain anything else. The generated package list could be part of some kind of lock file, couldn't it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, makes sense then.
The package list is in there since, at least in principle, Puli is independent of Composer. You could install additional packages manually or generally use Puli without Composer, if that makes sense for your project. So puli.json duplicates some parts of composer.json, however those parts are synchronized by the Composer plugin.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually I was thinking about a puli.lock file. In cases like this, a puli.json might not even be necessary in a project/application, only a puli.lock where non-configuration stuff can go. Even if you add stuff manually there, it is rather an "environmental" (aka. project dependent) thing, which depends on external resources, while you might change a configuration based on internal project changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Puli works differently than Composer. There's no need for a lock file in Puli.
You are right that in this case, a puli.json is not needed (but neither is a lock file).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, calling it lock is probably not straightforward and multiple configuration can be confusing. Also, packages for composer are only generated when the composer plugin is installed and it should only be done in an application, am right? With other words: package configuration, like composer packages should only be in an application, but not in reusable packages. Am I correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not necessarily. If your packages contain integration tests that require f.i. Puli's Discovery service and certain binding types/bindings to be loaded from other packages, then those packages must be loaded into Puli as well, otherwise the binding types/bindings are not found.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. Are those packages loaded into the application where the package is installed afterwards? Because I probably don't want integration testing binding in the application where I use the package.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool. Thanks for clarification.