One of the things that bothers me about some cli/console packages is how the commands you write with them end up being tightly coupled to the “framework” the package provides. You extend a command controller, which itself may use service location, and it has to be dispatched to via a specific console mechanism. Your actual command (the business logic) ends up tightly coupled not just to a tool for a… Read More »
Just a quick-hit today regarding Aura while I work on the Modernizing Legacy Applications in PHP book: It’s probably not correct to call Aura.Marshal an object-relational manager. With ORMs proper like Doctrine and Propel, the ORM issues queries for you using an embedded or preferred database library. With Aura.Marshal, you use the data retrieval tools of your choice and write your own queries to retrieve data from a data source.… Read More »
James fuller asks: any thoughts about which layer of the application we should be using a DI container like Aura.Di? Highest layer possible? Twitter is too constrained and ephemeral for a good response, so I’ll answer that question here. First, we need to remember that a Dependency Injection container and a Service Locator are indistinguishable from an implementation perspective. (This is a view I accepted only recently.) The difference is… Read More »
I just updated the Aura v2 libraries to use PSR-4 via Composer instead of their custom autoload.php files, but when I started my integration tests for the Aura.Project_Kernel, I got this error: PHP Fatal error: Call to undefined method Composer\Autoload\ClassLoader::setPsr4() in /Users/pmjones/Code/auraphp/develop-2-projects/Aura.Project_Kernel/cli-project/vendor/composer/autoload_real.php on line 38 Even after a composer self-update the problem remained. It turns out the problem was related to having issued composer global require phpunit/phpunit=3.7.*. The various Composer… Read More »
The Aura.Cli package provides the command-line equivalents of web request and response objects. The Context (request-equivalent) object allows insight into the $_ENV, $_SERVER, and $argv values, along with a Getopt object that lets you build and then parse flags and options passed at the command line. The Stdio (response-equivalent) object provides access to to the standard input/output/error streams. Via .
The Aura.Cli package provides the command-line equivalents of web request and response objects. The Context (request-equivalent) object allows insight into the $_ENV, $_SERVER, and $argv values, along with a Getopt object that lets you build and then parse flags and options passed at the command line. The Stdio (response-equivalent) object provides access to to the standard input/output/error streams. Via http://auraphp.com/blog/2014/01/11/aura-cli-2beta1/.
Wrapping up this week’s “one release a day” series is the 2.0.0-beta1 release of Aura.Sql_Schema. You can download it directly or install via Composer and Packagist. The Aura.Sql_Schema package contains PDO-based tools to read table and column information from a database. If you already use PDO, or if your database abstraction layer of choice uses PDO under the hood, you can feed that PDO object to the Schema object and… Read More »
Our “one release a day” series continues with the 2.0.0-beta1 release of Aura.Web. You can download it directly or install via Composer and Packagist. Whereas the v1 package included controllers, renderers, and other functionality, the v2 package provides only Request and Response objects… You can read more about the distillation of these concerns into separate packages here. As a side note, you can see from the timing of these recent… Read More »
One of the recent problem we can notice is every php framework tries to advertise they are developed from components. … The require-dev dependency is when you want to bind other components. The best way is to get rid of the require-dev. The glue package should be another independent package. … … learn PHP, and not the magic of a framework. Depending upon the dependencies it will be easy to… Read More »
Continuing our string of library package releases, today we have the 2.0.0-beta1 release of Aura.Router. Given a URL path and a copy of $_SERVER, it will extract path-info and $_SERVER values for a specific route. You can download it directly or install via Composer and Packagist. The Aura.Router package does not provide a dispatching mechanism. Your application is expected to take the information provided by the matching route and dispatch… Read More »