Skip to content
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

[GeneratorBundle] Deprecate generate bundle and entity commands #2864

Merged
merged 1 commit into from
May 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 6 additions & 0 deletions UPGRADE-5.9.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ DashboardBundle
* Passing a command classname for the "$command" argument in `Kunstmaan\DashboardBundle\Widget\DashboardWidget::__construct` is deprecated and will not be allowed 6.0. Pass a command name instead.
* Using the `kunstmaan_dashboard.widget.googleanalytics.command` parameter to modify the `kunstmaan_dashboard.widget.googleanalytics` service is deprecated and the parameter will be removed in 6.0. Use service decoration or a service alias instead.

GeneratorBundle
------------

* The "kuma:generate:bundle" command and related classes is deprecated and will be removed in 6.0
* The "kuma:generate:entity" command and related classes is deprecated and will be removed in 6.0, use the "make:entity" command of the symfony/maker-bundle.

NodeSearchBundle
------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
use Symfony\Component\HttpKernel\KernelInterface;

/**
* Generates bundles.
* @deprecated since KunstmaanGeneratorBundle 5.9 and will be removed in KunstmaanGeneratorBundle 6.0.
*
* NEXT_MAJOR Remove command, generator and related skeleton templates
*/
class GenerateBundleCommand extends GeneratorCommand
{
Expand Down Expand Up @@ -65,6 +67,8 @@ protected function configure()
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
@trigger_error(sprintf('The "kuma:generate:bundle" command is deprecated since KunstmaanGeneratorBundle 5.9 and will be removed in KunstmaanGeneratorBundle 6.0.'), E_USER_DEPRECATED);

$questionHelper = $this->getQuestionHelper();

if ($input->isInteractive()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
use Symfony\Component\HttpKernel\Bundle\BundleInterface;

/**
* GenerateEntityCommand
* @deprecated since KunstmaanGeneratorBundle 5.9 and will be removed in KunstmaanGeneratorBundle 6.0.
*
* NEXT_MAJOR Remove command, generator and related skeleton templates
*/
class GenerateEntityCommand extends KunstmaanGenerateCommand
{
Expand Down Expand Up @@ -89,6 +91,8 @@ protected function getWelcomeText()
*/
protected function doExecute()
{
@trigger_error(sprintf('The "kuma:generate:entity" command is deprecated since KunstmaanGeneratorBundle 5.9 and will be removed in KunstmaanGeneratorBundle 6.0. Use the "make:entity" command of the symfony/maker-bundle instead.'), E_USER_DEPRECATED);

$this->assistant->writeSection('Entity generation');

$this->createGenerator()->generate($this->bundle, $this->entityName, $this->prefix, $this->fields, $this->withRepository);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use Symfony\Component\DependencyInjection\Container;

/**
* Generates a bundle.
* @deprecated since KunstmaanGeneratorBundle 5.9 and will be removed in KunstmaanGeneratorBundle 6.0.
*/
class BundleGenerator extends Generator
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use Symfony\Component\HttpKernel\Bundle\BundleInterface;

/**
* DefaultEntityGenerator
* @deprecated @deprecated since KunstmaanGeneratorBundle 5.9 and will be removed in KunstmaanGeneratorBundle 6.0.
*/
class DefaultEntityGenerator extends KunstmaanGenerator
{
Expand Down