8000 Make convert services · Pull Request #604 · symfony/maker-bundle · GitHub
[go: up one dir, main page]

Skip to content

Make convert services #604

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

Closed
wants to merge 31 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
1f3022f
Adding command to convert service yaml files to php
May 12, 2020
4f77ceb
adding an argument to control the filename
weaverryan Jun 12, 2020
668cd3f
helping edit know specifically which class is returned
weaverryan Jun 12, 2020
a02f9f2
re-adding Symfony 5.1 requirement
weaverryan Jun 12, 2020
b7201c5
improving the test
weaverryan Jun 12, 2020
9e1c4aa
Adding bigger closing statement, including warning if your kernel doe…
weaverryan Jun 12, 2020
52b4191
fixing some misspellings
weaverryan Jun 12, 2020
027f969
adding test case for new deprecated syntax in 5.
weaverryan Jun 12, 2020
880d83e
minor clarification about argument name
weaverryan Jun 12, 2020
6853a09
convert exceptions from conversion into the nicer command exceptions
weaverryan Jun 12, 2020
f791e72
moving the handling of whether or not the container should be tested …
weaverryan Jun 12, 2020
11198df
this file is already tested in the main method
weaverryan Jun 12, 2020
579b780
renaming directory
weaverryan Jun 12, 2020
9f488be
I don't see why we're skipping someFile.yaml
weaverryan Jun 12, 2020
9ae90ea
just renaming files - I'll move them in a minute
weaverryan Jun 12, 2020
b5528be
Fixing a bug in the test
weaverryan Jun 12, 2020
b0f0b17
moving the reosource tests into the main test case
weaverryan Jun 12, 2020
9b247e2
combining last method into the main one
weaverryan Jun 12, 2020
a279dc9
Refactoring how we handle service args to be very specific
weaverryan Jun 12, 2020
0c23a34
updating for last-second php 5.1 changes: ref() -> service()
weaverryan Jun 12, 2020
2a9c9e3
removing bad error - this IS in fact a bad YAML situation
weaverryan Jun 12, 2020
73fde10
skipping tests below symfony 5.1
weaverryan Jun 12, 2020
50ea730
fixing php 7.1 syntax error
weaverryan Jun 12, 2020
18b3ad2 8000
fixing phpcs
weaverryan Jun 12, 2020
f785aeb
adding support for exclude as an array
weaverryan Jul 10, 2020
45c3585
adding state to PhpServicesCreator in prep for environments handling
weaverryan Jul 10, 2020
f30affd
Revert "adding state to PhpServicesCreator in prep for environments h…
weaverryan Jul 10, 2020
60aadd5
adding support for converting all services files at the same time (fo…
weaverryan Jul 10, 2020
d8f12c7
avoiding state problem and fixing "main" -> "all"
weaverryan Jul 10, 2020
098295e
Bringing in changes from https://github.com/migrify/migrify
weaverryan Jul 10, 2020
5033a64
fixing expected variable
weaverryan Jul 13, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
avoiding state problem and fixing "main" -> "all"
  • Loading branch information
weaverryan committed Jul 10, 2020
commit d8f12c7d5ef35c1ef930e4186a263fbc9bc5e8dd
4 changes: 2 additions & 2 deletions src/Maker/MakeConvertPhpServices.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,15 +132,15 @@ public function generate(InputInterface $input, ConsoleStyle $io, Generator $gen
}, $paths);
unset($environmentPaths['all']);

$phpServicesCreator = new PhpServicesCreator();
$finalPhpContents = [];
foreach ($paths as $environment => $path) {
$phpServicesCreator = new PhpServicesCreator();
$yamlContents = $this->fileManager->getFileContents($path);
try {
$finalPhpContents[$path] = $phpServicesCreator->convert(
$yamlContents,
// for the main environment, import the other environment files
$environment === 'main' ? $environmentPaths : []
$environment === 'all' ? $environmentPaths : []
);
} catch (\Exception $e) {
throw new RuntimeCommandException(sprintf('%s could not be converted. This may be a bug in your YAML or a missing feature in this command. Error: "%s"', $path, $e->getMessage()), 0, $e);
Expand Down
0