Repository navigation
Add generic apptype detection using apptype approach in #574 - #585
Merged
Merged
Conversation
rfay
force-pushed
the
20171227_detect_handling
branch
from
December 27, 2017 19:22
8673ad1 to
401251c
Compare
Member
Author
|
OK, I think this one is ready for review if it passes tests, thanks @cweagans and @rickmanelius |
rickmanelius
self-requested a review
December 27, 2017 23:58
rfay
force-pushed
the
20171227_detect_handling
branch
from
December 28, 2017 01:59
ca325a2 to
64cd309
Compare
cweagans
suggested changes
Jan 3, 2018
| return appName | ||
| } | ||
| } | ||
| return "php" |
Contributor
There was a problem hiding this comment.
IMO, we should not hardcode this. Put php at the end of appTypeMatrix, and then have an actual detector function for PHP that returns true if there are any PHP files in the app root. It'll be last in line behind the other PHP app types. That way, if we ever get around to adding Ruby or Python environments, we can do something similar for fallback detection.
Contributor
There was a problem hiding this comment.
@rfay let me know that the ordering of maps in Go is indeterminate, so this is not quite as easy as I thought it would be. Given that support for other languages is likely a while out still, this is fine as is :)
cweagans
approved these changes
Jan 3, 2018
rfay
force-pushed
the
20171227_detect_handling
branch
from
January 3, 2018 17:41
64cd309 to
35b66a0
Compare
This was referenced Jan 5, 2018
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The Problem/Issue/Bug:
Apptype detection is done inline in existing code, which makes it hard to maintain. We're now moving all types of app-specific logic into its own file in ddevapp. This PR does that for drupal, wordpress, and php.
This builds on #574 (generic, extensible apptype handling)
How this PR Solves The Problem:
Manual Testing Instructions:
Try it out on some sites. Note that only drupal7, drupal8, and wordpress (and the default "php") are currently implemented.
Automated Testing Overview:
This adds one test for detection and updates previous tests.
Related Issue Link(s):
#574 is the basic PR, with much background.
OP: #535
Release/Deployment notes: