Don’t compromise stability over a single feature. Just use strictly typed constructor and setters. Mark your PHPDocs so you can go back and apply the types after it is released.
You should look into a producer/consumer messaging pattern, instead of constantly querying the database for new records. The process in charge of writing to the database can also produce a message (into a service bus) that a consumer picks up and performs the desired operation upon receipt. This will help with scalability.
Including Employee.php must be done after $app is declared in index.php
And if you are doing any of this, you are probably approaching the problem the wrong way.
I used Slim on a project with tons of end points and I ran into the same issue. I ended up creating a wrapper class to build the $app and create all the routes.
The route methods call other classes where the application logic is tucked away.
I think slim encourages you to put the routes in the index for clarity.
We maintain server code all the way back since 2002. We ran into a problem with our internal global "Error" class, which did not exist prior to PHP 7 and needed to be renamed or namespaced.
Interesting. I just read a couple of weeks ago a PHP benchmark comparison between foreach vs. for where foreach took over 300% of the time of a for loop.
You can write OpenAPI in JSON
Why not use OpenAPI Specification/Swagger?
Why doesn’t it work?
I use either a Configuration file or a constant defined at runtime. Look up
__DIR__PHPCompatibility for php code sniffer
Don’t compromise stability over a single feature. Just use strictly typed constructor and setters. Mark your PHPDocs so you can go back and apply the types after it is released.
Chastain Park?
That is not the same project.
You should look into a producer/consumer messaging pattern, instead of constantly querying the database for new records. The process in charge of writing to the database can also produce a message (into a service bus) that a consumer picks up and performs the desired operation upon receipt. This will help with scalability.
Did you declare global $app; in Employees.php?
Including Employee.php must be done after $app is declared in index.php
And if you are doing any of this, you are probably approaching the problem the wrong way.
I used Slim on a project with tons of end points and I ran into the same issue. I ended up creating a wrapper class to build the $app and create all the routes.
The route methods call other classes where the application logic is tucked away.
I think slim encourages you to put the routes in the index for clarity.
It's the same base program: IntelliJ IDEA.
I use WebStorm for JavaScript development. Isn't PHPStorm the same program with a PHP plugin?
I'm probably alone here, but I've been using Zend Studio for years.
We maintain server code all the way back since 2002. We ran into a problem with our internal global "Error" class, which did not exist prior to PHP 7 and needed to be renamed or namespaced.
Beautiful.
TIL what a pangram is; and that "The quick brown fox..." is one.
Interesting. I just read a couple of weeks ago a PHP benchmark comparison between foreach vs. for where foreach took over 300% of the time of a for loop.
End of this list.
Back to top