-
Notifications
You must be signed in to change notification settings - Fork 506
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
Remove the remains of kohana #1841
Conversation
02c1eaa
to
844768e
Compare
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.
Looking cool
app/Tools/LumenMailer.php
Outdated
|
||
public function send($to, $type, Array $params = null) | ||
{ | ||
$method = "send" . Str::ucfirst($type); |
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.
Could we add a comment about available types?
app/Tools/LumenMailer.php
Outdated
} | ||
} | ||
|
||
protected function sendResetpassword($to, $params) |
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.
In the end, are we going to have subclass of this for Notifications, Reset etc or will they just live as function within?
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'm not sure yet. I suspect we might want to replace it entirely with something much closer to Laravel's Mailables
composer.json
Outdated
"barryvdh/laravel-cors": "^0.9.2" | ||
"barryvdh/laravel-cors": "^0.9.2", | ||
"illuminate/mail": "5.4.*", | ||
"mockery/mockery": "^0.9.9" |
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.
This is a great name for a mock lib :D
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.
If only it didn't break everything!
config/mail.php
Outdated
| | ||
*/ | ||
|
||
'from' => ['address' => env('MAIL_ADDRESS'), 'name' => env('MAIL_NAME')], |
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.
Do these derive from the email used to sign up to cloud?
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 in this instance, in the mailer they load from the site name + site email set in settings.
src/App/Multisite.php
Outdated
} | ||
|
||
// Set new database config | ||
$config = Kohana::$config->load('database')->default; | ||
$config = Repository\OhanzeeRepository::getDefaultConfig(); | ||
Kohana::$config->load('database')->default; |
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.
Is this line needed?
844768e
to
65f9040
Compare
65f9040
to
2062e61
Compare
027fd2b
to
05ae30f
Compare
e722992
to
bbce9c1
Compare
bbce9c1
to
bbcfe13
Compare
@willdoran this should be ready for review now |
app/Providers/AppServiceProvider.php
Outdated
}); | ||
|
||
// Intercom config settings | ||
$di->set('site.intercomAppToken', function () use ($di) { |
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.
@willdoran I don't know that this is really used anywhere anymore?
* Media Config | ||
*/ | ||
|
||
return array( |
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.
Pretty sure this could be combined with CDN config, but that all needs some rationalization now we could use Laravel Filesystem
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.
We should generally consider how we should logically group configs
} else { | ||
// URL::site or Media::uri already encodes the path properly, skip the path wrangling seen above | ||
return \URL::site(\Media::uri($this->getRelativePath() . $value), \Request::current()); | ||
return url(config('cdn.local.media_upload_dir') . '/' . $path); // @todo load from config |
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'm sure theres a nicer way to do this once we use laravel filesystem
- Stop bootstrapping kohana - Stop using Arr - Fix refs to DOCROOT and use base_path() instead - Move DB and CDN config into config/
51478f1
to
457f93e
Compare
getDefaultConfig() method doesn't exist
$this->app->configure('multisite'); | ||
$this->app->configure('ohanzee-db'); | ||
|
||
$this->registerServicesFromAura(); |
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.
why does it matter that it is using AuraDI to register usecase and repository.message?
return $site['private'] | ||
and $features['private']['enabled']; | ||
// Multisite db | ||
// Move multisite enabled check to class and move to src/App |
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.
when we talk about multisite install, is that the way we have the setup for ushahidi.io clients?
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 think that's correct, yes
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.
My comments are very general. I don't see any obvious issue.
My suggestion is that as part of wrapping this a doc is delivered that covers what was surfaced as important future concerns. And what next steps might be for further piece by piece upgrades of the API.
if ($type === 'jsonp') { | ||
$response->withCallback($request->input('callback')); | ||
// Prevent Opera and Chrome from executing the response as anything | ||
// other than JSONP, see T455. |
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.
could this be a link
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.
Ugh its a reference to phabricator WAT
return $site['private'] | ||
and $features['private']['enabled']; | ||
// Multisite db | ||
// Move multisite enabled check to class and move to src/App |
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 think that's correct, yes
app/Providers/AppServiceProvider.php
Outdated
// Multisite db | ||
// Move multisite enabled check to class and move to src/App | ||
$di->set('site', function () use ($di) { | ||
$site = ''; |
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.
Can we add a todo to make this a logical default?
@@ -15,7 +15,7 @@ | |||
realpath(__DIR__.'/../') | |||
); | |||
|
|||
// $app->withFacades(); | |||
$app->withFacades(); |
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 say this needs testing?
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.
Sorta - the branch is green so its tested :)
* Media Config | ||
*/ | ||
|
||
return array( |
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.
We should generally consider how we should logically group configs
|
||
// Maximum file upload size in bytes. Remember this figure should not be larger | ||
// than the maximum file upload size set on the server. 1Mb by default. | ||
'max_upload_bytes' => '1048576', |
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.
Can we add a todo that setting bytes is gross and should be made more logical somehow? I imagine this is something people may want to readily configure, which means they have to either know base 10 to an even number off by heart or google it.
This pull request makes the following changes:
Test checklist:
Refs #1372
Ping @ushahidi/platform