News for hackers. Stuff that matters.
Re:PHP the Wrong Way by RyanZAG on Friday August 19, 2016 @07:19AM (#12319264)
If its under 50 lines of code for some simple processing, I don't think another developer who comes in would have much trouble. Of course if that 50 lines of code is now 250 because it tries to get around a framework, then instead of finding a PHP developer to help out on the code, you now need a $framework developer.

Basically, don't use a framework unless you really do need all the features it gives you. Don't just pick a framework and try to cram your code into it for the sole purpose of using a framework.

Re:PHP the Wrong Way by spriggan3 on Friday August 19, 2016 @07:28AM (#12319294)
> If its under 50 lines of code for some simple processing

It doesn't matter how much lines you write. It has nothing to do with the number of lines but the functionalities and how many developers review that piece of code. Furthermore more a third party codebase is usually the code you don't have to test. You keep on talking about frameworks like it's a bad thing, but all frameworks are not equal in size nor features.

Re:PHP the Wrong Way by kijin on Friday August 19, 2016 @07:40AM (#12319341)
You still don't need a framework for that. Just use composer to install a bunch of well-tested, feature-rich, but fully independent packages. Start your script with

    include 'vendor/autoload.php';
and add 50 lines of your own code.
Re:PHP the Wrong Way by stephenr on Friday August 19, 2016 @08:16AM (#12319492)
Don't forget to understand how/why/what those other packages do.

Including a package based on the contents of its packagist description alone is basically like reading the ingredients for a pizza and then eating a bag of flour.

Re:PHP the Wrong Way by kijin on Friday August 19, 2016 @09:07AM (#12319677)
It's the same with frameworks. "Modern PHP" frameworks usually include a ton of composer packages.
Re:PHP the Wrong Way by stephenr on Friday August 19, 2016 @09:41AM (#12319865)
So pick a better one.