hechoendrupal / drupal-console Goto Github PK
View Code? Open in Web Editor NEWThe Drupal CLI. A tool to generate boilerplate code, interact with and debug Drupal.
Home Page: http://drupalconsole.com
License: GNU General Public License v2.0
The Drupal CLI. A tool to generate boilerplate code, interact with and debug Drupal.
Home Page: http://drupalconsole.com
License: GNU General Public License v2.0
This issue is a feature requirement.
The content entities generated's don't have the autocomplete functionality to be called by external forms
when I generate the entity "name_entity" and later I generate other entity with same name "name_entity" the code generated has duplicate.
And several other issues arise for failing at validate the id of the entity
Hi guys!
Amazing what you are doing.
Reading the code I've found myself reading "Drupal way" code style. I know Gardfield is in the PHP-FIG.
Why not changing to the PSR-1, PSR-2 code styles?
Would be much easier for us #symfony guys to read & contribute 😄
When we use below command, it downloads version "0.3.0".
$ COMPOSER_BIN_DIR=bin composer require --dev drupal/console:@stable
As "version": "0.3.0" uses a deprecated function class_loader, it throws fatal error.
When executing generate:entity:config
the EntityDeleteForm generated code is not properly naming a method name based on the official documentation here:
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Entity!EntityConfirmFormBase.php/class/EntityConfirmFormBase/8
Actual code:
public function submit(array $form, FormStateInterface $form_state) {
Expected code:
public function submitForm(array &$form, FormStateInterface $form_state) {
Hey,
Stumbled on this project from @fmitchell talk at Austin, PSR-0 is out and PSR-4 is in (both supported for the time being though) so it might be worth updating the directory structure to reflect that.
When I execute this command
COMPOSER_BIN_DIR=bin composer require --dev drupal/console:dev-master
This problem appear:
Problem 1
- Conclusion: remove zendframework/zend-feed 2.2.6
- Conclusion: don't install zendframework/zend-feed 2.2.6
- Can only install one of: zendframework/zendframework[2.2.6, 2.2.1].
- Can only install one of: zendframework/zendframework[2.2.6, 2.2.1].
- Installation request for zendframework/zend-feed == 2.2.6.0 -> satisfiable by zendframework/zend-feed[2.2.6], zendframework/zendframework[2.2.6].
- Installation request for zendframework/zendframework == 2.2.1.0 -> satisfiable by zendframework/zendframework[2.2.1].
why??
Hello, it's possible with Console to create a new Field Widget please ?
Example: a field of type Media for upload images and video from youtube, vimeo, etc.
Thanks.
Setup CodeSniffer check generated code on project build
When i try create with the "Console" the module "Node", the console let me generate the code of this new module, so when y try enable this module this error has been appear
Fatal error: Cannot redeclare Node_help() (previously declared in /var/www/html/kclient/core/modules/node/node.module:91) in /var/www/html/kclient/modules/Node/Node.module on line 12
jijiji. The console should validate that the module does not exist to generate, to avoid countless mistakes.
When I try create a module with this parameters:
Module name: TestA
Module Path [/var/www/html/kclient/modules]:
Description [My Awesome Module]: The TestA module is an example for testing
Package [Other]:
Core [8.x]:
Do you want to generate a Controller [no]? yes
Do you want to generate Test [yes]?
Do you want to generate a setting file [no]? yes
Do you want to generate the whole directory structure [yes]?
Do you confirm generation [yes]?
This error appear
[Twig_Error_Runtime]
Variable "class_name" does not exist in "module/module.controller.php.twig
" at line 11
However, the module is created.
The routing file module_name.routing.yml
is not updated when controller is generated using generate:controller
command
This is a really cool project, but you might want to investigate the yeoman tool, which was explicitly designed for building scaffold generators like this :)
https://github.com/yeoman/yo
http://yeoman.io/generators.html
http://yeoman.io/community-generators.html
There have already been some stabs at creating generators for drupalish things.
https://github.com/davidgenetic/generator-drupalmodule
https://twitter.com/pixelmord/status/402944072337203200
https://github.com/pixelmord/generator-drupaltheme
Anyhow, all the best!
When generating form using command
generate:form
By default the generated Form Class extends ConfigFormBase
Solutions
generate:form:generic
or as is now generate:form
generate:form:config
or generate:form:configuration
generate:form:confirm
or generate:form:confirmation
How I mentionet at isse #172 the $form_state is no longer a array.
generator:module
not work
generate:module
works fine
and thus similar to
generator:controller router:rebuild
generator:form:config
generator:entity:config
generator:entity:content
generator:command
generator:plugin:block
generator:plugin:imageeffect
generator:entity:config
generator:service
It would be very helpful to have a stable tag to use while the console is in heavy development.
The term controller is currently used inconsistently in Drupal 8 core. In particular, routing "controllers" and entity "controllers" are actually very different concepts. For this reason, the entity "controllers" will be referred to as handlers more information here => https://www.drupal.org/node/2200867
When trying to assign block to region on 'Configure block' overlay Block form fields are not shown
Re: file example/src/Form/{class_name}DeleteForm.php
d8 version: 8.1.x (aug25); console version: 0.2.8
Core code has apparently changed. Cannot delete the config entities added with "console". These changes worked:
[-] public function getCancelRoute()
[+] public function getCancelUrl()
[-] $form_state['redirect_route'] = $this->getCancelRoute();
[+] $form_state['redirect_route'] = $this->getCancelUrl();
This module needs to be installed at the root of a Drupal 8 installation, thus altering its composer files. This can cause problems in the future since at the moment the core team is figuring out how to overcome this.
Is there a chance for this project to work as a standalone executable that uses the current path in order to figure out Drupal 8's files? See the following error when I attempted to install it somewhere else and then run it from Drupal's root (as we do with Drush):
juampy@juampy-box:~/projects/drupal8 (8.x)$ ~/projects/drupal-console/vendor/bin/console generate:module
PHP Warning: require_once(/home/juampy/projects/drupal-console/vendor/hechoendrupal/drupal-app-console/bin/../../../../includes/bootstrap.inc): failed to open stream: No such file or directory in /home/juampy/projects/drupal-console/vendor/hechoendrupal/drupal-app-console/bin/console.php on line 17
PHP Stack trace:
PHP 1. {main}() /home/juampy/projects/drupal-console/vendor/hechoendrupal/drupal-app-console/bin/console:0
PHP 2. require() /home/juampy/projects/drupal-console/vendor/hechoendrupal/drupal-app-console/bin/console:3
When I try generate content entity the console prompt ask for module name. The console doesn't autocomplete the module name and when type this the console fail:
Error message:
Module "mimodulo" is invalid. You can use first generate:module command.
but the module exist.
Just learned about this at drupalcon and gave it a shot. On my ubuntu 14.04 vagrant box I'm getting this error:
PHP Fatal Error: Call to a member function isSecure() on a non-object in /vagrant/www/core/lib/Drupal/Core/Session/Sessionmanager.phpon line 120
Let me know if there's any way I can help with this.
I'm running:
nginx w/ php 5.5.9
Argument 2 passed to Drupal\Core\StackMiddleware\KernelPreHandle::__construct()
must implement interface Drupal\Core\DrupalKernelInterface, none given, called in
/drupal8.dev/sites/default/files/php/service_container/service_container_prod/579749ae8d9181dd29dd026487a50fa8b39ddc0c878426957a92daf38a2bf4a9.php
on line 2632 and defined in Drupal\Core\StackMiddleware\KernelPreHandle->__construct()
(line 42 of /drupal8.dev/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php).
I see that the drupal 8.0.x branch has been created the last Ago-1.
the main change it is:
$form_state is now a classed object
https://www.drupal.org/node/2310411
motivation:
https://www.drupal.org/node/2225353
Update README, add external links to Symfony documentation
Symfony Console component
http://symfony.com/doc/current/components/console/introduction.html
The interface of generate module ask the name of module. The tool generate that module folder with this name and many files into.
if i put the name "My module" the space causes errors. And in many cases it is desirable that this readable module name separated by a space but not the name of your files.
don't show
generate:module
generate:controller
generate:form
...
I tried a composer global require drupal/console
and it doesn't work.
This is the error message
Changed current directory to /Users/jmolivas/.composer
Using version 0.5.* for drupal/console
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for drupal/console 0.5.* -> satisfiable by drupal/console[0.5.0].
- Conclusion: remove symfony/console v2.5.5
- drupal/console 0.5.0 requires symfony/console 2.6.* -> satisfiable by symfony/console[v2.6.0, v2.6.1].
- Can only install one of: symfony/console[v2.6.0, v2.5.5].
- Can only install one of: symfony/console[v2.6.1, v2.5.5].
- Installation request for symfony/console == 2.5.5.0 -> satisfiable by symfony/console[v2.5.5].
Installation failed, reverting ./composer.json to its original content.
When I type this command:
root@Oscar:/var/www/html/devd8# ./bin/console generate:module
I get this messages:
PHP Warning: require(/var/www/html/devd8/core/vendor/hechoendrupal/drupal-app-console/bin/../vendor/autoload.php): failed to open stream: No such file or directory in /var/www/html/devd8/core/vendor/hechoendrupal/drupal-app-console/bin/console on line 6
PHP Fatal error: require(): Failed opening required '/var/www/html/devd8/core/vendor/hechoendrupal/drupal-app-console/bin/../vendor/autoload.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/html/devd8/core/vendor/hechoendrupal/drupal-app-console/bin/console on line 6
The command don't executed
Accessing console from anywhere on your system:
To access console globally move the executable 'console.phar' to a directory that is already in your PATH.
$ chmod +x console.phar
$ mv console.phar /usr/local/bin/drupal
Usage:
$ drupal generate:module
Change the way to generate code in travis
This error display
[Twig_Error_Loader]
Unable to find template "module/src/accessControlHandler-entity-content.php
.twig" (looked into: /var/www/html/drupal8/modules/console/src/Command/../R
esources/skeleton, /var/www/html/drupal8/modules/console/src/Command/../Res
ources).
generate:entity:content [--module="..."] [--entity-class="..."] [--entity-name="..."]
Error: Class 'Drupal\Core\Field\FieldDefinition' not found in /drupal8.dev/modules/acme/src/Entity/FooContent.php, line 112
This happens when running generate:entity:content
The generated code puts the opening brace on its own line, but according to https://www.drupal.org/node/608152 the brace needs to be in the line where the class/interface is declared.
https://github.com/bojanz/workflow/commit/20fa62268861639e20038d5473b2351b6502452a
The local actions options like "Add" at list of entities don't show or load.
The entities configurations like "Settings | Manage fields | Manage form display | Manage display" options don't show.
This issue appear at the last drupal 8 dev versión. (jul-16)
Instead of building it on install.
Also, the install URL should be on https.
I saw the Jesus Olivas youtube video on how to install and use drupal console. I installed it but did not use a vm(virtual machine) drupal install, just a normal site install. I can not use the console module. Here is what happens..
$ ./bin/console --help
Finding bootstrap.inc file...
Searching in /adp/www/d8/d8jun30/core/includes
File bootstrap.inc file found!
[Exception]
Kernel does not have site path set before calling boot()
Do you know what the trouble is?
When using the form generating tool, the user is prompted to enter services, but in the example video on youtube, services that are not closely related to the module demonstrated. Might be good to have something like:
services (optional):
or even to clarify that certain common services are already available to the form from FormBase. :)
Provide a downloadable console.phar file in order to install project globally on the system
Specifically, I noticed in the form builder that the form item arrays should contain a comma at the end of each line.
Example:
This is what it does:
$form['myfield'] = array(
'#type' => 'textfield',
'#title' => $this->t('My Field'),
'#description' => $this->t(''),
'#default_value' => $config->get('myfield')
);
It should do this:
$form['myfield'] = array(
'#type' => 'textfield',
'#title' => $this->t('My Field'),
'#description' => $this->t(''),
'#default_value' => $config->get('my field'),
);
According to Drupal coding standards
Drupal Issue: https://www.drupal.org/node/2353845
Right now the field widget type textarea in not available and I could say after the textfield is the second popular.
Great job BTW
Since this is considered a good practice this issue propose to update the suggested path where the module is generated.
Addding /custom
to Module Path default value question
Module Path [DRUPAL_8_ROOT_PATH/modules]:
Should look like this
Module Path [DRUPAL_8_ROOT_PATH/modules/custom]:
Hi!
I've spoted this line https://github.com/hechoendrupal/DrupalAppConsole/blob/master/lib/Drupal/AppConsole/Command/ServicesCommand.php#L209 which was the Symony 2.0-2.3 ways for table output. Since 2.3 there is a TableHelper which renders table much more nicely. It allow to delete a lot of code and make this nicer.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.