Office building

It’s a weird coincidence, that a running @rc CI4 framework app is out of military power to output a basic its documented resource in API JSON format. What’s more weird, that it is the usual MVC project flow capacitor, denominated for a runtime malfunction errors feasibility loss.

Postman sent basic http://localhost:8080/api/users query URL is returned null HTTP response body, which is unknown in a form of restrictions. Nonetheless, the work is ongoing, whereas the headers look fine:

Hostlocalhost:8080
DateSat, 11 Apr 2020 21:38:45 GMT
Connectionclose
X-Powered-ByPHP/7.2.29
Cache-controlno-store, max-age=0, no-cache
Content-Typeapplication/json; charset=UTF-8
Debugbar-Time1586641125
Debugbar-Linkhttp://localhost:8080/index.php/?debugbar_time=1586641125
Empty HTTP body response normal HTTP response headers – JSON

Code follows:

./builds release
The following files were modified:
 * /home/brilius/solutions/fusionote.site/composer.json
 * /home/brilius/solutions/fusionote.site/app/Config/Paths.php
 * /home/brilius/solutions/fusionote.site/phpunit.xml.dist
Run `composer update` to sync changes with your vendor folder
composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Writing lock file
Generating autoload files
Generated autoload files containing 579 classes

VS Code executed

Executing task: "composer" require codeigniter4/framework --no-cache --no-progress --no-suggest --prefer-stable --verbose -d '/home/brilius/solutions/fusionote.site'

results in

Using version ^4.0 for codeigniter4/framework
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Dependency resolution completed in 0.008 seconds
Analyzed 2162 packages to resolve dependencies
Analyzed 2422 rules to resolve dependencies
Nothing to install or update
Dependency resolution completed in 0.001 seconds
Writing lock file
Generating autoload files
> post-update-cmd: @composer dump-autoload
Generated autoload files containing 579 classes

The same. PHP source complies with the requests:

public function index()
    {
        $this->respond($this->model->findAll());
    }

It’s a usual class of ResourceController, serving User model, nothing special, just the usual stuff. I think CI4 should and could improve its facility state, basing not only on internal developers’ contacts, but also on a daily source of applied economics target developers. Nothing sophisticated, way too easy, basically.

Update

Working (at least body emission solution):

public function index()
    {
        echo $this->respond($this->model->findAll())->getBody();
    }

It’s note perfect, though; moreover, it’s a fragile snippet, because it violates framework constraints, directly responding to SAPI in a controller action, instead of aligning its material to framework installation. Nevertheless, a proof of concept is there, obviously CI4 is not debugged well enough, it’s their major bug, affecting – concerning – the whole API set.

%d bloggers like this: