Issue #487 Create the test schema with migrations (Draft)#488
Merged
markstory merged 3 commits intocakephp:3.nextfrom Jun 14, 2021
Merged
Issue #487 Create the test schema with migrations (Draft)#488markstory merged 3 commits intocakephp:3.nextfrom
markstory merged 3 commits intocakephp:3.nextfrom
Conversation
Contributor
Author
|
This will be marked as draft as long as the CakePHP 4.3 tag does not exist. |
markstory
reviewed
May 12, 2021
markstory
reviewed
May 19, 2021
Member
markstory
left a comment
There was a problem hiding this comment.
Looks good to move forward with. We'll need to update the docs as well.
| protected function handleMigrationsStatus(array $configs): self | ||
| { | ||
| $connectionsToDrop = []; | ||
| foreach ($configs as &$config) { |
Member
There was a problem hiding this comment.
Do we need a mutable reference to the configuration data?
| $options = []; | ||
| foreach (['connection', 'plugin', 'source', 'target'] as $option) { | ||
| if (isset($config[$option])) { | ||
| $options[] = $option . ' "'.$config[$option].'"'; |
Member
There was a problem hiding this comment.
Suggested change
| $options[] = $option . ' "'.$config[$option].'"'; | |
| $options[] = $option . ' "' . $config[$option] . '"'; |
Our phpcs rules will get grumpy about the operator spacing.
Comment on lines
+59
to
+60
| $Letters = TableRegistry::getTableLocator()->get('Letters'); | ||
| $this->assertSame('test', $Letters->getConnection()->configName()); |
Member
There was a problem hiding this comment.
Suggested change
| $Letters = TableRegistry::getTableLocator()->get('Letters'); | |
| $this->assertSame('test', $Letters->getConnection()->configName()); | |
| $letters = TableRegistry::getTableLocator()->get('Letters'); | |
| $this->assertSame('test', $letters->getConnection()->configName()); |
markstory
reviewed
Jun 6, 2021
| * For full copyright and license information, please see the LICENSE.txt | ||
| * Redistributions of files must retain the above copyright notice. | ||
| * | ||
| * @copyright Copyright (c) 2020 Juan Pablo Ramirez and Nicolas Masson |
Member
There was a problem hiding this comment.
We'll also need to add the CakePHP copyright to these files int addition to this copyright notice.
markstory
added a commit
to cakephp/app
that referenced
this pull request
Jun 12, 2021
Using the schema dump file is not ideal. Once cakephp/migrations#488 is merged I will update this to use migrations instead.
Member
|
Merging this so I can do integrated tests and document setup and how to upgrade. |
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.
Implements the solution to issue #487 in the lines of the (CakePHP Test Migrator)[https://github.com/vierge-noire/cakephp-test-migrator].