-
-
Notifications
You must be signed in to change notification settings - Fork 395
Drop helperset usage in favor of the DependencyFactory #898
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
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
4f99367
change configuration loaders interface
goetas d674e61
change connection loaders interface
goetas 9510722
add entyty manager loaders
goetas 3c581d0
introduce named DependencyFactory
goetas 9ccff03
remove helper sets and use dependency factory instead
goetas 5cb5f3d
extracted and tested cli-config.php logic
goetas a186486
update documentation, console helpers are not in use anymore
goetas 8965455
ConfiguredConnection was never used
goetas 3b3c28d
ConfiguredEntityManager was never used
goetas 4602162
remove not necessary default value
goetas 8ca18fb
remove double check on entity manager existence
goetas f84e111
improve exception messages
goetas 790e643
improve dockblock sections
goetas c3adb8d
flip console argument order
goetas 22ce9e5
better exception messages
goetas 71d4bf5
wording dockblocks
goetas 442c9a8
cs
goetas 00e3a82
use interface instead of concrete class for the entity manager
goetas File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
35 changes: 35 additions & 0 deletions
35
lib/Doctrine/Migrations/Configuration/Configuration/ConfigurationFile.php
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| <?php | ||
|
|
||
| declare(strict_types=1); | ||
|
|
||
| namespace Doctrine\Migrations\Configuration\Configuration; | ||
|
|
||
| use function dirname; | ||
| use function realpath; | ||
|
|
||
| abstract class ConfigurationFile implements ConfigurationLoader | ||
| { | ||
| /** @var string */ | ||
| protected $file; | ||
|
|
||
| public function __construct(string $file) | ||
| { | ||
| $this->file = $file; | ||
| } | ||
|
|
||
| /** | ||
| * @param array<string,string> $directories | ||
| * | ||
| * @return array<string,string> | ||
| */ | ||
| final protected function getDirectoriesRelativeToFile(array $directories, string $file) : array | ||
| { | ||
| foreach ($directories as $ns => $dir) { | ||
| $path = realpath(dirname($file) . '/' . $dir); | ||
|
|
||
| $directories[$ns] = $path !== false ? $path : $dir; | ||
| } | ||
|
|
||
| return $directories; | ||
| } | ||
| } |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.