Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.
'Interface "RepositoryInterface" not found error'
I'm really stuck on this video.
After previewing my workspace at the creation of the $repo variable in the config.php file I get a fatal error of :-
"Fatal error: Interface 'RepositoryInterface' not found in /home/treehouse/workspace/src/classes/jsonRepository.php on line 3"
I've pored over the video and Alena's code many times and can't see my error. I've also restarted from the beginning of the video and recreated all my files and code but still get the error.
I've posted a snapshot of my workspace below.
Thanks in advance for any help Don :-)
Jennifer NordellTreehouse Teacher
Hi there! I took the liberty of forking your workspace and looking around. I did manage to get it to the point where it has the same errors she has at this point in the videos. Now, I'm not exactly sure how this happened, but I found the error.
interfaces/RepositoryInterface.php on the top line, your code starts with:
For some reason, the php part is removed. It should start with:
I believe at this point that file can't even be interpreted as PHP because of that so it's trying to implment an interface it doesn't have access to (or really exist) at this point. Make that change and see if you can get back on track!
Hope this helps!
Well that's embarrassing..... :-) Didn't even think to check for that.
Thanks for taking the time to look it over and the help.
Cheers Don :-)