Closed robbykrlos closed 4 years ago
We'll take care of the bug, you take care of the docs :)
Thanks.
@robbykrlos I could not successfully replicate the issue specified in the second part of the description. Furthermore, please keep in mind that the namespace will always use App
as it's first segment ( unless you are using the Package
option, which is used for creating packages ) so it needs to be omitted when creating namespaced models
EG: ( App/Vehicles/Motorized/Car
will generate namespace App\App\Vehicles\Motorized;
).
This is the structure configuration I attempted:
Model
Permission Group
Permissions - yes to all
Files - yes to all
And these are the files generated by the pakage.
As you can see, the migration file seems to have been properly named. If you can provide a concise example I will be able to investigate further.
PS: This is a package specific issue
, and should have been posted in the laravel-enso/cli
repo.
I'll come back tomorrow with exact log error and more details. As a first deviation from newer implementation, i used the documentation description with "App\...."
When defining the model since \\
was not accepted anymore and it was recommended to use only /
, I used App/models/profiles
which was ok, but on step 6. Generate files
this error poped:
` local.ERROR: file_put_contents(database\migrations\2019_10_14_120529_create_structure_for_app/_models/_profiles.php): failed to open stream: No such file or directory {"exception":"[object] (ErrorException(code: 0): file_put_contents(database\migrations\2019_10_14_120529_create_structure_for_app/_models/_profiles.php): failed to open stream: No such file or directory at C:\DATA\ENSO\vendor\laravel\framework\src\Illuminate\Filesystem\Filesystem.php:122) [stacktrace]
\ use Lara...', 0)
\ use Lara...')
`
@vmcvlad can you see if this was solved or not?
@robbykrlos did you disable validation? What were the intermediary configurations between defining the model namespace and generating files?
I attempted to generate a structure based on the model example you provided but once again, I could not replicate the issue:
Permissions -> Y to ALL
Files -> Y to ALL
Package -> N/A
Generate Output:
I would be grateful if you can provide the input data for each configuration step, as well as the order in which you configured the structure. Also, please ensure you are running version 3.3.6.
@vmcvlad this was a one time error and it was 2 releases ago. I cannot easily simulate the exact scenario - and I do not remember the exact steps (it was not so straight forward - I remember I tried on model name multiple times to set a proper name with "\" and "\" and "/".
I suggest - if now it works without issues to close the ticket if nothing obvious can be found on that exception trace.
Thank you,
Hi,
I have to reopen this:
I have the latest version :
You said that App is by default set - so no need to add it to the name of the model.
My models are under "App/Models/
In my error case I have my model called "Monitor" under "App/Models/Monitor"
In rest I have full this configuration:
I do not use [5]Packages nor disabled validation - [7]Toggle Validation
Error I get on [5] Generate:
ErrorException : file_put_contents(database\migrations\2019_11_13_170209_create_structure_for_models/monitors.php): failed to open stream: No such file or directory
at C:\DATA\enso\vendor\laravel\framework\src\Illuminate\Filesystem\Filesystem.php:122
* @return int|bool
*/
public function put($path, $contents, $lock = false)
{
return file_put_contents($path, $contents, $lock ? LOCK_EX : 0);
}
...
As an workaround I do not give the sub-folder name in the model name anymore - and i'll deal later with moving the model file into the right path and correcting further paths.
up:)
Still happens. Started with model "App\Models\Condition". Error because of the wrong slash. Made it with "/" and then the migration file error from above.
Hi @robbykrlos, Thank you for reporting, it was solved.
Hi @robbykrlos, Thank you for reporting, it was solved.
That's just awesome! Thank you too!
I'll close now the ticket.
This is a bug.
Prerequisites
Description
When trying to define a model (option 0) in
php artisan enso:cli
in the new version 3.5.0 there is a problem while defining the full namespace.According to documentation (and this worked on 3.3.6 i believe)
https://docs.laravel-enso.com/guide/development.html#using-the-cli
This should have worked, but now it give an warning on "only / is allowed".
If i change this to "App/Vehicles/Motorized/Car" it works to configure the Model, but it will break at step 6.Generate files when some files (i think migration was one of them) are generated with create_app/vehicles/motorized_/car_table....
The temporary workaround was to omit the full namespace and move the model afterwards.
Also, documentation (video included) does not fit anymore with new enso:cli options (there is a new 5th option "Package" which i don't know what it is at the moment.
If we clear some of these things up i could update the documentation Thank you.