-
Notifications
You must be signed in to change notification settings - Fork 4
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
Fix/nex 336/schema change action abstraction #101
base: develop
Are you sure you want to change the base?
Fix/nex 336/schema change action abstraction #101
Conversation
…ema-change-action-abstraction
try { | ||
$this->writeSchema($oldSchema, $newSchema); | ||
} catch (DBALException $e) { | ||
Logger::w($e->getMessage()); |
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 you think you can inject LoggerService
and avoid usage of deprecated static methods?
try { | ||
$table = $this->resultStorage->$creationMethodName($schema); | ||
} catch (SchemaException $exception) { | ||
// Table already exists. How can this happen, since we're doing this because |
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.
please remove comments and add logger->error('')
try { | ||
$table = $schema->getTable($tableName); | ||
} catch (SchemaException $exception) { | ||
try { |
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.
please add log here as well
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
* | ||
* Copyright (c) 2014-2017 (original work) Open Assessment Technologies SA (under the project TAO-PRODUCT); | ||
* |
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.
for consistency, please remove the extra 2 lines at the end of the license
protected $persistence; | ||
|
||
/** | ||
* @param $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.
i would specify the type
* | ||
* @return Report | ||
*/ | ||
public function __invoke($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.
not used, and no default value
*/ | ||
private function readSchema() | ||
{ | ||
/** @var \common_persistence_sql_dbal_SchemaManager $schemaManager */ |
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.
fqn simplified please
{ | ||
} | ||
|
||
protected function getActionName() |
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 we really need this? it's a protected function that returns a constant, if yes maybe put it at the AbstractAction
level
This PR aims at proposing an abstraction for schema modification actions.
It has two levels of abstraction: