#1643: generate-yaml-models - Making models_path optional
--------------------------+-------------------------------------------------
Reporter: deefour | Owner: jwage
Type: enhancement | Status: new
Priority: minor | Milestone: Unknown
Component: Tasks | Version: 1.1-DEV
Resolution: | Keywords:
Has_test: 0 | Mystatus: Pending Core Response
Has_patch: 0 |
--------------------------+-------------------------------------------------
Changes (by deefour):
* version: 1.0.3 => 1.1-DEV
* component: Attributes => Tasks
Old description:
> Hello-
>
> I'm using:
> - PHP 5.2.6
> - Doctrine 1.1
>
> It would be useful to make the `models_path` parameter for the
> `Doctrine_Task_GenerateYamlModels` task optional;
>
> Currently:
> {{{
> class Doctrine_Task_GenerateYamlModels extends Doctrine_Task
> {
> public $description = 'Generates a Yaml schema file from
> existing Doctrine_Record definitions',
> $requiredArguments = array('yaml_schema_path' =>
> 'Specify the complete directory path to your yaml schema files.',
> 'models_path' =>
> 'Specify complete path to your Doctrine_Record definitions.'),
> $optionalArguments = array();
>
> // ...
> }}}
>
> Proposed:
> {{{
> class Doctrine_Task_GenerateYamlModels extends Doctrine_Task
> {
> public $description = 'Generates a Yaml schema file from
> existing Doctrine_Record definitions',
> $requiredArguments = array('yaml_schema_path' =>
> 'Specify the complete directory path to your yaml schema files.'),
> $optionalArguments = array('models_path' =>
> 'Specify complete path to your Doctrine_Record definitions.');
>
> // ...
> }}}
>
> I have my models split into more than one directory, and as such I do
> this prior to calling the `Doctrine_Cli::run()` in my CLI script
>
> {{{
> Doctrine::loadModels(array(CORE_PATH .'/php/model/',
> APPLICATION_PATH .'/php/model/'));
> }}}
>
> Then I can execute the task only passing the destination `.yml` file to
> use.
>
> {{{
> ./doctrine generate-yaml-models _schemas/core_schemal.yml
> }}}
>
> Manually loading my models prior to running the task makes specifying the
> `models_path` parameter unnecessary.
New description:
Hello-
I'm using:
- PHP 5.2.6
- Doctrine 1.1
It would be useful to make the `models_path` parameter for the
`Doctrine_Task_GenerateYamlModels` task optional;
Currently:
{{{
class Doctrine_Task_GenerateYamlModels extends Doctrine_Task
{
public $description = 'Generates a Yaml schema file from
existing Doctrine_Record definitions',
$requiredArguments = array('yaml_schema_path' =>
'Specify the complete directory path to your yaml schema files.',
'models_path' =>
'Specify complete path to your Doctrine_Record definitions.'),
$optionalArguments = array();
// ...
}}}
Proposed:
{{{
class Doctrine_Task_GenerateYamlModels extends Doctrine_Task
{
public $description = 'Generates a Yaml schema file from
existing Doctrine_Record definitions',
$requiredArguments = array('yaml_schema_path' =>
'Specify the complete directory path to your yaml schema files.'),
$optionalArguments = array('models_path' =>
'Specify complete path to your Doctrine_Record definitions.');
// ...
}}}
I have my models split into more than one directory, and as such I do this
prior to calling the `Doctrine_Cli::run()` in my CLI script
{{{
Doctrine::loadModels(array(CORE_PATH .'/php/model/',
APPLICATION_PATH .'/php/model/'));
}}}
Then I can execute the task only passing the destination `.yml` file to
use.
{{{
./doctrine generate-yaml-models _schemas/core_schemal.yml
}}}
Manually loading my models prior to running the task makes specifying the
`models_path` parameter unnecessary.
--
Ticket URL: <http://trac.doctrine-project.org/ticket/1643#comment:1>
Doctrine <http://www.phpdoctrine.org>
PHP Doctrine Object Relational Mapper
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"doctrine-svn" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.co.uk/group/doctrine-svn?hl=en-GB
-~----------~----~----~----~------~----~------~--~---