Using getLocator autocompletion not working with custom namespace?
Hi! I set a new namespace for my new project modules.
I created a directory under src/, added it to composer autoload, and it works on normal execution.
But neither the IDE or Phpstan manage to resolve the client I created.
Here's the namespace config:
Adding it as a dependency:
You can already tell custom()
can't be found by the IDE.
When running phpstan I get the following error:
╰─$ vendor/bin/phpstan analyze --memory-limit 4196M -c phpstan.neon
1578/1578 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%
Line Pyz/Yves/CheckoutPage/CheckoutPageDependencyProvider.php
314 Call to an undefined method Generated\Yves\Ide\AutoCompletion&Spryker\Shared\Kernel\LocatorLocatorInterface::custom().
[ERROR] Found 1 error
In case someone wonders
Any ideas? I run the console commandsdev:ide-auto-completion:generate
and dev:ide-auto-completion:client:generate
to no avail.
Answers
-
Could you please check, if your file src/Generated/Client/Ide/AutoCompletion.php contains your client?
Since I don't have access to your repository, I cannot really help you.
Hint. You may create a branch/fork for our Demoshop and extract there just your changes, stripping off all logic and obfuscating names.
0 -
Thanks, I was mainly wondering wether there was a known issue or not. If I'm supposed to have it working, I will check again just in case sometime.
It'd be nice to have a clear guide in the docs though, this being a recommendation.0
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 75 Spryker News
- 924 Developer Corner
- 783 Spryker Development
- 88 Spryker Dev Environment
- 362 Spryker Releases
- 3 Oryx frontend framework
- 35 Propel ORM
- 68 Community Projects
- 3 Community Ideation Board
- 30 Hackathon
- 3 PHP Bridge
- 6 Gacela Project
- 25 Job Opportunities
- 3.2K 📜 Slack Archives
- 116 Academy
- 5 Business Users
- 370 Docker
- 551 Slack General
- 2K Help
- 75 Knowledge Sharing
- 6 Random Stuff
- 4 Code Testing
- 32 Product & Business Questions
- 70 Spryker Safari Questions
- 50 Random