This repository has been archived by the owner on May 3, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 47
Proof of concept of bundle generator #684
Open
bdunogier
wants to merge
5
commits into
master
Choose a base branch
from
feature-bundle_generator
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains 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 Pull Request does not respect PSR-2 Coding Standards, please, see the suggested diff below: Loaded config from "/jenkins/jenkins.std/jobs/PlatformUIBundle-Pull-Request-checker/workspace/.php_cs"
F
Legend: ?-unknown, I-invalid file syntax, file ignored, .-no changes, F-fixed, E-error
1) Resources/SensioGeneratorBundle/skeleton/bundle/Configuration.php.twig (phpdoc_indent, phpdoc_short_description, operators_spaces, single_line_after_imports, phpdoc_trim, braces)
---------- begin diff ----------
--- Original
+++ New
@@ @@
<?php
namespace {{ namespace }}\DependencyInjection;
-{% block use_statements %}
+{ % block use_statements % }
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;
-{% endblock use_statements %}
+{ % endblock use_statements % }
+
/**
-{% block phpdoc_class_header %}
- * This is the class that validates and merges configuration from your app/config files
-{% endblock phpdoc_class_header %}
+ * This is the class that validates and merges configuration from your app/config files.
+ {% endblock phpdoc_class_header %}
*
* To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/extension.html#cookbook-bundles-extension-config-class}
*/
-{% block class_definition %}
+{ % block class_definition % }
class Configuration implements ConfigurationInterface
-{% endblock class_definition %}
{
-{% block class_body %}
+ % endblock class_definition %
+}
+{
+{ % block class_body % }
@@ @@
}
-{% endblock class_body %}
+{ % endblock class_body % }
}
---------- end diff ----------
Fixed all files in 7.179 seconds, 6.500 MB memory used |
I expected e56aa10 to fix php-cs, but it doesn't seem so... |
This Pull Request does not respect PSR-2 Coding Standards, please, see the suggested diff below: Loaded config from "/jenkins/jenkins.std/jobs/PlatformUIBundle-Pull-Request-checker/workspace/.php_cs"
.F
Legend: ?-unknown, I-invalid file syntax, file ignored, .-no changes, F-fixed, E-error
1) Resources/SensioGeneratorBundle/skeleton/bundle/Configuration.php.twig (phpdoc_indent, phpdoc_short_description, operators_spaces, single_line_after_imports, phpdoc_trim, braces)
---------- begin diff ----------
--- Original
+++ New
@@ @@
<?php
namespace {{ namespace }}\DependencyInjection;
-{% block use_statements %}
+{ % block use_statements % }
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;
-{% endblock use_statements %}
+{ % endblock use_statements % }
+
/**
-{% block phpdoc_class_header %}
- * This is the class that validates and merges configuration from your app/config files
-{% endblock phpdoc_class_header %}
+ * This is the class that validates and merges configuration from your app/config files.
+ {% endblock phpdoc_class_header %}
*
* To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/extension.html#cookbook-bundles-extension-config-class}
*/
-{% block class_definition %}
+{ % block class_definition % }
class Configuration implements ConfigurationInterface
-{% endblock class_definition %}
{
-{% block class_body %}
+ % endblock class_definition %
+}
+{
+{ % block class_body % }
@@ @@
}
-{% endblock class_body %}
+{ % endblock class_body % }
}
---------- end diff ----------
Fixed all files in 1.907 seconds, 6.500 MB memory used |
awesome :) I'll try to test that shortly |
Great idea 😃 |
This Pull Request does not respect PSR-2 Coding Standards, please, see the suggested diff below: Loaded config from "/jenkins/jenkins.std/jobs/PlatformUIBundle-Pull-Request-checker/workspace/.php_cs"
F.......F.
Legend: ?-unknown, I-invalid file syntax, file ignored, .-no changes, F-fixed, E-error
1) Generator/PlatformUIPluginGenerator.php (concat_with_spaces)
---------- begin diff ----------
--- Original
+++ New
@@ @@
$this->renderFile('bundle/Configuration.php.twig', $dir . '/DependencyInjection/Configuration.php', $parameters);
- $this->renderFile('bundle/DefaultController.php.twig', $dir.'/Controller/DefaultController.php', $parameters);
- $this->renderFile('bundle/DefaultControllerTest.php.twig', $dir.'/Tests/Controller/DefaultControllerTest.php', $parameters);
+ $this->renderFile('bundle/DefaultController.php.twig', $dir . '/Controller/DefaultController.php', $parameters);
+ $this->renderFile('bundle/DefaultControllerTest.php.twig', $dir . '/Tests/Controller/DefaultControllerTest.php', $parameters);
if ('annotation' != $format) {
- $this->renderFile('bundle/routing.'.$format.'.twig', $dir.'/Resources/config/routing.'.$format, $parameters);
+ $this->renderFile('bundle/routing.' . $format . '.twig', $dir . '/Resources/config/routing.' . $format, $parameters);
}
if ($structure) {
$this->renderFile('bundle/messages.fr.xlf', $dir . '/Resources/translations/messages.fr.xlf', $parameters);
$this->filesystem->mkdir($dir . '/Resources/doc');
$this->filesystem->touch($dir . '/Resources/doc/index.rst');
$this->filesystem->mkdir($dir . '/Resources/translations');
$this->filesystem->mkdir($dir . '/Resources/public/css');
$this->filesystem->mkdir($dir . '/Resources/public/images');
$this->filesystem->mkdir($dir . '/Resources/public/js');
}
}
}
---------- end diff ----------
2) Resources/SensioGeneratorBundle/skeleton/bundle/Configuration.php.twig (phpdoc_indent, phpdoc_short_description, operators_spaces, single_line_after_imports, phpdoc_trim, braces)
---------- begin diff ----------
--- Original
+++ New
@@ @@
<?php
namespace {{ namespace }}\DependencyInjection;
-{% block use_statements %}
+{ % block use_statements % }
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;
-{% endblock use_statements %}
+{ % endblock use_statements % }
+
/**
-{% block phpdoc_class_header %}
- * This is the class that validates and merges configuration from your app/config files
-{% endblock phpdoc_class_header %}
+ * This is the class that validates and merges configuration from your app/config files.
+ {% endblock phpdoc_class_header %}
*
* To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/extension.html#cookbook-bundles-extension-config-class}
*/
-{% block class_definition %}
+{ % block class_definition % }
class Configuration implements ConfigurationInterface
-{% endblock class_definition %}
{
-{% block class_body %}
+ % endblock class_definition %
+}
+{
+{ % block class_body % }
@@ @@
}
-{% endblock class_body %}
+{ % endblock class_body % }
}
---------- end diff ----------
Fixed all files in 2.691 seconds, 6.750 MB memory used |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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 a PlatformUI bundle generator. Generates a structure similar to https://raw.githubusercontent.com/dpobel/PlatformUIExtensionSkeletonBundle, in order to kickstart the development of any PlatformUI extension.
php app/console generate:ez:platform-ui-plugin
Only supported format is
yml
at the moment.TODO
.php.twig
files from CS check