Earlier this week, we put the final touches on the “micro/macro” frameworks for v2 web projects and v2 command line projects. Although these had been delayed a bit while working out the Aura.Di v2 beta release, they both now have their first “Google beta” releases! … The idea is that [Aura.Web_Project] starts as a very minimal system, with only router, dispatcher, request, and response functionality. But thanks to the Composer-assisted… Read More »
After a long period of consideration, research, and experiment, we have found a non-static solution for programmatic configuration through a DI container. It is part of a two-stage configuration process, implemented through a ContainerBuilder. The two stages are “define” and “modify”: In the “define” stage, the Config object defines constructor params, setter method values, and services. This is the equivalent of the previous single-stage Solar and Aura v1 configuration system.… Read More »
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 »