This is an automated email from the ASF dual-hosted git repository.
junichi11 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans.git
The following commit(s) were added to refs/heads/master by this push:
new facb631 [NETBEANS-4498] Fixed unit tests for Symfony
new 3d1db3d Merge pull request #2213 from
KacerCZ/netbeans-4498-fix-symfony-tests
facb631 is described below
commit facb6316856f523635234ac2fe393b92ddebd45f
Author: Tomas Prochazka <[email protected]>
AuthorDate: Wed Jun 24 23:05:57 2020 +0200
[NETBEANS-4498] Fixed unit tests for Symfony
https://issues.apache.org/jira/browse/NETBEANS-4498
- Added file `symfony-commands.xml`.
- Updated test.
- Enabled tests in Travis and Github Actions.
---
.github/workflows/main.yml | 2 +-
.travis.yml | 2 +-
.../test/unit/data/symfony-commands.xml | 1157 ++++++++++++++++++++
.../commands/SymfonyCommandsXmlParserTest.java | 9 +-
4 files changed, 1164 insertions(+), 6 deletions(-)
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 9d323fb..4136653 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -69,7 +69,7 @@ jobs:
ant -f php/php.project test
ant -f php/php.refactoring test
# ant -f php/php.smarty test
- # ant -f php/php.symfony test
+ ant -f php/php.symfony test
# ant -f php/php.symfony2 test
ant -f php/php.twig test
ant -f php/php.zend test
diff --git a/.travis.yml b/.travis.yml
index 08af640..10a6469 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -686,7 +686,7 @@ matrix:
- ant $OPTS -f php/php.project test
- ant $OPTS -f php/php.refactoring test
#- ant $OPTS -f php/php.smarty test
- #- ant $OPTS -f php/php.symfony test
+ - ant $OPTS -f php/php.symfony test
#- ant $OPTS -f php/php.symfony2 test
- ant $OPTS -f php/php.twig test
- ant $OPTS -f php/php.zend test
diff --git a/php/php.symfony/test/unit/data/symfony-commands.xml
b/php/php.symfony/test/unit/data/symfony-commands.xml
new file mode 100644
index 0000000..bdf6d86
--- /dev/null
+++ b/php/php.symfony/test/unit/data/symfony-commands.xml
@@ -0,0 +1,1157 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<symfony>
+ <tasks>
+ <task id="help" namespace="_global" name="help">
+ <usage> help [--xml] [task_name]</usage>
+ <description>Displays help for a task</description>
+ <help>The <em>help</em> task displays help for a given task:
+
+ <em>./symfony help test:all</em>
+
+ You can also output the help as XML by using the
<strong>--xml</strong> option:
+
+ <em>./symfony help test:all --xml</em></help>
+ <aliases/>
+ <arguments>
+ <argument name="task_name" is_required="0" is_array="0">
+ <description>The task name</description>
+ <defaults>
+ <default>help</default>
+ </defaults>
+ </argument>
+ </arguments>
+ <options>
+ <option name="--xml" shortcut="" accept_parameter="0"
is_parameter_required="0" is_multiple="0">
+ <description>To output help as XML</description>
+ </option>
+ </options>
+</task>
+ <task id="list" namespace="_global" name="list">
+ <usage> list [--xml] [namespace]</usage>
+ <description>Lists tasks</description>
+ <help>The <em>list</em> task lists all tasks:
+
+ <em>./symfony list</em>
+
+ You can also display the tasks for a specific namespace:
+
+ <em>./symfony list test</em>
+
+ You can also output the information as XML by using the
<strong>--xml</strong> option:
+
+ <em>./symfony list --xml</em></help>
+ <aliases/>
+ <arguments>
+ <argument name="namespace" is_required="0" is_array="0">
+ <description>The namespace name</description>
+ <defaults/>
+ </argument>
+ </arguments>
+ <options>
+ <option name="--xml" shortcut="" accept_parameter="0"
is_parameter_required="0" is_multiple="0">
+ <description>To output help as XML</description>
+ </option>
+ </options>
+</task>
+ <task id="app:routes" namespace="app" name="routes">
+ <usage> app:routes application [name]</usage>
+ <description>Displays current routes for an application</description>
+ <help>The <em>app:routes</em> displays the current routes for a
given application:
+
+ <em>./symfony app:routes frontend</em></help>
+ <aliases/>
+ <arguments>
+ <argument name="application" is_required="1" is_array="0">
+ <description>The application name</description>
+ <defaults/>
+ </argument>
+ <argument name="name" is_required="0" is_array="0">
+ <description>A route name</description>
+ <defaults/>
+ </argument>
+ </arguments>
+ <options/>
+</task>
+ <task id="cache:clear" namespace="cache" name="clear">
+ <usage> cache:clear [--app[="..."]] [--env[="..."]] [--type[="..."]] </usage>
+ <description>Clears the cache</description>
+ <help>The <em>cache:clear</em> task clears the symfony cache.
+
+ By default, it removes the cache for all available types, all applications,
+ and all environments.
+
+ You can restrict by type, application, or environment:
+
+ For example, to clear the <strong>frontend</strong> application
cache:
+
+ <em>./symfony cache:clear --app=frontend</em>
+
+ To clear the cache for the <strong>prod</strong> environment for
the <strong>frontend</strong> application:
+
+ <em>./symfony cache:clear --app=frontend --env=prod</em>
+
+ To clear the cache for all <strong>prod</strong> environments:
+
+ <em>./symfony cache:clear --env=prod</em>
+
+ To clear the <strong>config</strong> cache for all
<strong>prod</strong> environments:
+
+ <em>./symfony cache:clear --type=config --env=prod</em>
+
+ The built-in types are: <strong>config</strong>,
<strong>i18n</strong>, <strong>routing</strong>,
<strong>module</strong>
+ and <strong>template</strong>.
+ </help>
+ <aliases>
+ <alias>cc</alias>
+ </aliases>
+ <arguments/>
+ <options>
+ <option name="--app" shortcut="" accept_parameter="1"
is_parameter_required="0" is_multiple="0">
+ <description>The application name</description>
+ <defaults/>
+ </option>
+ <option name="--env" shortcut="" accept_parameter="1"
is_parameter_required="0" is_multiple="0">
+ <description>The environment</description>
+ <defaults/>
+ </option>
+ <option name="--type" shortcut="" accept_parameter="1"
is_parameter_required="0" is_multiple="0">
+ <description>The type</description>
+ <defaults>
+ <default>all</default>
+ </defaults>
+ </option>
+ </options>
+</task>
+ <task id="configure:author" namespace="configure" name="author">
+ <usage> configure:author author</usage>
+ <description>Configure project author</description>
+ <help>The <em>configure:author</em> task configures the author
for a project:
+
+ <em>./symfony configure:author "Fabien Potencier
<[email protected]>"</em>
+
+ The author is used by the generates to pre-configure the PHPDoc header for
each generated file.
+
+ The value is stored in [config/properties.ini].</help>
+ <aliases/>
+ <arguments>
+ <argument name="author" is_required="1" is_array="0">
+ <description>The project author</description>
+ <defaults/>
+ </argument>
+ </arguments>
+ <options/>
+</task>
+ <task id="generate:app" namespace="generate" name="app">
+ <usage> generate:app [--escaping-strategy="..."] [--csrf-secret="..."]
app</usage>
+ <description>Generates a new application</description>
+ <help>The <em>generate:app</em> task creates the basic directory
structure
+ for a new application in the current project:
+
+ <em>./symfony generate:app frontend</em>
+
+ This task also creates two front controller scripts in the
+ <strong>web/</strong> directory:
+
+ <em>web/%application%.php</em> for the production
environment
+ <em>web/%application%_dev.php</em> for the development
environment
+
+ For the first application, the production environment script is named
+ <strong>index.php</strong>.
+
+ If an application with the same name already exists,
+ it throws a <strong>sfCommandException</strong>.
+
+ By default, the output escaping is enabled (to prevent XSS), and a random
+ secret is also generated to prevent CSRF.
+
+ You can disable output escaping by using the
<strong>escaping-strategy</strong>
+ option:
+
+ <em>./symfony generate:app frontend
--escaping-strategy=false</em>
+
+ You can enable session token in forms (to prevent CSRF) by defining
+ a secret with the <strong>csrf-secret</strong> option:
+
+ <em>./symfony generate:app frontend
--csrf-secret=UniqueSecret</em>
+
+ You can customize the default skeleton used by the task by creating a
+ <strong>%sf_data_dir%/skeleton/app</strong> directory.</help>
+ <aliases/>
+ <arguments>
+ <argument name="app" is_required="1" is_array="0">
+ <description>The application name</description>
+ <defaults/>
+ </argument>
+ </arguments>
+ <options>
+ <option name="--escaping-strategy" shortcut="" accept_parameter="1"
is_parameter_required="1" is_multiple="0">
+ <description>Output escaping strategy</description>
+ <defaults>
+ <default>1</default>
+ </defaults>
+ </option>
+ <option name="--csrf-secret" shortcut="" accept_parameter="1"
is_parameter_required="1" is_multiple="0">
+ <description>Secret to use for CSRF protection</description>
+ <defaults>
+ <default>1</default>
+ </defaults>
+ </option>
+ </options>
+</task>
+ <task id="generate:module" namespace="generate" name="module">
+ <usage> generate:module application module</usage>
+ <description>Generates a new module</description>
+ <help>The <em>generate:module</em> task creates the basic
directory structure
+ for a new module in an existing application:
+
+ <em>./symfony generate:module frontend article</em>
+
+ The task can also change the author name found in the
<strong>actions.class.php</strong>
+ if you have configure it in
<strong>config/properties.ini</strong>:
+
+ <em>[symfony]
+ name=blog
+ author=Fabien Potencier <[email protected]></em>
+
+ You can customize the default skeleton used by the task by creating a
+ <strong>%sf_data_dir%/skeleton/module</strong> directory.
+
+ The task also creates a functional test stub named
+
<strong>%sf_test_dir%/functional/%application%/%module%ActionsTest.class.php</strong>
+ that does not pass by default.
+
+ If a module with the same name already exists in the application,
+ it throws a <strong>sfCommandException</strong>.</help>
+ <aliases/>
+ <arguments>
+ <argument name="application" is_required="1" is_array="0">
+ <description>The application name</description>
+ <defaults/>
+ </argument>
+ <argument name="module" is_required="1" is_array="0">
+ <description>The module name</description>
+ <defaults/>
+ </argument>
+ </arguments>
+ <options/>
+</task>
+ <task id="generate:project" namespace="generate" name="project">
+ <usage> generate:project [--orm="..."] [--installer="..."] name
[author]</usage>
+ <description>Generates a new project</description>
+ <help>The <em>generate:project</em> task creates the basic
directory structure
+ for a new project in the current directory:
+
+ <em>./symfony generate:project blog</em>
+
+ If the current directory already contains a symfony project,
+ it throws a <strong>sfCommandException</strong>.
+
+ By default, the task configures Doctrine as the ORM. If you want to use
+ Propel, use the <strong>--orm</strong> option:
+
+ <em>./symfony generate:project blog --orm=Propel</em>
+
+ If you don't want to use an ORM, pass <strong>none</strong> to
<strong>--orm</strong> option:
+
+ <em>./symfony generate:project blog --orm=none</em>
+
+ You can also pass the <strong>--installer</strong> option to
further customize the
+ project:
+
+ <em>./symfony generate:project blog
--installer=./installer.php</em>
+
+ You can optionally include a second <strong>author</strong>
argument to specify what name to
+ use as author when symfony generates new classes:
+
+ <em>./symfony generate:project blog "Jack Doe"</em></help>
+ <aliases/>
+ <arguments>
+ <argument name="name" is_required="1" is_array="0">
+ <description>The project name</description>
+ <defaults/>
+ </argument>
+ <argument name="author" is_required="0" is_array="0">
+ <description>The project author</description>
+ <defaults>
+ <default>Your name here</default>
+ </defaults>
+ </argument>
+ </arguments>
+ <options>
+ <option name="--orm" shortcut="" accept_parameter="1"
is_parameter_required="1" is_multiple="0">
+ <description>The ORM to use by default</description>
+ <defaults>
+ <default>Doctrine</default>
+ </defaults>
+ </option>
+ <option name="--installer" shortcut="" accept_parameter="1"
is_parameter_required="1" is_multiple="0">
+ <description>An installer script to execute</description>
+ <defaults/>
+ </option>
+ </options>
+</task>
+ <task id="generate:task" namespace="generate" name="task">
+ <usage> generate:task [--dir="..."] [--use-database="..."]
[--brief-description="..."] task_name</usage>
+ <description>Creates a skeleton class for a new task</description>
+ <help>The <em>generate:task</em> creates a new sfTask class
based on the name passed as
+ argument:
+
+ <em>./symfony generate:task namespace:name</em>
+
+ The <strong>namespaceNameTask.class.php</strong> skeleton task is
created under the <strong>lib/task/</strong>
+ directory. Note that the namespace is optional.
+
+ If you want to create the file in another directory (relative to the project
+ root folder), pass it in the <strong>--dir</strong> option. This
directory will be created
+ if it does not already exist.
+
+ <em>./symfony generate:task namespace:name
--dir=plugins/myPlugin/lib/task</em>
+
+ If you want the task to default to a connection other than
<strong>doctrine</strong>, provide
+ the name of this connection with the
<strong>--use-database</strong> option:
+
+ <em>./symfony generate:task namespace:name
--use-database=main</em>
+
+ The <strong>--use-database</strong> option can also be used to
disable database
+ initialization in the generated task:
+
+ <em>./symfony generate:task namespace:name
--use-database=false</em>
+
+ You can also specify a description:
+
+ <em>./symfony generate:task namespace:name --brief-description="Does
interesting things"</em></help>
+ <aliases/>
+ <arguments>
+ <argument name="task_name" is_required="1" is_array="0">
+ <description>The task name (can contain namespace)</description>
+ <defaults/>
+ </argument>
+ </arguments>
+ <options>
+ <option name="--dir" shortcut="" accept_parameter="1"
is_parameter_required="1" is_multiple="0">
+ <description>The directory to create the task in</description>
+ <defaults>
+ <default>lib/task</default>
+ </defaults>
+ </option>
+ <option name="--use-database" shortcut="" accept_parameter="1"
is_parameter_required="1" is_multiple="0">
+ <description>Whether the task needs model initialization to access
database</description>
+ <defaults/>
+ </option>
+ <option name="--brief-description" shortcut="" accept_parameter="1"
is_parameter_required="1" is_multiple="0">
+ <description>A brief task description (appears in task
list)</description>
+ <defaults/>
+ </option>
+ </options>
+</task>
+ <task id="i18n:extract" namespace="i18n" name="extract">
+ <usage> i18n:extract [--display-new] [--display-old] [--auto-save]
[--auto-delete] application culture</usage>
+ <description>Extracts i18n strings from php files</description>
+ <help>The <em>i18n:extract</em> task extracts i18n strings from
your project files
+ for the given application and target culture:
+
+ <em>./symfony i18n:extract frontend fr</em>
+
+ By default, the task only displays the number of new and old strings
+ it found in the current project.
+
+ If you want to display the new strings, use the
<strong>--display-new</strong> option:
+
+ <em>./symfony i18n:extract --display-new frontend fr</em>
+
+ To save them in the i18n message catalogue, use the
<strong>--auto-save</strong> option:
+
+ <em>./symfony i18n:extract --auto-save frontend fr</em>
+
+ If you want to display strings that are present in the i18n messages
+ catalogue but are not found in the application, use the
+ <strong>--display-old</strong> option:
+
+ <em>./symfony i18n:extract --display-old frontend fr</em>
+
+ To automatically delete old strings, use the
<strong>--auto-delete</strong> but
+ be careful, especially if you have translations for plugins as they will
+ appear as old strings but they are not:
+
+ <em>./symfony i18n:extract --auto-delete frontend fr</em></help>
+ <aliases/>
+ <arguments>
+ <argument name="application" is_required="1" is_array="0">
+ <description>The application name</description>
+ <defaults/>
+ </argument>
+ <argument name="culture" is_required="1" is_array="0">
+ <description>The target culture</description>
+ <defaults/>
+ </argument>
+ </arguments>
+ <options>
+ <option name="--display-new" shortcut="" accept_parameter="0"
is_parameter_required="0" is_multiple="0">
+ <description>Output all new found strings</description>
+ </option>
+ <option name="--display-old" shortcut="" accept_parameter="0"
is_parameter_required="0" is_multiple="0">
+ <description>Output all old strings</description>
+ </option>
+ <option name="--auto-save" shortcut="" accept_parameter="0"
is_parameter_required="0" is_multiple="0">
+ <description>Save the new strings</description>
+ </option>
+ <option name="--auto-delete" shortcut="" accept_parameter="0"
is_parameter_required="0" is_multiple="0">
+ <description>Delete old strings</description>
+ </option>
+ </options>
+</task>
+ <task id="i18n:find" namespace="i18n" name="find">
+ <usage> i18n:find [--env="..."] application</usage>
+ <description>Finds non "i18n ready" strings in an application</description>
+ <help>The <em>i18n:find</em> task finds non internationalized
strings embedded in templates:
+
+ <em>./symfony i18n:find frontend</em>
+
+ This task is able to find non internationalized strings in pure HTML and in
PHP code:
+
+ <p>Non i18n text</p>
+ <p><?php echo 'Test' ?></p>
+
+ As the task returns all strings embedded in PHP, you can have some false
positive (especially
+ if you use the string syntax for helper arguments).</help>
+ <aliases/>
+ <arguments>
+ <argument name="application" is_required="1" is_array="0">
+ <description>The application name</description>
+ <defaults/>
+ </argument>
+ </arguments>
+ <options>
+ <option name="--env" shortcut="" accept_parameter="1"
is_parameter_required="1" is_multiple="0">
+ <description>The environment</description>
+ <defaults>
+ <default>dev</default>
+ </defaults>
+ </option>
+ </options>
+</task>
+ <task id="log:clear" namespace="log" name="clear">
+ <usage> log:clear </usage>
+ <description>Clears log files</description>
+ <help>The <em>log:clear</em> task clears all symfony log files:
+
+ <em>./symfony log:clear</em></help>
+ <aliases/>
+ <arguments/>
+ <options/>
+</task>
+ <task id="log:rotate" namespace="log" name="rotate">
+ <usage> log:rotate [--history="..."] [--period="..."] application env</usage>
+ <description>Rotates an application's log files</description>
+ <help>The <em>log:rotate</em> task rotates application log files
for a given
+ environment:
+
+ <em>./symfony log:rotate frontend dev</em>
+
+ You can specify a <strong>period</strong> or a
<strong>history</strong> option:
+
+ <em>./symfony log:rotate frontend dev --history=10
--period=7</em></help>
+ <aliases/>
+ <arguments>
+ <argument name="application" is_required="1" is_array="0">
+ <description>The application name</description>
+ <defaults/>
+ </argument>
+ <argument name="env" is_required="1" is_array="0">
+ <description>The environment name</description>
+ <defaults/>
+ </argument>
+ </arguments>
+ <options>
+ <option name="--history" shortcut="" accept_parameter="1"
is_parameter_required="1" is_multiple="0">
+ <description>The maximum number of old log files to keep</description>
+ <defaults>
+ <default>10</default>
+ </defaults>
+ </option>
+ <option name="--period" shortcut="" accept_parameter="1"
is_parameter_required="1" is_multiple="0">
+ <description>The period in days</description>
+ <defaults>
+ <default>7</default>
+ </defaults>
+ </option>
+ </options>
+</task>
+ <task id="plugin:add-channel" namespace="plugin" name="add-channel">
+ <usage> plugin:add-channel name</usage>
+ <description>Add a new PEAR channel</description>
+ <help>The <em>plugin:add-channel</em> task adds a new PEAR
channel:
+
+ <em>./symfony plugin:add-channel
symfony.plugins.pear.example.com</em></help>
+ <aliases/>
+ <arguments>
+ <argument name="name" is_required="1" is_array="0">
+ <description>The channel name</description>
+ <defaults/>
+ </argument>
+ </arguments>
+ <options/>
+</task>
+ <task id="plugin:install" namespace="plugin" name="install">
+ <usage> plugin:install [-s|--stability="..."] [-r|--release="..."]
[-c|--channel="..."] [-d|--install_deps] [--force-license] name</usage>
+ <description>Installs a plugin</description>
+ <help>The <em>plugin:install</em> task installs a plugin:
+
+ <em>./symfony plugin:install sfGuardPlugin</em>
+
+ By default, it installs the latest <strong>stable</strong>
release.
+
+ If you want to install a plugin that is not stable yet,
+ use the <strong>stability</strong> option:
+
+ <em>./symfony plugin:install --stability=beta sfGuardPlugin</em>
+ <em>./symfony plugin:install -s beta sfGuardPlugin</em>
+
+ You can also force the installation of a specific version:
+
+ <em>./symfony plugin:install --release=1.0.0 sfGuardPlugin</em>
+ <em>./symfony plugin:install -r 1.0.0 sfGuardPlugin</em>
+
+ To force installation of all required dependencies, use the
<em>install_deps</em> flag:
+
+ <em>./symfony plugin:install --install-deps sfGuardPlugin</em>
+ <em>./symfony plugin:install -d sfGuardPlugin</em>
+
+ By default, the PEAR channel used is <em>symfony-plugins</em>
+ (plugins.symfony-project.org).
+
+ You can specify another channel with the <strong>channel</strong>
option:
+
+ <em>./symfony plugin:install --channel=mypearchannel
sfGuardPlugin</em>
+ <em>./symfony plugin:install -c mypearchannel sfGuardPlugin</em>
+
+ You can also install PEAR packages hosted on a website:
+
+ <em>./symfony plugin:install
http://somewhere.example.com/sfGuardPlugin-1.0.0.tgz</em>
+
+ Or local PEAR packages:
+
+ <em>./symfony plugin:install
/home/fabien/plugins/sfGuardPlugin-1.0.0.tgz</em>
+
+ If the plugin contains some web content (images, stylesheets or javascripts),
+ the task creates a <strong>%name%</strong> symbolic link for
those assets under <strong>web/</strong>.
+ On Windows, the task copy all the files to the
<strong>web/%name%</strong> directory.</help>
+ <aliases/>
+ <arguments>
+ <argument name="name" is_required="1" is_array="0">
+ <description>The plugin name</description>
+ <defaults/>
+ </argument>
+ </arguments>
+ <options>
+ <option name="--stability" shortcut="-s" accept_parameter="1"
is_parameter_required="1" is_multiple="0">
+ <description>The preferred stability (stable, beta, alpha)</description>
+ <defaults/>
+ </option>
+ <option name="--release" shortcut="-r" accept_parameter="1"
is_parameter_required="1" is_multiple="0">
+ <description>The preferred version</description>
+ <defaults/>
+ </option>
+ <option name="--channel" shortcut="-c" accept_parameter="1"
is_parameter_required="1" is_multiple="0">
+ <description>The PEAR channel name</description>
+ <defaults/>
+ </option>
+ <option name="--install_deps" shortcut="-d" accept_parameter="0"
is_parameter_required="0" is_multiple="0">
+ <description>Whether to force installation of required
dependencies</description>
+ </option>
+ <option name="--force-license" shortcut="" accept_parameter="0"
is_parameter_required="0" is_multiple="0">
+ <description>Whether to force installation even if the license is not
MIT like</description>
+ </option>
+ </options>
+</task>
+ <task id="plugin:list" namespace="plugin" name="list">
+ <usage> plugin:list </usage>
+ <description>Lists installed plugins</description>
+ <help>The <em>plugin:list</em> task lists all installed plugins:
+
+ <em>./symfony plugin:list</em>
+
+ It also gives the channel and version for each plugin.</help>
+ <aliases/>
+ <arguments/>
+ <options/>
+</task>
+ <task id="plugin:publish-assets" namespace="plugin" name="publish-assets">
+ <usage> plugin:publish-assets [--core-only] [plugins1] ... [pluginsN]</usage>
+ <description>Publishes web assets for all plugins</description>
+ <help>The <em>plugin:publish-assets</em> task will publish web
assets from all plugins.
+
+ <em>./symfony plugin:publish-assets</em>
+
+ In fact this will send the <em>plugin.post_install</em> event to
each plugin.
+
+ You can specify which plugin or plugins should install their assets by passing
+ those plugins' names as arguments:
+
+ <em>./symfony plugin:publish-assets sfDoctrinePlugin</em></help>
+ <aliases/>
+ <arguments>
+ <argument name="plugins" is_required="0" is_array="1">
+ <description>Publish this plugin's assets</description>
+ <defaults/>
+ </argument>
+ </arguments>
+ <options>
+ <option name="--core-only" shortcut="" accept_parameter="0"
is_parameter_required="0" is_multiple="0">
+ <description>If set only core plugins will publish their
assets</description>
+ </option>
+ </options>
+</task>
+ <task id="plugin:uninstall" namespace="plugin" name="uninstall">
+ <usage> plugin:uninstall [-c|--channel="..."] [-d|--install_deps]
name</usage>
+ <description>Uninstalls a plugin</description>
+ <help>The <em>plugin:uninstall</em> task uninstalls a plugin:
+
+ <em>./symfony plugin:uninstall sfGuardPlugin</em>
+
+ The default channel is <em>symfony</em>.
+
+ You can also uninstall a plugin which has a different channel:
+
+ <em>./symfony plugin:uninstall --channel=mypearchannel
sfGuardPlugin</em>
+
+ <em>./symfony plugin:uninstall -c mypearchannel
sfGuardPlugin</em>
+
+ Or you can use the <em>channel/package</em> notation:
+
+ <em>./symfony plugin:uninstall mypearchannel/sfGuardPlugin</em>
+
+ You can get the PEAR channel name of a plugin by launching the
+ <strong>plugin:list] task.
+
+ If the plugin contains some web content (images, stylesheets or javascripts),
+ the task also removes the [web/%name%</strong> symbolic link (on *nix)
+ or directory (on Windows).</help>
+ <aliases/>
+ <arguments>
+ <argument name="name" is_required="1" is_array="0">
+ <description>The plugin name</description>
+ <defaults/>
+ </argument>
+ </arguments>
+ <options>
+ <option name="--channel" shortcut="-c" accept_parameter="1"
is_parameter_required="1" is_multiple="0">
+ <description>The PEAR channel name</description>
+ <defaults/>
+ </option>
+ <option name="--install_deps" shortcut="-d" accept_parameter="0"
is_parameter_required="0" is_multiple="0">
+ <description>Whether to force installation of dependencies</description>
+ </option>
+ </options>
+</task>
+ <task id="plugin:upgrade" namespace="plugin" name="upgrade">
+ <usage> plugin:upgrade [-s|--stability="..."] [-r|--release="..."]
[-c|--channel="..."] name</usage>
+ <description>Upgrades a plugin</description>
+ <help>The <em>plugin:upgrade</em> task tries to upgrade a plugin:
+
+ <em>./symfony plugin:upgrade sfGuardPlugin</em>
+
+ The default channel is <em>symfony</em>.
+
+ If the plugin contains some web content (images, stylesheets or javascripts),
+ the task also updates the <strong>web/%name%</strong> directory
content on Windows.
+
+ See <em>plugin:install</em> for more information about the format
of the plugin name and options.</help>
+ <aliases/>
+ <arguments>
+ <argument name="name" is_required="1" is_array="0">
+ <description>The plugin name</description>
+ <defaults/>
+ </argument>
+ </arguments>
+ <options>
+ <option name="--stability" shortcut="-s" accept_parameter="1"
is_parameter_required="1" is_multiple="0">
+ <description>The preferred stability (stable, beta, alpha)</description>
+ <defaults/>
+ </option>
+ <option name="--release" shortcut="-r" accept_parameter="1"
is_parameter_required="1" is_multiple="0">
+ <description>The preferred version</description>
+ <defaults/>
+ </option>
+ <option name="--channel" shortcut="-c" accept_parameter="1"
is_parameter_required="1" is_multiple="0">
+ <description>The PEAR channel name</description>
+ <defaults/>
+ </option>
+ </options>
+</task>
+ <task id="project:clear-controllers" namespace="project"
name="clear-controllers">
+ <usage> project:clear-controllers </usage>
+ <description>Clears all non production environment controllers</description>
+ <help>The <em>project:clear-controllers</em> task clears all non
production environment
+ controllers:
+
+ <em>./symfony project:clear-controllers</em>
+
+ You can use this task on a production server to remove all front
+ controller scripts except the production ones.
+
+ If you have two applications named <strong>frontend</strong> and
<strong>backend</strong>,
+ you have four default controller scripts in <strong>web/</strong>:
+
+ <em>index.php
+ frontend_dev.php
+ backend.php
+ backend_dev.php</em>
+
+ After executing the <strong>project:clear-controllers</strong>
task, two front
+ controller scripts are left in <strong>web/</strong>:
+
+ <em>index.php
+ backend.php</em>
+
+ Those two controllers are safe because debug mode and the web debug
+ toolbar are disabled.</help>
+ <aliases/>
+ <arguments/>
+ <options/>
+</task>
+ <task id="project:deploy" namespace="project" name="deploy">
+ <usage> project:deploy [--go] [--rsync-dir="..."] [--rsync-options[="..."]]
server</usage>
+ <description>Deploys a project to another server</description>
+ <help>The <em>project:deploy</em> task deploys a project on a
server:
+
+ <em>./symfony project:deploy production</em>
+
+ The server must be configured in
<strong>config/properties.ini</strong>:
+
+ <em>[production]
+ host=www.example.com
+ port=22
+ user=fabien
+ dir=/var/www/sfblog/
+ type=rsync</em>
+
+ To automate the deployment, the task uses rsync over SSH.
+ You must configure SSH access with a key or configure the password
+ in <strong>config/properties.ini</strong>.
+
+ By default, the task is in dry-mode. To do a real deployment, you
+ must pass the <strong>--go</strong> option:
+
+ <em>./symfony project:deploy --go production</em>
+
+ Files and directories configured in
<strong>config/rsync_exclude.txt</strong> are
+ not deployed:
+
+ <em>.svn
+ /web/uploads/*
+ /cache/*
+ /log/*</em>
+
+ You can also create a <strong>rsync.txt</strong> and
<strong>rsync_include.txt</strong> files.
+
+ If you need to customize the <strong>rsync*.txt</strong> files
based on the server,
+ you can pass a <strong>rsync-dir</strong> option:
+
+ <em>./symfony project:deploy --go --rsync-dir=config/production
production</em>
+
+ Last, you can specify the options passed to the rsync executable, using the
+ <em>rsync-options</em> option (defaults are <em>-azC
--force --delete --progress</em>):
+
+ <em>./symfony project:deploy --go
--rsync-options=-avz</em></help>
+ <aliases/>
+ <arguments>
+ <argument name="server" is_required="1" is_array="0">
+ <description>The server name</description>
+ <defaults/>
+ </argument>
+ </arguments>
+ <options>
+ <option name="--go" shortcut="" accept_parameter="0"
is_parameter_required="0" is_multiple="0">
+ <description>Do the deployment</description>
+ </option>
+ <option name="--rsync-dir" shortcut="" accept_parameter="1"
is_parameter_required="1" is_multiple="0">
+ <description>The directory where to look for rsync*.txt
files</description>
+ <defaults>
+ <default>config</default>
+ </defaults>
+ </option>
+ <option name="--rsync-options" shortcut="" accept_parameter="1"
is_parameter_required="0" is_multiple="0">
+ <description>To options to pass to the rsync executable</description>
+ <defaults>
+ <default>-azC --force --delete --progress</default>
+ </defaults>
+ </option>
+ </options>
+</task>
+ <task id="project:disable" namespace="project" name="disable">
+ <usage> project:disable env [app1] ... [appN]</usage>
+ <description>Disables an application in a given environment</description>
+ <help>The <em>project:disable</em> task disables an environment:
+
+ <em>./symfony project:disable prod</em>
+
+ You can also specify individual applications to be disabled in that
+ environment:
+
+ <em>./symfony project:disable prod frontend backend</em></help>
+ <aliases/>
+ <arguments>
+ <argument name="env" is_required="1" is_array="0">
+ <description>The environment name</description>
+ <defaults/>
+ </argument>
+ <argument name="app" is_required="0" is_array="1">
+ <description>The application name</description>
+ <defaults/>
+ </argument>
+ </arguments>
+ <options/>
+</task>
+ <task id="project:enable" namespace="project" name="enable">
+ <usage> project:enable env [app1] ... [appN]</usage>
+ <description>Enables an application in a given environment</description>
+ <help>The <em>project:enable</em> task enables a specific
environment:
+
+ <em>./symfony project:enable frontend prod</em>
+
+ You can also specify individual applications to be enabled in that
+ environment:
+
+ <em>./symfony project:enable prod frontend backend</em></help>
+ <aliases/>
+ <arguments>
+ <argument name="env" is_required="1" is_array="0">
+ <description>The environment name</description>
+ <defaults/>
+ </argument>
+ <argument name="app" is_required="0" is_array="1">
+ <description>The application name</description>
+ <defaults/>
+ </argument>
+ </arguments>
+ <options/>
+</task>
+ <task id="project:optimize" namespace="project" name="optimize">
+ <usage> project:optimize application [env]</usage>
+ <description>Optimizes a project for better performance</description>
+ <help>The <em>project:optimize</em> optimizes a project for
better performance:
+
+ <em>./symfony project:optimize frontend prod</em>
+
+ This task should only be used on a production server. Don't forget to re-run
+ the task each time the project changes.</help>
+ <aliases/>
+ <arguments>
+ <argument name="application" is_required="1" is_array="0">
+ <description>The application name</description>
+ <defaults/>
+ </argument>
+ <argument name="env" is_required="0" is_array="0">
+ <description>The environment name</description>
+ <defaults>
+ <default>prod</default>
+ </defaults>
+ </argument>
+ </arguments>
+ <options/>
+</task>
+ <task id="project:permissions" namespace="project" name="permissions">
+ <usage> project:permissions </usage>
+ <description>Fixes symfony directory permissions</description>
+ <help>The <em>project:permissions</em> task fixes directory
permissions:
+
+ <em>./symfony project:permissions</em></help>
+ <aliases/>
+ <arguments/>
+ <options/>
+</task>
+ <task id="project:send-emails" namespace="project" name="send-emails">
+ <usage> project:send-emails [--application[="..."]] [--env="..."]
[--message-limit[="..."]] [--time-limit[="..."]] </usage>
+ <description>Sends emails stored in a queue</description>
+ <help>The <em>project:send-emails</em> sends emails stored in a
queue:
+
+ <em>php symfony project:send-emails</em>
+
+ You can limit the number of messages to send:
+
+ <em>php symfony project:send-emails --message-limit=10</em>
+
+ Or limit to time (in seconds):
+
+ <em>php symfony project:send-emails --time-limit=10</em></help>
+ <aliases/>
+ <arguments/>
+ <options>
+ <option name="--application" shortcut="" accept_parameter="1"
is_parameter_required="0" is_multiple="0">
+ <description>The application name</description>
+ <defaults>
+ <default>1</default>
+ </defaults>
+ </option>
+ <option name="--env" shortcut="" accept_parameter="1"
is_parameter_required="1" is_multiple="0">
+ <description>The environment</description>
+ <defaults>
+ <default>dev</default>
+ </defaults>
+ </option>
+ <option name="--message-limit" shortcut="" accept_parameter="1"
is_parameter_required="0" is_multiple="0">
+ <description>The maximum number of messages to send</description>
+ <defaults/>
+ </option>
+ <option name="--time-limit" shortcut="" accept_parameter="1"
is_parameter_required="0" is_multiple="0">
+ <description>The time limit for sending messages (in
seconds)</description>
+ <defaults/>
+ </option>
+ </options>
+</task>
+ <task id="project:validate" namespace="project" name="validate">
+ <usage> project:validate </usage>
+ <description>Finds deprecated usage in a project</description>
+ <help>The <em>project:validate</em> task detects deprecated
usage in your project.
+
+ <em>./symfony project:validate</em>
+
+ The task lists all the files you need to change before switching to
+ symfony 1.4.</help>
+ <aliases/>
+ <arguments/>
+ <options/>
+</task>
+ <task id="symfony:test" namespace="symfony" name="test">
+ <usage> symfony:test [-u|--update-autoloader] [-f|--only-failed]
[--xml="..."] [--rebuild-all] </usage>
+ <description>Launches the symfony test suite</description>
+ <help>The <em>test:all</em> task launches the symfony test suite:
+
+ <em>./symfony symfony:test</em></help>
+ <aliases/>
+ <arguments/>
+ <options>
+ <option name="--update-autoloader" shortcut="-u" accept_parameter="0"
is_parameter_required="0" is_multiple="0">
+ <description>Update the sfCoreAutoload class</description>
+ </option>
+ <option name="--only-failed" shortcut="-f" accept_parameter="0"
is_parameter_required="0" is_multiple="0">
+ <description>Only run tests that failed last time</description>
+ </option>
+ <option name="--xml" shortcut="" accept_parameter="1"
is_parameter_required="1" is_multiple="0">
+ <description>The file name for the JUnit compatible XML log
file</description>
+ <defaults/>
+ </option>
+ <option name="--rebuild-all" shortcut="" accept_parameter="0"
is_parameter_required="0" is_multiple="0">
+ <description>Rebuild all generated fixture files</description>
+ </option>
+ </options>
+</task>
+ <task id="test:all" namespace="test" name="all">
+ <usage> test:all [-f|--only-failed] [--xml="..."] </usage>
+ <description>Launches all tests</description>
+ <help>The <em>test:all</em> task launches all unit and
functional tests:
+
+ <em>./symfony test:all</em>
+
+ The task launches all tests found in <strong>test/</strong>.
+
+ If some tests fail, you can use the <strong>--trace</strong>
option to have more
+ information about the failures:
+
+ <em>./symfony test:all -t</em>
+
+ Or you can also try to fix the problem by launching them by hand or with the
+ <strong>test:unit</strong> and
<strong>test:functional</strong> task.
+
+ Use the <strong>--only-failed</strong> option to force the task
to only execute tests
+ that failed during the previous run:
+
+ <em>./symfony test:all --only-failed</em>
+
+ Here is how it works: the first time, all tests are run as usual. But for
+ subsequent test runs, only tests that failed last time are executed. As you
+ fix your code, some tests will pass, and will be removed from subsequent runs.
+ When all tests pass again, the full test suite is run... you can then rinse
+ and repeat.
+
+ The task can output a JUnit compatible XML log file with the
<strong>--xml</strong>
+ options:
+
+ <em>./symfony test:all --xml=log.xml</em></help>
+ <aliases/>
+ <arguments/>
+ <options>
+ <option name="--only-failed" shortcut="-f" accept_parameter="0"
is_parameter_required="0" is_multiple="0">
+ <description>Only run tests that failed last time</description>
+ </option>
+ <option name="--xml" shortcut="" accept_parameter="1"
is_parameter_required="1" is_multiple="0">
+ <description>The file name for the JUnit compatible XML log
file</description>
+ <defaults/>
+ </option>
+ </options>
+</task>
+ <task id="test:coverage" namespace="test" name="coverage">
+ <usage> test:coverage [--detailed] test_name lib_name</usage>
+ <description>Outputs test code coverage</description>
+ <help>The <em>test:coverage</em> task outputs the code coverage
+ given a test file or test directory
+ and a lib file or lib directory for which you want code
+ coverage:
+
+ <em>./symfony test:coverage test/unit/model lib/model</em>
+
+ To output the lines not covered, pass the <em>--detailed</em>
option:
+
+ <em>./symfony test:coverage --detailed test/unit/model
lib/model</em></help>
+ <aliases/>
+ <arguments>
+ <argument name="test_name" is_required="1" is_array="0">
+ <description>A test file name or a test directory</description>
+ <defaults/>
+ </argument>
+ <argument name="lib_name" is_required="1" is_array="0">
+ <description>A lib file name or a lib directory for wich you want to
know the coverage</description>
+ <defaults/>
+ </argument>
+ </arguments>
+ <options>
+ <option name="--detailed" shortcut="" accept_parameter="0"
is_parameter_required="0" is_multiple="0">
+ <description>Output detailed information</description>
+ </option>
+ </options>
+</task>
+ <task id="test:functional" namespace="test" name="functional">
+ <usage> test:functional [--xml="..."] application [controller1] ...
[controllerN]</usage>
+ <description>Launches functional tests</description>
+ <help>The <em>test:functional</em> task launches functional
tests for a
+ given application:
+
+ <em>./symfony test:functional frontend</em>
+
+ The task launches all tests found in
<strong>test/functional/%application%</strong>.
+
+ If some tests fail, you can use the <strong>--trace</strong>
option to have more
+ information about the failures:
+
+ <em>./symfony test:functional frontend -t</em>
+
+ You can launch all functional tests for a specific controller by
+ giving a controller name:
+
+ <em>./symfony test:functional frontend article</em>
+
+ You can also launch all functional tests for several controllers:
+
+ <em>./symfony test:functional frontend article comment</em>
+
+ The task can output a JUnit compatible XML log file with the
<strong>--xml</strong>
+ options:
+
+ <em>./symfony test:functional --xml=log.xml</em></help>
+ <aliases/>
+ <arguments>
+ <argument name="application" is_required="1" is_array="0">
+ <description>The application name</description>
+ <defaults/>
+ </argument>
+ <argument name="controller" is_required="0" is_array="1">
+ <description>The controller name</description>
+ <defaults/>
+ </argument>
+ </arguments>
+ <options>
+ <option name="--xml" shortcut="" accept_parameter="1"
is_parameter_required="1" is_multiple="0">
+ <description>The file name for the JUnit compatible XML log
file</description>
+ <defaults/>
+ </option>
+ </options>
+</task>
+ <task id="test:unit" namespace="test" name="unit">
+ <usage> test:unit [--xml="..."] [name1] ... [nameN]</usage>
+ <description>Launches unit tests</description>
+ <help>The <em>test:unit</em> task launches unit tests:
+
+ <em>./symfony test:unit</em>
+
+ The task launches all tests found in <strong>test/unit</strong>.
+
+ If some tests fail, you can use the <strong>--trace</strong>
option to have more
+ information about the failures:
+
+ <em>./symfony test:unit -t</em>
+
+ You can launch unit tests for a specific name:
+
+ <em>./symfony test:unit strtolower</em>
+
+ You can also launch unit tests for several names:
+
+ <em>./symfony test:unit strtolower strtoupper</em>
+
+ The task can output a JUnit compatible XML log file with the
<strong>--xml</strong>
+ options:
+
+ <em>./symfony test:unit --xml=log.xml</em></help>
+ <aliases/>
+ <arguments>
+ <argument name="name" is_required="0" is_array="1">
+ <description>The test name</description>
+ <defaults/>
+ </argument>
+ </arguments>
+ <options>
+ <option name="--xml" shortcut="" accept_parameter="1"
is_parameter_required="1" is_multiple="0">
+ <description>The file name for the JUnit compatible XML log
file</description>
+ <defaults/>
+ </option>
+ </options>
+</task>
+ </tasks>
+ <namespaces>
+ <namespace id="_global">
+ <task>help</task>
+ <task>list</task>
+ </namespace>
+ <namespace id="app">
+ <task>routes</task>
+ </namespace>
+ <namespace id="cache">
+ <task>clear</task>
+ </namespace>
+ <namespace id="configure">
+ <task>author</task>
+ </namespace>
+ <namespace id="generate">
+ <task>app</task>
+ <task>module</task>
+ <task>project</task>
+ <task>task</task>
+ </namespace>
+ <namespace id="i18n">
+ <task>extract</task>
+ <task>find</task>
+ </namespace>
+ <namespace id="log">
+ <task>clear</task>
+ <task>rotate</task>
+ </namespace>
+ <namespace id="plugin">
+ <task>add-channel</task>
+ <task>install</task>
+ <task>list</task>
+ <task>publish-assets</task>
+ <task>uninstall</task>
+ <task>upgrade</task>
+ </namespace>
+ <namespace id="project">
+ <task>clear-controllers</task>
+ <task>deploy</task>
+ <task>disable</task>
+ <task>enable</task>
+ <task>optimize</task>
+ <task>permissions</task>
+ <task>send-emails</task>
+ <task>validate</task>
+ </namespace>
+ <namespace id="symfony">
+ <task>test</task>
+ </namespace>
+ <namespace id="test">
+ <task>all</task>
+ <task>coverage</task>
+ <task>functional</task>
+ <task>unit</task>
+ </namespace>
+ </namespaces>
+</symfony>
diff --git
a/php/php.symfony/test/unit/src/org/netbeans/modules/php/symfony/commands/SymfonyCommandsXmlParserTest.java
b/php/php.symfony/test/unit/src/org/netbeans/modules/php/symfony/commands/SymfonyCommandsXmlParserTest.java
index f06c007..6d29805 100644
---
a/php/php.symfony/test/unit/src/org/netbeans/modules/php/symfony/commands/SymfonyCommandsXmlParserTest.java
+++
b/php/php.symfony/test/unit/src/org/netbeans/modules/php/symfony/commands/SymfonyCommandsXmlParserTest.java
@@ -37,23 +37,24 @@ public class SymfonyCommandsXmlParserTest extends
NbTestCase {
}
public void testParseCommands() throws Exception {
+ // File symfony-commands was created by running command "symfony list
--xml"
Reader reader = new BufferedReader(new FileReader(new
File(getDataDir(), "symfony-commands.xml")));
List<SymfonyCommandVO> commands = new ArrayList<>();
SymfonyCommandsXmlParser.parse(reader, commands);
assertFalse(commands.isEmpty());
- assertSame(62, commands.size());
+ assertSame(32, commands.size());
SymfonyCommandVO command = commands.get(0);
assertEquals("help", command.getCommand());
assertEquals("Displays help for a task", command.getDescription());
command = commands.get(10);
- assertEquals("doctrine:build-all-reload-test-all",
command.getCommand());
- assertEquals("Generates Doctrine model, SQL, initializes database,
load data and run all tests", command.getDescription());
+ assertEquals("i18n:find", command.getCommand());
+ assertEquals("Finds non \"i18n ready\" strings in an application",
command.getDescription());
- command = commands.get(61);
+ command = commands.get(31);
assertEquals("test:unit", command.getCommand());
assertEquals("Launches unit tests", command.getDescription());
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists