Skip to content

Releases

Div PHP Ways 2.5.0

Choose a tag to compare

@github-actions github-actions released this 01 May 17:22
7833363

Release v2.5.0

Date: 2026-05-01

Description

Release focused on preparing Div PHP Ways for a maintained package workflow.
It adds project-specific CI checks, PHPStan configuration, PHPUnit coverage for
core routing behavior, release note generation, and the documentation PDF
pipeline.

Commits

Div PHP Ways 2.4.1

Choose a tag to compare

@rafageist rafageist released this 13 Dec 05:10

New feature: passing controller's properties to rules

<?php
ways::rule('is-admin-section', function($data, $args, $props){
	var_dump($props);
	return $args['section'] === 'admin';
});

Div PHP Ways 2.4.0

Choose a tag to compare

@rafageist rafageist released this 13 Dec 04:53

New feature: passing data and args to rules.

<?php

ways::rule('is-admin-section', function($data, $args){
    return $args['section'] === 'admin';
});

ways::listen("/{section}/login", function(){
    echo "admin login";
}, ['rules' => ['is-admin-section']]);

Div PHP Ways 2.3.4

Choose a tag to compare

@rafageist rafageist released this 24 Aug 04:07

Minor fix

  • fix: rules for default action Run

Div PHP Ways 2.3.3

Choose a tag to compare

@rafageist rafageist released this 04 Aug 23:38

Fix the flow of the data before bootstrap and invoke.

Div PHP Ways 2.3.2

Choose a tag to compare

@rafageist rafageist released this 23 Jul 16:20

Simple release

  • bug fix in rules

Div PHP Ways 2.3.1

Choose a tag to compare

@rafageist rafageist released this 18 Jul 22:48

Urgent release!

  • fix. Fix lost data resulting from "file control points"
  • fix. Other fixes for nested calls of control points
  • fix. Other minor fixes
  • release. Urgent release 2.3.1!
  • new: New method for get current data on the way
<?php

$current_data_on_the_way = ways::getCurrentData();

Div PHP Ways 2.3.0

Choose a tag to compare

@rafageist rafageist released this 18 Jul 16:36

Multi-ways, optimization and fixes

  • improvement: Independent "ways" for invocations:

The execution of the PHP script (CLI or HTTP) have a main "request id" or "thread id", that is named WAY ID. Then each ways::invoke() have their own way id.

<?php

ways::listen("app://config", function(){
    $data['config'] = [1,2,3];
    return $data;
});

$config = ways::invoke("app://config");
echo json_encode($config); // {"track":1,"config":[1,2,3]}

// the second call did not work in 2.2.0 version 
$config = ways::invoke("app://config"); 
echo json_encode($config); // {"track":1,"config":[1,2,3]}
  • fix: Bug fix in nested calls of control points
  • fix: Check if exists methods, before execute an action
  • improvement: * pattern is now for all protocols
<?php

ways::listen("*", function($data){
    $data['track'] = 1;
    return $data;
});

ways::listen("app://config", function(){
    $data['config'] = [1,2,3];
    return $data;
});

$config = ways::invoke("app://config");
echo json_encode($config); // {"track":1,"config":[1,2,3]}

Div PHp Ways 2.2.0

Choose a tag to compare

@rafageist rafageist released this 08 Jul 22:47

Support namespaces

Now divengine\ways detect namespace instruction. You can do this:

<?php

namespace MyApp;

#listen = /
class MyController {
	static function Run() {
	    echo "Hello universe";
	}
}

Div PHP Ways 2.1.0

Choose a tag to compare

@rafageist rafageist released this 06 Jul 06:30

Adding rules!

ways::rule('some-rule', function() {return true or false;});

ways::listen("/secret", function() {...}, [
	ways::PROPERTY_RULES => [
		'some-rule',
		function () {
			return true; // another rule
		}
	] 
]);

In class controllers:

class SomeController {

    #listen@someAction = /some/action
    #rules@someAction = some-rule
    static function someAction() {
         ...
     } 

}