-
-
Notifications
You must be signed in to change notification settings - Fork 78
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
validate composer.json #43
Comments
Interesting suggestion :-) Right now, this project does not necessarily depend on composer at all. You can use this tool to bundle a local project directory without requiring composer. I considered embedding composer (#11), in which case it certainly makes sense to also add a validation step. What are your thoughts? |
Not sure how much dev-time it would take to embbed composer and how big the resulting phar-composer will be. This 2 parameters would be the actual drivers IMO. If this issue is the only reason for embedding composer we could also just use |
Sounds like a sane approach (sufficiently easy to implement independently of #11). Would you care to file a PR? :) |
Will PR tomorrow |
An alternate approach would be to use |
phar-composer commands assume the composer.json provided is valid.
In case it is not valid it sometimes produces strange things, e.g. name a project "myproject" (without a vendor prefix, which of course is invalid).
-> it will create a "yproject.phar" (without the leading "m"). It took some time to find out, that this problems are caused by my invalid composer.json.
phar-composer could do a better job and do a
composer validate
before each runs its own commands. In case of errors, skip its own command and print the error.The text was updated successfully, but these errors were encountered: