You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Symfony 6.4.*, while creating new entities using the php bin/console make:entity command works as expected, attempting to create, modify an existing entity results in an error. Specifically, when running the command to create new entity, or add new fields to an entity that already exists, the following error occurs:
php bin/console make:entity Variant
Your entity already exists! So let's add some new fields!
In FileManager.php line 111:
Warning: file_get_contents(project path/): Failed to open stream: No such file or directory
Downgrade the Symfony Maker Bundle to an older, stable version where this issue does not occur. You can specify a known working version in your composer.json or use the following command:
composer require symfony/maker-bundle:^1.52
Additional Context
The text was updated successfully, but these errors were encountered:
Thank you for the report. Can you give us further details about your environment please ? I could not reproduce the bug following the steps you described.
This issue is probably only related to Windows using some software (xamp wamp...)
Here you can see that the make command could create the entity without any issues
Also, i could edit the existing entity
The maker bundle's version is v1.61.0
NOTE : I created a project using the composer command :
composer create-project symfony/skeleton:"6.4.*" my_project
cd my_project
composer require webapp
By the way, I am using Docker. Sometimes, I had this kind of issues, but a restart of containers solved the issue. Did you try this ?
Thank you for your comment.
I'm using wamp with PHP 8.1. I didn't try to use docker, but I try to create a new project on four different devices using composer and symfony-cli, with different localhost environments (xampp, wamp), and I had the same issue.
I'll try it on the Linux environment and see.
NOTE: I have the same project with 6.4.3, 6.2, and it's works correctly .
Symfony version(s) affected
6.4.12
Description
In Symfony 6.4.*, while creating new entities using the php bin/console make:entity command works as expected, attempting to create, modify an existing entity results in an error. Specifically, when running the command to create new entity, or add new fields to an entity that already exists, the following error occurs:
php bin/console make:entity Variant
Your entity already exists! So let's add some new fields!
In FileManager.php line 111:
Warning: file_get_contents(project path/): Failed to open stream: No such file or directory
make:entity [-a|--api-resource] [-b|--broadcast] [--regenerate] [--overwrite] [--with-uuid] [--with-ulid] [--] []
How to reproduce
To reproduce the problem, follow these steps:
1- Set Up a Symfony 6.4 Project
Ensure you have Symfony 6.4.* installed:
symfony new my_project --version=6.4 --webapp
cd my_project
2- Create an Entity or Modify an Existing One
Attempt to create or modify an entity named Attribute, Variant...:
php bin/console make:entity Variant
If Variant already exists, the maker should allow you to add new fields.
3- Encounter the Error
Instead of proceeding to add new fields, the following error is displayed:
Your entity already exists! So let's add some new fields!
In FileManager.php line 111:
Warning: file_get_contents(project path/): Failed to open stream: No such file or directory
make:entity [-a|--api-resource] [-b|--broadcast] [--regenerate] [--overwrite] [--with-uuid] [--with-ulid] [--] []
Possible Solution
Downgrade the Symfony Maker Bundle to an older, stable version where this issue does not occur. You can specify a known working version in your composer.json or use the following command:
composer require symfony/maker-bundle:^1.52
Additional Context
The text was updated successfully, but these errors were encountered: