Debugging Array Cakephp 2.x $this->request->data - debugging

I am struggling trying to figure out how to debug an array in Cakephp 2.3. According to the documentation I am suppose to be using the Debugger class, but I do not see anything that debugs arrays. I am use to using die(debug()), var_dump, and pr() in older versions of Cake. Any input would be greatly appreciated here! Thank you!

Ok. Ive got it figured out. I just debugged $this->data. I thought $this-data was deprecated in Cakephp 2.0. That is why I was trying to debug $this->request->data.

Related

Unable to use Searchable in laravel model

I am trying to use Laravel Scout Searchable into my model but it gives me an error
Undefined type 'Laravel\Scout\Searchable'.
I have already included
use Laravel\Scout\Searchable;
in the code. Could someone please tell me what am I doing wrong here?
I have followed the documentation as is until this point.
After a little bit of tinkering around I found the answer myself.
The error was produced by PHP intelliphense plugin of VS Code. It seems there is a problem with a version of the plugin I used. I downgraded my version one step and now it detects everything correctly.

Laravel 5.1 using phpstorm code completion issue

this question may have been asked, but i could not find it so far.
i'm new to laravel (5.1) and phpstorm (v9) and trying a simple controller with a view and route.
I noticed that while typing the code for example:
View::make('someView');
if i ignore the autocomplete (intellisense) and complete the code.
i get a "NotFoundHttpException in RouteCollection.php" error.
But if i apply the suggested autocomplete for example:
Illuminate\Support\Facades\View
it works fine.
May be i've missed some configurations on Laravel or phpstorm or both, may be this issue is in only phpstorm v9. Either ways it sometimes give me a headache, specially as i just started learning.
Btw, even if i've
use Illuminate\Support\Facades\View;
for ever function that i write i still have to apply the autocomplete suggestion.
else i get the same View not found error.
Please let me know if there is a way to fix this.
Thanx
Install barryvdh/laravel-ide-helper package and follow instructions. It will create helper files that will improve you IDE autocomplete for Laravel project.

Ninject 3.0 MVC kernel scan not working

What happened to kernel.Scan in Ninject 3.0?
kernel.Scan(scanner =>
{
scanner.FromAssembliesMatching("LR.Service.*");
scanner.FromAssembliesMatching("LR.Repository.*");
scanner.BindWithDefaultConventions();
}
Get a build error.
'Ninject.IKernel' does not contain a definition for 'Scan' and no extension method 'Scan' accepting a first argument of type 'Ninject.IKernel'
Been banging my head for hours trying to figure out what to change it to.
Have not seen any good site or posts explaining how to fix this simply.
This all was working perfectly fine, some piece of ninject got upgraded. After hours of figuring out why nothing was working. I did not reinstall it(knowingly), not sure what happened, but now I've reinstalled everything to 3.0, figured it woulf be better, now I'm stuck with a lack of any help.
Will be checking out this later. Think this is what i was looking for.
http://sharpfellows.com/post/Ninject-Auto-registration-is-changing-in-version-3.aspx
UPDATE:
See out my other ninject3 question on auto discovery
Ninject 3.0 MVC kernel.bind error Auto Registration
I ran into a very similar issue recently because of some library documentation incorrectly referenced “AutoLoadModules”. I had a hard time finding out this was actually a thing from the past. And half of the accepted answer is now a dead link. So in case this can be useful to someone else…
There has been, with NInject3, several breaking changes around Ninject.Extensions.Conventions.
So if you are looking for AutoLoadModules, IKernel.Scan and the like, tough luck.
Instead, you are now left with only IKernel.Bind extension method:
_kernel = new StandardKernel();
_kernel.Bind(s=> s.FromAssembliesMatching("LR.Service.*", "LR.Repository.*")
.SelectAllClasses()
.BindDefaultInterface());

CodeIgniter 2.1.0 Template Library

Recently CI 2.1.0 is out.
I have a question. As I recognized that the CI folder structure has been 'evolved' (easy to setup, automatically defines base_url,etc), I'm wondering if the current template libraries like Phil's,william's concept,ocular,etc.. can be adapted to this new CI version.
I've tried Phil's but no luck, I mean..I don't know if I'm missing something this time, and ocular, also, to no avail ( I don't subclass the Controller, as suggested here)
Any better templating suggestions that will be suited enough to the latest CodeIgniter 2.1.0?
Thanks.
It seems like from the comments above that you're having trouble finding any resources online on the matter. Here's my suggestion for you:
Check the CodeIgniter Change Log here, and compare all the changes between this newest release, and the release that you know last worked with the template libraries that you've mentioned above. Use deductive reasoning, and see if you can find a way to modify the templates you need to work with the current CodeIgniter structure. I know that's a lot of work, and is not ideal for your situation. Regardless, it's the best advice I can give at the current moment. Good luck, and happy reading!

Please help me setting up codeigniter and phpunit

I have created few simple apps in codeigniter never tested it. Can anyone give me some links or explain how to setup codeigniter with phpunit ? Many thanks
This ciunit fork works well and it is compatible with the latest CI 2.1
https://bitbucket.org/kenjis/my-ciunit
http://www.knollet.com/foostack/

Resources