Replies: 1 comment
-
Hard to say anything without a reproducer, though I can see the application seems to be organized using bundles which is not recommended since Symfony 4. Maybe your issue stems from this. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
0
We are migrating from Symfony 2.8 to Symfony 6.4 and we are rewriting the necessary code required to upgrade to new version. In our older version we have common repository and controller to perform the generic task which are called from almost every repository & controller respectively. In common controller we are extending Controller"class CommonController extends Controller" and in the common repository we are extending Entity Repository "class CommonRepository extends EntityRepository". In all the other repository/contollers we are simply extending the common Repository/Controller. We have declared under services.yml like the below in older version.
But when we are trying to do the same in the new symfony 6.4, we are getting issues. The extend implementation remains the same and below is the code to add from services.yml in the new symfony:
After this we are getting error as InvalidArgumentException > LoaderLoadException
Expected to find class "Bundle\Repository\ClrRepository" in file "src\Bundle\Repository\ClrRepository.php" while importing services from resource "../src/Bundle/Repository", but it was not found! Check the namespace prefix used with the resource in /config/services.yaml (which is being imported from "src\Kernel.php").
Now I am stuck at this point and any changes I am doing is resulting in error.
I tried to change the setting as per Symfony 6 but not getting the desired result.
Beta Was this translation helpful? Give feedback.
All reactions