Can I use Symfony new to create a console-only project? - symfony-console

Instead of starting a project via symfony new <prj_name>, I used composer require symfony/console. I am unable to access any of the generate commands.
Am I going about this incorrectly? If I use composer require how do I automate the creation of the initial bin/console?

So in the existing project that I started using only composer require symfony/console and had to manually create the console.php file, I did the following:
Require the Sensio Bundle:
$ composer require sensio/generator-bundle
Then, in console.php, require the Sensio Bundle
.
.
.
use Sensio\Bundle\GeneratorBundle\Command\GenerateCommandCommand;
.
.
.
$console->add(new GenerateCommandCommand());
Now when I run the console.php file, the help text shows a link to that command.
$ php console.php
Console Tool
Usage:
command [options] [arguments]
Options:
-h, --help Display this help message
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi Force ANSI output
--no-ansi Disable ANSI output
-n, --no-interaction Do not ask any interactive question
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Available commands:
help Displays help for a command
list Lists commands
generate
generate:command Generates a console command

Related

nvim started as desktop application | :checkhealth - commands not available

When I start neovide from my applications and run :checkhealth I get errors that node and other commands are not available. But when I start it from my terminal there is no error for those commands. I tried to copy and modify the neovide desktop file to start just nvim and see if there if something wrong with my my neovide installation. But also starting just nvim as application prints the same errors.
I'm using linux with plasma desktop
TL:DR; add a path variable
Depending on your configuration, nvim will need to know the environment to run some executables (like it is with node in your example). An easy solution is to add the path variable to the exec command in the according .desktop file. I remember that I had the same issue with node not being recognized in a configuration using my plasma installation. On gnome node was recognized and healthchecks were good, so I thought I didn't need the extra path. Later on I realized that I had trouble with other commands. E.g. when using fdfind to complete path commands. Again I had to search what the reason was and it also was the missing path.
To give an example, let's say you are using zsh and want to start neovide with multigrid enabled, the Exec line in your desktop file could look like:
Exec=zsh -c "source ~/.config/zsh/.zshrc && neovide --multigrid %F"

TYPO3 10.4.16 cli commands missing?

checking which cli commands my installation of TYPO3 10.4.16 offers with php typo3 list in directory /var/www/html/typo3_src/typo3/sysext/core/bin I only get very few commands offered (output of command see below).
E.g. the scheduler extension is installed and works fine when commands are executed manually. Therefore I would expect to at least get the command scheduler:run offered in the cli list.
The Installation is non-composer as the server is behind heavy firewalls.
Has anyone experienced similar behaviour?
Any help is much appreciated.
Thanks,
Ben
Result of list-command:
TYPO3 CMS 10.4.16 (Application Context: Production)
Usage:
command [options] [arguments]
Options:
-h, --help Display help for the given command. When no command is given display help for the list command
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi Force ANSI output
--no-ansi Disable ANSI output
-n, --no-interaction Do not ask any interactive question
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Available commands:
help Displays help for a command
list Lists commands
language
language:update Update the language files of all activated extensions
upgrade
upgrade:list List available upgrade wizards.
upgrade:run Run upgrade wizard. Without arguments all available wizards will be run.
Solved:
When calling the typo3 script, the CWD has to be the root of your TYPO3 Installation while executing the command.
This works:
navigate to root folder of TYPO3
php typo3/sysext/core/bin/typo3
This doesn't work:
navigation to /typo3/sysext/core/bin/
execute php typo3

How to stop the Cygwin terminal from forgetting the environment when opening it in a non-home folder?

I got Ocaml for Windows which comes prepackaged with Cygwin. Since I wanted to be able to open mintty from the command line in the current directory, so I added it to PATH and then just running mintty does the trick. While this causes it to open in the current directory the problem is that when I run any of the Ocaml executables like opam I get an error.
Marko#Lain /cygdrive/e/Webdev/Ocaml/todolist
$ opam
bash: opam: command not found
When I run it using mintty - like the shortcut does, this in fact works.
Marko#Lain ~
$ cd "E:\Webdev\Ocaml\todolist"
Marko#Lain /cygdrive/e/Webdev/Ocaml/todolist
$ opam
usage: opam [--version]
[--help]
<command> [<args>]
The most commonly used opam commands are:
init Initialize opam state, or set init options.
list Display the list of available packages.
show Display information about specific packages.
install Install a list of packages.
remove Remove a list of packages.
update Update the list of available packages.
upgrade Upgrade the installed package to latest version.
config Display configuration options for packages.
repository Manage opam repositories.
switch Manage multiple installation prefixes.
pin Pin a given package to a specific version or source.
admin Tools for repository administrators
See 'opam help <command>' for more information on a specific command.
What do I have to do so that I get this behavior normally?
Also, since mintty runs a terminal in a standalone window, it would be better to run bash, but bash - does not work for me. After I get this to work, I'd like to add bash to my list of VS Code shells and for that I'd need to understand how to run it in an arbitrary directory from the command line while keeping its memory of the home environment.
This command mintty - start your shell as login one.
If you run a not-login shell, most of the configuration script are not read, and enviroment is taken from the father process, but of course your link fails as Windows can not provide a proper one.
If you want to be able to open a login shell from explorer the best way is to install chere package
$ chere -h
/usr/bin/chere version 1.4
Usage:
/usr/bin/chere -<iuxlrhv> [-lracnmpf12] [-t <term>] [-s <shell>]
[-d <display> ] [-o <options>] [-e <menutext>]
Adds the stated terminal/shell combination to the folder context menu
This allows you to right click a folder in Windows Explorer and open
a Cygwin shell in that folder.
Options:
i - Install
u - Uninstall
x - Freshen eXisting entries
l - List currently installed chere items
r - Read all chere registry entries to stdout
a - All users
c - Current user only
n - Be Nice and provide Control Panel uninstall option (Default)
m - Minimal, no Control Panel uninstall
p - Print regtool commands to stdout rather than running them
f - Force write (overwrite existing, ignore missing files)
1 - Start using registry one-liners. This doesn't work with ash,
tcsh or network shares.
2 - Start via bash script. Relies on windows to change directory,
and login scripts avoiding doing a cd /home/Marco
h - Help
v - Version
t <term> - Use terminal term. Supported terminals are:
cmd rxvt mintty xterm urxvt
s <shell> - Use the named shell. Supported shells are:
ash bash cmd dash fish mksh pdksh posh tcsh zsh passwd
d <display> - DISPLAY to use (xterm, urxvt). Defaults to :0.
Set to env to use the runtime environment variable.
o <options> - Add <options> to the terminal startup command.
If more than one option is specified, they should all be
contained within a single set of quotes.
e <menutext> - Use <menutext> as the context menu text.
See the man page for more detail.
You can than install your preferred or default shell on explorer right click menu as an additional item. It will open a login shell in the chosen directory.

How to install talend in silent mode (unattended mode)?

I have talend installer in my directory and now i want to run talend in silent mode so it do not give me options while running it on command line
my command to execute talend in silent mode :-
./Talend-Installer-20151214_1327-V6.1.1-linux64-installer.run --optionfile silentMode.txt
As soon as i run the above command i get the version and build detail but I cannot find it in the directory that i have given in me key value text file i.e /opt/talend-6.1.1. below is the result i get after executing the command.
"Talend 6.1.1 --- Built on 2015-12-14 18:02:36 IB: 9.5.3-201412111637"
Can anyone help me installing talend in silent mode ?
You are not specifying what components of Talend you are installing in unattended mode. The option file is there for that. So, let's say you would like to install TAC using included H2 DB and a JobServer, your option file (silentMode.txt that you are specifying) would probably look similar to the following:
mode=unattended
enable-components=tac,jobserver,serv
disable-components=logserv,mdm,dsc,cmdline,soa,runtime,svn,tdqp,sap_rfc,studio,esb
prefix=/opt
installStyle=advanced
installType=custom
licenseFile=/talend_packages/license
tacAdminUser=admin#company.com
tacAdminPwd=admin
tacWebAppName=tac611
svnInstall=create
svnUser=svnadmin
svnPass=admin
Please notice, that you have to specify both enable-components and disable-components together. If you don't, it might try to install all components and result in an error (since it misses necessary information from the option file). Don't ask me why ...
In order to get an exhaustive list of options to put in your optionfile, simply take a look at the installer's options:
# ./Talend-Installer-20151214_1327-V6.1.1-linux64-installer.run --help
The same content is available here
Please also notice that it is recommended to install Talend using root (in order to activate RC scripts, etc.), but you can then, manually change Talend Directory owner to another user and slightly modify the RC scripts to run services as that user.
Some more documentation could be read here

Installing Jenkins Plugins to Docker Jenkins

I have the following Dockerfile with jenkins as the base image:
FROM jenkins
USER root
ENV JENKINS_MIRROR http://mirrors.jenkins-ci.org
RUN for plugin in git-client git ws-cleanup ; do wget -O $JENKINS_HOME/plugins/${plugin}.hpi $JENKINS_MIRROR/plugins/${plugin}/latest/${plugin}.hpi ; done
EXPOSE 8080
I'm trying to install some additional plugins but it gives me an error saying no such file or directory
I then started and connected to the container of this build step in order to "debug" the error:
However, I could not find out the cause because every directory seems to exist. Furthermore, if I then run the for-loop manually in the bash, all plugins are installed correctly...
I further noticed, that the installation of the the plugins works, if I install them in the root directory as follows:
RUN for plugin in git-client git ws-cleanup ; do wget -O ${plugin}.hpi $JENKINS_MIRROR/plugins/${plugin}/latest/${plugin}.hpi ; done
However, this is the wrong place as they have to be placed in the directory $JENKINS_HOME/plugins
Why I am not able to install the plugins in $JENKINS_HOME/plugins?
I can't read your screenshots, but you don't seem to be following the official instructions. See https://github.com/cloudbees/jenkins-ci.org-docker under "Installing more tools". Note:
You should save the plugins to /usr/share/jenkins/ref/plugins
You could use a plugins.txt file instead, which contains the names of your plug-ins, and you can process with the provided plugins.sh script. This looks like:
COPY plugins.txt /usr/share/jenkins/plugins.txt
RUN /usr/local/bin/install-plugins.sh < /usr/share/jenkins/plugins.txt
I think the reason your approach wasn't working was to do with some processing in the start-up script.
install-plugins.sh is deprecated. I had to switch to jenkins-plugin-cli:
FROM jenkins/jenkins
...
RUN jenkins-plugin-cli \
--plugins \
git \
workflow-aggregator \
blueocean \
other-plugins
jenkins-plugin-cli also supports -f parameter, which gets the list of plugins as a file.
See Jenkins Official Documentation for details.

Resources