Skip to content

Releases: projek-xyz/slim-skeleton

Version 0.2.1 released

09 Oct 22:45
Compare
Choose a tag to compare

Update

  • Update CI build configuration.

Version 0.2.0 released

09 Oct 16:33
Compare
Choose a tag to compare

New:

  • Add CLI functionalities built on top of CLImate, see: 85cdfb0.

    Run php app/console from your terminal and you'll see something like this.

    $ php app/console
    PHP Application Skeleton for Slim v3 Microframework
    
    Usage:
    [command] [option]
    
    Optional Arguments:
    -h, --help       Show help message
        --ansi       Force ANSI output
        --no-ansi    Disable ANSI output
        --env[=ENV]  The environment the command should run under
    
    Available Commands:
    migrate   Execute migration data
    greeting  Say hello to the world
    

    The greeting command is default application command that will only print Hello, world! text on your terminal, it's could be remove on app/settings.php and you also could add your command on $settings['commands'].

    The $settings['commands'] will only accept array of string of class name that extends Projek\Slim\Console\Commands class.

  • Add simple Migration, see 78eb65a.

    Could only be executed through CLI via php app/console migrate command. See php app/console migrate --help for information.

    All migrations files are placed under app/data directory with 3 digits number at first followed by string filename separated by dash, e.g.: 001-first-install.php.

    It support .sql or .php migration file. But for .sql migration it could only be installed. The .sql file, simply put your sql script there and that's it. The .php file have to return an array with up, down and table. I've planned to make both extension have same functionality or remove the .sql support instead.

    Rules:

    • up (required) it use when migrate this file.
    • down (optional) it use to revert all changes from up index.
    • table (optional) It simply take string as table name.
    • up and down could have array or Closure as value. If you use Closure it will pass Projek\Slim\Database\Blueprint instance as parameter and bind to Slim\Pdo\Database for conveniences.
    • up and down Closure will need to call Project\Slim\Database\Bluprint::table('table_name') if table index is undefined.
    • down index is required when table index is undefined.

    Examples:

    // array `up` and without `down` index.
    use Projek\Slim\Database\Blueprint;
    
    return [
        'table' => 'dummy',
        'up' => [
            'id' => ['int' => 11, 'primary', 'null' => false, 'auto_increment'],
            'name' => ['varchar' => 100, 'unique', 'null' => false],
            'address' => ['text', 'null' => false],
        ],
    ];
    // closure `up` and without `down` index.
    use Projek\Slim\Database\Blueprint;
    
    return [
        'table' => 'dummy',
        'up' => function (Blueprint $schema) {
            $schema->create([
                'id' => ['int' => 11, 'primary', 'null' => false, 'auto_increment'],
                'name' => ['varchar' => 100, 'null' => false],
                'address' => ['text', 'null' => false],
            ]);
        }
    ];
    // closure `up` and `down` but without `table` index.
    use Projek\Slim\Database\Blueprint;
    
    return [
        'up' => function (Blueprint $schema) {
            $schema->table('dummy')->create([
                'id' => ['int' => 11, 'primary', 'null' => false, 'auto_increment'],
                'name' => ['varchar' => 100, 'null' => false],
                'address' => ['text', 'null' => false],
            ]);
        },
        'down' => function (Blueprint $schema) {
            $schema->table('dummy')->delete();
        }
    ];

    If you need to call view instance somewhere from your application, use app() global helper with Projek\Slim\Database\Migrator string as parameter. e.g: app(Projek\Slim\Database\Migrator::class).

  • Add linter for all scss and js files.

    Added new gulp task: lint:styles and lint:scripts which is required by default on the built:scripts and built:styles. You can found the standards under tests directory, here the .eslint.yml](tests/.eslint.yml) and [here the .scsslint.yml`.

    If you want to run all linters only, execute gulp lint from your terminal.

  • Remove view from container getter.

    Now you can't call view instance from $this-view->render() on Controller class. Instead use method from Projek\Slim\Http\Response::withView(string $viewName, array $data), see HomeController for example.

    If you need to call view instance somewhere from your application, use app() global helper with Projek\Slim\View string as parameter. eg: app(Projek\Slim\View::class).

    NOTE: BREAK BC

  • Remove assets and vendor directory under public directory from VCS.

    Simply install all node dependencies and run gulp from your terminal. All JS, SCSS, Images and Fonts from assets folder will be compiled to public/assets directory, then all your node dependencies defined under package.json at dependencies key will be copied to public/vendor directory.

    If you want to include them on your repo, simply remove .gitignore file at public folder.

Updates:

  • Patch testing.
  • Update directory structures.
  • Fix codeclimate and coveralls integrations.
  • Other minor fixes

v0.1.6 Released

29 Sep 11:36
Compare
Choose a tag to compare

v0.1.6 Released

v0.1.5 Released

29 Sep 11:14
Compare
Choose a tag to compare

v0.1.4 released

v0.1.4 Released

26 Jun 03:10
Compare
Choose a tag to compare
v0.1.4 released

v0.1.3 Released

25 Jun 20:28
Compare
Choose a tag to compare
v0.1.3 released

v0.1.2 Released

30 Nov 01:23
Compare
Choose a tag to compare
v0.1.2 released

v0.1.1 Released

30 Nov 01:23
Compare
Choose a tag to compare
v0.1.1 released

Initial Release

12 Nov 23:51
Compare
Choose a tag to compare
v0.1.0

Initial release