You should be using dependency injection in more places instead of calling app('example'). When you construct a controller, for example, you can put a parameter with a specific type and it will be resolved automatically. Then the IDE will understand too.
Ngrok (the technology behind the "valet share" command) is awesome. It's actually really simple to use and you can accomplish the same sharing with any application/technology that you want to expose online (temporarily, obviously).
I'm glad to see projects like this in PHP. There is still a long road for PHP to have the performance and asynchronous tooling that you have in stacks like node.js, but it's the right direction and important to so it can stay relevant and have longevity.
It's a cool idea, but probably impractical for real production projects. You could also accidentally flood your GitHub issues if you don't have good deduplication.
You should check out bugsnag. It does the same thing but will aggregate the errors/exceptions and tell you how many users it affects, etc. It even still gives you the stack trace.
I'm not sure why you say there isn't time to learn a framework. A framework is documented. If you bake something up yourself, it may be harder to learn for the others or coordinate on.
Alternatively, you should at least take a advantage of some existing modules/components like the symfony http foundation.
As others have mentioned, you might also consider a micro framework like Lumen or Slim.
That's a different issue. It may not know that the view function returns a response. You can try returning view() to a variable and providing a type in a comment block.
/**
* Example
*
* @return Response
*/
public function example()
{
/** @var Response $response */
$response = view('some.example');
return $response;
}
Or they just wanted to hire him to get rights to the artwork. If he did additional work on the ticket design, they would likely own it and could run with it without him after that.
It depends what your goals are. From a traditional business perspective, if you are thinking about frameworks and talking about a brochure site you are on the wrong track. Sure, there is some value to learning a new technology, but learn it while playing with a side-project.
You should be focusing on the requirements on the project and the future maintenance.
Who needs to update it? What is their level of understanding with the web, in general?
Yeah, I'm not looking to completely protect from all SQL injection vectors with library; at least initially.
There are some design decisions to be made, partly just because I allow the developer to pass a WHERE statement of their choice, to allow some flexibility.
The book “pixel logic” has a good breakdown of the different outline styles.
You should be using dependency injection in more places instead of calling app('example'). When you construct a controller, for example, you can put a parameter with a specific type and it will be resolved automatically. Then the IDE will understand too.
Ngrok (the technology behind the "valet share" command) is awesome. It's actually really simple to use and you can accomplish the same sharing with any application/technology that you want to expose online (temporarily, obviously).
I'm glad to see projects like this in PHP. There is still a long road for PHP to have the performance and asynchronous tooling that you have in stacks like node.js, but it's the right direction and important to so it can stay relevant and have longevity.
It's a cool idea, but probably impractical for real production projects. You could also accidentally flood your GitHub issues if you don't have good deduplication.
You should check out bugsnag. It does the same thing but will aggregate the errors/exceptions and tell you how many users it affects, etc. It even still gives you the stack trace.
To be fair, it's supposed to be released this month(-ish) and they are at release candidate 6.
ITT: people who haven't actually read the project page's description of the project.
• it handles more than just HTTP/HTTPS (ex. Web sockets)
• aligns with PSR7
• has some friendly methods that aren't available in PHP
I'm not sure why you say there isn't time to learn a framework. A framework is documented. If you bake something up yourself, it may be harder to learn for the others or coordinate on.
Alternatively, you should at least take a advantage of some existing modules/components like the symfony http foundation.
As others have mentioned, you might also consider a micro framework like Lumen or Slim.
Agreed. Looks great. The tailpipe and the glass are the weakest parts though, IMO.
Oh, if that's the case, he should check out this IDE helper: https://github.com/barryvdh/laravel-ide-helper
That's a different issue. It may not know that the view function returns a response. You can try returning view() to a variable and providing a type in a comment block.
Don't be afraid to check out some books that aren't specifically about PHP. You can learn good design patterns and principles and apply them in PHP.
Or they just wanted to hire him to get rights to the artwork. If he did additional work on the ticket design, they would likely own it and could run with it without him after that.
"Can we find something to go in that space?"
Looks great! Congrats!
I thought of it because that is how I first discovered FIG. I was reading the "Code Style Guide" section.
There is a section called "Code Style Guide". It specifically talks about FIG.
There is also PHP the right way
My thought behind it was in case they wanted to reuse the same handle for additional custom queries (without creating a separate one).
It depends what your goals are. From a traditional business perspective, if you are thinking about frameworks and talking about a brochure site you are on the wrong track. Sure, there is some value to learning a new technology, but learn it while playing with a side-project.
You should be focusing on the requirements on the project and the future maintenance.
It could be done this way:
I could make it so you could do this way as well:
A PITA... Got it.
Thanks for all this feedback, btw.
It was designed with only a single data source in mind.
A PITA?
I'll read up on SOLID.
Here is a taste of how it makes things easier:
Traditional:
$db->query("INSERT INTO `people` SET `x`='y', `a`='b'");$newPersonID = $db->insert_id;$newPerson = $db->query("SELECT * FROM `people` WHERE `id` = '{$newPersonID}'");$newPerson = $newPerson->fetch_object('Person');With Handy:
$newPerson = Person::create(array('x' => 'y','a' => 'b'));Edit: Formatting
Yeah, I'm not looking to completely protect from all SQL injection vectors with library; at least initially.
There are some design decisions to be made, partly just because I allow the developer to pass a WHERE statement of their choice, to allow some flexibility.